forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf38b66e
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 parenta357cc0 commitf38b66e
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
478 |
| - | |
479 | 478 |
| |
| 479 | + | |
480 | 480 |
| |
481 | 481 |
| |
482 | 482 |
| |
|
0 commit comments
Comments
(0)