VirtualBox

Changeset 5373 in vbox for trunk/src


Ignore:
Timestamp:
Oct 18, 2007 11:38:45 AM (17 years ago)
Author:
vboxsync
Message:

make sure the memory is suitable for executable images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/solaris/alloc-solaris.cpp

    r4362 r5373  
    5050    void *pv = valloc(cb);
    5151    AssertMsg(pv, ("posix_memalign(%d) failed!!! errno=%d\n", cb, errno));
     52    if (RT_UNLIKELY((uintptr_t)pv + cb > _2G))
     53    {
     54        AssertMsgFailed(("%p %#zx\n", pv, cb));
     55        free(pv);
     56        return NULL;
     57    }
    5258    if (pv)
    5359    {
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