This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/18649] New: int_arg() misbehaves on x86[_64] for 32-bit uprobe in binary having debuginfo
- From: "mcermak at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 09 Jul 2015 09:28:56 +0000
- Subject: [Bug tapsets/18649] New: int_arg() misbehaves on x86[_64] for 32-bit uprobe in binary having debuginfo
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18649
Bug ID: 18649
Summary: int_arg() misbehaves on x86[_64] for 32-bit uprobe in
binary having debuginfo
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: tapsets
Assignee: systemtap at sourceware dot org
Reporter: mcermak at redhat dot com
Target Milestone: ---
The int_arg() function doesn't work correctly on i[36]86 and x86_64 when
probing 32-bit userspace application having debuginfo compiled in. Let's have
following program:
=======
int
testfc(int arg)
{
return arg;
}
int
main()
{
testfc(32767);
return 0;
}
=======
and probe it using following stap command:
=======
stap -e 'probe process("a.out").function("testfc") {printf("%x\n",
int_arg(1))}' -c ./a.out
=======
Following example demonstrates int_arg() returning nonsense value when 32-bit
binary having debuginfo is being traced:
=======
7.2 S x86_64 # cat test.c
int
testfc(int arg)
{
return arg;
}
int
main()
{
testfc(32767);
return 0;
}
7.2 S x86_64 # gcc test.c
7.2 S x86_64 # stap -e 'probe process("a.out").function("testfc")
{printf("%x\n", int_arg(1))}' -c ./a.out
7fff
7.2 S x86_64 # gcc -g test.c
7.2 S x86_64 # stap -e 'probe process("a.out").function("testfc")
{printf("%x\n", int_arg(1))}' -c ./a.out
7fff
7.2 S x86_64 # gcc -m32 test.c
7.2 S x86_64 # stap -e 'probe process("a.out").function("testfc")
{printf("%x\n", int_arg(1))}' -c ./a.out
7fff
7.2 S x86_64 # gcc -g -m32 test.c
7.2 S x86_64 # stap -e 'probe process("a.out").function("testfc")
{printf("%x\n", int_arg(1))}' -c ./a.out
804840a
7.2 S x86_64 #
=======
--
You are receiving this mail because:
You are the assignee for the bug.