Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ struct __sanitizer_file_handle {
};
#endif

#if SANITIZER_MAC
// These fields are not actually pointers, and so wasm64 must use unsigned and not uptr for them
#if SANITIZER_MAC || SANITIZER_EMSCRIPTEN
Comment thread
aardappel marked this conversation as resolved.
struct __sanitizer_msghdr {
void *msg_name;
unsigned msg_namelen;
Expand Down
5 changes: 5 additions & 0 deletions system/lib/compiler-rt/lib/ubsan/ubsan_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,18 @@ void InitializeFlags() {
parser.ParseString(__ubsan_default_options());
// Override from environment variable.
#if SANITIZER_EMSCRIPTEN
#ifdef __wasm64__
// FIXME: support UBSAN in wasm64.
abort();
#else
char *options = (char*) EM_ASM_INT({
return withBuiltinMalloc(function () {
return allocateUTF8(Module['UBSAN_OPTIONS'] || 0);
});
});
parser.ParseString(options);
emscripten_builtin_free(options);
#endif
#else
parser.ParseStringFromEnv("UBSAN_OPTIONS");
#endif // SANITIZER_EMSCRIPTEN
Expand Down