Re:Cap'n'Proto remote vuln: pointer overflow check optimized...
by chrisseaton on Friday April 21, 2017 @04:38AM
(#14163937)
The 70s era bit of this is the thinking that compilers 'sometimes re-write parts' of your program. Really they completely break your entire program down and then build it up from the ground again. Everything would show up as having been rewritten.
[ Parent
| on HN ]
Re:Cap'n'Proto remote vuln: pointer overflow check optimized...
by johncolanduoni on Friday April 21, 2017 @05:45AM
(#14164190)
Most C/C++ compilers support outputting line number information even for optimized code (DWARF for example has a specific mechanism for identifying inlined code in stack traces). That's more than enough location data to provide something useful.
Re:Cap'n'Proto remote vuln: pointer overflow check optimized...
by MaulingMonkey on Friday April 21, 2017 @06:39AM
(#14164380)
Seeing e.g. the original source in the disassembly window is useful. And the same info lets you do things like: https://gcc.godbolt.org/
Taking that information into any sort of "yeah, this still represents the original intent of the author" highlight/lack of highlight/summary as it sounds like azinman2 wants might be a little more difficult. (After all, if you can implement that, why not have your compiler only emit 'sane' code in the first place?)
Re:Cap'n'Proto remote vuln: pointer overflow check optimized...
by rainforest on Friday April 21, 2017 @05:22AM
(#14164113)
In this specific case an IDE could conceivably highlight a check that the compiler will omit, or point at undefined behaviour directly. The general aim is probably unachievable as you suggest - if 3 functions are rewritten to one it'd be hard to point out where the change was applied.