VirtualBox

Ignore:
Timestamp:
Jul 7, 2020 6:23:08 PM (5 years ago)
Author:
vboxsync
Message:

SUPLib: Adjustments to avoid CxxFrameHandler4. bugref:9794

File:
1 edited

Legend:

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

    r83181 r85093  
    671671 * @param   rcExit      The exit code.
    672672 */
    673 DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit)
     673DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit) RT_NO_THROW_DEF
    674674{
    675675    for (;;)
     
    888888 * @param   va          Arguments to format.
    889889 */
    890 DECLHIDDEN(void) suplibHardenedPrintFV(const char *pszFormat, va_list va)
     890DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintFV(const char *pszFormat, va_list va) RT_NO_THROW_DEF
    891891{
    892892#ifdef IPRT_NO_CRT
     
    11221122 * @param   ...         Arguments to format.
    11231123 */
    1124 DECLHIDDEN(void) suplibHardenedPrintF(const char *pszFormat, ...)
     1124DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintF(const char *pszFormat, ...) RT_NO_THROW_DEF
    11251125{
    11261126    va_list va;
     
    11701170 * @copydoc RTPathFilename
    11711171 */
    1172 DECLHIDDEN(char *) supR3HardenedPathFilename(const char *pszPath)
     1172DECL_HIDDEN_NOTHROW(char *) supR3HardenedPathFilename(const char *pszPath)
    11731173{
    11741174    const char *psz = pszPath;
     
    12061206 * @copydoc RTPathAppPrivateNoArch
    12071207 */
    1208 DECLHIDDEN(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath)
     1208DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath)
    12091209{
    12101210#if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE)
     
    12251225 * @copydoc RTPathAppPrivateArch
    12261226 */
    1227 DECLHIDDEN(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath)
     1227DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath)
    12281228{
    12291229#if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE_ARCH)
     
    12441244 * @copydoc RTPathSharedLibs
    12451245 */
    1246 DECLHIDDEN(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath)
     1246DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath)
    12471247{
    12481248#if !defined(RT_OS_WINDOWS) && defined(RTPATH_SHARED_LIBS)
     
    12631263 * @copydoc RTPathAppDocs
    12641264 */
    1265 DECLHIDDEN(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath)
     1265DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath)
    12661266{
    12671267#if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_DOCS)
     
    14321432 * @remarks not quite like RTPathExecDir actually...
    14331433 */
    1434 DECLHIDDEN(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath)
     1434DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath)
    14351435{
    14361436    /*
     
    14591459#endif
    14601460
    1461 DECLHIDDEN(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs)
     1461DECL_HIDDEN_NOTHROW(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs) RT_NO_THROW_DEF
    14621462{
    14631463    static const char s_szLogOption[] = "--sup-hardening-log=";
     
    14771477             * Drop the argument from the vector (has trailing NULL entry).
    14781478             */
    1479             memmove(&papszArgs[iArg], &papszArgs[iArg + 1], (cArgs - iArg) * sizeof(papszArgs[0]));
     1479//            memmove(&papszArgs[iArg], &papszArgs[iArg + 1], (cArgs - iArg) * sizeof(papszArgs[0]));
    14801480            *pcArgs -= 1;
    14811481            cArgs   -= 1;
     
    14991499                if (RT_SUCCESS(rc))
    15001500                {
    1501                     SUP_DPRINTF(("Log file opened: " VBOX_VERSION_STRING "r%u g_hStartupLog=%p g_uNtVerCombined=%#x\n",
    1502                                  VBOX_SVN_REV, g_hStartupLog, g_uNtVerCombined));
     1501//                    SUP_DPRINTF(("Log file opened: " VBOX_VERSION_STRING "r%u g_hStartupLog=%p g_uNtVerCombined=%#x\n",
     1502//                                 VBOX_SVN_REV, g_hStartupLog, g_uNtVerCombined));
    15031503
    15041504                    /*
     
    15081508                    if (RT_C_IS_ALPHA(pszLogFile[0]) && pszLogFile[1] == ':')
    15091509                    {
    1510                         RTUtf16CopyAscii(g_wszStartupLogVol, RT_ELEMENTS(g_wszStartupLogVol), "\\??\\");
     1510//                        RTUtf16CopyAscii(g_wszStartupLogVol, RT_ELEMENTS(g_wszStartupLogVol), "\\??\\");
    15111511                        g_wszStartupLogVol[sizeof("\\??\\") - 1] = RT_C_TO_UPPER(pszLogFile[0]);
    15121512                        g_wszStartupLogVol[sizeof("\\??\\") + 0] = ':';
     
    15271527
    15281528
    1529 DECLHIDDEN(void) supR3HardenedLogV(const char *pszFormat, va_list va)
     1529DECL_HIDDEN_NOTHROW(void) supR3HardenedLogV(const char *pszFormat, va_list va) RT_NO_THROW_DEF
    15301530{
    15311531#ifdef RT_OS_WINDOWS
     
    15591559
    15601560
    1561 DECLHIDDEN(void) supR3HardenedLog(const char *pszFormat,  ...)
     1561DECL_HIDDEN_NOTHROW(void) supR3HardenedLog(const char *pszFormat,  ...) RT_NO_THROW_DEF
    15621562{
    15631563    va_list va;
     
    15681568
    15691569
    1570 DECLHIDDEN(void) supR3HardenedLogFlush(void)
     1570DECL_HIDDEN_NOTHROW(void) supR3HardenedLogFlush(void) RT_NO_THROW_DEF
    15711571{
    15721572#ifdef RT_OS_WINDOWS
     
    16471647
    16481648
    1649 DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,
    1650                                                         const char *pszMsgFmt, va_list va)
     1649DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,
     1650                                                                 const char *pszMsgFmt, va_list va)
    16511651{
    16521652    /*
     
    17641764
    17651765
    1766 DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,
    1767                                                        const char *pszMsgFmt, ...)
     1766DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,
     1767                                                                const char *pszMsgFmt, ...)
    17681768{
    17691769    va_list va;
     
    17741774
    17751775
    1776 DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va)
     1776DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalV(const char *pszFormat, va_list va)
    17771777{
    17781778    supR3HardenedLog("Fatal error:\n");
     
    18091809
    18101810
    1811 DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...)
     1811DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatal(const char *pszFormat, ...)
    18121812{
    18131813    va_list va;
     
    18181818
    18191819
    1820 DECLHIDDEN(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va)
     1820DECL_HIDDEN_NOTHROW(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va)
    18211821{
    18221822    if (fFatal)
     
    18451845
    18461846
    1847 DECLHIDDEN(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...)
     1847DECL_HIDDEN_NOTHROW(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...)
    18481848{
    18491849    va_list va;
     
    18611861 * @remarks This function will not return on failure.
    18621862 */
    1863 DECLHIDDEN(void) supR3HardenedMainOpenDevice(void)
     1863DECL_HIDDEN_NOTHROW(void) supR3HardenedMainOpenDevice(void)
    18641864{
    18651865    RTERRINFOSTATIC ErrInfo;
     
    25162516 * @param   envp            The environment vector.
    25172517 */
    2518 DECLHIDDEN(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp)
     2518DECL_HIDDEN_NOTHROW(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp)
    25192519{
    25202520    SUP_DPRINTF(("SUPR3HardenedMain: pszProgName=%s fFlags=%#x\n", pszProgName, fFlags));
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