-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[RISC-V] Add g_GCShadowEnd to JIT_WriteBarrier_Table #90036
Conversation
lla pseudo instruction which used for access to g_GCShadowEnd in JIT_WriteBarrier implemented via PC-relative addressing. But when W^X enabled, copy of JIT_WriteBarrier is being created and this PC-related addressing is not valid, which cause crash. This change moves address of g_GCShadowEnd to JIT_WriteBarrier_Table like others variables used in Write Barrier.
a342b99
to
649b3f6
Compare
The similar issue should be in ARM64 since there is the same access to @jkotas @Maoni0 |
I agree. |
Right, I've added
But do these |
The registers are stored into the literal pool at the end of Are you suggesting that the method can always load a value into a register and then immediately store it into the literal pool? Yes, the code can be written that way, but I do not see anything wrong with how it is written today. |
Do you plan to do matching fix in the arm64 version as well? |
Yes, I'll check on ARM64 environment and make separate PR |
Thank you! |
This change moves address of g_GCShadowEnd to JIT_WriteBarrier_Table like others variables used in Write Barrier. This fix simmilar to RISC-V one dotnet#90036
* [ARM64] Add g_GCShadowEnd to JIT_WriteBarrier_Table This change moves address of g_GCShadowEnd to JIT_WriteBarrier_Table like others variables used in Write Barrier. This fix simmilar to RISC-V one #90036 * [ARM64] Move GCShadow vars to the end of the wbs block * Update src/coreclr/vm/arm64/asmhelpers.asm --------- Co-authored-by: Jan Kotas <[email protected]>
lla
pseudo instruction which used for access tog_GCShadowEnd
inJIT_WriteBarrier
implemented via PC-relative addressing. But whenW^X
enabled, copy ofJIT_WriteBarrier
is being created and this PC-related addressing is not valid, which cause crash.This change moves address of
g_GCShadowEnd
toJIT_WriteBarrier_Table
like others variables used in Write Barrier.Part of #84834
cc @jakobbotsch @Maoni0 @wscho77 @HJLeee @JongHeonChoi @t-mustafin @clamp03 @gbalykov @tomeksowi