VirtualBox

忽略:
時間撮記:
2008-10-10 下午10:21:18 (16 年 以前)
作者:
vboxsync
訊息:

PGMPhys: Fix for silly edge case bug.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r13152 r13186  
    17481748    /* optimize for the case where access is completely within the first page. */
    17491749    size_t cbPage = PAGE_SIZE - (GCPhysSrc & PAGE_OFFSET_MASK);
    1750     if (RT_LIKELY(cb < cbPage))
     1750    if (RT_LIKELY(cb <= cbPage))
    17511751    {
    17521752        memcpy(pvDst, pvSrc, cb);
     
    17731773
    17741774        /* last page? */
    1775         if (cb < PAGE_SIZE)
     1775        if (cb <= PAGE_SIZE)
    17761776        {
    17771777            memcpy(pvDst, pvSrc, cb);
     
    18221822    /* optimize for the case where access is completely within the first page. */
    18231823    size_t cbPage = PAGE_SIZE - (GCPhysDst & PAGE_OFFSET_MASK);
    1824     if (RT_LIKELY(cb < cbPage))
     1824    if (RT_LIKELY(cb <= cbPage))
    18251825    {
    18261826        memcpy(pvDst, pvSrc, cb);
     
    18471847
    18481848        /* last page? */
    1849         if (cb < PAGE_SIZE)
     1849        if (cb <= PAGE_SIZE)
    18501850        {
    18511851            memcpy(pvDst, pvSrc, cb);
     
    18941894    /* optimize for the case where access is completely within the first page. */
    18951895    size_t cbPage = PAGE_SIZE - ((RTGCUINTPTR)GCPtrSrc & PAGE_OFFSET_MASK);
    1896     if (RT_LIKELY(cb < cbPage))
     1896    if (RT_LIKELY(cb <= cbPage))
    18971897    {
    18981898        memcpy(pvDst, pvSrc, cb);
     
    19191919
    19201920        /* last page? */
    1921         if (cb < PAGE_SIZE)
     1921        if (cb <= PAGE_SIZE)
    19221922        {
    19231923            memcpy(pvDst, pvSrc, cb);
     
    19661966    /* optimize for the case where access is completely within the first page. */
    19671967    size_t cbPage = PAGE_SIZE - ((RTGCUINTPTR)GCPtrDst & PAGE_OFFSET_MASK);
    1968     if (RT_LIKELY(cb < cbPage))
     1968    if (RT_LIKELY(cb <= cbPage))
    19691969    {
    19701970        memcpy(pvDst, pvSrc, cb);
     
    19911991
    19921992        /* last page? */
    1993         if (cb < PAGE_SIZE)
     1993        if (cb <= PAGE_SIZE)
    19941994        {
    19951995            memcpy(pvDst, pvSrc, cb);
     
    20412041    /* optimize for the case where access is completely within the first page. */
    20422042    size_t cbPage = PAGE_SIZE - ((RTGCUINTPTR)GCPtrDst & PAGE_OFFSET_MASK);
    2043     if (RT_LIKELY(cb < cbPage))
     2043    if (RT_LIKELY(cb <= cbPage))
    20442044    {
    20452045        memcpy(pvDst, pvSrc, cb);
     
    20682068
    20692069        /* last page? */
    2070         if (cb < PAGE_SIZE)
     2070        if (cb <= PAGE_SIZE)
    20712071        {
    20722072            memcpy(pvDst, pvSrc, cb);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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