You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Access violation when using Vector3 array with default values #55623
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIneeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration
When accessing a array of Vector3 with Vector3.Zero or default the dotnet crashes without any error message.
Looking at the crashdump the error seems to be a AccessViolation
Unhandled exception at 0x00007FFA24E33E10 (coreclr.dll) in dotnet.exe.18068.dmp: 0xC0000005: Access violation reading location 0x0000000000000009.
@EgorBo on 2.1 - which is what was reported - crashes in a jit helper. That being said, 2.1 is out of support on August - and I think that means the snap date is past.
; HCIMPL2(Object*, JIT_Box, CORINFO_CLASS_HANDLE type, void* unboxedData)NESTED_ENTRY JIT_BoxFastMP_InlineGetThread, _TEXTmovrax,[rcx+ OFFSETOF__MethodTable__m_pWriteableData] ; Check whether the class has not been initializedtest dword ptr [rax+ OFFSETOF__MethodTableWriteableData__m_dwFlags], MethodTableWriteableData__enum_flag_Unrestoredjnz ClassNotInitedmovr8d,[rcx+ OFFSET__MethodTable__m_BaseSize] ; m_BaseSize is guaranteed to be a multiple of 8. INLINE_GETTHREAD r11movr10,[r11+ OFFSET__Thread__m_alloc_context__alloc_limit]movrax,[r11+ OFFSET__Thread__m_alloc_context__alloc_ptr]addr8,raxcmpr8,r10ja AllocFailedmov[r11+ OFFSET__Thread__m_alloc_context__alloc_ptr],r8mov[rax],rcx ; Check whether the object contains pointerstest dword ptr [rcx+ OFFSETOF__MethodTable__m_dwFlags], MethodTable__enum_flag_ContainsPointersjnz ContainsPointers ; We have no pointers - emit a simple inline copy loop ; Copy the contents from the endmovecx,[rcx+ OFFSET__MethodTable__m_BaseSize]subecx,18h ; sizeof(ObjHeader) + sizeof(Object) + last slotalign16 CopyLoop:movr8,[rdx+rcx] <-- this is the issue, since this is rdx+rcx=0x9; not sure how. mov[rax+rcx+8],r8subecx,8jge CopyLoop REPRET ContainsPointers: ; Do call to CopyValueClassUnchecked(object, data, pMT) push_vol_reg rax alloc_stack 20h END_PROLOGUEmovr8,rcxlearcx,[rax+8]call CopyValueClassUncheckedaddrsp,20hpopraxret
I couldn't repro anything particular under the debugger on 6.0.0-preview.5.21301.5. Moving back to codegen - although 2.1 is not very actionable. Let me know if you have any repros on the 6.0 issue.
@brianpopow I'm not able to reproduce it for net472 and net48, but it does reproduce on netcoreapp2.1. However, all of these targets, as was noted, are no longer maintained. Are there any extra steps needed to reproduce it under .NET Framework and does it block you the way there is no workaround for it?
I'm not able to reproduce it for net472 and net48, but it does reproduce on netcoreapp2.1. However, all of these targets, as was noted, are no longer maintained. Are there any extra steps needed to reproduce it under .NET Framework and
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIneeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration
Activity
EgorBo commentedon Jul 14, 2021
hm.. I can reproduce this issue on .NET 6.0 in VS 16.11 when debugger is attached.
EgorBo commentedon Jul 14, 2021
Perhaps, it's the same as #54025
EgorBo commentedon Jul 14, 2021
cc @hoyosjs
hoyosjs commentedon Jul 15, 2021
@EgorBo on 2.1 - which is what was reported - crashes in a jit helper. That being said, 2.1 is out of support on August - and I think that means the snap date is past.
Particularly for this IL/assembly in the constructor:
I couldn't repro anything particular under the debugger on
6.0.0-preview.5.21301.5. Moving back to codegen - although 2.1 is not very actionable. Let me know if you have any repros on the 6.0 issue.EgorBo commentedon Jul 15, 2021
@hoyosjs hm.. I updated my .NET 6.0 preview (I think it was Preview4) to 6 and can't reproduce it anymore. So I guess we can close this.
Thanks for the investigation!
brianpopow commentedon Jul 15, 2021
The issue seems to happen also for net472 and net48 (again only for Release and not in Debug mode)
EgorBo commentedon Jul 27, 2021
@brianpopow I'm not able to reproduce it for
net472andnet48, but it does reproduce onnetcoreapp2.1. However, all of these targets, as was noted, are no longer maintained. Are there any extra steps needed to reproduce it under .NET Framework and does it block you the way there is no workaround for it?brianpopow commentedon Jul 27, 2021
@EgorBo: Actually there are no extra steps need.
No it does not block me, I can work around it by not using Vector.Zero.
Thanks for investigating!