Closed
Bug 1789505
Opened 2 years ago
Closed 2 years ago
[rust 1.65] error: the type `sockaddr_un` does not permit being left uninitialized
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox106 fixed)
RESOLVED
FIXED
106 Branch
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
[task 2022-09-06T10:44:57.268Z] 10:44:57 INFO - error: the type `sockaddr_un` does not permit being left uninitialized
[task 2022-09-06T10:44:57.269Z] 10:44:57 INFO - --> third_party/rust/mio-0.6.23/src/sys/unix/uds.rs:55:39
[task 2022-09-06T10:44:57.269Z] 10:44:57 INFO - |
[task 2022-09-06T10:44:57.269Z] 10:44:57 INFO - 55 | let addr: libc::sockaddr_un = mem::uninitialized();
[task 2022-09-06T10:44:57.269Z] 10:44:57 INFO - | ^^^^^^^^^^^^^^^^^^^^
[task 2022-09-06T10:44:57.269Z] 10:44:57 INFO - | |
[task 2022-09-06T10:44:57.269Z] 10:44:57 INFO - | this code causes undefined behavior when executed
[task 2022-09-06T10:44:57.270Z] 10:44:57 INFO - | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
[task 2022-09-06T10:44:57.270Z] 10:44:57 INFO - |
[task 2022-09-06T10:44:57.270Z] 10:44:57 INFO - = note: `-D invalid-value` implied by `-D warnings`
[task 2022-09-06T10:44:57.270Z] 10:44:57 INFO - note: integers must not be uninitialized (in this struct field)
[task 2022-09-06T10:44:57.270Z] 10:44:57 INFO - --> /builds/worker/checkouts/gecko/third_party/rust/libc/src/unix/linux_like/mod.rs:228:9
[task 2022-09-06T10:44:57.270Z] 10:44:57 INFO - |
[task 2022-09-06T10:44:57.270Z] 10:44:57 INFO - 228 | pub sun_family: sa_family_t,
[task 2022-09-06T10:44:57.271Z] 10:44:57 INFO - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2022-09-06T10:44:57.271Z] 10:44:57 INFO - error: could not compile `mio` due to previous error
Assignee | ||
Updated•2 years ago
|
Blocks: rustc-1.65
Assignee | ||
Comment 1•2 years ago
|
||
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/aa127682247c
Silence rustc 1.65 warning about mem::uninitialized. r=emilio
Comment 3•2 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox106:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•