Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 439432 (PR52445)

Summary: sys-devel/gcc-4.6.3 - conditional store replacement causes segfault in generated code
Product: Gentoo Linux Reporter: Steev Klimaszewski (RETIRED) <steev>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: arm
Priority: Normal    
Version: unspecified   
Hardware: ARM   
OS: Linux   
URL: http://gcc.gnu.org/PR52445
See Also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52445
Whiteboard:
Package list:
Runtime testing required: ---

Description Steev Klimaszewski (RETIRED) gentoo-dev 2012-10-23 18:14:21 UTC
(From upstream bug report)
The cond_store_replacement() optimization can move a memory access outside of a
conditional statement that checks whether it is safe to access the memory. 
This can cause the program to segfault.

(Last comment in upstream bug report)
A recently reported miscompilation
of a device driver in the Linux/ARM kernel by gcc-4.6.3 was traced to this bug.
 Applying the trunk patch to 4.6.3 fixed that test case.

Reproducible: Always




This patch has been applied upstream to the 4.7 series.  I'd like it if we could apply it to 4.6.  It's been requested in the bug to be applied for a 4.6.4 release, and I'm running it locally here and it does indeed fix the issue.