File tree 1 file changed +6
-3
lines changed
src/native/managed/cdacreader/src/Legacy 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ internal sealed unsafe partial class SOSDacImpl
32
32
private readonly Target _target ;
33
33
34
34
// When this class is created, the runtime may not have loaded the string and object method tables and set the global pointers.
35
- // They should be set when actually requested via a DAC API, so we lazily read the global pointers.
35
+ // This is also the case for the GetUsefulGlobals API, which can be called as part of load notifications before runtime start.
36
+ // They should be set when actually requested via other DAC APIs, so we lazily read the global pointers.
36
37
private readonly Lazy < TargetPointer > _stringMethodTable ;
37
38
private readonly Lazy < TargetPointer > _objectMethodTable ;
38
39
@@ -1243,8 +1244,10 @@ int ISOSDacInterface.GetUsefulGlobals(DacpUsefulGlobalsData* data)
1243
1244
{
1244
1245
data ->ArrayMethodTable = _target . ReadPointer (
1245
1246
_target . ReadGlobalPointer ( Constants . Globals . ObjectArrayMethodTable ) ) ;
1246
- data ->StringMethodTable = _stringMethodTable . Value ;
1247
- data ->ObjectMethodTable = _objectMethodTable . Value ;
1247
+ data ->StringMethodTable = _target . ReadPointer (
1248
+ _target . ReadGlobalPointer ( Constants . Globals . StringMethodTable ) ) ;
1249
+ data ->ObjectMethodTable = _target . ReadPointer (
1250
+ _target . ReadGlobalPointer ( Constants . Globals . ObjectMethodTable ) ) ;
1248
1251
data ->ExceptionMethodTable = _target . ReadPointer (
1249
1252
_target . ReadGlobalPointer ( Constants . Globals . ExceptionMethodTable ) ) ;
1250
1253
data ->FreeMethodTable = _target . ReadPointer (
You can’t perform that action at this time.
0 commit comments