Closed Bug 1903583 Opened 5 months ago Closed 5 months ago

rust_minidump_writer_linux and Breakpad disagree on the alignment of the context structure on Android/AArch64

Categories

(Toolkit :: Crash Reporting, defect)

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: gsvelto, Assigned: gsvelto)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I noticed this issue by using debug builds w/ recent versions of the Rust compiler. copy_nonoverlapping() now checks if the source and destination pointers have the same alignment constraints, and this causes crash tests to fail with an assertion because Breakpad only aligns that structure to 8 bytes instead of the 16 that Rust expects. That's unsurprising because Breakpad declares the context as a char array without any specific alignment requirements. Setting the proper alignment should be sufficient to solve this issue.

Also replace core::ptr::* uses with the std::ptr::* equivalents.

Assignee: nobody → gsvelto
Attachment #9408437 - Attachment description: WIP: Bug 1903583 - Enforce the same alignment for the crash context across C++ and Rust → Bug 1903583 - Enforce the same alignment for the crash context across C++ and Rust r=afranchuk
Status: NEW → ASSIGNED
Pushed by gsvelto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/02caddd04031 Enforce the same alignment for the crash context across C++ and Rust r=afranchuk

Backed out for causing build bustages with rust_minidump_writer_linux

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: error[E0658]: use of unstable library feature 'offset_of'
    error: could not compile rust_minidump_writer_linux (lib) due to 4 previous errors
    gmake[4]: *** [/builds/worker/checkouts/gecko/config/makefiles/rust.mk:498: force-cargo-library-build] Error 101
Flags: needinfo?(gsvelto)
Flags: needinfo?(gsvelto)
Pushed by gsvelto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7d1c4c23e5a Enforce the same alignment for the crash context across C++ and Rust r=afranchuk
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: