diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-02-06 23:24:49 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-07 10:22:03 +0100 |
commit | c95d48c8d66e05b632a71e414d0fff323c4b67bf (patch) | |
tree | c1df5c4031ea3d338b22e7a02da034cd589f6ba9 /Kernel/UBSanitizer.cpp | |
parent | 57e10eadac01273cc4c0bcb681aa9381cacef0b3 (diff) | |
download | serenity-c95d48c8d66e05b632a71e414d0fff323c4b67bf.zip |
Kernel: KUBSAN implementation of returns-nonnull-attribute
This didn't find anything in the current source.
Diffstat (limited to 'Kernel/UBSanitizer.cpp')
-rw-r--r-- | Kernel/UBSanitizer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/UBSanitizer.cpp b/Kernel/UBSanitizer.cpp index 073abc6eb4..f3f159c371 100644 --- a/Kernel/UBSanitizer.cpp +++ b/Kernel/UBSanitizer.cpp @@ -53,6 +53,13 @@ void __ubsan_handle_nonnull_arg(const NonnullArgData& data) print_location(data.location); } +void __ubsan_handle_nonnull_return_v1(const NonnullReturnData&, const SourceLocation&); +void __ubsan_handle_nonnull_return_v1(const NonnullReturnData&, const SourceLocation& location) +{ + dbgln("KUBSAN: null pointer return from function declared to never return null"); + print_location(location); +} + void __ubsan_handle_vla_bound_not_positive(const VLABoundData&, void*); void __ubsan_handle_vla_bound_not_positive(const VLABoundData& data, void*) { |