aboutsummaryrefslogtreecommitdiffstats
path: root/guidelines/UnitTests
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2021-03-16 16:42:14 +0100
committerZachary Snow <zachary.j.snow@gmail.com>2021-03-18 20:52:36 -0400
commit0c66141ed25b0af229551f9ce8fe844be1e88bf3 (patch)
treef1cf91507dc5fb20ae075f2fd8c28ba7d9d86299 /guidelines/UnitTests
parent3a12617ec0713aeb81fbf4beede804545f762a1f (diff)
downloadyosys-0c66141ed25b0af229551f9ce8fe844be1e88bf3.tar.gz
yosys-0c66141ed25b0af229551f9ce8fe844be1e88bf3.tar.bz2
yosys-0c66141ed25b0af229551f9ce8fe844be1e88bf3.zip
verilog: rebuild user_type_stack from globals before parsing file
This was actually a ticking UB bomb: after running the parser, the type maps contain pointers to children of the current AST, which is recursively deleted after the pass has executed. This leaves the pointers in user_type_stack dangling, which just happened to never be a problem due to another bug that causes typedefs from higher-level type maps to never be considered. Rebuilding the type stack from the design's globals ensures the AstNode pointers are valid.
Diffstat (limited to 'guidelines/UnitTests')
0 files changed, 0 insertions, 0 deletions