diff options
author | Alon Zakai <azakai@google.com> | 2024-12-09 14:48:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-09 14:48:22 -0800 |
commit | e9f693d40f0479aa218dd5664b22402994d2db29 (patch) | |
tree | 9d0a5af795a1954b485fc94a25963049223cc255 /scripts/test/shared.py | |
parent | 7f62a423ee4bd908f485d01945b71786176b926a (diff) | |
download | binaryen-e9f693d40f0479aa218dd5664b22402994d2db29.tar.gz binaryen-e9f693d40f0479aa218dd5664b22402994d2db29.tar.bz2 binaryen-e9f693d40f0479aa218dd5664b22402994d2db29.zip |
[GC] Fix TypeRefining on StructGets without content but with a reachable ref (#7138)
If we see a StructGet with no content (the type it reads from has no writes)
then we can make it unreachable. The old code literally just changed the type
to unreachable, which would later work out with refinalization - but only if
the StructGet's ref was unreachable. But it is possible for this situation to
occur without that, and if so, this hit the validation error "can't have an
unreachable node without an unreachable child".
To fix this, merge all code paths that handle "impossible" situations, which
simplifies things, and add this situation.
This uncovered an existing bug where we noted default values of refs, but
not non-refs (which could lead us to think that a field of a struct that only
was ever created by struct.new_default, was never created at all). Fixed as
well.
Diffstat (limited to 'scripts/test/shared.py')
0 files changed, 0 insertions, 0 deletions