diff options
author | Piotr Sarna <p.sarna@tlen.pl> | 2022-11-18 20:12:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-18 19:12:36 +0000 |
commit | 19cb68dd0cfb2070b434ab9a1bd5b5b9d46fe09b (patch) | |
tree | 2f4423d7a78146f948418a1e7b7e1d06bc5b8576 /src/passes/CodePushing.cpp | |
parent | 15009945aca9b81d7c57d797bbafa58dfaa4c891 (diff) | |
download | binaryen-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