Bug 11364 - cxxclass.exp fails with latest std.h and g++ (Red Hat 4.4.3-4)
Summary: cxxclass.exp fails with latest std.h and g++ (Red Hat 4.4.3-4)
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 20:00 UTC by Mark Wielaard
Modified: 2010-03-17 15:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2010-03-09 20:00:38 UTC
After this commit:

commit f43a495397a431683f2b5ee8ad827f77b82f5f09
Author: Stan Cox <scox@redhat.com>
Date:   Tue Mar 9 10:50:14 2010 -0500

    Only use volatile for sdt.h arguments when needed.
    
    sdt.h (VOLATILE_ARG): gcc 4.4.3 support for inline asm
    argument debug info means volatile is not needed.

The following testcase started failing:

Running /home/mark/systemtap/testsuite/systemtap.base/cxxclass.exp ...
FAIL: cxxclass

		=== systemtap Summary ===

# of expected passes		1
# of unexpected failures	1

Running /home/mark/systemtap/testsuite/systemtap.base/cxxclass.exp ...
Executing on host: g++
/home/mark/systemtap/testsuite/systemtap.base/cxxclass.cxx  -g -O2
-I/home/mark/systemtap/testsuite/../includes  -lm   -o cxxclass.exe    (timeout
= 300)
PASS: cxxclass.c compile
executing: stap /home/mark/systemtap/testsuite/systemtap.base/cxxclass.stp
cxxclass.exe -c ./cxxclass.exe
FAIL: cxxclass
line 1: expected "main_enter"
Got "semantic error: failed to retrieve location attribute for local 'arg3'
(dieoffset: 0x599): identifier '$arg3' at
/home/mark/systemtap/testsuite/systemtap.base/cxxclass.stp:28:57"

This is on fedora 12 x86_64 with g++ (GCC) 4.4.3 20100127 (Red Hat 4.4.3-4)
Comment 1 Mark Wielaard 2010-03-10 09:31:33 UTC
This commit makes things work again:

commit 985adad37f66be2b1796641360296b7632c7f290
Author: Stan Cox <scox@redhat.com>
Date:   Tue Mar 9 17:40:04 2010 -0500

    Include __GNUC_RH_RELEASE__ in the volatile check.
    
    sdt.h (GNUC_VERSION) Include __GNUC_RH_RELEASE__.  Check for at least gcc 4.4.4

Do you happen to know which 4.4.4 commit made it work, that isn't in 4.4.3?
(I even tried the fedora 12 4.4.3-8 version, which still fails if the above
check is "downgraded").
Comment 2 Mark Wielaard 2010-03-10 09:49:38 UTC
Also tried with g++ (GCC) 4.4.3 20100309 (Red Hat 4.4.3-9) which also still fails.
We really should try to figure out what 4.4.4 patch does make this work.
Comment 3 Mark Wielaard 2010-03-10 09:59:44 UTC
BTW. The test/guard is: #if GNUC_VERSION >= 4040400 && ! defined VOLATILE

What about a program that might be using VOLATILE as define already?
Can't we use something a bit less likely to be used?
Comment 4 Mark Wielaard 2010-03-11 21:27:38 UTC
See also: https://bugzilla.redhat.com/show_bug.cgi?id=572260
"missing debuginfo for inline asm arg in c++ method"
Comment 5 Mark Wielaard 2010-03-11 21:31:37 UTC
Upstream gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43329
"Early inlining causes suboptimal debug info"
Comment 6 Mark Wielaard 2010-03-17 15:24:23 UTC
commit 6ccb243c59eff3ac89072b112414c50d6ef6cf3b
Author: Mark Wielaard <mjw@redhat.com>
Date:   Wed Mar 17 15:41:02 2010 +0100

    PR11364 sdt.h volatile for args isn't needed with gcc 4.5 or rh 4.4.3-10+