summaryrefslogtreecommitdiff
path: root/src/wasm2js.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-07-22 15:58:04 -0700
committerGitHub <noreply@github.com>2021-07-22 15:58:04 -0700
commit464ddbe5faf151b5ef50d56d00ad442ac76620a6 (patch)
treef504c2b21a69fa709ce81d613ddf979b33e3392b /src/wasm2js.h
parent90545189ce4f790c798e83c1e65afb70f228d176 (diff)
downloadbinaryen-464ddbe5faf151b5ef50d56d00ad442ac76620a6.tar.gz
binaryen-464ddbe5faf151b5ef50d56d00ad442ac76620a6.tar.bz2
binaryen-464ddbe5faf151b5ef50d56d00ad442ac76620a6.zip
wasm-reduce: Avoid a crash where function names change after tryToRemoveFunctions (#4013)
tryToRemoveFunctions() will reload the wasm from binary if it fails to optimize, and without the names section we don't have a guarantee on the names being the same after that. And then tryToEmptyFunctions would look for a name, and crash. In the reverse order there is no risk, as tryToEmptyFunctions does not reload the wasm from binary, it carefully undoes what it tried to do when it fails.
Diffstat (limited to 'src/wasm2js.h')
0 files changed, 0 insertions, 0 deletions