chapel icon indicating copy to clipboard operation
chapel copied to clipboard

[Bug]: erroneously creating an AstNode causes a segfault

Open jabraham17 opened this issue 5 months ago • 0 comments

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 avatar Sep 12 '24 18:09 jabraham17