File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def run(self):
100100 name = 'vmprof' ,
101101 author = 'vmprof team' ,
102102 author_email = 'fijal@baroquesoftware.com' ,
103- version = "0.4.10 " ,
103+ version = "0.4.11.dev0 " ,
104104 packages = find_packages (),
105105 description = "Python's vmprof client" ,
106106 long_description = 'See https://vmprof.readthedocs.org/' ,
Original file line number Diff line number Diff line change @@ -510,7 +510,6 @@ int vmp_read_vmaps(const char * fname) {
510510static const char * vmprof_error = NULL ;
511511static void * libhandle = NULL ;
512512
513-
514513#ifdef VMPROF_LINUX
515514#define LIBUNWIND "libunwind.so"
516515#ifdef __i386__
@@ -525,9 +524,19 @@ static void * libhandle = NULL;
525524int vmp_native_enable (void ) {
526525#ifdef VMPROF_LINUX
527526 if (libhandle == NULL ) {
527+ // on linux, the wheel includes the libunwind shared object.
528+ libhandle = dlopen (NULL , RTLD_LAZY | RTLD_LOCAL );
529+ if (libhandle != NULL ) {
530+ if (dlsym (libhandle , U_PREFIX PREFIX "_getcontext" ) != NULL ) {
531+ goto loaded_libunwind ;
532+ }
533+ libhandle = NULL ;
534+ }
535+
528536 if ((libhandle = dlopen (LIBUNWIND , RTLD_LAZY | RTLD_LOCAL )) == NULL ) {
529537 goto bail_out ;
530538 }
539+ loaded_libunwind :
531540 if ((unw_get_reg = dlsym (libhandle , UL_PREFIX PREFIX "_get_reg" )) == NULL ) {
532541 goto bail_out ;
533542 }
You can’t perform that action at this time.
0 commit comments