diff options
| -rw-r--r-- | autobuild.xml | 12 | ||||
| -rw-r--r-- | indra/cmake/Copy3rdPartyLibs.cmake | 1 | ||||
| -rw-r--r-- | indra/cmake/FreeType.cmake | 8 | ||||
| -rw-r--r-- | indra/linux_crash_logger/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | indra/llcommon/llapp.cpp | 59 | ||||
| -rw-r--r-- | indra/llcommon/llapp.h | 2 | ||||
| -rw-r--r-- | indra/newview/viewer_manifest.py | 4 | 
7 files changed, 68 insertions, 21 deletions
| diff --git a/autobuild.xml b/autobuild.xml index 6cf9041206..53fa1f0f45 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -606,9 +606,9 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>9f8a9dc39fd7c3da0fb3533782d1fddf</string> +              <string>bd6f84f9fb3c2e68850676d06935373f</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-freetype/rev/226814/arch/Linux/installer/freetype-2.3.9-linux-20110418.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-freetype/rev/271684/arch/Linux/installer/freetype-2.4.4-linux-20130312.tar.bz2</string>              </map>              <key>name</key>              <string>linux</string> @@ -774,9 +774,9 @@              <key>archive</key>              <map>                <key>hash</key> -	      <string>d6ffc840ec2fb1fc02f350995e5b9885</string> +	      <string>c1b938b796bc53c527bb888f3b782f8e</string>                <key>url</key> -	      <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-google-breakpad-graham/rev/272925/arch/Linux/installer/google_breakpad-0.0.0-rev1099-linux-20130327.tar.bz2</string> +	      <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-google-breakpad-graham/rev/272967/arch/Linux/installer/google_breakpad-0.0.0-rev1099-linux-20130328.tar.bz2</string>              </map>              <key>name</key>              <string>linux</string> @@ -786,9 +786,9 @@              <key>archive</key>              <map>                <key>hash</key> -	      <string>1098c2a9450cf303c37a3aedbe45d04a</string> +	      <string>abe4e6e67a729884c1c2618231454e1a</string>                <key>url</key> -	      <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-google-breakpad-graham/rev/272939/arch/CYGWIN/installer/google_breakpad-0.0.0-rev1099-windows-20130327.tar.bz2</string> +	      <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-google-breakpad-graham/rev/272974/arch/CYGWIN/installer/google_breakpad-0.0.0-rev1099-windows-20130328.tar.bz2</string>              </map>              <key>name</key>              <string>windows</string> diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c32e357da3..2a73900c71 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -260,7 +260,6 @@ elseif(LINUX)          libboost_filesystem-mt.so.${BOOST_VERSION}.0          libboost_signals-mt.so.${BOOST_VERSION}.0          libboost_system-mt.so.${BOOST_VERSION}.0 -        libbreakpad_client.so.0          libcollada14dom.so          libcrypto.so.1.0.0          libdb-5.1.so diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 43a9d282d0..c9a90a9a8d 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -7,13 +7,7 @@ if (STANDALONE)    pkg_check_modules(FREETYPE REQUIRED freetype2)  else (STANDALONE)    use_prebuilt_binary(freetype) -  if (LINUX) -    set(FREETYPE_INCLUDE_DIRS -        ${LIBS_PREBUILT_DIR}/include) -  else (LINUX) -    set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -  endif (LINUX) - +  set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)    set(FREETYPE_LIBRARIES freetype)  endif (STANDALONE) diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt index 98ebdc7487..a1f334ffad 100644 --- a/indra/linux_crash_logger/CMakeLists.txt +++ b/indra/linux_crash_logger/CMakeLists.txt @@ -12,6 +12,7 @@ include(LLVFS)  include(LLXML)  include(Linking)  include(UI) +include(FreeType)  include_directories(      ${LLCOMMON_INCLUDE_DIRS} @@ -19,6 +20,7 @@ include_directories(      ${LLMATH_INCLUDE_DIRS}      ${LLVFS_INCLUDE_DIRS}      ${LLXML_INCLUDE_DIRS} +    ${FREETYPE_INCLUDE_DIRS}      )  set(linux_crash_logger_SOURCE_FILES @@ -53,6 +55,7 @@ target_link_libraries(linux-crash-logger      ${LLCOMMON_LIBRARIES}      ${UI_LIBRARIES}      ${DB_LIBRARIES} +    ${FREETYPE_LIBRARIES}      )  add_custom_target(linux-crash-logger-target ALL diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index b3fee0adec..67e6705cbf 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -69,10 +69,16 @@ bool windows_post_minidump_callback(const wchar_t* dump_path,  void setup_signals();  void default_unix_signal_handler(int signum, siginfo_t *info, void *); +#if LL_LINUX +#include "google_breakpad/minidump_descriptor.h" +bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc, void* context, bool succeeded); +#else  // Called by breakpad exception handler after the minidump has been generated.  bool unix_post_minidump_callback(const char *dump_dir,  					  const char *minidump_id,  					  void *context, bool succeeded); +#endif +  # if LL_DARWIN  /* OSX doesn't support SIGRT* */  S32 LL_SMACKDOWN_SIGNAL = SIGUSR1; @@ -313,7 +319,7 @@ void LLApp::setupErrorHandling()  	// Add google breakpad exception handler configured for Darwin/Linux.  	bool installHandler = true; -#ifdef LL_DARWIN +#if LL_DARWIN  	// For the special case of Darwin, we do not want to install the handler if  	// the process is being debugged as the app will exit with value ABRT (6) if  	// we do.  Unfortunately, the code below which performs that test relies on @@ -322,7 +328,7 @@ void LLApp::setupErrorHandling()  	// future releases of Darwin.  This test is really only needed for developers  	// starting the app from a debugger anyway.  	#ifndef LL_RELEASE_FOR_DOWNLOAD -    int mib[4]; +    	int mib[4];  	mib[0] = CTL_KERN;  	mib[1] = KERN_PROC;  	mib[2] = KERN_PROC_PID; @@ -346,14 +352,21 @@ void LLApp::setupErrorHandling()  		installHandler = true;  	}  	#endif -#endif +  	if(installHandler && (mExceptionHandler == 0))  	{  		std::string dumpPath = "/tmp/";  		mExceptionHandler = new google_breakpad::ExceptionHandler(dumpPath, 0, &unix_post_minidump_callback, 0, true, 0);  	} +#elif LL_LINUX +	if(installHandler && (mExceptionHandler == 0)) +	{ +		google_breakpad::MinidumpDescriptor desc("/tmp"); +	        new google_breakpad::ExceptionHandler(desc, 0, &unix_minidump_callback, 0, true, 0); +	}  #endif +#endif  	startErrorThread();  } @@ -410,6 +423,9 @@ void LLApp::setMiniDumpDir(const std::string &path)  	wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];  	mbstowcs(buffer, path.c_str(), MAX_MINDUMP_PATH_LENGTH);  	mExceptionHandler->set_dump_path(std::wstring(buffer)); +#elif LL_LINUX +        google_breakpad::MinidumpDescriptor desc(path); +	mExceptionHandler->set_minidump_descriptor(desc);  #else  	mExceptionHandler->set_dump_path(path);  #endif @@ -857,6 +873,43 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)  	}  } +#if LL_LINUX +bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc, void* context, bool succeeded) +{ +	// Copy minidump file path into fixed buffer in the app instance to avoid +	// heap allocations in a crash handler. +	 +	// path format: <dump_dir>/<minidump_id>.dmp +	int dirPathLength = strlen(minidump_desc.path()); +	 +	// The path must not be truncated. +	llassert((dirPathLength + 5) <= LLApp::MAX_MINDUMP_PATH_LENGTH); +	 +	char * path = LLApp::instance()->getMiniDumpFilename(); +	S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH; +	strncpy(path, minidump_desc.path(), remaining); +	remaining -= dirPathLength; +	path += dirPathLength; +	if (remaining > 0 && dirPathLength > 0 && path[-1] != '/') +	{ +		*path++ = '/'; +		--remaining; +	} +	 +	llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; +	LLApp::runErrorHandler(); +	 +#ifndef LL_RELEASE_FOR_DOWNLOAD +	clear_signals(); +	return false; +#else +	return true; +#endif + +} +#endif + +  bool unix_post_minidump_callback(const char *dump_dir,  					  const char *minidump_id,  					  void *context, bool succeeded) diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index a536a06ea5..afa06df23e 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -38,7 +38,7 @@ typedef LLAtomic32<U32> LLAtomicU32;  class LLErrorThread;  class LLLiveFile;  #if LL_LINUX -typedef struct siginfo siginfo_t; +#include <signal.h>  #endif  typedef void (*LLAppErrorHandler)(); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index dd5689512f..3c107d67a3 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1073,9 +1073,7 @@ class Linux_i686Manifest(LinuxManifest):              self.path("libboost_filesystem-mt.so.*")              self.path("libboost_signals-mt.so.*")              self.path("libboost_system-mt.so.*") -            self.path("libbreakpad_client.so.0.0.0") -            self.path("libbreakpad_client.so.0") -            self.path("libbreakpad_client.so") +            #self.path("libbreakpad_client.a")              self.path("libcollada14dom.so")              self.path("libdb*.so")              self.path("libcrypto.so.*") | 
