This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/2497] STP_STRING_SIZE set by stap is too small
- From: "guij at cn dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 4 Apr 2006 02:08:19 -0000
- Subject: [Bug runtime/2497] STP_STRING_SIZE set by stap is too small
- References: <20060330093952.2497.guanglei@cn.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From guij at cn dot ibm dot com 2006-04-04 02:08 -------
(In reply to comment #9)
> But aren't there just two possibilities?
> 1. You print the backtrace.
> 2. You get the backtrace in a string and save it in an array.
>
> For #1, you use print_backtrace. For #2, you need to have all strings be
> larger, as it is done now.
>
> In your example above, you would just write something like this in
> script:
>
> bin_write("%1b%4b%1b%ld%4b%4b", cmd->device->sdev_state, [...])
> print_backtrace()
>
I think _lket_trace() is more like:
bin_write("%n%1b%4b%1b%ld%4b%4b%s",this_event_len(), cmd->device->sdev_state,
[...], _stp_string_ptr(str))
The total length of the trace record (including backtrace string) is to be
calculated and filled by bin_write(), thus only #2 can work.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2497
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.