Skip to content

Dart generates broken debug information #47289

@ueman

Description

@ueman

This issue was originally reported in getsentry/sentry-dart#591

flutter build apk --split-per-abi --obfuscate --split-debug-info myfolder --release --verbose generates broken debug information since this commit 2362cd5 in Dart and since this commit flutter/flutter@f190bfb in Flutter.

I will let others reply to this but the current state of affairs is that what flutter generates is definitely a broken file. This is me summarzing what @relaxolotl found out:

The generated .dynamic section includes bad DT_HASH, DT_STRTAB and DT_SYMTAB records that point to virtual addresses which are not in a valid segment. Unfortunately our ELF library (goblin) treats these as fatal whereas some other tools can skip over this.

You can however see that llvm-readelf will also complain about this:

/usr/local/Cellar/llvm/12.0.1/bin/llvm-readelf: warning: 'app.android-arm(flutter2.5).symbols': unable to parse DT_HASH: virtual address is not in any segment: 0x17a420
/usr/local/Cellar/llvm/12.0.1/bin/llvm-readelf: warning: 'app.android-arm(flutter2.5).symbols': unable to parse DT_STRTAB: virtual address is not in any segment: 0x17a338
/usr/local/Cellar/llvm/12.0.1/bin/llvm-readelf: warning: 'app.android-arm(flutter2.5).symbols': unable to parse DT_SYMTAB: virtual address is not in any segment: 0x17a3c0

The commit that introduces the reordering is this one: dart-lang/sdk@2362cd5

Source: getsentry/sentry-dart#591 (comment)

Edit: Also see getsentry/sentry-dart#591 (comment) for even more information.

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions