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

Crashes since the last fix "Ghidra loses '#' symbol in display section " #11

Open
Elmue opened this issue Jan 16, 2021 · 4 comments
Open

Comments

@Elmue
Copy link

Elmue commented Jan 16, 2021

Since the last fix
c64dd2a
Ghidra crashes with a null pointer exception.

I disassemble the same binary file with the same settings as last week.
Before I have never seen that crash.
Now it happens always.

How to reproduce:
I create a new project.
Select C166
Set base address = C00000
Select an area with the mouse which I want to disassemble
right click the selected area
click "Disassemble" in the menu

The first bytes are disassembled fine until Ghidra finds invalid bytes in a section which does not contain valid code.

Before your last fix Ghidra simply skipped that invalid bytes and continued later on where it found valid code.
Now it crashes here:
It seems to have a problem with the byte CC

      c081bc cc              ??         CCh
      c081bd 76              ??         76h    v
      c081be c0              ??         C0h
      c081bf 00              ??         00h
      c081c0 3e              ??         3Eh    >
      c081c1 77              ??         77h    w
      c081c2 c0              ??         C0h
      c081c3 00              ??         00h
      c081c4 42              ??         42h    B
      c081c5 77              ??         77h    w
      c081c6 c0              ??         C0h
      c081c7 00              ??         00h
      c081c8 aa              ??         AAh
      c081c9 77              ??         77h    w
      c081ca c0              ??         C0h
      c081cb 00              ??         00h
      c081cc 74              ??         74h    t
      c081cd 77              ??         77h    w
      c081ce c0              ??         C0h
      c081cf 00              ??         00h
      c081d0 70              ??         70h    p
      c081d1 77              ??         77h    w
      c081d2 c0              ??         C0h
      c081d3 00              ??         00h
      c081d4 bc              ??         BCh
      c081d5 77              ??         77h    w
      c081d6 c0              ??         C0h
      c081d7 00              ??         00h
      c081d8 c0              ??         C0h
      c081d9 77              ??         77h    w
      c081da c0              ??         C0h
      c081db 00              ??         00h
      c081dc c6              ??         C6h
      c081dd 77              ??         77h    w
      c081de c0              ??         C0h
      c081df 00              ??         00h
      c081e0 8e              ??         8Eh
      c081e1 77              ??         77h    w
      c081e2 c0              ??         C0h
      c081e3 00              ??         00h
      c081e4 8a              ??         8Ah

If you cannot reproduce the problem I can send you the binary file.

@esaulenka
Copy link
Owner

yes it would be better, if you share your binary.

I am tested it only with one binary, and it works ok.

@Elmue
Copy link
Author

Elmue commented Jan 17, 2021

I uploaded the file here:
https://netcult.ch/elmue/FlashMemory.bin

When you import the file set the base address C00000
The flash memory has code sections and data sections.
The code section which is interesting for me and which causes the crash is from C08000 until the end (C1FFFF)
Mark that section and click "Disassemble" and you will see.

@Elmue
Copy link
Author

Elmue commented Jan 28, 2021

No answer anymore ?
Could you reproduce the problem?

@Elmue
Copy link
Author

Elmue commented Feb 22, 2021

Well, at least i found a workaround:
Instead of selecting "Disassemble" in the menu, use "Disassemble Static"
I have no idea what is the difference but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants