Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 959564 - ICC uses ms_abi in its internal library without a thunk causing problems for the unwinder in libgcc
ICC uses ms_abi in its internal library without a thunk causing problems for ...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
Dagmar Prokopová
Depends On:
Blocks: 832743
  Show dependency treegraph
Reported: 2013-05-03 15:49 EDT by Ben Woodard
Modified: 2014-07-01 18:54 EDT (History)
8 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Last Closed: 2013-11-21 06:10:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

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

  None (edit)
Description Ben Woodard 2013-05-03 15:49:04 EDT
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 15:51:02 EDT
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 16:07:23 EDT
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 12:49:34 EDT
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 13:47:01 EDT
Created attachment 752301 [details]
updated patch that includes __builtin_expect
Comment 6 Ben Woodard 2013-05-23 14:11:05 EDT
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 06:39:07 EDT
Verified for gcc-4.4.7-4.el6.x86_64.
Comment 10 errata-xmlrpc 2013-11-21 06:10:40 EST
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.