Bug 959564 - ICC uses ms_abi in its internal library without a thunk causing problems for the unwinder in libgcc
Summary: ICC uses ms_abi in its internal library without a thunk causing problems for ...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc
Version: 6.4
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: Dagmar Prokopová
Depends On:
Blocks: 832743
TreeView+ depends on / blocked
Reported: 2013-05-03 19:49 UTC by Ben Woodard
Modified: 2018-12-04 15:18 UTC (History)
8 users (show)

Fixed In Version: gcc-4.4.7-4.el6
Doc Type: Bug Fix
Doc Text:
Previously, crash might occur when unwinding the stack for a function annotated with __attribute__((ms_abi)). This has been fixed by ignoring unwind data for unknown column numbers so that the crash doesn't occur anymore.
Clone Of:
Last Closed: 2013-11-21 11:10:40 UTC

Attachments (Terms of Use)
patch to do bounds checking on the array (6.46 KB, patch)
2013-05-16 16:49 UTC, Ben Woodard
no flags Details | Diff
updated patch that includes __builtin_expect (6.74 KB, patch)
2013-05-23 17:47 UTC, Ben Woodard
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1609 normal SHIPPED_LIVE gcc bug fix and enhancement update 2013-11-20 21:54:08 UTC
GNU Compiler Collection 49146 None None None Never

Description Ben Woodard 2013-05-03 19:49:04 UTC
Description of problem:
When the unwinder in libgcc comes across a ms_abi call the callee-clobbered registers reference out bounds of the array that stores the callee-clobbered registers causing a segv.

Comment 1 Ben Woodard 2013-05-03 19:51:02 UTC
This bz is intended for collaboration between LLNL, RH, Intel, and Roguewave to resolve the problems associated with the unwinder not being able to handle exception frames that include more than 17 callee-clobbered registers.

Comment 2 Ben Woodard 2013-05-03 20:07:23 UTC
So far this is not considered a GCC or libgcc bug. We currently believe that the problem is due to ICC using MS's abi code inside of their OpenMP library rather than conforming to the ELF ABI. However, investigation and discussion is continuing.

It would be good to involve some people from the Intel compiler team in this discussion.

Comment 4 Ben Woodard 2013-05-16 16:49:34 UTC
Created attachment 748936 [details]
patch to do bounds checking on the array

Once RTH takes this patch or a patch like this on 4.8.N can we please back port this one to our libgcc so that people using the intel compiler don't crash.

The customer is carrying the patch right now and rebuilding gcc but they would very much prefer to have one provided by us. Looking at the way things are working, I don't think that this could be added to DTS.


Comment 5 Ben Woodard 2013-05-23 17:47:01 UTC
Created attachment 752301 [details]
updated patch that includes __builtin_expect

Comment 6 Ben Woodard 2013-05-23 18:11:05 UTC
It looks like RTH committed this to mainline and it will likely be in 4.8.2. Could we please have that patch backported to go into libgcc for rhel6.5 this is really causing a lot of problems for LLNL and so far we have been unable to get Intel to address the issue. 


The patch he posted there is better than the one that I just posted:

"The patch in #8 is better, and indeed has a bug fix relative to this
in that the condition should be <= DWARF_FRAME_REGISTERS.  Note that
the array size is DWARF_FRAME_REGISTERS + 1."

Comment 9 Dagmar Prokopová 2013-08-13 10:39:07 UTC
Verified for gcc-4.4.7-4.el6.x86_64.

Comment 10 errata-xmlrpc 2013-11-21 11:10:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.