- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit2c6a4f2
committed
Remove unnecessary type violation in tsvectorrecv().
compareentry() is declared to work on WordEntryIN structs, buttsvectorrecv() is using it in two places to work on WordEntrystructs. This is almost okay, since WordEntry is the firstfield of WordEntryIN. But on machines with 8-byte pointers,WordEntryIN will have a larger alignment spec than WordEntry,and it's at least theoretically possible that the compilercould generate code that depends on the larger alignment.Given the lack of field reports, this may be just a hypothetical bugthat upsets nothing except sanitizer tools. Or it may be real oncertain hardware but nobody's tried to use tsvectorrecv() on suchhardware. In any case we should fix it, and the fix is trivial:just change compareentry() so that it works on WordEntry without anymention of WordEntryIN. We can also get rid of the quite-uselessintermediate function WordEntryCMP.Bug: #18875Reported-by: Alexander Lakhin <exclusion@gmail.com>Author: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/18875-07a29c49c825a608@postgresql.orgBackpatch-through: 131 parentb9ec812 commit2c6a4f2
1 file changed
+10
-13
lines changedLines changed: 10 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 |
| |
83 | 86 |
| |
84 | 87 |
| |
85 |
| - | |
86 |
| - | |
| 88 | + | |
| 89 | + | |
87 | 90 |
| |
88 | 91 |
| |
89 |
| - | |
90 |
| - | |
| 92 | + | |
| 93 | + | |
91 | 94 |
| |
92 | 95 |
| |
93 | 96 |
| |
| |||
167 | 170 |
| |
168 | 171 |
| |
169 | 172 |
| |
170 |
| - | |
171 |
| - | |
172 |
| - | |
173 |
| - | |
174 |
| - | |
175 |
| - | |
176 | 173 |
| |
177 | 174 |
| |
178 | 175 |
| |
| |||
505 | 502 |
| |
506 | 503 |
| |
507 | 504 |
| |
508 |
| - | |
| 505 | + | |
509 | 506 |
| |
510 | 507 |
| |
511 | 508 |
| |
|
0 commit comments
Comments
(0)