v2-0001-Add-pg_attribute_no_asan.patch
text/x-patch
Filename: v2-0001-Add-pg_attribute_no_asan.patch
Type: text/x-patch
Part: 1
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v2-0001
Subject: Add pg_attribute_no_asan
| File | + | − |
|---|---|---|
| src/include/c.h | 7 | 0 |
From 40f56251ef629eed2ebb6d9b2f875eac06678cab Mon Sep 17 00:00:00 2001
From: Tristan Partin <tristan@neon.tech>
Date: Mon, 5 Feb 2024 20:18:59 -0600
Subject: [PATCH v2 1/4] Add pg_attribute_no_asan
Putting this attribute on a function will disable AddressSanitizer
instrumentation in a function.
---
src/include/c.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/include/c.h b/src/include/c.h
index 2e3ea206e1..11e7df0fd7 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -272,6 +272,13 @@
#endif /* defined(__MINGW64__) && __GNUC__ == 8 &&
* __GNUC_MINOR__ == 1 */
+
+#if __SANITIZE_ADDRESS__
+#define pg_attribute_no_asan __attribute__((no_sanitize("address")))
+#else
+#define pg_attribute_no_asan
+#endif
+
/*
* Mark a point as unreachable in a portable fashion. This should preferably
* be something that the compiler understands, to aid code generation.
--
Tristan Partin
Neon (https://neon.tech)