Ryan Johnson
2010-07-20 14:31:26 UTC
Hi all,
I would have expected that x < 0, below, but it isn't (even though it
theoretically has only 32 bits, as confirmed by the second probe)
self signed int x;
self signed long y;
self signed int z;
BEGIN {self->x = 0xffffffff; self->y = 0xffffffffffffffffl; self->z =
0xffffffffffffffffl; }
BEGIN/self->x & 0xffffffff00000000/ { printf("x has 33+ bits"); }
BEGIN/self->x < 0/ {printf("x < 0"); }
BEGIN/self->y < 0/ {printf("y < 0"); }
BEGIN/self->z < 0/ {printf("z < 0"); }
BEGIN {exit(0); }
I'm using Solaris 10, so maybe I've got an old-n-buggy version of
dtrace, but google didn't turn up anything obvious when I searched.
Ideas?
Ryan
I would have expected that x < 0, below, but it isn't (even though it
theoretically has only 32 bits, as confirmed by the second probe)
self signed int x;
self signed long y;
self signed int z;
BEGIN {self->x = 0xffffffff; self->y = 0xffffffffffffffffl; self->z =
0xffffffffffffffffl; }
BEGIN/self->x & 0xffffffff00000000/ { printf("x has 33+ bits"); }
BEGIN/self->x < 0/ {printf("x < 0"); }
BEGIN/self->y < 0/ {printf("y < 0"); }
BEGIN/self->z < 0/ {printf("z < 0"); }
BEGIN {exit(0); }
I'm using Solaris 10, so maybe I've got an old-n-buggy version of
dtrace, but google didn't turn up anything obvious when I searched.
Ideas?
Ryan