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): Fixed bug that caused functions to have len 0 #324

Merged
merged 2 commits into from
Feb 15, 2021

Conversation

loewenheim
Copy link
Contributor

This fixes #285. The problem wast that in the line

let len = (end_address - start_address) as u16;

len could be 0 if end_address - start_address was a multiple of 2^16.

@loewenheim loewenheim requested a review from a team February 15, 2021 14:45
@mitsuhiko
Copy link
Member

Classic

len, 0,
"While adding function {}: length must be positive",
function.name
);

let len = match NonZeroU16::new(len) {
Some(len) => len,
Copy link
Member

Choose a reason for hiding this comment

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

Let's also break below, to avoid endless loops. Sorry about that, this was my mistake in the previous review suggestion.

@loewenheim loewenheim merged commit 4f37163 into master Feb 15, 2021
@loewenheim loewenheim deleted the fix/issue285 branch February 15, 2021 15:59
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.

symbolic fails lookup if the lookup address doesn't line up exactly with line record
3 participants