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

agi: Replace Boost flat_map with std::map in Thesaurus class #138

Closed
wants to merge 1 commit into from

Conversation

mia-0
Copy link

@mia-0 mia-0 commented Jun 1, 2024

I do not see a reason to prefer the flat_map implementation, and it’s causing crashes when compiled with GCC >= 13 and Boost 1.85.0 at optimization level 2 or higher.

Whether or not this is a bug in GCC, or Boost hitting a case of undefined behavior, avoiding it altogether doesn’t seem to hurt.

Fixes #137

I do not see a reason to prefer the flat_map implementation,
and it’s causing crashes when compiled with GCC >= 13 and
Boost 1.85.0 at optimization level 2 or higher.

Whether or not this is a bug in GCC, or Boost hitting a case of
undefined behavior, avoiding it altogether doesn’t seem to hurt.

Fixes #137
@arch1t3cht
Copy link
Owner

Thanks - merged in 14480cc .

I also don't see any reason to prefer flat_map. The commit switching to it didn't have any additional explanation, and the one other commit mentioning flat_map only says "Switch to flat_map for trivially less memory usage" (which is very likely negligible on an application that has to decode and display video).

@arch1t3cht arch1t3cht closed this Oct 25, 2024
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

Successfully merging this pull request may close these issues.

Crash in agi::Thesaurus::Thesaurus with Boost 1.85.0 and GCC >= 13
2 participants