-
Notifications
You must be signed in to change notification settings - Fork 444
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
argument test failures in RISC-V with clang #1876
Comments
We know that the argument tests are broken in gcc, but it should be fine for clang. |
It seems arguments passed through stack are broken. I've looked at the binary and found that it adjusted stack pointers to save register values before calling I think we can only support stack arguments on (full) dynamic tracing. |
Do you mean the 00000000000107cc <bar>:
107cc: 7179 addi sp,sp,-48 # NOTE: sp modified before mcount
107ce: f406 sd ra,40(sp)
107d0: f022 sd s0,32(sp)
107d2: 1800 addi s0,sp,48
107d4: fcb43c23 sd a1,-40(s0)
107d8: fca43823 sd a0,-48(s0)
107dc: ef5ff0ef jal ra,106d0 <_mcount@plt>
...
0000000000010840 <foo>:
10840: 7139 addi sp,sp,-64 # NOTE: sp modified before mcount
10842: fc06 sd ra,56(sp)
10844: f822 sd s0,48(sp)
10846: 0080 addi s0,sp,64
10848: fca43823 sd a0,-48(s0)
1084c: e85ff0ef jal ra,106d0 <_mcount@plt>
...
00000000000108ea <many>:
108ea: 7159 addi sp,sp,-112 # NOTE: sp modified before mcount
108ec: f406 sd ra,40(sp)
108ee: f022 sd s0,32(sp)
108f0: 1800 addi s0,sp,48
108f2: fca43823 sd a0,-48(s0)
108f6: 03143c23 sd a7,56(s0)
108fa: 03043823 sd a6,48(s0)
108fe: f41c sd a5,40(s0)
10900: f018 sd a4,32(s0)
10902: ec14 sd a3,24(s0)
10904: e810 sd a2,16(s0)
10906: e40c sd a1,8(s0)
10908: dc9ff0ef jal ra,106d0 <_mcount@plt>
...
0000000000010990 <check>:
10990: 7179 addi sp,sp,-48 # NOTE: sp modified before mcount
10992: f406 sd ra,40(sp)
10994: f022 sd s0,32(sp)
10996: 1800 addi s0,sp,48
10998: fcb43823 sd a1,-48(s0)
1099c: fca43c23 sd a0,-40(s0)
109a0: d31ff0ef jal ra,106d0 <_mcount@plt>
... Then you're right. There is no way to handle stack pushed arguments in this binary structure unless we disassemble the function prologue. |
cc: @gichoel |
Based on the code snippet above, I understand the following two issues:
Apart from the above problem, I was analyzing the operations after the Maybe when I am done with that, I will be able to understand the problem. |
I see some test failures in RISC-V as follows.
The text was updated successfully, but these errors were encountered: