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

NULL ptr deref in instance_dealloc #421

Open
vient opened this issue Aug 30, 2023 · 0 comments
Open

NULL ptr deref in instance_dealloc #421

vient opened this issue Aug 30, 2023 · 0 comments

Comments

@vient
Copy link

vient commented Aug 30, 2023

Hi, we've recently triggered null pointer deref in that place, right on dynamic_cast. From the first glance code does not look correct, dynamic_cast occurs after explicitly calling destructor on object. In our combination of clang16, gcc13 and python3.11 (I don't know what exactly triggered this) this destructor compiles in such way that vtable pointer is set to 0 in the end, which does not work so well with dynamic_cast.

Using object after destroying it sound like UB anyway, can it be fixed somehow? Using dynamic_cast before calling object destructor?

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 a pull request may close this issue.

1 participant