Changeset 116


Ignore:
Timestamp:
Aug 26, 2010, 12:49:45 PM (15 years ago)
Author:
dmik
Message:

hotspot: Fixed a typo in 4115: The fix should be applied in the outer loop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/hotspot/src/os/os2/vm/os_os2.cpp

    r115 r116  
    8282    os2_QSLREC *pLibRec = pPtrRec->pLibRec;
    8383    while (pLibRec) {
     84        // It happens that for some modules ctObj is > 0 but pbjInfo is
     85        // NULL. This seems to be an OS/2 FP13 bug. Here is the solution I
     86        // found in the Odin32 sources (kernel32/winimagepe2lx.cpp):
     87        if (pLibRec->ctObj > 0 && pLibRec->pObjInfo == NULL) {
     88            pLibRec->pObjInfo = (os2_QSLOBJREC *)
     89                ((char*) pLibRec
     90                 + ((sizeof(os2_QSLREC)                         /* size of the lib record */
     91                     + pLibRec->ctImpMod * sizeof(os2_USHORT)   /* size of the array of imported modules */
     92                     + strlen((char*)pLibRec->pName) + 1        /* size of the filename */
     93                     + 3) & ~3));                               /* the size is align on 4 bytes boundrary */
     94            pLibRec->pNextRec = (os2_PVOID *)((char *)pLibRec->pObjInfo
     95                                              + sizeof(os2_QSLOBJREC) * pLibRec->ctObj);
     96        }
    8497        if (pLibRec->hmte == hmte) {
    8598            // mark as already walked
    8699            pLibRec->hmte = os2_NULLHANDLE;
    87100            st->print("  %s\n", pLibRec->pName);
    88             // It happens that for some modules ctObj is > 0 but pbjInfo is
    89             // NULL. This seems to be an OS/2 FP13 bug. Here is the solution I
    90             // found in the Odin32 sources (kernel32/winimagepe2lx.cpp):
    91             if (pLibRec->ctObj > 0 && pLibRec->pObjInfo == NULL) {
    92                 pLibRec->pObjInfo = (os2_QSLOBJREC *)
    93                     ((char*) pLibRec
    94                      + ((sizeof(os2_QSLREC)                         /* size of the lib record */
    95                          + pLibRec->ctImpMod * sizeof(os2_USHORT)   /* size of the array of imported modules */
    96                          + strlen((char*)pLibRec->pName) + 1        /* size of the filename */
    97                          + 3) & ~3));                               /* the size is align on 4 bytes boundrary */
    98                 pLibRec->pNextRec = (os2_PVOID *)((char *)pLibRec->pObjInfo
    99                                                   + sizeof(os2_QSLOBJREC) * pLibRec->ctObj);
    100             }
    101101            for (ULONG i = 0; i < pLibRec->ctObj; ++i) {
    102102                if (pLibRec->pObjInfo[i].oaddr)
Note: See TracChangeset for help on using the changeset viewer.