public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/11097] debug memory tracker shows memory overwrite in MAXNESTING
  2009-12-16 15:26 [Bug translator/11097] New: debug memory tracker shows memory overwrite in MAXNESTING dsmith at redhat dot com
@ 2009-12-16 15:26 ` dsmith at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: dsmith at redhat dot com @ 2009-12-16 15:26 UTC (permalink / raw)
  To: systemtap



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |dsmith at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


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

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

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

* [Bug translator/11097] New: debug memory tracker shows memory overwrite in MAXNESTING
@ 2009-12-16 15:26 dsmith at redhat dot com
  2009-12-16 15:26 ` [Bug translator/11097] " dsmith at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dsmith at redhat dot com @ 2009-12-16 15:26 UTC (permalink / raw)
  To: systemtap

After getting the debug memory tracker (activated with -DDEBUG_MEM) going again,
it found a problem with the following testcase (part of
src/testsuite/systemtap.base/control_limits.exp):

====
# stap -u -DMAXNESTING=3 ../src/testsuite/systemtap.base/control_limits.stp
ERROR: MAXNESTING exceeded near identifier 'recurse' at
../src/testsuite/systemtap.base/control_limits.stp:3:10
WARNING: Number of errors: 1, skipped probes: 0
====

Note that the above testcase is designed to fail, so the error printed there is OK.

When run, the debug memory tracker uses printk to print the following on the
console:

====
Dec 15 17:02:02 kvm-rawhide-64-1 kernel: SYSTEMTAP ERROR: Memory fence corrupted
after allocated memory
Dec 15 17:02:02 kvm-rawhide-64-1 kernel: at addr ffff88003e476698. (Allocation
ends at ffff88003e476697)
====

Since the memory fence (a small bit of memory placed after every allocation) has
been overwritten, this means systemtap is writing past the end of the allocated
memory.

After a bit of debugging, this appears to be happening to the allocated context
structure.

-- 
           Summary: debug memory tracker shows memory overwrite in
                    MAXNESTING
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: dsmith at redhat dot com


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

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

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

end of thread, other threads:[~2009-12-16 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-16 15:26 [Bug translator/11097] New: debug memory tracker shows memory overwrite in MAXNESTING dsmith at redhat dot com
2009-12-16 15:26 ` [Bug translator/11097] " dsmith 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).