[Issue 17591] SIGSEGV in pthread_mutex_destroy after dlopen'ing a shared library with -defaultlib=libphobos2.so

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 3 15:56:48 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17591

Timothee Cour <timothee.cour2 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2 at gmail.com

--- Comment #1 from Timothee Cour <timothee.cour2 at gmail.com> ---
* NOTE 1:

commenting out:
```
int ret=dlclose(handle);
assert(!ret);
```
will avoid the error but this will leak resources

* NOTE 2:
adding:
```
enum RTLD_NODELETE=0x01000;
auto flag=RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE;
```

will also avoid the error but my understanding is it'll also leak resources
(and RTLD_NODELETE isn't defined in core.sys.posix.dlfcn for X86_64 so i had to
add the above defined enum)
Is that safe?

--


More information about the Digitalmars-d-bugs mailing list