Bug 1422456

Summary: Optimisation generates incorrect code on armv7hl
Product: [Fedora] Fedora Reporter: Tom Hughes <tom>
Component: boostAssignee: Jonathan Wakely <jwakely>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dakingun, davejohansen, denis.arnaud_fedora, jakub, jwakely, law, me, mpolacek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-01 11:07:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Test case
none
Compressed preprocessed source for test case none

Description Tom Hughes 2017-02-15 11:35:51 UTC
Created attachment 1250551 [details]
Test case

I have a package (mapnik) that is failing some tests on armv7hl since the switch to gcc 7 in rawhide while still passing on all other platforms.

I have extracted the relevant code and narrowed it down as best I can but unfortunately as it involves a boost::spirit parser the 50 lines of source expands to about 6Mb of preprocessed source :-(

Test case and preprocessed source are attached - the resulting code should not assert when run but will on armv7hl if compiled with both -O2 and -fstack-protector-strong options.

Bisecting the optimisation flags has narrowed it down to the -ftree-pre option, so this produces failing code:

  g++ -Wall -std=c++11 -O2 -fstack-protector-strong

while this produces working code:

  g++ -Wall -std=c++11 -O2 -fno-tree-pre -fstack-protector-strong

Comment 1 Tom Hughes 2017-02-15 11:36:41 UTC
Created attachment 1250552 [details]
Compressed preprocessed source for test case

Comment 2 Jakub Jelinek 2017-02-21 18:28:07 UTC
This changed with http://gcc.gnu.org/r235622 aka http://gcc.gnu.org/PR13962 fix.
Unfortunately the source is way too large and that optimization makes a lot of changes in the huge source.

Comment 3 Fedora End Of Life 2017-02-28 11:18:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 4 Jakub Jelinek 2017-03-01 20:37:20 UTC
This is actually a boost bug, see the upstream PR for details.

Comment 5 Jonathan Wakely 2017-04-06 10:16:35 UTC
I've patched boost in rawhide to workaround this. Not in f26 yet.

Comment 6 Jonathan Wakely 2017-07-01 11:07:39 UTC
This got fixed by a change in gcc-7 instead, so I'm going to close this and remove the patch from rawhide's boost.spec, as it's no longer needed.