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(symcache): Support lookup for public syms larger than 65k #320

Merged
merged 3 commits into from
Feb 11, 2021

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Feb 10, 2021

Fixes part of #284 (comment)

Public symbol records often have no size. If there's a gap larger than 65k, the symcache lookup would not resolve the last symbol. For example, with this Breakpad symbol a lookup for 0x180000 should resolve symbol_a:

PUBLIC 100000 0 symbol_a
PUBLIC 200000 0 symbol_b

In practice, it is likely that there are symbols missing and the lookup would in fact be wrong. However, there could be the possibility of such large functions and with how symbol tables are structured, this would be the expected result. Note that this now also matches Breakpad's behavior.

@jan-auer jan-auer requested review from a team and loewenheim February 10, 2021 10:05
@@ -209,11 +209,18 @@ impl FuncRecord {
}

/// The instruction address _after_ the end of the function.
///
/// TODO(ja): Describe special case.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The special case is: len of 0xffff means we don't know how big it is and therefore assume it goes all the way to the end.

}

/// Checks whether the given address is covered by the function.
///
/// TODO(ja): Describe special case.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The special case here is that we use <= to treat records with len == 0?

@jan-auer jan-auer merged commit 3ef4e1b into master Feb 11, 2021
@jan-auer jan-auer deleted the fix/symcache-lookup-65k branch February 11, 2021 11:17
jan-auer added a commit that referenced this pull request Feb 11, 2021
* master:
  fix(symcache): Support lookup for public syms larger than 65k (#320)
jan-auer added a commit to getsentry/sentry that referenced this pull request Feb 16, 2021
With getsentry/symbolic#320, we changed how trailing PUBLIC records in
incomplete Breakpad symbols are handled during native symbolication. The unreal
tests contain such incomplete symbols as fixtures to reduce their overall size,
which now creates changes in the snapshot.

We are not really interested in those additonal frames. By adding a phantom
function at the end, Symbolicator does not apply the trailing symbol to all
intermediate frames, which keeps the snapshots stable.
jan-auer added a commit that referenced this pull request Mar 1, 2021
* master:
  test: add similar-asserts' assert_eq (#333)
  release: 8.0.4
  meta: Changelog for 8.0.4
  build: Drop support for python 2.7 (#328)
  meta(vscode): Fix include paths for C++ (#331)
  doc(debuginfo): Add descriptions of records to breakpad.pest (#329)
  build: Replace virtualenv with venv
  doc(symcache): Symcache documentation
  fix(debuginfo): Support debug_addr indexes in DWARF functions (#326)
  fix(symcache): Fixed bug that caused functions to have len 0 (#324)
  ref(symcache): FuncRecord::len must be nonzero (#323)
  fix: Clippy 1.50 lints (#322)
  fix(symcache): Support lookup for public syms larger than 65k (#320)
  fix(symcache): Compute correct line offsets (#319)
  release: 8.0.3
  meta: Changelog
  build: Update goblin to 0.3.1 (#318)
  fix(elf): Consider sections of type SHT_MIPS_DWARF (#317)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants