mipsy icon indicating copy to clipboard operation
mipsy copied to clipboard

branches to label outside > 16-bit offset range not detected

Open andrew-taylor opened this issue 2 years ago • 1 comments

$ (printf 'main:b end\n';yes nop|sed 32767q;printf 'end:jr $ra') >a.s
$ 1521 mipsy a.s

error: segmentation fault

this happened because you tried to execute
the address `0x003e0000`, which is not a valid address to execute

the instruction that got us here was:
0x00400000 1   [0x10008000]    beq    $zero, $zero, -32768 #  main:b end


tip: the address `0x003e0000` is not part of any segment

andrew-taylor avatar Sep 19 '22 05:09 andrew-taylor

evil...

this issue also applies to j family range also

insou22 avatar Sep 19 '22 06:09 insou22