+static void CHECK_ACCESS(void* ptr) {
+ allocation* it = allocation_ll;
+ while (it->ptr != ptr) {
+ it = it->next;
+ if (it == NULL) {
+ return; // addrsan should catch malloc-unknown and print more info than we have
+ }
+ }
+}
+#define CHECK_INNER_FIELD_ACCESS_OR_NULL(v) \\
+ if (v.is_owned && v.inner != NULL) { \\
+ const void *p = __unmangle_inner_ptr(v.inner); \\
+ if (p != NULL) { \\
+ CHECK_ACCESS(p); \\
+ } \\
+ }
+