question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DumpFileLoader: IndexOutOfBoundsException

See original GitHub issue

Describe the bug I hope it’s not too soon to open an issue for this as it was recently added. Anyway, most of the time loading a dump file from procdump results in an IndexOutOfBoundsException.

To Reproduce Steps to reproduce the behavior:

  1. Try to import attached dump of demangler_gnu_v2_33_1 (couldn’t find the decompiler process and it wouldn’t let me do Ghidra)

Attachments

stacktrace
2022-06-16 19:33:50 ERROR (ImporterUtilities) Error Importing File: Error importing file: demangler_gnu_v2_33_1.exe_220616_193343.dmp java.lang.IndexOutOfBoundsException: Specified length extends beyond file bytes length
	at ghidra.program.database.mem.MemoryMapDB.checkFileBytesRange(MemoryMapDB.java:697)
	at ghidra.program.database.mem.MemoryMapDB.createInitializedBlock(MemoryMapDB.java:660)
	at ghidra.app.util.MemoryBlockUtils.createInitializedBlock(MemoryBlockUtils.java:227)
	at ghidra.file.formats.dump.DumpFileLoader.loadRanges(DumpFileLoader.java:183)
	at ghidra.file.formats.dump.DumpFileLoader.parseDumpFile(DumpFileLoader.java:150)
	at ghidra.file.formats.dump.DumpFileLoader.load(DumpFileLoader.java:122)
	at ghidra.app.util.opinion.AbstractLibrarySupportLoader.doLoad(AbstractLibrarySupportLoader.java:356)
	at ghidra.app.util.opinion.AbstractLibrarySupportLoader.loadProgram(AbstractLibrarySupportLoader.java:84)
	at ghidra.app.util.opinion.AbstractProgramLoader.load(AbstractProgramLoader.java:115)
	at ghidra.plugin.importer.ImporterUtilities.importSingleFile(ImporterUtilities.java:368)
	at ghidra.plugin.importer.ImporterDialog.lambda$okCallback$7(ImporterDialog.java:351)
	at ghidra.util.task.TaskBuilder$TaskBuilderTask.run(TaskBuilder.java:306)
	at ghidra.util.task.Task.monitoredRun(Task.java:134)
	at ghidra.util.task.TaskRunner.lambda$startTaskThread$0(TaskRunner.java:106)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

demangler_gnu_v2_33_1.exe_220616_193343.zip

Environment (please complete the following information):

  • OS: Microsoft Windows [Version 10.0.22000.708]
  • Java Version: 11
  • Ghidra Version: Approximately f0089b8efb5f0ab2717154d8b67676b673c4b561
  • Ghidra Origin: [e.g. official GitHub distro, third party distro, locally built]

Additional context I do have more, mostly enhancements I think, related to the new loaders. I don’t want to open a ton of things that might just be making their way through the pipeline though.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
d-millarcommented, Jun 25, 2022

@ghidra1 has tweaked the options so they CAN be set per-dump-type now, so I feel like we can do whatever we feel is best. I just don’t have a good sense of what actually would be best. I don’t want to set the default to something most users won’t tolerate, and making a decision based on some arbitrary size cutoff feels a bit dodgy.

1reaction
d-millarcommented, Jun 20, 2022

Revisited and (surprise) definitely an error on my part. Not doing the right thing for the CommentStreams (which were missing in my test examples), resulting in bad blocks that exceeded the file bounds. Fix in the queue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to fix java.lang.IndexOutOfBoundsException
You want to get an element from an empty array. That's why the Size: 0 from the exception. java.lang.IndexOutOfBoundsException: Index: 0, Size: 0....
Read more >
GetFile failed to start : java.lang.IndexOutOfBoundsException
Solved: Attached is the java stack. I am getting this error in the nifi.log whenever i am starting GetFile - 293383.
Read more >
https://raw.githubusercontent.com/NationalSecurity...
Added support for APPORT-style crash dumps (Ubuntu) to Dump File Loader. ... Fixed an IndexOutOfBoundsException in the Listing when the XREF <B>Group by ......
Read more >
astrelsky (astrelsky) - PullAnswer
MemoryByteProvider IOException from reading unititialized bytes · DumpFileLoader: IndexOutOfBoundsException · Windows Installer: Broken add to system path for all ...
Read more >
ghidra - bytemeta
DumpFileLoader : IndexOutOfBoundsException. lautalom. lautalom CLOSED · Updated 3 months ago · Exception reading .bss. nneonneo. nneonneo OPEN.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found