|
From: Jeremy F. <je...@go...> - 2003-10-01 17:40:04
|
On Mon, 2003-09-29 at 17:27, Nicholas Nethercote wrote: > Interesting... were they allowing for the possibility of a non-flat > address space, or something like that? If you cast the pointers to > integers, did the subtraction, then used the result as the offset, would > that be legal C? Not really. There are some (very strange) machines which do annelid-like things internally, so the C standard allows for them. But it doesn't matter what C does or doesn't allow, since Valgrind works on machine-code from any language. > Either way, in practice we have to deal with it, especially since glibc > does it in strcpy() (see below), and it pops up in lots of other places. Yep. J |