This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: Language Reference, updated
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Mike Mason" <mmlnx at us dot ibm dot com>, "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: "Robb Romans" <robb at linux dot vnet dot ibm dot com>, "SystemTap" <systemtap at sources dot redhat dot com>
- Date: Fri, 16 Feb 2007 16:39:46 -0800
- Subject: RE: Language Reference, updated
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