VirtualBox

Changeset 76053 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Dec 7, 2018 11:46:26 AM (6 years ago)
Author:
vboxsync
Message:

IPRT/initterm-r0drv-nt.cpp: Pre-initialize g_uRtNtVersion early so the allocator will use the right kind of pool type when RTR0DbgKrnlInfoOpen needs memory (bugcheck 0xc2, 0x20000,).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp

    r73097 r76053  
    273273{
    274274    /*
     275     * Preinitialize g_uRtNtVersion so RTMemAlloc uses the right kind of pool
     276     * when RTR0DbgKrnlInfoOpen calls it.
     277     */
     278    RTNTSDBOSVER OsVerInfo;
     279    rtR0NtGetOsVersionInfo(&OsVerInfo);
     280    g_uRtNtVersion  = RTNT_MAKE_VERSION(OsVerInfo.uMajorVer, OsVerInfo.uMinorVer);
     281    g_uRtNtMinorVer = OsVerInfo.uMinorVer;
     282    g_uRtNtMajorVer = OsVerInfo.uMajorVer;
     283    g_uRtNtBuildNo  = OsVerInfo.uBuildNo;
     284
     285    /*
    275286     * Initialize the function pointers.
    276287     */
     
    340351
    341352    /*
    342      * HACK ALERT! (and déjà vu warning - remember win32k.sys?)
     353     * Get and publish the definitive NT version.
     354     */
     355    rtR0NtGetOsVersionInfo(&OsVerInfo);
     356    g_uRtNtVersion  = RTNT_MAKE_VERSION(OsVerInfo.uMajorVer, OsVerInfo.uMinorVer);
     357    g_uRtNtMinorVer = OsVerInfo.uMinorVer;
     358    g_uRtNtMajorVer = OsVerInfo.uMajorVer;
     359    g_uRtNtBuildNo  = OsVerInfo.uBuildNo;
     360
     361
     362    /*
     363     * HACK ALERT! (and déjà vu warning - remember win32k.sys on OS/2?)
    343364     *
    344365     * Try find _KPRCB::QuantumEnd and _KPRCB::[DpcData.]DpcQueueDepth.
     
    357378     * be distinguishable from another.
    358379     */
    359 
    360     RTNTSDBOSVER OsVerInfo;
    361     rtR0NtGetOsVersionInfo(&OsVerInfo);
    362 
    363     /* Publish the version info in globals. */
    364     g_uRtNtVersion  = RTNT_MAKE_VERSION(OsVerInfo.uMajorVer, OsVerInfo.uMinorVer);
    365     g_uRtNtMinorVer = OsVerInfo.uMinorVer;
    366     g_uRtNtMajorVer = OsVerInfo.uMajorVer;
    367     g_uRtNtBuildNo  = OsVerInfo.uBuildNo;
    368380
    369381    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette