rust-minidump icon indicating copy to clipboard operation
rust-minidump copied to clipboard

Breaking Changes to OpAnalysis.memory_accesses

Open kevin-yu-0602 opened this issue 1 year ago • 0 comments

We are running into an issue building minidump-processor v0.22.2 with default features disabled

minidump-processor = { version = "0.22.2", default-features = false }

error[E0599]: no method named `is_empty` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/process_state.rs:607:33
    |
607 |                 if !access_list.is_empty() {
    |                                 ^^^^^^^^ method not found in `&MemoryAccessList`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `is_empty`, perhaps you need to implement one of them:
            candidate #1: `ExactSizeIterator`
            candidate #2: `bitflags::traits::Flags`
help: one of the expressions' fields has a method of the same name
    |
607 |                 if !access_list.accesses.is_empty() {
    |                                 +++++++++

error[E0599]: no method named `iter` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/process_state.rs:609:54
    |
609 |                     for (idx, access) in access_list.iter().enumerate() {
    |                                                      ^^^^ method not found in `&MemoryAccessList`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `iter`, perhaps you need to implement it:
            candidate #1: `bitflags::traits::Flags`
help: one of the expressions' fields has a method of the same name
    |
609 |                     for (idx, access) in access_list.accesses.iter().enumerate() {
    |                                                      +++++++++

   Compiling enum-ordinalize v3.1.15
   Compiling diff v0.1.13
error[E0599]: no method named `iter` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/process_state.rs:910:37
    |
910 |                         access_list.iter().map(|access| {
    |                                     ^^^^ method not found in `&MemoryAccessList`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `iter`, perhaps you need to implement it:
            candidate #1: `bitflags::traits::Flags`
help: one of the expressions' fields has a method of the same name
    |
910 |                         access_list.accesses.iter().map(|access| {
    |                                     +++++++++

error[E0599]: no method named `iter` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/processor.rs:659:34
    |
658 | / ...                   access_list
659 | | ...                       .iter()
    | |                           -^^^^ method not found in `&MemoryAccessList`
    | |___________________________|
    |
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `iter`, perhaps you need to implement it:
            candidate #1: `bitflags::traits::Flags`
help: one of the expressions' fields has a method of the same name
    |
659 |                                 .accesses.iter()
    |                                  +++++++++

error[E0599]: no method named `iter` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/processor.rs:934:22
    |
933 |                   !access_list
    |  __________________-
934 | |                     .iter()
    | |                     -^^^^ method not found in `&MemoryAccessList`
    | |_____________________|
    |
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `iter`, perhaps you need to implement it:
            candidate #1: `bitflags::traits::Flags`
help: one of the expressions' fields has a method of the same name
    |
934 |                     .accesses.iter()
    |                      +++++++++

error[E0599]: no method named `contains_access` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/processor.rs:967:41
    |
967 |                         && !access_list.contains_access(crash_address, MemoryAccessType::Read)
    |                                         ^^^^^^^^^^^^^^^ method not found in `&MemoryAccessList`

error[E0599]: no method named `contains_access` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/processor.rs:968:41
    |
968 |                         && !access_list.contains_access(crash_address, MemoryAccessType::ReadWrite)
    |                                         ^^^^^^^^^^^^^^^ method not found in `&MemoryAccessList`

error[E0599]: no method named `contains_access` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/processor.rs:972:41
    |
972 |                         && !access_list.contains_access(crash_address, MemoryAccessType::Write)
    |                                         ^^^^^^^^^^^^^^^ method not found in `&MemoryAccessList`

error[E0599]: no method named `contains_access` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/processor.rs:973:41
    |
973 |                         && !access_list.contains_access(crash_address, MemoryAccessType::ReadWrite)
    |                                         ^^^^^^^^^^^^^^^ method not found in `&MemoryAccessList`

   Compiling yansi v1.0.1
error[E0599]: no method named `is_empty` found for reference `&MemoryAccessList` in the current scope
   --> minidump-processor-0.22.2/src/processor.rs:980:69
    |
980 |                     has_access_derivable_instruction && access_list.is_empty()
    |                                                                     ^^^^^^^^ method not found in `&MemoryAccessList`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `is_empty`, perhaps you need to implement one of them:
            candidate #1: `ExactSizeIterator`
            candidate #2: `bitflags::traits::Flags`
help: one of the expressions' fields has a method of the same name
    |
980 |                     has_access_derivable_instruction && access_list.accesses.is_empty()
    |                                                                     +++++++++

The change seemed to have been introduced in this commit https://github.com/rust-minidump/rust-minidump/commit/1f121375d37c964d1af3d18b29864ea543bd3c16#diff-c32b08203643ddeb9e374ab8be8ac296a601342e63e1ce4da5f96f180f26c3dfR59. And the fact that the MemoryAccessList is under one of the default feature flags.

kevin-yu-0602 avatar Oct 11 '24 23:10 kevin-yu-0602