| Summary: | xen build problems with -ftree-coalesce-vars with gcc6 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Michael Young <m.a.young> | ||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 24 | CC: | davejohansen, jakub, jwakely, law, m.a.young, mpolacek | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | gcc-6.1.1-2.fc24 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-05-15 14:01:22 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: | |||||
| Attachments: |
|
||||||
|
Description
Michael Young
2016-04-03 19:37:29 UTC
Can you find out which object file is problematic (do a binary search between objects compiled with -O0 and normal option set (or -fno-tree-coalesce-vars and normal options))? Then see if -fno-inline still reproduces it, or if inlining is needed for the problem reproduction? Then one can use __attribute__((optimize (0))) on selected functions to find the problematic function. Created attachment 1144907 [details]
file with the compile issue
I traced the compile issue to the xen/arch/x86/usercopy.c in the xen-4.6.1 code, which shows the failure on the __copy_to_user_ and __copy_from_user_ll functions. I have attached the result of running cpp on the usercopy.c file.
What gcc options are used to compile this file? When building xen the standard build line is gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -DNDEBUG -I/home/michael/xen/xen-4.6.1/xen/include -I/home/michael/xen/xen-4.6.1/xen/include/asm-x86/mach-generic -I/home/michael/xen/xen-4.6.1/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX -DHAVE_GAS_EPT -DHAVE_GAS_FSGSBASE -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include /home/michael/xen/xen-4.6.1/xen/include/xen/config.h -nostdinc -DCONFIG_SHADOW_PAGING -DHAS_ACPI -DHAS_GDBSX -DHAS_PASSTHROUGH -DHAS_MEM_ACCESS -DHAS_MEM_PAGING -DHAS_MEM_SHARING -DHAS_PCI -DHAS_IOPORTS -DHAS_PDX -MMD -MF .usercopy.o.d -c usercopy.c -o usercopy.o which results in a xen hypervisor which crashes. The build with -fno-tree-coalesce-vars added after -O2 works. Thanks, tracking this upstream: PR70593 Now gcc-6.1.1-2.fc24 has made the build repositories, I have tried building xen without adding -fno-tree-coalesce-vars and the resulting hypervisor boots successfully, so I consider this bug fixed. |