dbx: Unable to run with memory checking enabled

When I try to debug any program using memory checking, I get the following error:

RTC: Enabling Error Checking...

t@1 (l@1) signal SEGV (no mapping at the fault address ) in __rtc_mutex_unlock at 0xfffffd7ff3534949

0xfffffd7ff3534949: __rtc_mutex_unlock+0x0159: call *%r8d

dbx: Stopped within call to '__rtc_suppress_always'. Starting new command interpreter

Versions:

Solaris: SunOS 5.10 Generic_118844-20 ( amd64 )

CC: Sun C++ 5.8 Patch 121018-02 2006/04/08

dbx: 7.5 Patch 12166-02 2006/05/30

[551 byte] By [knickerbockerd] at [2007-11-26 10:23:08]
# 1
What happens when you run the program not under dbx, or under dbx without RTC?That is, does the SEGV occur only when you run under dbx with RTC enabled?
clamage45 at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Yes...The SEGV only occurs running under dbx with RTC enabled. If I disable RTC or run outside dbx, the program runs fine.
knickerbockerd at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
If try to debug a generic binary, say /usr/bin/ls, RTC works fine.I'm only using -xtarget=opteron -xarch=amd64 and -g as my compile options. Is there something I'm missing?
knickerbockerd at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

I've found a simple test case that highlights my problem...

hello.cc

#include <stdio.h>

int

main()

{

printf("Hello World\n");

return( 0 );

}

Works!

CC -v =xarch=amd64 hello.cc -o hello

Does not work!

CC -v -xarch=amd64 -mt hello.cc -o hello

knickerbockerd at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
This segv problem (bug 6431531) has been fixed in SunStudio Express 2. SSX2 can be downloaded from: http://developers.sun.com/prodtech/cc/downloads/express.jsp
janitor at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6
Is there a workaround for this bug ( 6431531 )? I'm pretty much stuck with the versions I listed above until SUN provides an offical patch.Message was edited by: knickerbockerd
knickerbockerd at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 7
Sorry, there is no workaround. I can backport the fix to dbx 7.5 and email you the binary for bug fix verification purpose.
janitor at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 8
Thank you for the offer...but I work in an environment where I can only use officially patched software.Do you know when a patch might be released?Is this a 64-bit only problem?
knickerbockerd at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 9
This is an amd64 specific bug. Please escalate bugid 6431531 in order to get an official patch. Sorry, I don't know when the patch will be available.
janitor at 2007-7-7 2:24:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...