cadets / freebsd-old

FreeBSD src tree http://www.FreeBSD.org/
Other
12 stars 7 forks source link

More permissive typing on variables #127

Closed dstolfa closed 2 years ago

dstolfa commented 2 years ago

It seems like DTrace is very liberal when it comes to variable typing. In tst.openret.ksh, DTrace seems to be happy with:

        syscall::open*:entry
        /pid == \$target/
        {                                                      
                self->p = arg0; 
        }

        syscall::open*:return
        /self->p && copyinstr(self->p) == "shajirosan"/
        {
                self->err = 1;
                self->p = 0;
        }   

where self->p is const char * in the entry point, but int64_t in the exit point. Perhaps we need to be more permissive when typing variables in DIF typing -- or perhaps we can isolate this to anything that can be cast to NULL (so any integer that is 0)?

dstolfa commented 2 years ago

This was fixed with 099b4127819b9ee84c91ac0c092432c069da3c1e.