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

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

Open
andrew-taylor opened this issue Sep 19, 2022 · 1 comment
Open

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

andrew-taylor opened this issue Sep 19, 2022 · 1 comment

Comments

@andrew-taylor
Copy link

$ (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
@insou22
Copy link
Owner

insou22 commented Sep 19, 2022

evil...

this issue also applies to j family range also

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