http://bugzilla.opensuse.org/show_bug.cgi?id=1133245 http://bugzilla.opensuse.org/show_bug.cgi?id=1133245#c12 --- Comment #12 from Dr. Werner Fink <werner@suse.com> --- (In reply to Martin Liška from comment #10)
(In reply to Dr. Werner Fink from comment #8)
Hmm ... the transformation might be correcti(?), but how should libsigsegv catch the first segmentation fault (and only this), if the check is moved in the resulting assembler instructions out of the way? Would the volatile attribute for handler_called help here?
I would recommend to use a memory barrier: asm volatile("" ::: "memory");
More informations: https://stackoverflow.com/questions/14950614/working-of-asm-volatile-memory
Btw: IMHO we need an HOWTO for debugging link time optimized programs within gdb. This because with LTO the core dumps from users/customers become rather useless (IMHO).
Ouch .. this is somehow a déjà vu for me as I had in past (15 years back) used memory barriers very often but had been told that this not need anymore with the modern gcc. IMHO it is a bug of the compiler if code is moved in such a way that the logic becomes broken. -- You are receiving this mail because: You are on the CC list for the bug.