Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/Debug build incompatibility #81

Closed
mlegenovic opened this issue Aug 3, 2017 · 3 comments
Closed

Release/Debug build incompatibility #81

mlegenovic opened this issue Aug 3, 2017 · 3 comments

Comments

@mlegenovic
Copy link

Hi,
We want to use this library in our project, but we have a problem (concrete signal 11 crashes) when we use libcds release build, and our executable as debug build.
It seams that header-only part is not compatible with compiled part of libcds if NDEBUG is set differently.

At the moment the only solution for us is to patch libcds (concreate to remove #define CDS_DEBUG statement), so that we can work without crashes.

This is also a huge problem for linux distributors because they have to build libcds in both versions, debug and release, and you have to link against first or second dependent on your build profile. This is not usual behaviour. I can for example use boost library provided by my distributor (which is built with release profile), and link them to my project which i have built in debug profile. Of course, it is not possible then to debug in boost library, but usualy you don't want to do that, you want to debug only your code. Executable will work without crashes.

Do you have a better solution for this problem? Is it possible to make CDS_DEBUG definition dependent on a different condition then #if !defined(NDEBUG)? In our Makefiles we do not set NDEBUG for debug build, and this activates CDS_DEBUG macro too, but compiled part of libcds was build without CDS_DEBUG?

Thanks in advance

@khizmax
Copy link
Owner

khizmax commented Aug 3, 2017

Hmm... At first glance I dont' see any problem with debug/release mix for libcds.
Maybe, your crashes is really errors in your project or even in libcds?..
Can you give me at least the backtrace of any crash?

Of course, I can add preprocessor defs like -DCDS_DEBUG/-DCDS_NODEBUG in compiler's command line but at this moment it seems superfluous and ugly "feature" for me.

@gtroxler
Copy link

Hi,
is it possible that you are missing a

current_block_ = block;

arround line 401 in dhp.h?

@khizmax
Copy link
Owner

khizmax commented Aug 10, 2017

Hi,
Yes, you are right, thanks!

@khizmax khizmax closed this as completed Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants