public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/6979] New: using $$parms under uprobe probes might result in a uninitialized variable access.
@ 2008-10-24  8:23 srikar at linux dot vnet dot ibm dot com
  2009-02-03  6:21 ` [Bug translator/6979] " wenji dot huang at oracle dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: srikar at linux dot vnet dot ibm dot com @ 2008-10-24  8:23 UTC (permalink / raw)
  To: systemtap

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2661 bytes --]

$$parms fails seems to fail under a particular test.

$ sudo stap -k -v -v -v allfuncs.stp -c "./git-1.5.4/git clone git.systemtap
/tmp/systemtap"
where  allfuncs.stp  is
-------------------------------------------------------------------------------------
probe process("/home/srikar/git-1.5.4/git").function("*").call
{
        printf ("%s \n", $$parms);

}
--------------------------------------------------------------------------------
gives 
.....
cc1: warnings being treated as errors
/tmp/stapxK2Ynm/stap_18137.c: In function ‘probe_1683’:
/tmp/stapxK2Ynm/stap_18137.c:10419: warning: ‘s0’ is used uninitialized in this
function
make[1]: *** [/tmp/stapxK2Ynm/stap_18137.o] Error 1
make: *** [_module_/tmp/stapxK2Ynm] Error 2
make: Leaving directory `/home/srikar/work/linux-2.6.23'
Pass 4: compiled C into "stap_18137.ko" in 36650usr/1710sys/37410real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.
Keeping temporary directory "/tmp/stapxK2Ynm"
$


code at /tmp/stapxK2Ynm/stap_18137.c:10419  looks like this


10415     { int32_t value = deref (4, addr);u.pieces.p0 = value; }
10416     { // DWARF expression: 0x51
10417       {
10418         intptr_t s0;
10419         addr = s0;
10420       }
10421     }
10422     { int32_t value = deref (4, addr);u.pieces.p4 = value; }
10423     THIS->__retvalue = u.whole;
10424   }

It looks we are trying to assign uninitialized ptr s0 to addr;

some information about probe_1683:

60563   { .finder = { .pathname="/home/srikar/git-1.5.4/git", },
.address=0x80763a2UL, .pp="process(\"/home/srikar/git-1.5.4/git\").          
function(\"find_packed_object@/home/srikar/git-1.5.4/builtin-pack-objects.c:213\").call",
.ph=&probe_1683, },

 1386     struct probe_1683_locals {
 1387       string_t __tmp0;
 1388       int64_t __tmp1;
 1389       int64_t __tmp2;
 1390       string_t __tmp3;
 1391     } probe_1683;

probe_1683 corresponds to 
static struct revindex_entry * find_packed_object(struct packed_git *p,
                                                   off_t ofs)

-- 
           Summary: using $$parms under uprobe probes might result in a
                    uninitialized variable access.
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: srikar at linux dot vnet dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6979

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-11-18 18:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-24  8:23 [Bug translator/6979] New: using $$parms under uprobe probes might result in a uninitialized variable access srikar at linux dot vnet dot ibm dot com
2009-02-03  6:21 ` [Bug translator/6979] " wenji dot huang at oracle dot com
2009-02-03 14:07 ` wenji dot huang at oracle dot com
2009-02-03 19:42 ` fche at redhat dot com
2009-02-04  3:11 ` wenji dot huang at oracle dot com
2009-02-04  5:56 ` wenji dot huang at oracle dot com
2009-02-04 11:34 ` wenji dot huang at oracle dot com
2009-02-04 17:08 ` fche at redhat dot com
2009-02-05 14:55 ` wenji dot huang at oracle dot com
2009-02-05 21:05 ` fche at redhat dot com
2009-02-20 14:24 ` fche at redhat dot com
2009-06-11 12:31 ` srikar at linux dot vnet dot ibm dot com
2009-11-11 14:35 ` fche at redhat dot com
2009-11-11 20:21 ` roland at gnu dot org
2009-11-18 17:32 ` fche at redhat dot com
2009-11-18 18:29 ` [Bug translator/6979] loc2c code generation error, uninitialized variable access, mishandling of multiple-piece $target vars fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).