Unverified Commit bd7bce2c authored by Erich Keane's avatar Erich Keane Committed by GitHub
Browse files

Fix null-deref thanks to an attribute on a global declarator chunk (#83611)

This was reported (sort of) in a PR: #77703. The problem is that a
declarator 'owns' an attributes allocation via an `AttributePool`.
However, this example tries to copy a DeclaratorChunk from one
Declarator to another, so when the temporary Declarator goes out of
scope, it deletes the attribute it has tried to pass on via the chunk.

This patch ensures that we copy the 'ownership' of the attribute
correctly, and adds an assert to catch any other casess where this
happens.

Additionally, this was put in as a bug report, so this
Fixes #83611
parent 252f3c98
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment