forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit993bdb9
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.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 parentc8b21b0 commit993bdb9
2 files changed
+13
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
135 | 147 |
| |
136 | 148 |
| |
137 | 149 |
| |
|
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)