diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-10-20 23:32:11 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-10-20 23:32:11 +0300 |
commit | 6c47e6d4c929d97aa59efc970c0b3a07d6ee7ad6 (patch) | |
tree | ccf1d5699a995ce79781ebf663b7b67c23ae9e30 /malloc.c | |
parent | 444a0ff820c02aeec6326b5cf3461394775863f0 (diff) | |
download | bdwgc-6c47e6d4c929d97aa59efc970c0b3a07d6ee7ad6.tar.gz |
Fix uclibc handling and comment in GC_init_lib_bounds
(fix of commit ffd2f9fe0)
Issue #477 (bdwgc).
According to uclibc source it seems to have libpthread.so file,
unlike musl. This commit replaces uclibc to musl in comment and do
not turn off the warning about missing libpthread.so for uclibc.
* malloc.c [REDIRECT_MALLOC && !REDIRECT_MALLOC_IN_HEADER
&& GC_LINUX_THREADS && __GLIBC__] (GC_init_lib_bounds): Change
uclibc (misspelled) to musl in comment; do not check whether __UCLIBC__
is defined.
Diffstat (limited to 'malloc.c')
-rw-r--r-- | malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -469,14 +469,14 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_malloc_uncollectable(size_t lb) GC_init(); /* if not called yet */ if (!GC_text_mapping("libpthread-", &GC_libpthread_start, &GC_libpthread_end)) { - /* Some libc implementations like bionic, uclib and glibc 2.34 */ + /* Some libc implementations like bionic, musl and glibc 2.34 */ /* do not have libpthread.so because the pthreads-related code */ /* is located in libc.so, thus potential calloc calls from such */ /* code are forwarded to real (libc) calloc without any special */ /* handling on the libgc side. Checking glibc version at */ /* compile time to turn off the warning seems to be fine. */ /* TODO: Remove GC_text_mapping() call for this case. */ -# if defined(__GLIBC__) && !defined(__UCLIBC__) \ +# if defined(__GLIBC__) \ && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 34)) WARN("Failed to find libpthread.so text mapping: Expect crash\n", 0); /* This might still work with some versions of libpthread, */ |