Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1309225
Summary: | gcc6 miscompiles lzo on ppc64le when -O2 is used: 'internal error - lzo_init() failed !!! | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Karsten Hopp <karsten> |
Component: | lzo | Assignee: | Huzaifa S. Sidhpurwala <huzaifas> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 24 | CC: | davejohansen, hannsj_uhl, huzaifas, jakub, jskarvad, jwakely, law, mpolacek, pbrobinson, steve, than |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | ppc64le | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lzo-2.08-8.fc24 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-06-10 14:06:29 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1071880, 1051573 |
Description
Karsten Hopp
2016-02-17 09:30:45 UTC
build succeeds with -O2 -fno-strict-aliasing That usually points to a bug in the program, not in the compiler. Does -Wstrict-aliasing warn on something? (This warning has multiple levels, you might want to try e.g. -Wstrict-aliasing=2.) The build log is full of aliasing warnings everywhere; the lzo_funcs.h seems very much obfuscated, but the important change on the GCC side is that since http://gcc.gnu.org/PR66110 fix char/unsigned char/signed char fields in structs are no longer considered to alias everything, while lzo clearly assumes that. Thus, something like: --- include/lzo/lzodefs.h.jj 2014-06-29 11:38:49.000000000 +0200 +++ include/lzo/lzodefs.h 2016-02-18 15:26:47.952064501 +0100 @@ -1686,6 +1686,10 @@ extern "C" { # define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); #endif #endif +#if (LZO_CC_GNUC >= 0x060000ul) && defined(__lzo_byte_struct_ma) +# undef __lzo_byte_struct +# define __lzo_byte_struct(s,n) __lzo_byte_struct_ma(s,n) +#endif #if defined(__lzo_byte_struct) && !defined(__lzo_byte_struct_ma) # define __lzo_byte_struct_ma(s,n) __lzo_byte_struct(s,n) #endif fixes both the warnings and the testcase crash for me. This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase it's fixed in lzo-2.08-8.fc24 |