Bug 1686696 - gcc, s390x: -fcode-hoisting error
Summary: gcc, s390x: -fcode-hoisting error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: s390x
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-08 03:14 UTC by Jerry James
Modified: 2019-03-29 19:14 UTC (History)
10 users (show)

Fixed In Version: gcc-9.0.1-0.10.fc30
Clone Of:
Environment:
Last Closed: 2019-03-29 19:14:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reduced test case from gmp-ecm (3.40 KB, text/x-csrc)
2019-03-08 03:14 UTC, Jerry James
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 89634 0 None None None 2019-03-22 21:15:41 UTC

Description Jerry James 2019-03-08 03:14:59 UTC
Created attachment 1542027 [details]
Reduced test case from gmp-ecm

Description of problem:
The gmp-ecm package failed the mass rebuild, on s390x only.  I will attach a reduced version of the failing test.  When built with "gcc -O2 -Wall -Wextra -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations", the code segfaults due to walking off the end of an allocated block of memory.  Libusan is unavailable on s390x, so I cannot check with -fsanitize=undefined, but on x86_64 the sanitizer gives no errors.

When built with "gcc -O2 -fno-code-hoisting", the code does not segfault, and neither valgrind nor the address sanitizer shows any errors.

Version-Release number of selected component (if applicable):
gcc-9.0.1-0.4.fc30.s390x

How reproducible:
Always

Steps to Reproduce:
1. Build the attached code with -O2
2.
3.

Actual results:
The code segfaults unless -fno-code-hoisting is also given.

Expected results:
No segfault.

Additional info:

Comment 1 Jakub Jelinek 2019-03-08 09:47:35 UTC
This seems to be fixed with upstream http://gcc.gnu.org/r269302 aka http://gcc.gnu.org/PR89497 fix.

Comment 2 Jerry James 2019-03-08 22:52:26 UTC
Great!  Thank you, Jakub.

Comment 3 Fedora Update System 2019-03-13 09:42:22 UTC
gcc-9.0.1-0.10.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-833ad0f15b

Comment 4 Fedora Update System 2019-03-13 15:36:55 UTC
gcc-9.0.1-0.10.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-833ad0f15b

Comment 5 Fedora Update System 2019-03-29 19:14:42 UTC
gcc-9.0.1-0.10.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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