[8/11] patch series to port ASAN for riscv64
Depends On D87577
Differential D87579
[RISCV][ASAN] unwind fixup EccoTheDolphin on Sep 12 2020, 6:15 PM. Authored by
Details
[8/11] patch series to port ASAN for riscv64 Depends On D87577
Diff Detail
Event Timeline
Comment Actions LGTM Does gcc use the same frame record layout? We've had issues like that with Arm, see GetCanonicFrame. If not, maybe it's not too late to fix? Comment Actions Looks like it does. clang -O0 int foo(int): addi sp, sp, -32 sd ra, 24(sp) sd s0, 16(sp) addi s0, sp, 32 gcc -O0 -march=rv64imafdc -mabi=lp64d int foo(int): addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 Example with gcc/clang (-O2 -fno-omit-frame-pointer') https://godbolt.org/z/3GeET1 They match too. Comment Actions Is this something it would be useful for the psABI to specify? I can look at an addition along the lines of "If you save ra, it must go in a certain place in the frame. If you save fp, it also has to go in a certain place." I think other ABIs require this too, but I could be wrong. Comment Actions Documenting this would be a good idea. Comment Actions @eugenis, @luismarques - I believe all concerns for this one were addressed. Do you mind if I commit this as is? Comment Actions If some revision of the patch is approved, and all comments are addressed no need to wait for re-approval. |
This block is incorrectly marked in the patch as already existing code, instead of new code.
For performance, it should probably do the checks in order of most to least likely case. That's probably 4, 2, 6, 8.