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]

Re: [RFC PATCH] Fix segmentation fault of listing kprocess.create


"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


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