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

bad-free error when building with memory sanitizer flag #88

Open
JEGroeneweg opened this issue Oct 18, 2022 · 0 comments
Open

bad-free error when building with memory sanitizer flag #88

JEGroeneweg opened this issue Oct 18, 2022 · 0 comments

Comments

@JEGroeneweg
Copy link

Hi,

In our project we are linking to your library, unfortunately we came across a problem. Whenever we are building our project with a sanitizer flag we encounter a runtime error. If I build Ifopt with the same flag the error disappears.

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -fno-omit-frame-pointer -O0")

I've added one of the Ifopt tests to our project, to see if the same error would appear (it does). The test that I copied is the problem_test.cc from the core folder. The test which gives problems is the GetVariableValues test, the problem particular seems to occur in the ifopt::Composite::GetValues() functionality, which corresponds to what we find in our own project.

Is there someone who can take a look where this behavior is coming from?

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

1 participant