Bug 911307
| Summary: | gcc-4.8.0-0.{8,10,12} fail to build latest glibc, causing segfaults | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Karsten Hopp <karsten> | ||||||
| Component: | glibc | Assignee: | Carlos O'Donell <codonell> | ||||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | rawhide | CC: | bbaude, codonell, fweimer, jakub, law, pfrankli, schwab, spoyarek | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | powerpc | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2013-02-28 12:23:27 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
Karsten Hopp
2013-02-14 17:13:06 UTC
Created attachment 697287 [details]
root log
This sounds like something that needs to be fixed on the glibc side, at least my understanding of the bug. gcc 4.8 now has -ftree-loop-distribute-patterns by default for -O3, which is undesirable if one compiles with it the
implementation of memset or memcpy if they are not implemented in assembly.
So, I think glibc should check in configure whether -fno-tree-loop-distribute-patterns option is accepted, and if yes, add it to CFLAGS for {,rtld-}mem{set,cpy,pcpy}.o* at least or perhaps for all functions in string/ subdir, whatever. At least, that is what I saw in the backtrace (endless recursion in the dynamic linker's memset).
Jakub, Yes, we need to fix this in glibc. We should disable the optimization for all of elf/ and string/ where it could cause infinite recursion matching patterns on the function it itself wants to call. If the list of detected patterns changes then glibc needs to be updated, so we should keep clear the channels of communication. My preference would be that gcc clearly documents which functions might be called by the optimization that way other developers implementing their own runtimes can adjust accordingly. Comments on enhancing gcc documentation? Raised with upstream to discuss acceptable solution: http://sourceware.org/ml/libc-alpha/2013-02/msg00299.html Hi Carlos, I believe Steve Munroe responded directly to you after your upstream post. Thoughts? Baude, Yes, Steve Munroe did respond directly to me indicating that it should be OK for elf/ and string/ to be excluded from this optimization. I'm working through a solution to this for today and I'll work to get it into rawhide. Patch done. Tested, and verified. Posting upstream. Found a an issues relating to old compilers, adding some checks. I have a rawhide patch that works with gcc 4.6.0 and newer, and will be committing this once my local builds complete. The upstream patch will require a little more work and I don't want to block the rawhide builds any longer. Verified that I can build the patched glibc with gcc 4.8.0 without any problems. Verified that there were no testsuite regressions on x86_64.
Fix checked into rawhide...
---
commit 6cfdaac5b6b98b0810253d20e3cb4e069f432ec6
Author: Carlos O'Donell <carlos>
Date: Wed Feb 27 19:48:51 2013 -0500
2.17-3
- Renamed release engineering directory to `releng' (#903754).
- Fix building with gcc 4.8.0 (#911307).
---
... and build started:
http://koji.fedoraproject.org/koji/taskinfo?taskID=5062864
I'll wait for koji builds to complete before marking this as fixed, but my local and mockbuild didn't fail so I don't expect any surprises.
Previously submittted koji builds failed for some odd reason. Resubmitted builds worked fine. http://koji.fedoraproject.org/koji/taskinfo?taskID=5063196 I'm marking this CLOSED / RAWHIDE. |