[RFC PATCH] Fix segmentation fault of listing kprocess.create
Frank Ch. Eigler
fche@redhat.com
Thu Nov 5 14:12:00 GMT 2009
"Wenji Huang" <wenji.huang@oracle.com> writes:
>> Please ignore the previous patch, the root cause is the
>> following section tapsets.cxx: dwarf_derived_probe::saveargs
Indeed.
>> /* trick from visit_target_symbol_context */
>> target_symbol *tsym = new target_symbol;
>> token *t = new token;
>> tsym->tok = t;
>> tsym->base_name = "$";
>> tsym->base_name += arg_name;
Right, such an empty token should not exist. (We may be able to
remove this default constructor and force clients to fill in the
fields immediately.)
When synthesizing new parse tree structures, the token pointer
assigned to the new objects usually relates to the original
script-level object that caused the synthesis. So for example in a
return probe that uses a saved entry-time $var, a whole new synthetic
probe and global variables could all be assigned to the same "$var"
token.
Perhaps the recently introduced saveargs() function should be supplied
with an appropriate token*, for examples q.base_probe->tok.
- FChE
More information about the Systemtap
mailing list