1 Commits

Author SHA1 Message Date
Erich Keane
bd7bce2c84
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
2024-03-04 09:25:29 -08:00