-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
Pulled from #13485 (comment) so we don't forget, this is a fuzzer testcase that hits a clang assertion on Delegate destination should be in scope
,
clang++: /b/s/w/ir/cache/builder/emscripten-releases/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp:1553: unsigned int (anonymous namespace)::WebAssemblyCFGStackify::getDelegateDepth(const SmallVectorImpl<(anonymous namespace)::WebAssemblyCFGStackify::EndMarkerInfo> &, const llvm::MachineBasicBlock *): Assertion `Depth < Stack.size() && "Delegate destination should be in scope"' failed.
#include <stdio.h> // avoid iostream C++ code, just test libc++abi, not libc++
#include <stdint.h>
extern void refuel();
extern void checkRecursion();
extern bool getBoolean();
void func_0() {
try {
if (getBoolean()) {
throw 0;
} else {
try {
try {
if (getBoolean()) {
}
} catch(...) {
}
} catch(...) {
}
}
} catch(...) {
}
}
int main() {
// func_0
puts("calling func_0");
refuel();
try {
func_0();
} catch(...) {
puts("main caught from func_0");
}
return 0;
}
STR: emcc -c a.cpp -fwasm-exceptions
Metadata
Metadata
Assignees
Labels
No labels