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

[Bug]: erroneously creating an AstNode causes a segfault #25937

Open
jabraham17 opened this issue Sep 12, 2024 · 0 comments
Open

[Bug]: erroneously creating an AstNode causes a segfault #25937

jabraham17 opened this issue Sep 12, 2024 · 0 comments
Assignees
Labels
area: Python bindings For things related to chapel-py, chpl-language-server, chplcheck, etc. type: Bug

Comments

@jabraham17
Copy link
Member

The following python code for chapel-py results in a sefault

import chapel
a = chapel.AstNode()

This is not semantically valid code, since you cannot create AstNodes from chapel-py. But it is allowed by the interpreter and results in a segfault. This is because the internal context object for a is never initialized, but the interpreter does try to deinitialize it, causing a segfault.

I hit this while writing a chplcheck rule, where I erroneously created an advanced rule as @driver.advanced_rule(AstNode), which is not correct and resulted in an unexpected node being "created"

@jabraham17 jabraham17 added type: Bug area: Python bindings For things related to chapel-py, chpl-language-server, chplcheck, etc. labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Python bindings For things related to chapel-py, chpl-language-server, chplcheck, etc. type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants