Closed
Bug 1878782
Opened 1 year ago
Closed 11 months ago
[rustc 1.77] error: shared reference of mutable static is discouraged
Categories
(Core :: Graphics: Color Management, defect)
Core
Graphics: Color Management
Tracking
()
RESOLVED
FIXED
124 Branch
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
[task 2024-02-05T22:07:57.796Z] 22:07:57 ERROR - error: shared reference of mutable static is discouraged
[task 2024-02-05T22:07:57.797Z] 22:07:57 INFO - --> gfx/qcms/src/transform_neon.rs:54:42
[task 2024-02-05T22:07:57.797Z] 22:07:57 INFO - |
[task 2024-02-05T22:07:57.797Z] 22:07:57 INFO - 54 | let max: float32x4_t = vld1q_dup_f32(&clampMaxValue);
[task 2024-02-05T22:07:57.797Z] 22:07:57 INFO - | ^^^^^^^^^^^^^^ shared reference of mutable static
[task 2024-02-05T22:07:57.797Z] 22:07:57 INFO - |
[task 2024-02-05T22:07:57.798Z] 22:07:57 INFO - = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
[task 2024-02-05T22:07:57.798Z] 22:07:57 INFO - = note: reference of mutable static is a hard error from 2024 edition
[task 2024-02-05T22:07:57.798Z] 22:07:57 INFO - = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
[task 2024-02-05T22:07:57.798Z] 22:07:57 INFO - = note: `-D static-mut-ref` implied by `-D warnings`
[task 2024-02-05T22:07:57.799Z] 22:07:57 INFO - = help: to override `-D warnings` add `#[allow(static_mut_ref)]`
[task 2024-02-05T22:07:57.799Z] 22:07:57 INFO - help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
[task 2024-02-05T22:07:57.799Z] 22:07:57 INFO - |
[task 2024-02-05T22:07:57.799Z] 22:07:57 INFO - 54 | let max: float32x4_t = vld1q_dup_f32(addr_of!(clampMaxValue));
[task 2024-02-05T22:07:57.800Z] 22:07:57 INFO - | ~~~~~~~~~~~~~~~~~~~~~~~
[task 2024-02-05T22:07:57.800Z] 22:07:57 ERROR - error: shared reference of mutable static is discouraged
[task 2024-02-05T22:07:57.800Z] 22:07:57 INFO - --> gfx/qcms/src/transform_neon.rs:56:44
[task 2024-02-05T22:07:57.800Z] 22:07:57 INFO - |
[task 2024-02-05T22:07:57.800Z] 22:07:57 INFO - 56 | let scale: float32x4_t = vld1q_dup_f32(&floatScale);
[task 2024-02-05T22:07:57.801Z] 22:07:57 INFO - | ^^^^^^^^^^^ shared reference of mutable static
[task 2024-02-05T22:07:57.801Z] 22:07:57 INFO - |
[task 2024-02-05T22:07:57.801Z] 22:07:57 INFO - = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
[task 2024-02-05T22:07:57.801Z] 22:07:57 INFO - = note: reference of mutable static is a hard error from 2024 edition
[task 2024-02-05T22:07:57.803Z] 22:07:57 INFO - = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
[task 2024-02-05T22:07:57.803Z] 22:07:57 INFO - help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
[task 2024-02-05T22:07:57.803Z] 22:07:57 INFO - |
[task 2024-02-05T22:07:57.803Z] 22:07:57 INFO - 56 | let scale: float32x4_t = vld1q_dup_f32(addr_of!(floatScale));
[task 2024-02-05T22:07:57.804Z] 22:07:57 INFO - | ~~~~~~~~~~~~~~~~~~~~
[task 2024-02-05T22:07:57.804Z] 22:07:57 ERROR - error: could not compile `qcms` (lib) due to 2 previous errors
Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/173bf272980e
Remove useless static mut globals. r=gfx-reviewers,jrmuizel
Comment 3•11 months ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
status-firefox124:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•