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

Making sure VERIFY_LOCKS stays disabled if not defined #2365

Closed
wants to merge 1 commit into from

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Oct 22, 2016

No description provided.

Copy link
Member

@sithhell sithhell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch disables the lock detection by default for every build type. Shouldn't we enable it for debug builds via CMake?

@hkaiser
Copy link
Member Author

hkaiser commented Oct 24, 2016

This patch disables the lock detection by default for every build type. Shouldn't we enable it for debug builds via CMake?

Good point. I'll change that.

@hkaiser
Copy link
Member Author

hkaiser commented Oct 26, 2016

This patch disables the lock detection by default for every build type. Shouldn't we enable it for debug builds via CMake?

Good point. I'll change that.

After trying to do this, I have no idea how to change that. @sithhell any input would be welcome.

@sithhell
Copy link
Member

My suggestion would be to leave everything as is and keep the lock detection forced in debug mode.

@hkaiser
Copy link
Member Author

hkaiser commented Oct 26, 2016

@biddisco You were the one complaining that the current behavior was unexpected. Care to comment?

@hkaiser
Copy link
Member Author

hkaiser commented Nov 15, 2016

@biddisco ping?

@biddisco
Copy link
Contributor

@sithhell wrote "This patch disables the lock detection by default for every build type. Shouldn't we enable it for debug builds via CMake?"
This is not correct. If the user enables lock detection, then cmake adds a #define for HPX_HAVE_VERIFY_LOCKS, the patch just removes the override that turns it back on in debug mode.
In my view this patch is fine.
If the user enables lock checks, (here

if(HPX_WITH_VERIFY_LOCKS)
) they get lock checking, if they don't enable it, then they don't

@sithhell
Copy link
Member

What we loose here is that it is enabled by default on debug builds. One way to fix that would be to not have the define as part of the generated config defines header, but the target specific compiler flags, which is able to use generator expressions, which would allow to enable it for debug builds by default.
If the premise is to only have it enabled if explicitly asked for, then this change is fine. In the past however, we caught more bugs with it being enabled than false-positives.

@sithhell
Copy link
Member

What should we do with this PR now?

@hkaiser
Copy link
Member Author

hkaiser commented Apr 18, 2017

@biddisco, @sithhell What should be done with this? Can we simply close it?

@hkaiser hkaiser modified the milestones: 1.0.0, 1.1.0 Apr 23, 2017
@hkaiser
Copy link
Member Author

hkaiser commented May 21, 2017

I'm going to close this as there is no obvious way to achieve what you asked for. The PR here is not a correct solution in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants