Fries David (Helbling Technik)
2015-03-19 14:21:51 UTC
Hello Everybody
I have an application which links against library A which in turn link against library B. Both libs were written by us. Library B was built with BOOST_ASIO_ENABLE_HANDLER_TRACKING defined, but library A wasn't. The resulting application is very unstable- crashing randomly, asserts failing, sometimes appearing to be running then crashing on shutdown, etc. We tried to debug the problem but the backtraces always pointed into Asio itself, not into our code. If I enable (or disable) handler tracking everywhere, things work like a charm.
Was I violating the one-definition-rule by using inconsistent debugging options in different libraries? Is this a reasonable assumption? I was aware of ODR when building a single binary or library, but I didn't expect that there would be issues across libraries...
I know that's not much information to go on, but I would like to hear your thoughts on this issue.
Dave
I have an application which links against library A which in turn link against library B. Both libs were written by us. Library B was built with BOOST_ASIO_ENABLE_HANDLER_TRACKING defined, but library A wasn't. The resulting application is very unstable- crashing randomly, asserts failing, sometimes appearing to be running then crashing on shutdown, etc. We tried to debug the problem but the backtraces always pointed into Asio itself, not into our code. If I enable (or disable) handler tracking everywhere, things work like a charm.
Was I violating the one-definition-rule by using inconsistent debugging options in different libraries? Is this a reasonable assumption? I was aware of ODR when building a single binary or library, but I didn't expect that there would be issues across libraries...
I know that's not much information to go on, but I would like to hear your thoughts on this issue.
Dave