Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150571320
D40946.id124368.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
546 B
Referenced Files
None
Subscribers
None
D40946.id124368.diff
View Options
diff --git a/sys/sys/kassert.h b/sys/sys/kassert.h
--- a/sys/sys/kassert.h
+++ b/sys/sys/kassert.h
@@ -38,6 +38,16 @@
extern bool panicked;
#define KERNEL_PANICKED() __predict_false(panicked)
+/*
+ * Try to trap accesses.
+ * TODO: use kmsan if available
+ */
+#ifdef INVARIANTS
+#define DEBUG_POISON_POINTER(x) ({ x = (void *)(UINTPTR_MAX - 4096); })
+#else
+#define DEBUG_POISON_POINTER(x)
+#endif
+
#ifdef INVARIANTS /* The option is always available */
#define VNASSERT(exp, vp, msg) do { \
if (__predict_false(!(exp))) { \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 11:37 AM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30755883
Default Alt Text
D40946.id124368.diff (546 B)
Attached To
Mode
D40946: Add DEBUG_POISON_POINTER
Attached
Detach File
Event Timeline
Log In to Comment