Revert "[vm] fix confusing use of m_pCanonMT (NFC) (#102936)"#104100
Revert "[vm] fix confusing use of m_pCanonMT (NFC) (#102936)"#104100lambdageek wants to merge 1 commit intodotnet:mainfrom
Conversation
This reverts commit 1ab6888. The change broke the DAC.
|
Tagging subscribers to this area: @mangod9 |
|
I don't completely understand why the DAC broke. The scenario I saw was when The union {
DPTR(EEClass) m_pEEClass;
TADDR m_pCanonMT;
};So on the DAC side it's either a smart pointer of an Original code (works, apparently): return PTR_EEClass(PTR_MethodTable(canonicalMethodTable)->m_pCanonMT);This gets the If My code that we're reverting (doesn't work): return PTR_MethodTable(canonicalMethodTable)->m_pEEClass;This gets a |
|
I think the old code crashed too. Here’s a self-contained repo with a lot of copy/pasted code for the __DPtr<> template https://github.com/lambdageek/dac-nullptr build with: both the old and new versions of the methodtable code segfault. |
Right, it is what I would expect. It is expected that this method may segfault for invalid MethodTable. AV = AccessViolation = segfault.
What is the manifestation of the break? |
@mikem8361 has the details. Apparently some diagnostic test started segfaulting on Alpine roughly coinciding with this |
|
Closed in favor of #104128 |
This reverts commit 1ab6888.
The change broke the DAC.