https://llvm.org/bugs/show_bug.cgi?id=24009
Bug ID: 24009
Summary: Need to disable most libc library builtin
optimizations when SEH is present
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This program crashes instead of exiting zero:
#include <string.h>
bool try_memcpy(void *d, void *s, size_t n) {
__try {
memcpy(d, s, n);
} __except (1) {
return false;
}
return true;
}
int main() {
return try_memcpy(nullptr, nullptr, 42);
}
This is because we codegen memcpy to llvm.memcpy instead of emitting the
libcall. We don't support invoking most intrinsics, so for now we should
probably behave as if -fno-builtin was set in functions that use SEH.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs