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

Lifetime issue in tech_library constructor #662

Closed
rocallahan opened this issue Oct 17, 2024 · 2 comments
Closed

Lifetime issue in tech_library constructor #662

rocallahan opened this issue Oct 17, 2024 · 2 comments

Comments

@rocallahan
Copy link
Contributor

The tech_library constructor initializes _supergates_spec to be a reference to the super_lib referenced by the supergates_spec parameter. But the default value for that parameter is a default-constructed super_lib that will be destroyed when the tech_lib constructor returns. So if this default is used _supergates_spec becomes a dangling reference.

(Not super urgent since we haven't actually hit this yet, but it looks like a problem.)

@aletempiac
Copy link
Member

Thank you for reporting! This issue shouldn't affect the execution of any program. However, it is good to remove it. Let me know if the change in #665 is good enough.

@rocallahan
Copy link
Contributor Author

Yes, thanks.

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

No branches or pull requests

2 participants