VirtualBox

Changeset 4699 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Sep 11, 2007 11:27:25 AM (17 years ago)
Author:
vboxsync
Message:

Better error message if mmap(PROT_EXEC | PROT_WRITE) failed. A better solution would be a function RTMemInit() which performs this test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/log.cpp

    r4071 r4699  
    194194    *ppLogger = NULL;
    195195
     196    if (pszErrorMsg)
     197        RTStrPrintf(pszErrorMsg, cchErrorMsg, "unknown error");
    196198
    197199    /*
     
    421423        }
    422424        else
     425        {
     426#ifdef RT_OS_LINUX
     427            /*
     428             * RTMemAlloc() succeeded but RTMemExecAlloc() failed -- most probably an SELinux problem.
     429             */
     430            if (pszErrorMsg)
     431                RTStrPrintf(pszErrorMsg, cchErrorMsg, "mmap(PROT_WRITE | PROT_EXEC) failed -- SELinux?");
     432#endif /* RT_OS_LINUX */
    423433            rc = VERR_NO_MEMORY;
     434        }
    424435        RTMemFree(pLogger);
    425436    }
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