forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbdc79dd
committed
Fix ancient bug in ecpg's pthread_once() emulation for Windows.
We must not set the "done" flag until after we've executed theinitialization function. Otherwise, other threads can fall throughthe initial unlocked test before initialization is really complete.This has been seen to cause rare failures of ecpg's thread/descriptortest, and it could presumably cause other sorts of misbehavior inthreaded ECPG-using applications, since ecpglib relies onpthread_once() in several places.Diagnosis and patch by me, based on investigation by Alexander Lakhin.Back-patch to all supported branches (the bug dates to 2007).Discussion:https://postgr.es/m/16685-d6cd241872c101d3@postgresql.org1 parent78ccf7f commitbdc79dd
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
482 | 482 |
| |
483 | 483 |
| |
484 | 484 |
| |
485 |
| - | |
486 | 485 |
| |
| 486 | + | |
487 | 487 |
| |
488 | 488 |
| |
489 | 489 |
| |
|
0 commit comments
Comments
(0)