This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/2156] check return value for _stp_pmap_agg()
- From: "hunt at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 18 Jan 2006 18:06:11 -0000
- Subject: [Bug translator/2156] check return value for _stp_pmap_agg()
- References: <20060116083509.2156.hunt@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From hunt at redhat dot com 2006-01-18 18:06 -------
Looking at the latest generated code, it does this
if (unlikely(NULL == _stp_pmap_agg (global_foo)))
c->last_error = "unknown error while aggregating global_foo";
write_unlock (& global_foo_lock);
post_unlock_3: ;
read_lock (& global_foo_lock);
l->__tmp19 = _stp_map_start (_stp_pmap_get_agg(global_foo));
[...]
_stp_pmap_agg() will return NULL if the map pointer is invalid, the map type in
unknown, or it overflows. The first two should be impossible with code from the
translator, so I suggest changing the error message to indicate an overflow
happened and suggest the map size needs increased.
_stp_pmap_get_agg() always returns a valid pointer but in the case above the
aggragated map will not be complete. So printing it anyway is safe, but
potentially misleading.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2156
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.