Obscure crashes due to gcc 4.9 -O2 => -fisolate-erroneous-paths-dereference

Manuel López-Ibáñez lopezibanez@gmail.com
Fri Feb 27 22:13:00 GMT 2015

On 02/19/15 14:56, Chris Johns wrote:
> My main concern is not knowing the trap has been added to the code. If I
> could build an application and audit it somehow then I can manage it. We
> have a similar issue with the possible use of FP registers being used in
> general code (ISR save/restore trade off).
> Can the ELF be annotated in some GCC specific way that makes it to the
> final executable to flag this is happening ? We can then create tools to
> audit the executables.

Simply ignore me if I'm misunderstanding the issue: Couldn't GCC
generate, instead of a trap, a call to a noinline noreturn cold weak
function __gcc_is_a_trap that by default calls the trap? Then, audit
tools can inspect the code and see if such a function call appears and
even override it with something else.

Chris, wouldn't that be enough for your purposes?



More information about the Gcc mailing list