Ghidra_C166 icon indicating copy to clipboard operation
Ghidra_C166 copied to clipboard

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

Open Elmue opened this issue 3 years ago • 4 comments

Since the last fix https://github.com/esaulenka/Ghidra_C166/commit/c64dd2a5e5b6132ba6f38d0b1293e7cfe684fb2a 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.

Elmue avatar Jan 16 '21 12:01 Elmue