Hi James,
This looks like a bug. Feel free to file it.
Adam
On Thu, Nov 08, 2007 at 04:41:21PM -0800, James McIlree wrote:
>
> Does anyone know why these scripts behave differently?
>
> It looks to me like the thread local variable is being treated as
> un-initialized, or a pointer without backing store.
>
> Is this intentional?
>
> James M
>
> # cat global.d
> struct foo { int a; };
> struct foo ttest;
>
> BEGIN
> {
> ttest.a = 3;
> }
> # dtrace -s global.d
> dtrace: script 'global.d' matched 1 probe
> ^C
>
> # cat thread-local.d
> struct foo { int a; };
> self struct foo ttest;
>
> BEGIN
> {
> self->ttest.a = 3;
> }
> # dtrace -s thread-local.d
> dtrace: script 'thread-local.d' matched 1 probe
> dtrace: error on enabled probe ID 1 (ID 1: dtrace:::BEGIN): invalid
> address (0x0) in action #1 at DIF offset 8
> ^C
>
> _______________________________________________
> dtrace-discuss mailing list
> [email protected]
--
Adam Leventhal, FishWorks http://blogs.sun.com/ahl
_______________________________________________
dtrace-discuss mailing list
[email protected]