Bug 1422456 - Optimisation generates incorrect code on armv7hl
Summary: Optimisation generates incorrect code on armv7hl
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Wakely
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-15 11:35 UTC by Tom Hughes
Modified: 2017-07-01 11:07 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-01 11:07:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test case (1.30 KB, text/x-csrc)
2017-02-15 11:35 UTC, Tom Hughes
no flags Details
Compressed preprocessed source for test case (573.79 KB, application/x-gzip)
2017-02-15 11:36 UTC, Tom Hughes
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 79671 0 None None None 2019-03-03 12:53:02 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.