Better fix for OSX 10.14 libc++abi demangling crash on mem shenanigans.
Silence nagging about running launcher for non-release for download builds. Tweak newview CMake to use executable instead of SL_Launcher and re-enable debugging within Xcode.meow-7.2.2
parent
1c4decadfe
commit
88da45148e
|
|
@ -247,32 +247,15 @@ namespace LLError
|
|||
{
|
||||
std::string Log::demangle(const char* mangled)
|
||||
{
|
||||
|
||||
#if LL_DARWIN
|
||||
// MAINT-8724 libc++abi demangling causes malloc check failures
|
||||
// that abort the application on OS X 10.14 Mojave so the easy
|
||||
// fix is to disable demangling until a better fix can be found.
|
||||
return mangled;
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
// GCC: type_info::name() returns a mangled class name,st demangle
|
||||
|
||||
static size_t abi_name_len = 100;
|
||||
static char* abi_name_buf = (char*)malloc(abi_name_len);
|
||||
// warning: above is voodoo inferred from the GCC manual,
|
||||
// do NOT change
|
||||
|
||||
int status;
|
||||
// We don't use status, and shouldn't have to pass apointer to it
|
||||
// but gcc 3.3 libstc++'s implementation of demangling is broken
|
||||
// and fails without.
|
||||
|
||||
char* name = abi::__cxa_demangle(mangled,
|
||||
abi_name_buf, &abi_name_len, &status);
|
||||
// this call can realloc the abi_name_buf pointer (!)
|
||||
|
||||
return name ? name : mangled;
|
||||
|
||||
// passing nullptr, 0 forces allocation of a unique buffer we can free
|
||||
// fixing MAINT-8724 on OSX 10.14
|
||||
int status = -1;
|
||||
char* name = abi::__cxa_demangle(mangled, nullptr, 0, &status);
|
||||
std::string result(name ? name : mangled);
|
||||
free(name);
|
||||
return result;
|
||||
#elif LL_WINDOWS
|
||||
// DevStudio: type_info::name() includes the text "class " at the start
|
||||
|
||||
|
|
@ -289,7 +272,6 @@ namespace LLError
|
|||
|
||||
#else
|
||||
return mangled;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} // LLError
|
||||
|
|
|
|||
|
|
@ -2057,7 +2057,12 @@ if (DARWIN)
|
|||
# These all get set with PROPERTIES
|
||||
set(product "Second Life")
|
||||
# this is the setting for the Python wrapper, see SL-322 and WRAPPER line in Info-SecondLife.plist
|
||||
set(MACOSX_WRAPPER_EXECUTABLE_NAME "SL_Launcher")
|
||||
if (PACKAGE)
|
||||
set(MACOSX_WRAPPER_EXECUTABLE_NAME "SL_Launcher")
|
||||
else (PACKAGE)
|
||||
# force the name of the actual executable to allow running it within Xcode for debugging
|
||||
set(MACOSX_WRAPPER_EXECUTABLE_NAME "../Resources/Second Life Viewer.app/Contents/MacOS/Second Life")
|
||||
endif (PACKAGE)
|
||||
set(MACOSX_BUNDLE_INFO_STRING "Second Life Viewer")
|
||||
set(MACOSX_BUNDLE_ICON_FILE "secondlife.icns")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.secondlife.indra.viewer")
|
||||
|
|
|
|||
|
|
@ -1082,6 +1082,8 @@ bool LLAppViewer::init()
|
|||
}
|
||||
}
|
||||
|
||||
// don't nag developers who need to run the executable directly
|
||||
#if LL_RELEASE_FOR_DOWNLOAD
|
||||
char* PARENT = getenv("PARENT");
|
||||
if (! (PARENT && std::string(PARENT) == "SL_Launcher"))
|
||||
{
|
||||
|
|
@ -1094,6 +1096,7 @@ bool LLAppViewer::init()
|
|||
// him/herself in the foot.
|
||||
LLNotificationsUtil::add("RunLauncher");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LL_WINDOWS
|
||||
if (gGLManager.mGLVersion < LLFeatureManager::getInstance()->getExpectedGLVersion())
|
||||
|
|
|
|||
Loading…
Reference in New Issue