debuginfo/dwarf: Deobfuscation of flutter function names fails sometimes
loewenheim opened this issue · 0 comments
loewenheim commented
We have seen a case where for equivalent events on MacOs and Android, deobfuscation works correctly in the Android case, but not the MacOs case.
- For simplicity, call the MacOs debug file
macos.dSYM
and the Android oneandroid.debug
. Bothmacos.dSYM
andandroid.debug
contain obfuscated names in their symbol tables and the properly deobfuscated names in the actual debug information. The difference is that in the MacOs case, the name in the symbol table is preferred, while in the Android case, it's the name in the debug info. - The logic of which name to prefer is controlled by the
prefer_dwarf_names
flag. This flag is set insymbolic/symbolic-debuginfo/src/dwarf.rs
Line 515 in 9d27cd5
DW_AT_producer
attribute has the value "Dart VM". - In fact we have
DW_AT_producer == "Dart VM"
for bothmacos.dSYM
andandroid.debug
. What's going on? It appears that for whatever reason, inandroid.debug
this attribute value is an in-place string literal, while inmacos.dSYM
it's a reference to the string section. - We don't correctly resolve the string reference, leading to everything going wrong.