- Notifications
You must be signed in to change notification settings - Fork28
Commitc86eae3
committed
pg_attribute_no_sanitize_alignment() macro
Modern gcc and clang compilers offer alignment sanitizers, which help to detectpointer misalignment. However, our codebase already contains x86-specificcrc32 computation code, which uses unalignment access. Thankfully, thosecompilers also support the attribute, which disables alignment sanitizers atthe function level. This commit adds pg_attribute_no_sanitize_alignment(),which wraps this attribute, and applies it to pg_comp_crc32c_sse42() function.Back-patch of commits 993bdb9f9 and ad2ad698a, to enable doingalignment testing in all supported branches.Discussion:https://postgr.es/m/CAPpHfdsne3%3DT%3DfMNU45PtxdhSL_J2PjLTeS8rwKnJzUR4YNd4w%40mail.gmail.comDiscussion:https://postgr.es/m/475514.1612745257%40sss.pgh.pa.usAuthor: Alexander Korotkov, revised by Tom LaneReviewed-by: Tom Lane1 parentbcd5e95 commitc86eae3
2 files changed
+13
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
113 | 125 |
| |
114 | 126 |
| |
115 | 127 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
|
0 commit comments
Comments
(0)