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

Assertion failed (left == right) during SCCP stage on /bin/ls #251

Open
XVilka opened this issue Mar 1, 2019 · 3 comments
Open

Assertion failed (left == right) during SCCP stage on /bin/ls #251

XVilka opened this issue Mar 1, 2019 · 3 comments

Comments

@XVilka
Copy link
Contributor

XVilka commented Mar 1, 2019

image

Here is the /bin/ls binary from Fedora 29
fedora-ls.zip

@Mm7
Copy link
Contributor

Mm7 commented Mar 9, 2019

@XVilka @kriw
It seems that the issue is within ssaconstructor.rs but I still can't see what is wrong.

I'm not really familiar with the frontend code, can you please look into this bug? Thanks!
Here is a minimal code to reproduce the crash (the assembled version is attached to this comment):

hello:	mov rdx, qword [rdi + 8]    ; [0x8:8]=0 ; arg1
	xor eax, eax
	test rdx, rdx
	je out
	nop dword [rax + rax]
loop:	mov rcx, qword [rdx]
	sub rcx, rdx
	mov rdx, qword [rdx + 8]    ; [0x8:8]=0
	add rax, rcx
	test rdx, rdx
	jne loop
	ret
out:	ret

binary.zip

@XVilka
Copy link
Contributor Author

XVilka commented Mar 11, 2019

@Mm7 by the way we have regressions tests for radeco too, see https://github.com/radareorg/radeco-regressions

So you can add binaries/tests here too.

@kriw
Copy link
Collaborator

kriw commented Mar 12, 2019

@Mm7
I tried to find the root cause of the bug, but I also can't see what is wrong.
It seems that out: ret is not processed properly. This will cause that the destination node of je out is missing.
I will continue to try to resolve this issue, thank you.

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

No branches or pull requests

3 participants