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

Invalid pointer error for static built Axom linked into a separate shared library #1408

Closed
ldowen opened this issue Sep 10, 2024 · 2 comments · Fixed by #1416
Closed

Invalid pointer error for static built Axom linked into a separate shared library #1408

ldowen opened this issue Sep 10, 2024 · 2 comments · Fixed by #1416
Assignees
Labels
bug Something isn't working Reviewed

Comments

@ldowen
Copy link

ldowen commented Sep 10, 2024

I get a free(): invalid pointer error on this static variable:

AXOM_SIDRE_EXPORT static const std::vector<std::string> s_io_protocols;

This only occurs if our code is built as shared libraries but Axom is built as static libraries. If Axom is built as shared libraries or our code is built as a static library, we don't get this error. This was not an issue for version 0.7.0 when this static variable did not exist.

@cyrush
Copy link
Member

cyrush commented Sep 10, 2024

@ldowen thank you, does this happen when your program closes?

This sounds like a c++ static finalization issue.

@ldowen
Copy link
Author

ldowen commented Sep 10, 2024

Ah right, I forgot to mention that: the error occurs when the program closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants