Commit 6dd9926
authored
Rollup merge of rust-lang#76521 - tavianator:fix-pthread-getattr-destroy, r=Amanieu
Fix segfault if pthread_getattr_np fails
glibc [destroys][1] the passed pthread_attr_t if pthread_getattr_np()
fails. Destroying it again leads to a segfault. Fix it by only
destroying it on success for glibc.
[1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_getattr_np.c;h=ce437205e41dc05653e435f6188768cccdd91c99;hb=HEAD#l2051 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| |||
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
| |||
403 | 406 | | |
404 | 407 | | |
405 | 408 | | |
| 409 | + | |
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
| |||
446 | 450 | | |
447 | 451 | | |
448 | 452 | | |
449 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
450 | 456 | | |
451 | 457 | | |
452 | 458 | | |
| |||
0 commit comments