Bug 1058991
| Summary: | gcc PCH bug causes segfaults on aarch64 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Brendan Conoboy <blc> | ||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | jakub, jcm, kmcmartin, law, msalter, pbrobinson | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | gcc-4.8.2-14.fc21 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-02-04 15:39:28 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: | 922257 | ||||||
| Attachments: |
|
||||||
|
Description
Brendan Conoboy
2014-01-28 23:14:28 UTC
First of all, that looks like a kernel bug, what normal process doesn't shouldn't result in such messages. Second, supposedly aarch64 should add it's own define to gcc/config/host-linux.c, but you really want to file/discuss this upstream, I have no idea what address would be appropriate for that, no idea what the memory layout on aarch64 is etc. If it is added upstream, I can consider backporting it. The kernel message is just the result of the SIGSEGV... it means we had a valid translation for the vaddr through two levels of the page table, but not the third... It'll probably not generate such descriptive fault messages in production when print-fatal-signals is off, but since it's such a new port, such messages are a bit instructive. In any event, thanks for the hint at looking at host-linux.c, I think I've got a theory as to why this is occuring as a result of it! Created attachment 857311 [details] define TRY_EMPTY_VM_SPACE on aarch64 http://gcc.gnu.org/bugzilla//show_bug.cgi?id=45979 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940 looks like the same issue as in these PRs... I've attached a ``fix''. It looks like PCH is basically relying on our mmap being effectively a MAP_FIXED and the address being unused... on AArch64, we're mapping executables at 4MB, so the attempt to mmap at 0 would fail for two reasons (we also disallow mmap to the first page or so CONFIG_MMAP_MIN_ADDR.) Anyway, things look hunky dory in my testing when using 0x100000000 as X86_64 and others do. http://gcc.gnu.org/ml/gcc-patches/2014-01/msg02096.html http://gcc.gnu.org/bugzilla//show_bug.cgi?id=60010 upstream submission. Now patched locally and sent upstream |