[Mono-devel-list] Re: Abcremoval
Willibald Krenn
Willibald.Krenn at gmx.at
Tue Feb 1 10:33:05 EST 2005
> No, AFAICT the index is treated as unsigned int32 (minus MSB):
> shl %eax /* multiply by 2; clears top 32 bits on AMD64 IIRC;*/
> /*no signed widening here*/
> add %rcx,%rax /*rcx is pointer to string; rax is index by two */
> movzwq 0x14(%rax),%r14 /*copy*/
>
> IOW: There is no such thing as a negative index for string access.
This goes for AMD64 only; I did not check what x86 does. Probably you
end up reading from kernel mem? However, you'd need a string of that
length in the first place / or fool mono by changing the string length
somehow.
Willi
More information about the Mono-devel-list
mailing list