SUPR3HardenedNoCrt-win.cpp revision 30f07af559efcbd967e801903746fc21f81ee533
/* $Id$ */
/** @file
* VirtualBox Support Library - Hardened main(), windows bits.
*/
/*
* Copyright (C) 2006-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <AccCtrl.h>
#include <AclApi.h>
#ifndef PROCESS_SET_LIMITED_INFORMATION
# define PROCESS_SET_LIMITED_INFORMATION 0x2000
#endif
#include <iprt/initterm.h>
#include "SUPLibInternal.h"
#include "win/SUPHardenedVerify-win.h"
/*
*/
RTDATADECL(const char * volatile) g_pszRTAssertExpr;
RTDATADECL(const char * volatile) g_pszRTAssertFile;
RTDATADECL(const char * volatile) g_pszRTAssertFunction;
RTDECL(bool) RTAssertMayPanic(void)
{
return true;
}
RTDECL(void) RTAssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
{
/*
* Fill in the globals.
*/
"\n!!Assertion Failed!!\n"
"Expression: %s\n"
"Location : %s(%d) %s\n",
}
{
else
supR3HardenedError(VERR_INTERNAL_ERROR, false/*fFatal*/, "%s%s", g_szRTAssertMsg1, g_szRTAssertMsg2);
}
/*
* Memory allocator.
*/
{
}
{
}
{
}
{
if (!pv)
return pv;
}
{
if (!pv)
return pv;
}
{
if (cbUnaligned >= 16)
else
}
{
if (cbUnaligned >= 16)
else
}
{
if (!pvOld)
if (!pv)
return pv;
}
{
if (pv)
}
/*
* Simplified version of RTMemWipeThoroughly that avoids dragging in the
* random number code.
*/
{
do
{
} while (cPasses-- > 0);
}