From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16399 invoked by alias); 9 Jul 2015 09:29:01 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 15961 invoked by uid 48); 9 Jul 2015 09:28:57 -0000 From: "mcermak at redhat dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/18649] New: int_arg() misbehaves on x86[_64] for 32-bit uprobe in binary having debuginfo Date: Thu, 09 Jul 2015 09:29:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mcermak at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q3/txt/msg00019.txt.bz2 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.