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

global destructors #40

Open
Trass3r opened this issue Aug 12, 2019 · 4 comments
Open

global destructors #40

Trass3r opened this issue Aug 12, 2019 · 4 comments
Assignees

Comments

@Trass3r
Copy link
Contributor

Trass3r commented Aug 12, 2019

I saw functions being marked as constructors which are actually destructors.
It could have been deduced from atexit usage: https://godbolt.org/z/rndZOs
(Also in this particular case the function called operator delete which shouldn't happen in a ctor.)

@Trass3r
Copy link
Contributor Author

Trass3r commented Aug 12, 2019

Nice to have: exported information about these 'dynamic initializers' etc., i.e. "function x is a dynamic atexit destructor for 'foo'", ...

@sei-ccohen
Copy link
Contributor

Agreed that this would be nice. No progress yet. Leaving open as an outstanding enhancement, but it's also unlikely to get attention for a while.

@sei-eschwartz
Copy link
Collaborator

@sei-ccohen Is there a reason why we don't have a rule or guess stating if a method calls delete it isn't a constructor?

@sei-eschwartz sei-eschwartz self-assigned this Jun 21, 2020
@sei-eschwartz
Copy link
Collaborator

@Trass3r We changed a bunch of rules relating to destructor detection recently. You may want to retry this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants