forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc3dc311
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 commits993bdb9 andad2ad69, 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 parent0347470 commitc3dc311
2 files changed
+13
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
115 | 127 |
| |
116 | 128 |
| |
117 | 129 |
| |
|
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)