Language Reference, updated

Stone, Joshua I joshua.i.stone@intel.com
Sat Feb 17 00:39:00 GMT 2007


Mike Mason wrote:
> Frank Ch. Eigler wrote:
>> (However, it is not clear that the NULL-handling case is relevant or
>> appropriate.  If the timeval* coming in from the application is
>> permitted to be NULL, fine, but if it's meant as a crash-prevention
>> mechanism in this embedded-C routine, then it's not right.)
> 
> What's the right thing to do if NULL isn't permitted?  Should we let
> kread() report the error or do something else? 

Yes, let kread() trap the NULL dereference.  Using sentinal values like
"NULL" just tends to obscure the problem.  With kread() it's treated as
an error and the script user is notified.

Josh



More information about the Systemtap mailing list