[SCM] strace branch, master, updated. v4.6-124-geb0e3e8

Denys Vlasenko dvlasenk at redhat.com
Fri Feb 15 14:07:44 UTC 2013


On 02/15/2013 11:37 AM, Denys Vlasenko wrote:
> They don't have to be longs. Any signed argument needs signed widening.
> See example above.
> 
>> but there are
>> a lot that take pointers, and these are displayed wrongly now, e.g.
>>
>> $ strace -etrace=uname,mprotect,mmap2,munmap,set_thread_area,fstat64 -everbose=none /path/to/chroot32/bin/cat </dev/null 
>> [ Process PID=12345 runs in 32 bit mode. ]
>> uname(0xffffffffbfbf4a5a)               = 0
>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fda000
>> fstat64(3, 0xffffffffbfbf46a0)          = 0
> 
> And as you just observed, signed widening messes up unsigned quantities,
> such as pointers.
> 
> Do you have a feeling unsigned cup of poison is less painful?

I looked at the source a bit more and I think you are right:
zero-extending 32-bit args is somewhat more preferable.

I committed some fixes for this.

Thanks!

-- 
vda






More information about the Strace-devel mailing list