On Mon, Apr 21, 2008 at 11:00:29AM -0700, Adam Leventhal wrote: > So curlwpsinfo->pr_stype can work and later fail. Looking at the translator > for that field we see that it looks like this: > > pr_stype = T->t_sobj_ops ? T->t_sobj_ops->sobj_type : 0; > > This compiles to this DIF code: > > [...] > We can see that we load the t_sobj_ops member once at offset 07 and then again > at offset 17 (right before we load sobj_type at offset 18). The t_sobj_ops > member can be set to NULL asynchronously from other threads so this double > load introduces a window for the failure that you're seeing. > > Either we need to use some temporary, probe-local variable (one that can't > conflict with a user-defined variable), or we need to perform some element of > optimization to the generated DIF.
In the world of LISP macros the macro writer would gensym a local variable (probe-local in this case) to deal with this sort of issue. Perhaps the DTrace translator facility needs a probe-local gensym feature. Nico -- _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org