VirtualBox

Changeset 100824 in vbox


Ignore:
Timestamp:
Aug 9, 2023 12:21:27 AM (16 months ago)
Author:
vboxsync
Message:

VMM/IEM: Corrected wrong calculation in BODY_CHECK_CS_LIM. Untested. bugref:10369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdFuncsBltIn.cpp

    r100806 r100824  
    163163 * number of functions.
    164164 */
     165/** @todo consider 32-bit EIP mid-instruction wrap-around... Difficult to
     166 *        test, since it would require replacing the default firmware. */
    165167#define BODY_CHECK_CS_LIM(a_cbInstr) do { \
    166         if (RT_LIKELY(pVCpu->cpum.GstCtx.eip - pVCpu->cpum.GstCtx.cs.u32Limit >= cbInstr)) \
     168        if (RT_LIKELY((uint32_t)(pVCpu->cpum.GstCtx.eip + cbInstr) <= pVCpu->cpum.GstCtx.cs.u32Limit)) \
    167169        { /* likely */ } \
    168170        else \
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