This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit cbf6492
authored
Unrolled build for rust-lang#136826
Rollup merge of rust-lang#136826 - xizheyin:issue-136737, r=thomcc
Replace mem::zeroed with mem::MaybeUninit::uninit for large struct in Unix
As discussion in rust-lang#136737.
- Replace `mem::zeroed()` with `MaybeUninit::uninit()` for `sockaddr_storage` in `accept()` and `recvfrom()` since these functions fill in the address structure
- Replace `mem::zeroed()` with `MaybeUninit::uninit()` for `pthread_attr_t` in thread-related functions since `pthread_attr_init()` initializes the structure
- Add references to man pages to document this behaviorFile tree
4 files changed
+45
-26
lines changed- library/std/src/sys
- net/connection
- socket
- pal/unix
4 files changed
+45
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
561 | 564 | | |
562 | | - | |
563 | | - | |
| 565 | + | |
| 566 | + | |
564 | 567 | | |
565 | 568 | | |
566 | 569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
338 | | - | |
| 341 | + | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
323 | 326 | | |
324 | | - | |
| 327 | + | |
325 | 328 | | |
326 | | - | |
| 329 | + | |
327 | 330 | | |
328 | | - | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
332 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
336 | | - | |
| 342 | + | |
337 | 343 | | |
338 | 344 | | |
339 | 345 | | |
| |||
509 | 515 | | |
510 | 516 | | |
511 | 517 | | |
512 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
513 | 523 | | |
514 | | - | |
| 524 | + | |
515 | 525 | | |
516 | | - | |
| 526 | + | |
517 | 527 | | |
518 | | - | |
| 528 | + | |
519 | 529 | | |
520 | 530 | | |
521 | | - | |
| 531 | + | |
522 | 532 | | |
523 | 533 | | |
524 | 534 | | |
| |||
531 | 541 | | |
532 | 542 | | |
533 | 543 | | |
534 | | - | |
| 544 | + | |
535 | 545 | | |
536 | 546 | | |
537 | 547 | | |
| |||
552 | 562 | | |
553 | 563 | | |
554 | 564 | | |
555 | | - | |
| 565 | + | |
556 | 566 | | |
557 | 567 | | |
558 | 568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
| 70 | + | |
68 | 71 | | |
69 | | - | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | | - | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | | - | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
89 | | - | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
0 commit comments