* Makefile.am: Use -no-undefined for libgc.
* Makefile.in: Regenerate.
* Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
* dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
consistently.
* misc.c: Fix some WARN calls. Move GC_is_initialized setting and
GC_thr_init() call.
* os_dep.c: Consistently use WARN where appropriate.
* thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
remove inappropriate pthread.h include.
* doc/README.linux: Remove some anachronisms.
* libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/powerpc.h (AO_load_acquire): Add
64-bit version.
+2007-06-28 Hans Boehm <Hans.Boehm@hp.com>
+
+ * Makefile.am: Use -no-undefined for libgc.
+ * Makefile.in: Regenerate.
+ * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
+ * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
+ consistently.
+ * misc.c: Fix some WARN calls. Move GC_is_initialized setting and
+ GC_thr_init() call.
+ * os_dep.c: Consistently use WARN where appropriate.
+ * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
+ remove inappropriate pthread.h include.
+ * doc/README.linux: Remove some anachronisms.
+
2007-06-23 Hans Boehm <Hans.Boehm@hp.com>
* alloc.c: Also use GC_check_tls on non-Linux systems.
# linuxthread semaphore functions get linked:
libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
libgc_la_DEPENDENCIES = @addobjs@
-libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0
-# -no-undefined doesn't work here, since we get a reference to __tls_get_addr.
+libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined
EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
mips_sgi_mach_dep.s mips_ultrix_mach_dep.s \
# stack bounds in the same way as other pthread ports, without trying to
# walk the frames onthe stack. This is recommended only as a fallback
# for applications that don't support proper stack unwinding.
+# -DUSE_PROC_FOR_LIBRARIES Causes the Linux collector to treat writable
+# memory mappings (as reported by /proc) as roots, if it doesn't have
+# otherinformation about them. It no longer traverses dynamic loader
+# data structures to find dynamic library static data. This may be
+# required for applications that store pointers in mmapped segments without
+# informaing the collector. But it typically performs poorly, especially
+# since it will scan inactive but cached NPTL thread stacks completely.
#
CXXFLAGS= $(CFLAGS)
# linuxthread semaphore functions get linked:
libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
libgc_la_DEPENDENCIES = @addobjs@
-libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0
-# -no-undefined doesn't work here, since we get a reference to __tls_get_addr.
+libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined
EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
mips_sgi_mach_dep.s mips_ultrix_mach_dep.s \
rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
conditions, this may cause unexpected heap growth.
5) The combination of GC_LINUX_THREADS, REDIRECT_MALLOC, and incremental
- collection fails in seemingly random places. This hasn't been tracked
- down yet, but is perhaps not completely astonishing. The thread package
- uses malloc, and thus can presumably get SIGSEGVs while inside the
- package. There is no real guarantee that signals are handled properly
- at that point.
+ collection is probably not fully reliable, though it now seems to work
+ in simple cases.
6) Thread local storage may not be viewed as part of the root set by the
collector. This probably depends on the linuxthreads version. For the
time being, any collectable memory referenced by thread local storage should
also be referenced from elsewhere, or be allocated as uncollectable.
- (This is really a bug that should be fixed somehow.)
+ (This is really a bug that should be fixed somehow. The current GC
+ version probably gets things right if there are not too many tls locations
+ and if dlopen is not used.)
M68K LINUX:
word GC_register_map_entries(char *maps)
{
- char *prot_buf;
+ char *prot;
char *buf_ptr = maps;
int count;
ptr_t start, end;
long addr = strtoul(addr_string, NULL, 16);
# endif
if (addr < 0x1000)
- WARN("Unlikely trace address: 0x%lx", (unsigned long)addr);
+ WARN("Unlikely trace address: 0x%lx\n", (GC_word)addr);
GC_trace_addr = (ptr_t)addr;
# endif
}
GC_init_win32();
# endif
# if defined(USE_PROC_FOR_LIBRARIES) && defined(GC_LINUX_THREADS)
- WARN("USE_PROC_FOR_LIBRARIES + GC_LINUX_THREADS performs poorly.", 0);
+ WARN("USE_PROC_FOR_LIBRARIES + GC_LINUX_THREADS performs poorly.\n", 0);
/* If thread stacks are cached, they tend to be scanned in */
/* entirety as part of the root set. This wil grow them to */
/* maximum size, and is generally not desirable. */
# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
GC_init_netbsd_elf();
# endif
-# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \
- || defined(GC_WIN32_THREADS)
- GC_thr_init();
-# endif
# if !defined(THREADS) || defined(GC_PTHREADS) || defined(GC_WIN32_THREADS) \
|| defined(GC_SOLARIS_THREADS)
if (GC_stackbottom == 0) {
} else {
# if (defined(LINUX) || defined(HPUX)) && defined(IA64)
if (GC_register_stackbottom == 0) {
- WARN("GC_register_stackbottom should be set with GC_stackbottom", 0);
+ WARN("GC_register_stackbottom should be set with GC_stackbottom\n", 0);
/* The following may fail, since we may rely on */
/* alignment properties that may not hold with a user set */
/* GC_stackbottom. */
}
PCR_IL_Unlock();
GC_pcr_install();
+# endif
+ GC_is_initialized = TRUE;
+# if defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
+ GC_thr_init();
# endif
COND_DUMP;
/* Get black list set up and/or incremental GC started */
if (!GC_dont_precollect || GC_incremental) GC_gcollect_inner();
- GC_is_initialized = TRUE;
# ifdef STUBBORN_ALLOC
GC_stubborn_init();
# endif
ABORT("Got more than 8 SIGBUSs in a row!");
} else {
GC_sigbus_count++;
- GC_err_printf("GC: WARNING: Ignoring SIGBUS.\n");
+ WARN("Ignoring SIGBUS.\n", 0);
}
}
#endif /* BROKEN_EXCEPTION_HANDLING */
GC_log_printf("Inititalizing mach/darwin mprotect virtual dirty bit "
"implementation\n");
# ifdef BROKEN_EXCEPTION_HANDLING
- GC_err_printf("GC: WARNING: Enabling workarounds for various darwin "
- "exception handling bugs.\n");
+ WARN("Enabling workarounds for various darwin "
+ "exception handling bugs.\n", 0);
# endif
GC_dirty_maintained = TRUE;
if (GC_page_size % HBLKSIZE != 0) {
}
if(++last_fault_count < 32) {
if(last_fault_count == 1)
- GC_err_printf("GC: WARNING: Ignoring KERN_PROTECTION_FAILURE"
- "at %p\n", addr);
+ WARN("Ignoring KERN_PROTECTION_FAILURE at %lx\n", (GC_word)addr);
return KERN_SUCCESS;
}
extern char * GC_lookup_thread(pthread_t id);
#endif
-#if defined(GC_ASSERTIONS) && !defined(GC_WIN32_THREADS)
-# include <pthread.h>
+#if defined(GC_ASSERTIONS) && defined(GC_WIN32_THREADS)
extern char * GC_lookup_thread(int id);
#endif