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

Failure to parse injected64-ForDistribution.i64 #10

Open
Tracked by #15
emesare opened this issue Oct 5, 2024 · 2 comments
Open
Tracked by #15

Failure to parse injected64-ForDistribution.i64 #10

emesare opened this issue Oct 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@emesare
Copy link
Member

emesare commented Oct 5, 2024

injected64-ForDistribution.i64.txt

thread 'test::parse_idbs' panicked at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/ops/function.rs:166:5:
called `Result::unwrap()` on an `Err` value: invalid Compiler ID Value

Stack backtrace:
   0: std::backtrace_rs::backtrace::libunwind::trace
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2: std::backtrace::Backtrace::create
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/backtrace.rs:331:13
   3: anyhow::error::<impl anyhow::Error>::msg
             at /Users/emesare/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.89/src/error.rs:85:36
   4: anyhow::__private::format_err
             at /Users/emesare/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.89/src/lib.rs:690:13
   5: idb_rs::id0::root_info::IDBParam::read_v2::{{closure}}
             at ./src/id0/root_info.rs:488:28
   6: core::option::Option<T>::ok_or_else
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/option.rs:1231:25
   7: idb_rs::id0::root_info::IDBParam::read_v2
             at ./src/id0/root_info.rs:487:21
   8: idb_rs::id0::root_info::IDBParam::read
             at ./src/id0/root_info.rs:222:22
   9: idb_rs::id0::btree::ID0Section::root_info::{{closure}}
             at ./src/id0/btree.rs:444:37
  10: core::iter::adapters::map::map_fold::{{closure}}
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/iter/adapters/map.rs:89:28
  11: <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/slice/iter/macros.rs:232:27
  12: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/iter/adapters/map.rs:129:9
  13: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/iter/adapters/map.rs:129:9
  14: core::iter::traits::iterator::Iterator::for_each
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/iter/traits/iterator.rs:858:9
  15: alloc::vec::Vec<T,A>::extend_trusted
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/alloc/src/vec/mod.rs:2962:17
  16: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/alloc/src/vec/spec_extend.rs:26:9
  17: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/alloc/src/vec/spec_from_iter_nested.rs:62:9
  18: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/alloc/src/vec/spec_from_iter.rs:33:9
  19: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/alloc/src/vec/mod.rs:2836:9
  20: core::iter::traits::iterator::Iterator::collect
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/iter/traits/iterator.rs:2054:9
  21: idb_rs::test::parse_idbs
             at ./src/lib.rs:626:46
  22: idb_rs::test::parse_idbs::{{closure}}
             at ./src/lib.rs:603:20
@emesare emesare changed the title Failure to parse IDB File Failure to parse injected64-ForDistribution.i64 Oct 5, 2024
@emesare emesare added the bug Something isn't working label Oct 5, 2024
@rbran
Copy link
Collaborator

rbran commented Oct 7, 2024

Fixed with 1bb8036

It's unclear if this is the best solution, but that's what ida seems to do.

@rbran
Copy link
Collaborator

rbran commented Oct 7, 2024

This database have a bug, the last entry on the dirtree/names is invalid, even ida don't know what to do with it.
screen
note that I'm selecting an non-existing item on the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants