UBSAN: Add __ubsan_handle_nonnull_arg
This commit is contained in:
parent
8e8706be27
commit
a9b5cf99f7
@ -70,5 +70,11 @@ namespace UBSAN
|
||||
{
|
||||
SourceLocation location;
|
||||
};
|
||||
|
||||
struct NonnullArgInfo
|
||||
{
|
||||
SourceLocation location;
|
||||
SourceLocation attr_location;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -118,4 +118,10 @@ extern "C"
|
||||
};
|
||||
__ubsan_handle_type_mismatch(&info, pointer);
|
||||
}
|
||||
|
||||
void __ubsan_handle_nonnull_arg(NonnullArgInfo* info, intptr_t)
|
||||
{
|
||||
dbgln("ubsan: null argument at %s:%d:%d", DISPLAY(info->location));
|
||||
ub_panic();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user