Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#44442 - [clang] clang generating SSE2 instructions with `-march=i686`
Attached to Project:
Arch Linux
Opened by Félix Faisant (xcodexif) - Friday, 03 April 2015, 06:53 GMT
Last edited by Evangelos Foutras (foutrelis) - Saturday, 04 April 2015, 08:56 GMT
Opened by Félix Faisant (xcodexif) - Friday, 03 April 2015, 06:53 GMT
Last edited by Evangelos Foutras (foutrelis) - Saturday, 04 April 2015, 08:56 GMT
|
DetailsDescription:
When compiling with the flags "-march=i686 -mtune=generic" (default flags in makepkg) or not, and then linking, clang produces SSE2 instructions, then the execution of the output produces a SIGILL. Disass in GDB : 0x08062fdf <+143>: mov %ecx,(%eax) 0x08062fe1 <+145>: call 0x8063250 <std::_Deque_base<optctx::ctxfncts_t, std::allocator<optctx::ctxfncts_t> >::_M_get_Tp_allocator()> => 0x08062fe6 <+150>: movsd -0x28(%ebp),%xmm0 0x08062feb <+155>: movsd -0x20(%ebp),%xmm1 0x08062ff0 <+160>: mov %esp,%ecx Additional info: * package version : I always seen this bug, and switching to GCC resolves the problem |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Saturday, 04 April 2015, 08:56 GMT
Reason for closing: Works for me
Additional comments about closing: Feel free to file a new bug with a minimal test case if the issue can be reliably reproduced.
Saturday, 04 April 2015, 08:56 GMT
Reason for closing: Works for me
Additional comments about closing: Feel free to file a new bug with a minimal test case if the issue can be reliably reproduced.
If it is confirmed, I'll report upstream.
Which clang version were you using before the update? (The 3.6.0-4 release only fixed the shebangs in a couple of Python scripts, so it shouldn't have affected this issue.)
If you can still reproduce the issue, please provide a minimal test case. If it's not happening anymore, we can go ahead and close this task.
Sometimes SSE2 instructions appeared in one of my packages, and, when changing a single line of code (even without a link with the buggy part of the executable), it can disappear, without any apparent reason.
When I discovered the behavior (one year ago), I switched to gcc for all my packages, but one (which uses a clang-only feature). And two days ago, the bug finally appeared on this package too.
So maybe I opened this bug report too early.
I re-switched all my packages to clang, and if it reappears, I'll investigate more deeply and create a test case before opening a bug report.
NB: For linking, I don't use -march=i686. But I think it shouldn't affect anything.