Merge remote-tracking branch 'singu/master'

This commit is contained in:
Aleric Inglewood
2013-10-31 02:19:37 +01:00
4 changed files with 29 additions and 30 deletions

View File

@@ -123,6 +123,8 @@ LLApp::LLApp() : mThreadErrorp(NULL)
commonCtor();
}
static void* sCrashLoggerReserve = NULL;
void LLApp::commonCtor()
{
// Set our status to running
@@ -148,6 +150,12 @@ void LLApp::commonCtor()
sApplication = this;
mExceptionHandler = 0;
#if LL_WINDOWS
sCrashLoggerReserve = VirtualAlloc(NULL, 512*1024, MEM_COMMIT|MEM_RESERVE, PAGE_NOACCESS);
#else
sCrashLoggerReserve = malloc(512*1024);
#endif
// initialize the buffer to write the minidump filename to
// (this is used to avoid allocating memory in the crash handler)
@@ -155,6 +163,16 @@ void LLApp::commonCtor()
mCrashReportPipeStr = L"\\\\.\\pipe\\LLCrashReporterPipe";
}
static bool clear_CrashLoggerReserve_callback(void* context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion)
{
#if LL_WINDOWS
VirtualFree(sCrashLoggerReserve, 0, MEM_RELEASE);
#else
free(sCrashLoggerReserve);
#endif
return true;
}
LLApp::LLApp(LLErrorThread *error_thread) :
mThreadErrorp(error_thread)
{
@@ -309,7 +327,7 @@ void LLApp::setupErrorHandling()
{
mExceptionHandler = new google_breakpad::ExceptionHandler(
std::wstring(mDumpPath.begin(),mDumpPath.end()), //Dump path
0, //dump filename
clear_CrashLoggerReserve_callback,
windows_post_minidump_callback,
0,
google_breakpad::ExceptionHandler::HANDLER_ALL);
@@ -367,7 +385,7 @@ void LLApp::setupErrorHandling()
if(installHandler && (mExceptionHandler == 0))
{
mExceptionHandler = new google_breakpad::ExceptionHandler(mDumpPath, 0, &unix_post_minidump_callback, 0, true, 0);
mExceptionHandler = new google_breakpad::ExceptionHandler(mDumpPath, clear_CrashLoggerReserve_callback, &unix_post_minidump_callback, 0, true, 0);
}
#elif LL_LINUX
if(installHandler && (mExceptionHandler == 0))
@@ -377,8 +395,7 @@ void LLApp::setupErrorHandling()
mDumpPath = "/tmp";
}
google_breakpad::MinidumpDescriptor desc(mDumpPath);
//mExceptionHandler = new google_breakpad::ExceptionHandler(desc, 0, unix_minidump_callback, 0, true, 0);
mExceptionHandler = new google_breakpad::ExceptionHandler(desc, NULL, unix_minidump_callback, NULL, true, -1);
mExceptionHandler = new google_breakpad::ExceptionHandler(desc, clear_CrashLoggerReserve_callback, unix_minidump_callback, NULL, true, -1);
}
#endif

View File

@@ -2625,7 +2625,11 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor;
gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch;
gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild;
#if defined(_WIN64) || defined(__x86_64__)
gDebugInfo["ClientInfo"]["Architecture"] = "x86_64";
#else
gDebugInfo["ClientInfo"]["Architecture"] = "i386";
#endif
gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();

View File

@@ -1189,21 +1189,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
// <FS:ND> The volume face vf can have more indices/vertices than this face. All striders below are aquired with a size of this face, but then written with num_verices/num_indices values,
// thus overflowing the buffer when vf holds more data.
// We can either clamp num_* down like here, or aquire all striders not using the face size, but the size if vf (that is swapping out mGeomCount with num_vertices and mIndicesCout with num_indices
// in all calls to nVertbuffer->get*Strider(...). Final solution is to just return FALSE and be done with it.
//
// The correct poison of choice is debatable, either copying not all data of vf (clamping) or writing more data than this face claims to have (aquiring bigger striders). Returning will not display this face at all.
//
// clamping it is for now.
num_vertices = llclamp( num_vertices, (S32)0, (S32)mGeomCount );
num_indices = llclamp( num_indices, (S32)0, (S32)mIndicesCount );
// </FS:ND>
//don't use map range (generates many redundant unmap calls)
bool map_range = false; //gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange;
@@ -1659,14 +1644,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (!do_xform)
{
LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM);
// <FS:ND> Don't round up, or there's high risk to write past buffer
// S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF;
S32 tc_size = (num_vertices*2*sizeof(F32));
// </FS:ND>
S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF;
LLVector4a::memcpyNonAliased16((F32*) tex_coords0.get(), (F32*) vf.mTexCoords, tc_size);
}
else

View File

@@ -540,9 +540,9 @@
<key>windows64</key>
<map>
<key>md5sum</key>
<string>17f6c6e1b2d404a1e039aa23445f446c</string>
<string>bfde86bbd84536448ac2a717ed1646d8</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/freetype-2.3.9-windows64-20131028.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/freetype-2.5.0.1-windows64-20131020.tar.bz2</uri>
</map>
</map>
</map>