Skip to content

Conversation

dornbirndevelops
Copy link

@dornbirndevelops dornbirndevelops commented Jan 3, 2025

with some warnings enabled, gcc 13 and above detect a potential null pointer dereference in the typed_value::notify member function.

@vprus
Copy link
Collaborator

vprus commented Jan 3, 2025

Thanks for the PR.

Can you tell why value might end up null? It seems like it's only possible due to user error and then it's better to crash than silently ignoring it?

@dornbirndevelops
Copy link
Author

Hi @vprus, thank you for the quick response.

I created a minimum reproducible example of my problem in compiler explorer using boost 1.86.0.
https://godbolt.org/z/efP1WxoKT

I tried to stick with the original example from the docs to minimize the chance of user error.
https://www.boost.org/doc/libs/1_86_0/doc/html/program_options/tutorial.html

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.

2 participants