summaryrefslogtreecommitdiff
path: root/src/passes/CodePushing.cpp
diff options
context:
space:
mode:
authorPiotr Sarna <p.sarna@tlen.pl>2022-11-18 20:12:36 +0100
committerGitHub <noreply@github.com>2022-11-18 19:12:36 +0000
commit19cb68dd0cfb2070b434ab9a1bd5b5b9d46fe09b (patch)
tree2f4423d7a78146f948418a1e7b7e1d06bc5b8576 /src/passes/CodePushing.cpp
parent15009945aca9b81d7c57d797bbafa58dfaa4c891 (diff)
downloadbinaryen-19cb68dd0cfb2070b434ab9a1bd5b5b9d46fe09b.tar.gz
binaryen-19cb68dd0cfb2070b434ab9a1bd5b5b9d46fe09b.tar.bz2
binaryen-19cb68dd0cfb2070b434ab9a1bd5b5b9d46fe09b.zip
Avoid calling back() on an empty string in setBinaryenBinDir (#5280)
std::string::back() is only well defined for non-empty strings. Without the change, wasm-reduce fails if it is called from $PATH, because then, the parent directory is an empty string. A workaround is to explicitly set the binaryen path with -b, and it is still necessary after this fix, but at least the program ends with a comprehensible error message instead of a generic assertion failure from the standard library.
Diffstat (limited to 'src/passes/CodePushing.cpp')
0 files changed, 0 insertions, 0 deletions