if (badptr){// Do something assuming the pointer is valid
}
To view this discussion on the web visit https://groups.google.com/d/msgid/tkhtml3/eec002b1-3051-42a3-8a23-fb91b120350bn%40googlegroups.com.
Bob C,
With what Starseeker provided below, you're almost certainly on the right track.
The problem in my experience with this code is that there are places where the code assumes only 32-bit pointers when setting them to '0', resulting in a pointer whose lower 32bits are indeed zero but whose upper 32bits might not be.
A pattern you can look for in failing code tends to look something like:if (badptr){// Do something assuming the pointer is valid
}
Check that pointer's address in a debugger or print the address using printf and you're likely to see non-zero values in the upper 32-bits.
I'm not sure, but I don't think that's the most common case.
I think it's probably "Tcl_AppendResult()" calls you need to look for. Any time a literal "0" or "NULL" is passed to that, change it to "(char*)0" or "(char*)NULL".
Dan.
To view this discussion on the web visit https://groups.google.com/d/msgid/tkhtml3/9c50511b-1aaa-e40b-3b51-ed553f504be6%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tkhtml3/34d76fe9-f80c-2ab1-7030-25b18b6c28b3%40gmail.com.