forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4971c36
committed
Don't let protected variable access to be reordered after spinlock release.
LWLockAcquireWithVar needs to set the protected variable while holdingthe spinlock. Need to use a volatile pointer to make sure it doesn't getreordered by the compiler. The other functions that accessed the protectedvariable already got this right.9.4 only. Earlier releases didn't have this code, and in master, spinlockrelease acts as a compiler barrier.1 parent4dbc760 commit4971c36
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
482 | 482 |
| |
483 | 483 |
| |
484 | 484 |
| |
| 485 | + | |
485 | 486 |
| |
486 | 487 |
| |
487 | 488 |
| |
| |||
637 | 638 |
| |
638 | 639 |
| |
639 | 640 |
| |
640 |
| - | |
641 |
| - | |
| 641 | + | |
| 642 | + | |
642 | 643 |
| |
643 | 644 |
| |
644 | 645 |
| |
|
0 commit comments
Comments
(0)