Re: [Gc] glibc 2.19 lock elision bug
Ivan Maidanski <ivmai-JGs/[email protected]> Wed, 24 Sep 2014 01:41:31 +0400
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
Hi Thomas, Thank you. I fixed it (in a bit different way) plus another bug. PS. Github merge request is generally preferred. -- Tue, 23 Sept 2014, 11:18 +04:00 from Thomas Schwinge <[email protected]>: Hi! On Sat, 19 Jul 2014 16:48:39 +0400, Ivan Maidanski < [email protected] > wrote: > Thank you for the patch. > I reviewed it and applied several changes - see https://github.com/ivmai/bdwgc/commit/757af8aa17ed107ff2915f93967087835c0100dc : I've hit two issues (in GNU Hurd testing, but generally applicable), for which I'm attaching patches. Please tell if you'd rather have me submit these as Github pull requests. Adding the following include directive avoids an implicit declaration warning: commit 6b9b4eef2622a23856af47fb9aa0eebc159960e4 Author: Thomas Schwinge < [email protected] > Date: Mon Sep 22 13:34:30 2014 +0200 Avoid compiler warning. ../master/misc.c: In function 'GC_init': ../master/misc.c:892:7: warning: implicit declaration of function 'GC_setup_mark_lock' [-Wimplicit-function-declaration] * misc.c: Include "private/pthread_support.h". --- misc.c | 1 + 1 file changed, 1 insertion(+) diff --git misc.c misc.c index 32cbe24..41bd3f4 100644 --- misc.c +++ misc.c @@ -14,6 +14,7 @@ */ #include "private/gc_pmark.h" +#include "private/pthread_support.h" #include <stdio.h> #include <limits.h> Guarding GC_setup_mark_lock usage with PARALLEL_MARK is required to avoid an undefined reference in non-PARALLEL_MARK configurations: commit 4c8e0dc234e671c4d64ffab9d4f94b6cd8cc2f63 Author: Thomas Schwinge < [email protected] > Date: Mon Sep 22 13:36:00 2014 +0200 Refer to GC_setup_mark_lock only in PARALLEL_MARK code. ./.libs/libgc.so: undefined reference to `GC_setup_mark_lock' * misc.c (GC_init): Guard GC_setup_mark_lock usage. --- misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git misc.c misc.c index 41bd3f4..721a999 100644 --- misc.c +++ misc.c @@ -889,7 +889,7 @@ GC_API void GC_CALL GC_init(void) /* else */ InitializeCriticalSection (&GC_allocate_ml); } # endif /* GC_WIN32_THREADS */ -# if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) +# if defined(PARALLEL_MARK) && defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) GC_setup_mark_lock(); # endif /* GC_PTHREADS */ # if (defined(MSWIN32) || defined(MSWINCE)) && defined(THREADS) Grüße, Thomas _______________________________________________ bdwgc mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/bdwgc