1
0

Merge pull request #414 from worktycho/abortondeadlock

add abort call to deadlock detection code
This commit is contained in:
Mattes D 2013-12-10 12:55:57 -08:00
commit 60ca21b598
3 changed files with 8 additions and 9 deletions

View File

@ -7,6 +7,7 @@
#include "DeadlockDetect.h"
#include "Root.h"
#include "World.h"
# include <cstdlib>
@ -137,11 +138,7 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
void cDeadlockDetect::DeadlockDetected(void)
{
ASSERT(!"Deadlock detected");
// TODO: Make a crashdump / coredump
// Crash the server intentionally:
*((volatile int *)0) = 0;
abort();
}

View File

@ -70,8 +70,8 @@ public:
cStructGenWormNestCaves(int a_Seed, int a_Size = 64, int a_Grid = 96, int a_MaxOffset = 128) :
m_Noise(a_Seed),
m_Size(a_Size),
m_Grid(a_Grid),
m_MaxOffset(a_MaxOffset)
m_MaxOffset(a_MaxOffset),
m_Grid(a_Grid)
{
}

View File

@ -737,9 +737,11 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
FillColumnMesa(a_ChunkDesc, a_RelX, a_RelZ);
return;
}
default:
ASSERT(!"Unhandled biome");
return;
} // switch (Biome)
ASSERT(!"Unhandled biome");
ASSERT(!"Unexpected fallthrough");
}