encounter/objdiff

range end index 2848 out of range for slice of length 2844

Closed this issue · 6 comments

Not really sure what files I should provide to assist with looking into this problem? I have attached the stacktrace below but I can provide any other files if needed.

thread '<unnamed>' panicked at objdiff-core/src/diff/code.rs:27:9:
range end index 2848 out of range for slice of length 2844
stack backtrace:
   0:     0x565197011e19 - <unknown>
   1:     0x56519677bf13 - <unknown>
   2:     0x565196fd66f2 - <unknown>
   3:     0x565197012f93 - <unknown>
   4:     0x5651970134bc - <unknown>
   5:     0x565197013068 - <unknown>
   6:     0x565197012fc9 - <unknown>
   7:     0x565197012fbc - <unknown>
   8:     0x56519657b79f - <unknown>
   9:     0x56519677b416 - <unknown>
  10:     0x56519657b7a9 - <unknown>
  11:     0x565196c6dff6 - <unknown>
  12:     0x565196c8bf51 - <unknown>
  13:     0x565196ca4219 - <unknown>
  14:     0x565196ca3309 - <unknown>
  15:     0x565197015efb - <unknown>
  16:     0x7ff3cd0617eb - <unknown>
  17:     0x7ff3cd0e518c - <unknown>
  18:                0x0 - <unknown>

What objdiff version? If v2, could you try the latest v3 beta?

Hi @encounter, I was using 2.7.1

Switching to 3.0.0-beta.10 instead gives the following error.

Loading object '/home/umbreon/nsmb/config/A2DE/arm9/../../../build/delinks/src/Base.o'
Symbol data out of bounds: 0x9a4..0xb20

Sounds like the object might have an invalid symbol. You may want to use readelf -Wes to see what's going on.

@encounter Yep thank you for advice I have gotten this resolved now.
It turns out in my ds-decomp delinks.txt I had the end address 4 bytes off what it was supposed to be resulting in this error. Everything is now working as expected now that its corrected.

Would it potentially be worth updating the error to specify that it is the provided file itself that has the error? It may help with narrowing down issues in the input file before people raise issues.

It might be better to submit an issue to dsd, since it's emitting invalid objects.

All good, thank you for the help.