anakryiko / retsnoop

Investigate kernel error call stacks
BSD 2-Clause "Simplified" License
210 stars 34 forks source link

sidecar: Remove usage of deprecated APIs #80

Closed d-e-s-o closed 1 month ago

d-e-s-o commented 1 month ago

The gimli crate deprecated the Dwarf::borrow() method some time back. Not using it makes it super inconvenient to support our current workflow. However, addr2line recently introduced the Context::from_arc_dwarf() constructor which allows us to keep existing code structure. Switch over to using it and remove usage of the deprecated Dwarf::borrow().

d-e-s-o commented 1 month ago

This will likely need to wait until the next addr2line release is cut that contains https://github.com/gimli-rs/addr2line/commit/5d10d81996cbbdf2637dda68460d9c0114d724ae.

anakryiko commented 1 month ago

@philipc is there any chance you can cut a new release of addr2line to help us get rid of this deprecation warning?

philipc commented 1 month ago

I'm currently working on another addr2line fix which I would like to finish before doing a release, but hopefully that won't be long.

Some comments on the usage here. gimli::Dwarf::borrow was being used here as a substitute for the lack of gimli::Dwarf::clone (rather than its intended usage of borrowing owned data), so I'm happy that this is switching to use an actual clone. However, I'm surprised that you need to use supplementary object files in the first place, since I haven't seen them used with the Linux kernel before, and the "sup" addr2line argument doesn't appear to be used when calling this.

philipc commented 1 month ago

Released addr2line 0.24.2.