How to determine why this executable crashes on start? (C on *nix)
===

So I've got an application that builds and runs fine.   I started playing with some compiler settings on a bunch of the 20+ static and dynamic libraries it links to, and the app consistently crashes on start at a particular point.

I reverted my build system mods, and and the app is fine again.  (However, I forgot to make note of the changes I actually made...)

Purely as a matter interest, since I still have a copy of the bad binary (built in debug mode), I'd like to try and reverse engineer what I did exactly to screw things up.  :-)

Attaching a debugger, I can see that a function in a `.so` is passing to the main app, via a function call, a function pointer for the main app to use as a callback. 

In the frame of the caller (in the `.so`) the function pointer has one value.  In the frame of the callee (in the main app), the function pointer magically has a different value.

When the main app attempts to call the stored function pointer, the program crashes with a segfault (mapper error).  The function pointer seems to still have the 2nd value which is presumably wrong.

Any suggestions on how to pick this apart?  


Thank you