summaryrefslogtreecommitdiff
path: root/Kernel/UBSanitizer.cpp
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2021-02-06 23:24:49 -0800
committerAndreas Kling <kling@serenityos.org>2021-02-07 10:22:03 +0100
commitc95d48c8d66e05b632a71e414d0fff323c4b67bf (patch)
treec1df5c4031ea3d338b22e7a02da034cd589f6ba9 /Kernel/UBSanitizer.cpp
parent57e10eadac01273cc4c0bcb681aa9381cacef0b3 (diff)
downloadserenity-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.cpp7
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*)
{