forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9fb1396
committed
Avoid concurrent calls to bindtextdomain().
We previously supposed that it was okay for different threads tocall bindtextdomain() concurrently (cf. commit1f655fd).It now emerges that there's at least one gettext implementationin which that triggers an abort() crash, so let's stop doing that.Add mutexes guarding libpq's and ecpglib's calls, which are theonly ones that need worry about multithreaded callers.Note: in libpq, we could perhaps have piggybacked ondefault_threadlock() to avoid defining a new mutex variable.I judge that not terribly safe though, since libpq_gettext couldbe called from code that is holding the default mutex. If thatwere the first such call in the process, it'd fail. An extramutex is cheap insurance against unforeseen interactions.Per bug #18312 from Christian Maurer. Back-patch to allsupported versions.Discussion:https://postgr.es/m/18312-bbbabc8113592b78@postgresql.orgDiscussion:https://postgr.es/m/264860.1707163416@sss.pgh.pa.us1 parent95e960e commit9fb1396
2 files changed
+52
-26
lines changedLines changed: 26 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
521 |
| - | |
522 |
| - | |
523 |
| - | |
524 |
| - | |
525 |
| - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
526 | 526 |
| |
527 | 527 |
| |
| 528 | + | |
528 | 529 |
| |
529 | 530 |
| |
530 | 531 |
| |
| |||
534 | 535 |
| |
535 | 536 |
| |
536 | 537 |
| |
537 |
| - | |
538 |
| - | |
539 |
| - | |
540 |
| - | |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
545 | 558 |
| |
546 | 559 |
| |
547 | 560 |
| |
|
Lines changed: 26 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1274 | 1274 |
| |
1275 | 1275 |
| |
1276 | 1276 |
| |
1277 |
| - | |
1278 |
| - | |
1279 |
| - | |
1280 |
| - | |
1281 |
| - | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1282 | 1282 |
| |
1283 | 1283 |
| |
| 1284 | + | |
1284 | 1285 |
| |
1285 | 1286 |
| |
1286 | 1287 |
| |
| |||
1290 | 1291 |
| |
1291 | 1292 |
| |
1292 | 1293 |
| |
1293 |
| - | |
1294 |
| - | |
1295 |
| - | |
1296 |
| - | |
1297 |
| - | |
1298 |
| - | |
1299 |
| - | |
1300 |
| - | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
1301 | 1314 |
| |
1302 | 1315 |
| |
1303 | 1316 |
| |
|
0 commit comments
Comments
(0)