forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2a2352e
committed
Replace memcpy() calls in xlog.c critical sections with struct assignments.
This gets rid of a dangerous-looking use of the not-volatile XLogCtlpointer in a couple of spinlock-protected sections, where the normalcoding rule is that you should only access shared memory through apointer-to-volatile. I think the risk is only hypothetical not actual,since for there to be a bug the compiler would have to move the spinlockacquire or release across the memcpy() call, which one sincerely hopesit will not. Still, it looks cleaner this way.Per comment from Daniel Farina and subsequent discussion.1 parent6259678 commit2a2352e
1 file changed
+3
-3
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8158 | 8158 |
| |
8159 | 8159 |
| |
8160 | 8160 |
| |
8161 |
| - | |
8162 |
| - | |
| 8161 | + | |
| 8162 | + | |
8163 | 8163 |
| |
8164 | 8164 |
| |
8165 | 8165 |
| |
| |||
8194 | 8194 |
| |
8195 | 8195 |
| |
8196 | 8196 |
| |
8197 |
| - | |
| 8197 | + | |
8198 | 8198 |
| |
8199 | 8199 |
| |
8200 | 8200 |
| |
|
0 commit comments
Comments
(0)