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

sparcv9 radare2/capstone #426

Closed
zonkzonk opened this issue Jul 26, 2015 · 16 comments
Closed

sparcv9 radare2/capstone #426

zonkzonk opened this issue Jul 26, 2015 · 16 comments

Comments

@zonkzonk
Copy link

Hi,

in revision d5a8e9dafe81990091ff648f23ffe92c67e34bb8

the following bug happens in sparc code with radare2:

radareorg/radare2#3008

Greetings
--zlul

@aquynh
Copy link
Collaborator

aquynh commented Jul 26, 2015

can you provide the input (in hexcode format) triggering the problem? the link above looks confused to me.

thanks.

@zonkzonk
Copy link
Author

see updated issue. I don't know exactly what input bytes trigger this, but you can look at bt full output.
I can also provide valgrind output.

Greetings
--zlul

@aquynh
Copy link
Collaborator

aquynh commented Jul 26, 2015

i looked at that, but it is still not clear what causes the issue.

i can fix this very quickly if you can give me the input (best in hexcode form), so please narrow down on what input triggers this segfault.

thanks.

@zonkzonk
Copy link
Author

did an additional strace -Divx. Though I did not find the exact input trigger.

@radare
Copy link
Contributor

radare commented Jul 27, 2015

Which version of capstone are you using? The one shipped with r2-git, or using the system one from the last release?

I cannot reproduce your issue with r2.

On 28 Jul 2015, at 00:51, zonkzonk notifications@github.com wrote:

did an additional strace -Divx. Though I did not find the exact input trigger.


Reply to this email directly or view it on GitHub.

@zonkzonk
Copy link
Author

capstone version from r2-git: d5a8e9dafe81990091ff648f23ffe92c67e34bb8

@radare
Copy link
Contributor

radare commented Jul 27, 2015

I have reproduced and tested the issue. it happens with and without detail, also with and without v9 bit set. The crashing bytes are BB 70 00 00. You can reproduce this by building r2 with ASAN or running it with valgrind:

$ rasm2 -a sparc -b 32 -d bb700000

@aquynh
Copy link
Collaborator

aquynh commented Jul 28, 2015

what is the expected output here?

thanks.

@radare
Copy link
Contributor

radare commented Jul 28, 2015

I guess its an invalid instruction but the problem is that it is segfaulting

On 28 Jul 2015, at 04:06, Nguyen Anh Quynh notifications@github.com wrote:

what is the expected output here?

thanks.


Reply to this email directly or view it on GitHub.

@aquynh
Copy link
Collaborator

aquynh commented Jul 28, 2015

confirmed. this bug comes from LLVM itself.

will see how to fix this, thanks.

@radare
Copy link
Contributor

radare commented Jul 28, 2015

thanks!

On 28 Jul 2015, at 12:18, Nguyen Anh Quynh notifications@github.com wrote:

confirmed. this bug comes from LLVM itself.

will see how to fix this, thanks.


Reply to this email directly or view it on GitHub #426 (comment).

@radare
Copy link
Contributor

radare commented Aug 8, 2015

any updates on this?

@aquynh
Copy link
Collaborator

aquynh commented Aug 8, 2015

I can fix this issue now, but will take few days to integrate with the code
properly. will commit the fix in few days.

On Aug 8, 2015 9:33 AM, "radare" notifications@github.com wrote:

any updates on this?


Reply to this email directly or view it on GitHub.

@aquynh
Copy link
Collaborator

aquynh commented Aug 13, 2015

the right output is popc %g0, %i5

fixed in the "next" branch now. will fix it in "master" branch later.

thanks.

@radare
Copy link
Contributor

radare commented Aug 13, 2015

thanks

@aquynh
Copy link
Collaborator

aquynh commented Aug 13, 2015

fixed in the "master" branch, too.

@aquynh aquynh closed this as completed Aug 14, 2015
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

3 participants