Jean-Sébastien Guay wrote:
Hi Chris,

  Usually the linker will yell and scream at you if you try to do this, so it usually
doesn't happen accidentally and without the programmer knowing.

I'm curious when you've seen the linker scream about mixing debug and release DLLs... I've seen plenty of users do it by mistake and the linker never said a thing, except when mixing the dynamic and static C runtimes. When mixing debug and release (both using the dynamic runtime, for example) the linker says nothing.

That's why it's so easy to do, but nevertheless it will lead to bad behavior, crashes, etc.
It is usually more of muted cough than a scream, and is often a warning referring to conflicting default libraries. If the least significant bits of the address of the corruption remain the same then you can track it down it down with a data breakpoint. Because of heap randomisation you need to work out what the base address of the heap is for each run and recalculate the address of the breakpoint each time. If you use an absolute address "0x0000abcd etc" and make sure it is one of the first four breakpoints then a hardware breakpoint register will be used and the program will run at a reasonable speed. You may get a few false positives if the breakpoint is enabled too soon but you should be able to sort that out :-)

Roger
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to