VirtualBox

Changeset 44020 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Dec 3, 2012 5:43:17 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
82438
Message:

IPRT/thread-posix.cpp: avoid the pthread_setname_np dlsym trickery in the static variant of the runtime, causes crashes

Location:
trunk/src/VBox/Runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/Makefile.kmk

    r43880 r44020  
    215215RuntimeR3_SDKS          = VBOX_LIBXML2 VBOX_OPENSSL VBOX_BOOST ## @todo why is BOOST and XML2 here? r3/xml.cpp is not in this lib...
    216216RuntimeR3_SDKS.win      = $(VBOX_WINPSDK) $(VBOX_WINDDK)
    217 RuntimeR3_DEFS          = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
     217RuntimeR3_DEFS          = IN_RT_R3 IN_SUP_R3 IN_RT_STATIC LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
    218218#RuntimeR3_DEFS         += RTMEM_WRAP_TO_EF_APIS
    219219ifdef IPRT_WITH_KSTUFF
     
    13151315VBoxRT_INST                    = $(INST_DLL) $(INST_TESTCASE)
    13161316endif
    1317 VBoxRT_DEFS                    = $(filter-out RT_NO_GIP,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
     1317VBoxRT_DEFS                    = $(filter-out RT_NO_GIP IN_RT_STATIC,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
    13181318ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
    13191319 VBoxRT_DEFS                  += RT_NO_GIP
  • trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp

    r43363 r44020  
    4848# include <mach/mach_host.h>
    4949#endif
    50 #if defined(RT_OS_DARWIN) /*|| defined(RT_OS_FREEBSD) - later */ || defined(RT_OS_LINUX) \
     50#ifdef IN_RT_STATIC
     51/* The pthread_setname_np trickery below assumes a working dl env which is
     52 * not guaranteed in the context of a fully static executable. */
     53# undef IPRT_MAY_HAVE_PTHREAD_SET_NAME_NP
     54#else
     55# if defined(RT_OS_DARWIN) /*|| defined(RT_OS_FREEBSD) - later */ || defined(RT_OS_LINUX) \
    5156 || defined(IPRT_MAY_HAVE_PTHREAD_SET_NAME_NP)
    52 # define IPRT_MAY_HAVE_PTHREAD_SET_NAME_NP
    53 # include <dlfcn.h>
     57#  define IPRT_MAY_HAVE_PTHREAD_SET_NAME_NP
     58#  include <dlfcn.h>
     59# endif
    5460#endif
    5561#if defined(RT_OS_HAIKU)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette