rust-minidump / rust-minidump

Type definitions, parsing, and analysis for the minidump file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux kernel SI_* codes are not printed correctly

gabrielesvelto opened this issue · comments

Processing a crash caused by abort() such as this one used to yield SIGABRT / SI_QUEUE for the crash reason. Current versions of minidump-stackwalk print the raw value of the si_code field instead: SIGABRT / 0xffffffff.

This is a regression that was introduced when we upgraded the num-derive crate here: 4a3da19

I've been looking at the code and it's unclear to me why this is happening, I must have a look at the num-derive internals. From the documentation it's unclear why this isn't working, it should be supported use-case.

It seems that the num-derive crate produces two conversion methods for that enum, from_u64() and from_i64() and frankly I have no idea why. Either way, using from_i64() works but is kind of odd.

Nevermind, I can get it to generate the right conversion methods, and using from_i32() works as expected.