Comments (6)
Couldn't download the file (I've requested access), but I guess we'll need to handle overlapping ranges in a manner similar to #163
from addr2line.
Sorry, I've updated the sharing settings (got confused by new UI).
from addr2line.
That file contains a lot of functions that are at the same address:
0003c91f T _Unwind_Complete
0003c91f t _ZN15google_breakpad11StackwalkerD2Ev
0003c91f t _ZN15google_breakpad13CFIRuleParser7HandlerD2Ev
0003c91f t _ZN15google_breakpad13ModuleFactoryD2Ev
0003c91f t _ZN15google_breakpad14ExploitabilityD2Ev
0003c91f t _ZN15google_breakpad14MinidumpModule18SetShrinkDownDeltaEy
0003c91f t _ZN15google_breakpad14MinidumpObjectD2Ev
0003c91f t _ZN15google_breakpad22MinidumpUnloadedModule18SetShrinkDownDeltaEy
0003c91f t _ZN17SharedLibraryInfo10InitializeEv
0003c91f t _ZN19MappableExtractFile8finalizeEv
0003c91f t _ZN19ReplaceMallocBridge25DisablePHCOnCurrentThreadEv
0003c91f t _ZN19ReplaceMallocBridge26ReenablePHCOnCurrentThreadEv
etc.
It's fine if I change the assert to this:
debug_assert!(addresses
.windows(2)
.all(|w| w[0].range.end <= w[1].range.begin || w[0].range == w[1].range));
but I think we probably should delete the assert, because it could still trigger for other unlikelier cases. Not sure if we should be trying to handle function ranges that are overlapping but not equal. Can you think of any situation in which that might occur?
from addr2line.
Interesting. Thanks for looking into this!
The contents of that function (which for me is at 3c91e rather than 3c91f, for some reason) is just a single instruction: bx lr
. According to the internet, this means "Return, and possibly mode switch, depending on the value in the lr register". So it seems like it's basically an empty function. And looking up some of its names in the source, many of them seem to be empty virtual destructors, for example virtual ~MinidumpObject() {}
. Since the method is virtual, there needs to be an address for it that can be put in a vtable, so my guess is that this function is just "the empty function" that you can take the address of.
Requiring ranges to be equal if they overlap sounds fine to me, until we see counter-examples. But the bad cases should report an error rather than panicking. Having a library panic on bad input, even if it only happens in debug builds, is quite disruptive.
from addr2line.
I'm not sure that we should even return an error for bad cases, since they won't prevent symbolication of the non-overlapping functions. Currently this crate only returns errors for parsing errors, rather than semantic errors too. e.g. if a range has low_pc > high_pc then we ignore it.
from addr2line.
Oh I see, that sounds good too. Thanks for the fix!
from addr2line.
Related Issues (20)
- Ability to shrink the library? HOT 4
- `Context` is not `Send` anymore HOT 10
- Add Line to Address Functionality HOT 2
- Broken link in Readme HOT 1
- Leftover Travis CI references
- osx binary HOT 3
- empty output '??:?' HOT 2
- Duplicated `comp-dir` HOT 1
- Consider switching from memmap crate dependency
- Promote the CLI example to a `bin` crate HOT 2
- No line information found in jitted-1234-56.so files generated by perf inject --jit HOT 5
- Can't resolve libc symbol - which is found by C addr2line HOT 4
- New release HOT 3
- Remove `Context::new` HOT 1
- Tests are failing with nightly rust due to packed debuginfo HOT 4
- Errors when parsing DWARF from Wasm objects HOT 20
- Broken with clang-16 debug info on Linux HOT 2
- How to locate a symbol using this crate? HOT 4
- There is a bug when ```find_location_range``` is used to parse an relocatable object file. HOT 14
- Fails consistently with "failed to process type: 68 [Numerical result out of range]" HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addr2line.