VirtualBox

Ignore:
Timestamp:
Jan 8, 2013 9:03:31 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83104
Message:

SUPDrvTracer.cpp: Fixed crash on Mac OS X Snow Leopard where pszFunction wouldn't be fixed (just like pProbe). Fixes public ticket #11273.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp

    r42011 r44247  
    636636            MY_CHECK_RET(paProbeLocs[i].fEnabled == false, VERR_SUPDRV_VTG_BAD_PROBE_LOC);
    637637            MY_CHECK_RET(paProbeLocs[i].idProbe == 0, VERR_SUPDRV_VTG_BAD_PROBE_LOC);
    638             MY_WITHIN_IMAGE(paProbeLocs[i].pszFunction, VERR_SUPDRV_VTG_BAD_PROBE_LOC);
    639638            offTmp = (uintptr_t)paProbeLocs[i].pProbe - (uintptr_t)pVtgHdr->offProbes - (uintptr_t)pVtgHdr;
    640639#ifdef RT_OS_DARWIN /* See header validation code. */
     
    646645            {
    647646                uint64_t offDelta = uVtgHdrAddr - pVtgHdr->u64VtgObjSectionStart;
     647
    648648                paProbeLocs[i].pProbe = (PVTGDESCPROBE)((uintptr_t)paProbeLocs[i].pProbe + offDelta);
     649                if ((uintptr_t)paProbeLocs[i].pszFunction < _4M)
     650                    paProbeLocs[i].pszFunction = (const char *)((uintptr_t)paProbeLocs[i].pszFunction + offDelta);
     651
    649652                offTmp += offDelta;
    650653            }
     
    652655            MY_CHECK_RET(offTmp < pVtgHdr->cbProbes, VERR_SUPDRV_VTG_BAD_PROBE_LOC);
    653656            MY_CHECK_RET(offTmp / sizeof(VTGDESCPROBE) * sizeof(VTGDESCPROBE) == offTmp, VERR_SUPDRV_VTG_BAD_PROBE_LOC);
     657            MY_WITHIN_IMAGE(paProbeLocs[i].pszFunction, VERR_SUPDRV_VTG_BAD_PROBE_LOC);
    654658        }
    655659    }
Note: See TracChangeset for help on using the changeset viewer.

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