Skip to content
1 change: 0 additions & 1 deletion src/coreclr/inc/clrconfigvalues.h
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,6 @@ CONFIG_STRING_INFO(INTERNAL_DumpOnClassLoad, W("DumpOnClassLoad"), "Dumps inform
CONFIG_DWORD_INFO(INTERNAL_ExpandAllOnLoad, W("ExpandAllOnLoad"), 0, "")
CONFIG_DWORD_INFO(INTERNAL_ForceRelocs, W("ForceRelocs"), 0, "")
CONFIG_DWORD_INFO(INTERNAL_GenerateLongJumpDispatchStubRatio, W("GenerateLongJumpDispatchStubRatio"), 0, "Useful for testing VSD on AMD64")
CONFIG_DWORD_INFO(INTERNAL_HashStack, W("HashStack"), 0, "")
CONFIG_DWORD_INFO(INTERNAL_HostManagerConfig, W("HostManagerConfig"), (DWORD)-1, "")
CONFIG_DWORD_INFO(INTERNAL_HostTestThreadAbort, W("HostTestThreadAbort"), 0, "")
CONFIG_STRING_INFO(INTERNAL_InvokeHalt, W("InvokeHalt"), "Throws an assert when the given method is invoked through reflection.")
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/inc/clrhost.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ BOOL ClrVirtualProtect(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWO
HANDLE ClrGetProcessExecutableHeap();
#endif

#ifdef FAILPOINTS_ENABLED
extern int RFS_HashStack();
#endif

// Critical section support for CLR DLLs other than the EE.
// Include the header defining each Crst type and its corresponding level (relative rank). This is
// auto-generated from a tool that takes a high-level description of each Crst type and its dependencies.
Expand Down
13 changes: 0 additions & 13 deletions src/coreclr/inc/holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -997,19 +997,6 @@ FORCEINLINE void Delete(TYPE *value)
template<typename _TYPE>
using NewHolder = SpecializedWrapper<_TYPE, Delete<_TYPE>>;

//-----------------------------------------------------------------------------
// NewExecutableHolder : New'ed memory holder for executable memory.
//
// {
// NewExecutableHolder<Foo> foo = (Foo*) new (executable) Byte[num];
// } // delete foo on out of scope
//-----------------------------------------------------------------------------
// IJW
template<class T> void DeleteExecutable(T *p);

template<typename _TYPE>
using NewExecutableHolder = SpecializedWrapper<_TYPE, DeleteExecutable<_TYPE>>;

//-----------------------------------------------------------------------------
// NewArrayHolder : New []'ed pointer holder
// {
Expand Down
7 changes: 0 additions & 7 deletions src/coreclr/inc/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@
#define LOGGING
#endif

#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES)
// Failpoint support
#if defined(_DEBUG) && !defined(DACCESS_COMPILE) && !defined(TARGET_UNIX)
#define FAILPOINTS_ENABLED
#endif
#endif //!defined(FEATURE_UTILCODE_NO_DEPENDENCIES)

#if 0
// Enable to track details of EESuspension
#define TIME_SUSPEND
Expand Down
31 changes: 0 additions & 31 deletions src/coreclr/inc/utilcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -3716,37 +3716,6 @@ namespace util
}
}


/* ------------------------------------------------------------------------ *
* Overloaded operators for the executable heap
* ------------------------------------------------------------------------ */

#ifdef HOST_WINDOWS

struct CExecutable { int x; };
extern const CExecutable executable;

void * __cdecl operator new(size_t n, const CExecutable&);
void * __cdecl operator new[](size_t n, const CExecutable&);
void * __cdecl operator new(size_t n, const CExecutable&, const std::nothrow_t&) noexcept;
void * __cdecl operator new[](size_t n, const CExecutable&, const std::nothrow_t&) noexcept;


//
// Executable heap delete to match the executable heap new above.
//
template<class T> void DeleteExecutable(T *p)
{
if (p != NULL)
{
p->T::~T();

HeapFree(ClrGetProcessExecutableHeap(), 0, p);
}
}

#endif // HOST_WINDOWS

INDEBUG(BOOL DbgIsExecutable(LPVOID lpMem, SIZE_T length);)

BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommittedStack);
Expand Down
73 changes: 0 additions & 73 deletions src/coreclr/utilcode/clrhost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,79 +39,6 @@ void* GetClrModuleBase()

thread_local int t_CantAllocCount;

#ifdef FAILPOINTS_ENABLED
typedef int (*FHashStack) ();

static FHashStack fHashStack = 0;
static _TEB *HashStackSetupThread = NULL;
static _TEB *RFSCustomDataSetupThread = NULL;

static void SetupHashStack ()
{
CANNOT_HAVE_CONTRACT;

FHashStack oldValue = InterlockedCompareExchangeT(&fHashStack,
reinterpret_cast<FHashStack>(1), reinterpret_cast<FHashStack>(0));
if ((size_t) oldValue >= 2) {
return;
}
else if ((size_t) oldValue == 0) {
// We are the first thread to initialize
HashStackSetupThread = NtCurrentTeb();

if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_HashStack) == 0) {
fHashStack = (FHashStack) 2;
return;
}

PAL_TRY(void *, unused, NULL) {
FHashStack func;
HMODULE hmod = WszLoadLibrary(W("mscorrfs.dll"), NULL, 0);
if (hmod) {
func = (FHashStack)GetProcAddress (hmod, "HashStack");
if (func == 0) {
func = (FHashStack)2;
}
}
else
func = (FHashStack)2;
fHashStack = func;
}
PAL_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
fHashStack = (FHashStack) 2;
}
PAL_ENDTRY;
}
else if (NtCurrentTeb() == HashStackSetupThread) {
// We get here while initializing
return;
}
else {
// All other threads will wait
while (fHashStack == (FHashStack) 1) {
ClrSleepEx (100, FALSE);
}
}
}

int RFS_HashStack ()
{
CANNOT_HAVE_CONTRACT;

if ((size_t)fHashStack < 2) {
SetupHashStack ();
}

if ((size_t)fHashStack <= 2) {
return 0;
}
else
return fHashStack ();
}

#endif // FAILPOINTS_ENABLED

DWORD GetClrModulePathName(SString& buffer)
{
#ifdef HOST_WINDOWS
Expand Down
Loading