This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/4592] New: access to $bio ioblock.request probe in ioblock.stp fails


When running the  systemtap.samples/ioblocktest.stp, the test fails when
running. It appears to make in invalid access through a pointer.



stap
/home/wcohen/stap_snap_200706041620/src/testsuite/systemtap.samples/ioblocktest.stp
systemtap starting probe
ERROR: pointer dereference fault near identifier '$bio' at
/home/wcohen/stap_snap_200706041620/install/share/systemtap/tapset/ioblock.stp:115:33
WARNING: Number of errors: 1, skipped probes: 0

Looking through the ioblock.stp the section of code in question is:

probe ioblock.request = kernel.function ("generic_make_request")
{
        devname = __bio_devname($bio) //problem here
        ino = __bio_ino($bio)
...

The __bio_devname function is the following (noticed the line with the "FIXME":

/* returns the block device name */
function __bio_devname:string(bio:long)
%{
    char b[BDEVNAME_SIZE];
    struct bio *bio = (struct bio *)(long)THIS->bio;
    struct block_device *bdev = kread(&(bio->bi_bdev));
	if (bdev == NULL) {
		strlcpy(THIS->__retvalue, "N/A", MAXSTRINGLEN);
	} else {
		const char *name = bdevname(bdev, b); /* FIXME: deref hazard! */
		deref_string(THIS->__retvalue, name, MAXSTRINGLEN);
	}
	CATCH_DEREF_FAULT();
%}

-- 
           Summary: access to $bio ioblock.request probe in ioblock.stp
                    fails
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: wcohen at redhat dot com
  GCC host triplet: ia64


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]