Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(minidump): Do not emit default CFI for the .ra register #157

Merged
merged 1 commit into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions minidump/src/cfi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,6 @@ impl<W: Write> AsciiCfiWriter<W> {
}
}

// Breakpad STACK CFI records must provide a .ra rule, but DWARF CFI may not
// establish any rule for .ra if the return address column is an ordinary register,
// and that register holds the return address on entry to the function. So establish
// a .ra rule citing the return address register.
if !rule_cache.contains_key(&ra) {
let rule = RegisterRule::SameValue::<R>;
written |= Self::write_register_rule(&mut line, info.arch, ra, &rule, ra)?;
}

if written {
self.inner
.write_all(&line)
Expand Down
6 changes: 3 additions & 3 deletions minidump/tests/snapshots/test_cfi__cfi_elf.snap
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
created: "2019-04-24T14:55:14.510136Z"
creator: insta@0.7.4
created: "2019-07-05T18:52:40.332785Z"
creator: insta@0.8.1
source: minidump/tests/test_cfi.rs
expression: cfi
---
STACK CFI INIT 1dc0 2a .cfa: $rsp 8 + .ra: $rip
STACK CFI INIT 1dc0 2a .cfa: $rsp 8 +
STACK CFI INIT 1580 370 .cfa: $rsp 16 + .ra: .cfa -8 + ^
STACK CFI 1586 .cfa: $rsp 24 +
STACK CFI INIT 1ec0 3b .cfa: $rsp 8 + .ra: .cfa -8 + ^
Expand Down
2 changes: 1 addition & 1 deletion py/tests/res/minidump/crash_linux.sym
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
STACK CFI INIT 1f10 2a .cfa: $rsp 8 + .ra: $rip
STACK CFI INIT 1f10 2a .cfa: $rsp 8 +
STACK CFI INIT 1a90 470 .cfa: $rsp 16 + .ra: .cfa -8 + ^
STACK CFI 1a96 .cfa: $rsp 24 +
STACK CFI INIT 21d4 3a .cfa: $rsp 8 + .ra: .cfa -8 + ^
Expand Down