[7.2d]

2012-08-09  Ivan Maidanski <ivmai@mail.ru>

	* doc/README: Change version to 7.2d (rev. D).

2012-08-05  Ivan Maidanski <ivmai@mail.ru>

	* config.guess: Regenerate (by autoreconf -vif using autoconf-2.68,
	automake-1.11.1 and libtool-2.4).
	* config.sub: Likewise.
	* m4/libtool.m4: Likewise.

2012-08-02  Ivan Maidanski <ivmai@mail.ru>

	* misc.c (GC_clear_stack_inner): Use GC_approx_sp() instead of
	"dummy[0]" set to "&dummy" value (that worked as expected only for
	STACK_GROWS_DOWN case).

2012-08-02  Ivan Maidanski <ivmai@mail.ru>

	* alloc.c (min_bytes_allocd, GC_stopped_mark): Use GC_approx_sp()
	instead of "&dummy"; remove 'dummy' local variable.
	* dyn_load.c (GC_cond_add_roots): Likewise.
	* misc.c (GC_init): Likewise.
	* os_dep.c (GC_get_stack_base, GC_get_main_stack_base): Likewise.
	* pthread_stop_world.c (GC_suspend_handler_inner,
	nacl_pre_syscall_hook, __nacl_suspend_thread_if_needed): Likewise.
	* pthread_support.c (GC_thr_init): Likewise.
	* ptr_chck.c (GC_on_stack): Likewise.
	* win32_threads.c (GC_push_stack_for): Likewise.
	* extra/setjmp_t.c (main): Define volatile 'sp' local variable, store
	its address to it and use it instead of "&dummy"; remove 'dummy' local
	variable.
	* mach_dep.c (GC_with_callee_saves_pushed): Use volatile for 'dummy'
	local variable.
	* misc.c (GC_clear_stack_inner): Store address of volatile 'dummy'
	local array (i.e. 'sp' value) to its first element (and use it in the
	comparison of addresses) to prevent any harmful optimizations as C
	officially disallows comparisons of pointers to different objects
	(e.g., some Mac OS X clang releases might turn a conditional
	expression that uses 'dummy' address into a constant); update comment.
	* misc.c (GC_call_with_stack_base): Use "&base" instead of "&dummy"
	(it is safe to use address of base here); remove dummy variable.

2012-08-01  Ivan Maidanski <ivmai@mail.ru>

	* misc.c (GC_call_with_stack_base): Call GC_noop1 after fn()
	invocation to prevent a tail-call optimization.

2012-07-21  Ivan Maidanski <ivmai@mail.ru>

	* os_dep.c (GC_get_stack_base): Abort if pthread_stackseg_np fails
	(if GC_OPENBSD_THREADS).
	* pthread_stop_world.c (GC_suspend_all): Get correct stack_ptr by
	calling pthread_stackseg_np (subtracting ss_size from ss_sp) instead
	of retrieving it from OpenBSD pthread implementation-dependent context
	(if GC_OPENBSD_THREADS); remove comment.

2012-06-17  Ivan Maidanski <ivmai@mail.ru>

	* tests/initsecondarythread.c: Include "private/config.h" if
	HAVE_CONFIG_H (mostly to have GC_WIN32_PTHREADS defined for
	pthreads-w32 target).
	* tests/thread_leak_test.c: Likewise.
	* tests/threadkey_test.c: Likewise.

2012-06-16  Ivan Maidanski <ivmai@mail.ru>

	* tests/test_cpp.cc (WinMain): Prevent SEGV in strtok() by checking
	"cmd" WinMain argument for NULL (in that case "argc" local variable is
	set to 0).

2012-06-16  Ivan Maidanski <ivmai@mail.ru>

	* tests/test_cpp.cc (main): Call GC_set_all_interior_pointers(1)
	before GC_INIT to ensure that the collector considers pointers to
	object interiors as valid ones (such a pointer could emerge as
	a result of a type cast to subclass in case of multiple inheritance);
	add comment.

[7.2c]

2012-06-11  Ivan Maidanski <ivmai@mail.ru>

	* doc/README: Change version to 7.2c (rev. C).

2012-06-08  Ivan Maidanski <ivmai@mail.ru>

	* cordbscs.c (CORD_cat_char_star): Check GC_MALLOC_ATOMIC result for
	NULL (do OUT_OF_MEMORY in such case) to prevent SEGV.

2012-06-07  Ivan Maidanski <ivmai@mail.ru>

	* dyn_load.c (GC_register_dynamic_libraries): If GC_scratch_alloc
	fails (returns null) then abort (with the appropriate message) instead
	of causing SEGV.
	* os_dep.c (GC_dirty_init): Likewise.
	* headers.c (GC_init_headers): Report error and exit if
	GC_scratch_alloc fails.
	* include/private/gc_priv.h (GC_scratch_alloc): Improve comment.
	* os_dep.c (GC_print_address_map): If GC_get_maps return null then
	print the appropriate message (instead of passing null to GC_err_puts
	thus causing SEGV).

2012-06-02  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gc_priv.h (GC_push_all, GC_push_other_roots):
	Declare as GC_API_PRIV (instead of GC_INNER) to make the symbol
	externally visible to some well-known 3rd-party software (e.g., ECL).
	* include/private/gc_priv.h (GC_push_conditional): Declare as
	GC_API_PRIV (only if GC_DISABLE_INCREMENTAL is undefined).
	* mark.c (GC_push_all, GC_push_conditional): Remove GC_INNER (to match
	the declaration).
	* os_dep.c (GC_push_other_roots): Likewise.

2012-06-02  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gc_priv.h (GC_clear_mark_bit, GC_set_mark_bit):
	Declare as GC_API_PRIV (instead of GC_INNER) to make the symbol
	externally visible to 3rd-party software (e.g., ECL).
	* mark.c (GC_set_mark_bit, GC_clear_mark_bit): Remove GC_INNER (to
	match the declaration).

2012-06-01  Tsugutomo Enami <tsugutomo.enami@jp.sony.com>

	* dyn_load.c: Include sys/param.h and dlfcn.h on NetBSD.
	* dyn_load.c (GC_FirstDLOpenedLinkMap): Obtain link map using dlinfo()
	on NetBSD if RTLD_DI_LINKMAP feature present (defined).

[7.2b]

2012-05-23  Ivan Maidanski <ivmai@mail.ru>

	* doc/README: Change version to 7.2b (rev. B).

2012-05-16  Ivan Maidanski <ivmai@mail.ru>

	* malloc.c (GC_malloc_uncollectable): Do not check assertion on
	hb_n_marks to be zero if multi-threaded; add comment.
	* mallocx.c (GC_malloc_atomic_uncollectable): Likewise.

[7.2]

2012-05-11  Ivan Maidanski  <ivmai@mail.ru>

	* configure.ac, doc/README, include/gc_version.h:
	Bump version to 7.2 (final).
	* configure: Regenerate.
	* Makefile.in: Ditto.

2012-04-16  H.J. Lu <hjl.tools@gmail.com>

	* include/gc_tiny_fl.h (GC_GRANULE_BYTES): Set to 8 for x32.
	(GC_GRANULE_WORDS): Set to 2 for x32.

2012-04-16  H.J. Lu <hjl.tools@gmail.com>

	* include/private/gcconfig.h: (ALIGNMENT): Set to 4 for x32.
	(CPP_WORDSZ): Set to 32 for x32.

2012-04-29  Ivan Maidanski <ivmai@mail.ru>

	* alloc.c (GC_check_fl_marks): Cast pointer passed to GC_is_marked to
	prevent compiler warning.

2012-04-21  Petter Urkedal <paurkedal@gmail.com>

	* alloc.c (GC_check_fl_marks): Re-read each pointer atomically before
	following the pointed-to link and bail out if the result is different
	(this can happen if the thread has popped the object off the
	free-list); the function is a no-op if AO_load is unavailable.

2012-04-21  Ivan Maidanski <ivmai@mail.ru>

	* pthread_support.c (GC_remove_all_threads_but_me): Call
	GC_remove_specific after destroying thread-local list.

2012-04-20  Ivan Maidanski <ivmai@mail.ru>

	* alloc.c (GC_check_fl_marks): Change prototype (pass pointer to
	"freelist" element instead of value); do not define the function if
	THREAD_LOCAL_ALLOC undefined.
	* include/private/gc_priv.h (GC_check_fl_marks): Likewise.
	* alloc.c (GC_check_fl_marks): Skip check if the argument points to
	a special (non-pointer) value; update comment; rename "q" local
	variable to "list".
	* thread_local_alloc.c (GC_check_tls_for): Update code according to
	GC_check_fl_marks functionality change (remove checks for special
	value).

2012-04-17  Niklas Therning <niklas@therning.org>

	* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT): Do not define
	for clang (as __builtin_unwind_init seems to be a no-op in the latest
	clang release).

2012-04-12  Ivan Maidanski <ivmai@mail.ru>

	* include/private/pthread_support.h (DETACHED): Fix a typo in comment.

2012-04-02  Ivan Maidanski <ivmai@mail.ru>

	* configure: Regenerate.
	* include/private/config.h.in : Likewise.

2012-04-02  Ivan Maidanski <ivmai@mail.ru>

	* doc/README.macros (NO_HANDLE_FORK): Replace back with HANDLE_FORK
	and update.
	* include/private/gcconfig.h (CAN_HANDLE_FORK): Define also for Darwin
	in case of MPROTECT_VDB.
	* misc.c (GC_set_handle_fork): Handle Darwin properly; add comment.
	* os_dep.c (GC_dirty_init): Do not turn on GC_dirty_maintained for
	Darwin if GC_handle_fork is on; add comment; remove FIXME.
	* pthread_support.c (GC_fork_prepare_proc): Remove WARN for Darwin
	(since GC_dirty_maintained is off in that case).
	* pthread_support.c (GC_fork_child_proc): Remove comment (for Darwin).

2012-04-02  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (GC_set_handle_fork): New API function.
	* misc.c (GC_set_handle_fork): Likewise.
	* include/private/gc_priv.h (GC_handle_fork): New internal variable
	declaration (only if CAN_HANDLE_FORK).
	* misc.c (GC_handle_fork): New internal variable (defined only if
	CAN_HANDLE_FORK); initialize to TRUE if HANDLE_FORK.
	* include/private/gcconfig.h (HANDLE_FORK): Replace with
	CAN_HANDLE_FORK.
	* pthread_support.c (HANDLE_FORK): Likewise.
	* win32_threads.c (HANDLE_FORK): Likewise.
	* include/private/gcconfig.h (CAN_HANDLE_FORK): Always define macro if
	HANDLE_FORK.
	* pthread_support.c (GC_thr_init): Replace HANDLE_FORK with
	CAN_HANDLE_FORK; call pthread_atfork only if GC_handle_fork; update
	the comment.
	* win32_threads.c (GC_thr_init): Likewise.
	* tests/test.c (NO_TEST_HANDLE_FORK): Define new macro if fork
	handling is not supported (or is a no-op) on the target.
	* tests/test.c (INIT_FORK_SUPPORT): New macro (invoke
	GC_set_handle_fork unless NO_TEST_HANDLE_FORK).
	* tests/test.c (GC_OPT_INIT): New macro (defined to GC_INIT or empty).
	* tests/test.c (GC_COND_INIT): Use INIT_FORK_SUPPORT and GC_OPT_INIT.
	* tests/test.c (run_one_test): Test NO_TEST_HANDLE_FORK (instead of
	target-specific macros).
	* win32_threads.c (GC_remove_all_threads_but_me, GC_fork_prepare_proc,
	GC_fork_parent_proc, GC_fork_child_proc): Do not test GC_PTHREADS.
	* configure.ac (HANDLE_FORK, NO_HANDLE_FORK): Update message.

2012-02-20  Ivan Maidanski <ivmai@mail.ru>

	* pthread_support.c (GC_thr_init): Abort on pthread_atfork failure
	(only if HANDLE_FORK).

2012-03-30  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (GC_HAVE_GET_HEAP_USAGE_SAFE): Remove public HAVE_
	macro (since function availability could be determined by autotools);
	update the comment.

2012-03-27  Andy Wingo <wingo@pobox.com>

	* configure.ac: Add --enable-handle-fork option; if explicitly passed,
	enables or disables the pthread_atfork support; if not passed, the
	default, as determined by gcconfig.h, is to enable HANDLE_FORK if it
	is supported on the target platform.

2012-03-28  Ivan Maidanski <ivmai@mail.ru>

	* doc/README.solaris2 (SOLARIS THREADS): Update.
	* doc/overview.html: Remove information about Solaris old-style
	threads support.

2012-03-26  Ivan Maidanski <ivmai@mail.ru>

	* dyn_load.c: Fix a typo and improve comment (for Android).

2012-03-25  Ivan Maidanski <ivmai@mail.ru>

	* include/gc_mark.h (GC_clear_stack): New API function.
	* include/private/gc_priv.h (GC_clear_stack): Remove declaration.
	* misc.c (GC_clear_stack): Replace GC_INNER with GC_API; add GC_CALL
	calling conventions modifier.

2012-03-25  Ivan Maidanski <ivmai@mail.ru>

	* allchblk.c (GC_hblkfreelist, GC_free_bytes): Do not define array as
	STATIC again but only if GC_GCJ_SUPPORT (for GNU GCJ client).
	* blacklst.c (GC_is_black_listed): Do not define as GC_INNER again
	(for GNU GCJ client).
	* include/private/gc_priv.h (GC_is_black_listed): Likewise.
	* include/private/gc_priv.h (GC_hblkfreelist): Restore removed
	declaration (but only if GC_GCJ_SUPPORT).
	* reclaim.c (GC_n_set_marks): Do not define as STATIC again (for GCJ);
	update the comment.

2012-03-24  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (HIDE_POINTER): Test GC_I_HIDE_POINTERS macro (as
	a synonym to I_HIDE_POINTERS) again (remains for backward
	compatibility only).

2012-03-24  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (GC_PTR): Add typedef again (for source-level backward
	compatibility useful for clients currently using gcc_boehmgc or
	mono_libgc).

2012-03-16  Ivan Maidanski <ivmai@mail.ru>

	* tests/test.c (GC_ALPHA_VERSION): Define to GC_TMP_ALPHA_VERSION if
	not defined by gc_version.h.
	* extra/add_gc_prefix.c (GC_ALPHA_VERSION): Likewise.
	* extra/gcname.c (GC_ALPHA_VERSION): Likewise.

2012-03-15  Ivan Maidanski <ivmai@mail.ru> (really Hans Boehm)

	* malloc.c (GC_SQRT_SIZE_MAX): New macro.
	* malloc.c (calloc): Add fast initial size overflow check to avoid
	integer division for reasonably small values passed.

2012-03-15  Ivan Maidanski <ivmai@mail.ru>

	* malloc.c: Include limits.h for SIZE_MAX.
	* malloc.c (SIZE_MAX, calloc): Define GC_SIZE_MAX instead of SIZE_MAX.

2012-03-15  Xi Wang <xi.wang@gmail.com>

	* malloc.c (GC_generic_malloc): Check if the allocation size is
	rounded to a smaller value.
	* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.

2012-03-15  Xi Wang <xi.wang@gmail.com>

	* malloc.c (calloc): Check multiplication overflow in calloc(),
	assuming REDIRECT_MALLOC.

2012-03-06  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gc_priv.h (GC_print_stats): Update the comment.
	* tests/test.c (GC_print_stats, run_one_test, check_heap_stats):
	Rename GC_print_stats to print_stats (since the former is used
	internally by GC and not exported).
	* tests/test.c (print_stats): Always define (either as a macro or
	a static int variable) regardless of GC_DLL and SMALL_CONFIG.
	* tests/test.c (INIT_PRINT_STATS): New macro (used to initialize
	print_stats if needed); GETENV is used if needed and available.
	* tests/test.c (GC_COND_INIT): Invoke INIT_PRINT_STATS.

2012-03-06  Ivan Maidanski <ivmai@mail.ru>

	* misc.c: Include windows.h for Cygwin if GC_READ_ENV_FILE (required
	for GC_envfile_init).
	* misc.c (_MAX_PATH): Move definition to the place before the first
	use (only Win32).

2012-03-04  Ivan Maidanski <ivmai@mail.ru>

	* misc.c (GC_init): Add a workaround for clang/x64 (coming with
	Xcode 4.3) which cannot process the static assertion on
	((ptr_t)-1 > 0) correctly.

2012-02-27  Ivan Maidanski <ivmai@mail.ru>

	* win32_threads.c (GC_register_my_thread): Fix SEGV by setting "me"
	to the newly-created thread GC descriptor (if lookup failed) before
	altering flags of "me" (only if GC_PTHREADS); add comment (same as
	in pthread_support.c).

2012-02-27  Ivan Maidanski <ivmai@mail.ru>

	* os_dep.c (GC_SysVGetDataStart): Place "volatile" keyword for
	"result" local variable properly.

2012-02-26  Ivan Maidanski <ivmai@mail.ru>

	* win32_threads.c (GC_remove_all_threads_but_me): Update comment;
	re-hash GC_threads map as thread Win32 Id in the child differs from
	that in the parent; rename "id" local variable to "pthread_id".
	* win32_threads.c (GC_remove_all_threads_but_me): Call
	GC_setspecific (if THREAD_LOCAL_ALLOC) to re-assign Win32-based
	thread-local pointer to 'tlfs' (identified by GC_thread_key) of the
	current thread.

2012-02-26  Ivan Maidanski <ivmai@mail.ru>

	* pthread_support.c (GC_remove_all_threads_but_me): Refine comment for
	stop_info.mach_thread update.
	* pthread_support.c (GC_remove_all_threads_but_me): Call
	GC_setspecific (if THREAD_LOCAL_ALLOC) to re-assign thread-local
	pointer to 'tlfs' (identified by GC_thread_key) of the current thread
	(except for USE_CUSTOM_SPECIFIC).

2012-02-25  Ivan Maidanski <ivmai@mail.ru>

	* configure: Regenerate.

2012-02-25  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (win32_threads): Set variable for "mingw" target
	(causing definition of "WIN32_THREADS" AM conditional which, in turn,
	causes win32_threads.c to be compiled and put to libgc.a).

2012-02-25  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gc_priv.h (SIG_SUSPEND): Do not define for Cygwin
	and pthreads-w32 (since signals are not used for threads
	suspend/resume).

2012-02-24  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gcconfig.h (HANDLE_FORK): Define also for Cygwin
	(but not for win32-pthreads).
	* win32_threads.c: Include unistd.h if HANDLE_FORK (for
	pthread_atfork).
	* win32_threads.c (GC_wait_for_gc_completion): Add wait_for_all
	argument.
	* win32_threads.c (GC_unregister_my_thread, GC_thread_exit_proc): Pass
	FALSE ("wait_for_all" argument) to GC_wait_for_gc_completion.
	* win32_threads.c (GC_remove_all_threads_but_me, GC_fork_prepare_proc,
	GC_fork_parent_proc, GC_fork_child_proc): New functions (similar to
	that in pthread_support.c) if HANDLE_FORK.
	* win32_threads.c (GC_thr_init): Invoke pthread_atfork if HANDLE_FORK.

2012-02-24  Ivan Maidanski <ivmai@mail.ru>

	* os_dep.c (GC_dirty_init): Add FIXME regarding fork (Darwin).
	* pthread_support.c (GC_remove_all_threads_but_me): Update mach_thread
	for "me" (Darwin).
	* pthread_support.c (GC_fork_prepare_proc): Output warning if
	GC_dirty_maintained (if DARWIN and MPROTECT_VDB).
	* pthread_support.c (GC_fork_prepare_proc, GC_fork_child_proc): Add
	FIXME (for Darwin).
	* tests/test.c (run_one_test): Do not test fork() for Darwin with
	incremental mode on (if HANDLE_FORK); add FIXME.

2012-02-21  Ivan Maidanski <ivmai@mail.ru>

	* win32_threads.c (GC_wait_for_gc_completion): Add function (similar
	implementation as in pthread_support.c).
	* win32_threads.c (GC_unregister_my_thread, GC_thread_exit_proc):
	Call GC_wait_for_gc_completion to prevent collecting from unregistered
	thread; remove FIXME.

2012-02-21  Ivan Maidanski <ivmai@mail.ru>

	* tests/test.c: Include unistd.h for fork() declaration if HANDLE_FORK
	(and THREADS).

2012-02-20  Ivan Maidanski <ivmai@mail.ru> (mostly really Andy Wingo)

	* doc/README.macros (HANDLE_FORK): Replace with NO_HANDLE_FORK; update
	the documentation.
	* include/private/gcconfig.h (HANDLE_FORK): Explicitly define if
	GC_PTHREADS unless already defined or NO_HANDLE_FORK is defined, or
	unsupported on the target.

2012-02-16  Ivan Maidanski <ivmai@mail.ru>

	* mark.c (GC_push_all, GC_push_selected): Properly check for empty
	region after boundaries alignment (for the case when boundaries
	unaligned and the region is short than one word); simplify the checked
	condition.

2012-02-16  Ivan Maidanski <ivmai@mail.ru>

	* finalize.c (GC_finalizer_nested): Change type from char to int to
	force GC symbols proper alignment for some compilers (e.g., Watcom);
	add comment.
	* finalize.c (GC_check_finalizer_nested): Cast GC_finalizer_nested
	properly (since it holds an unsigned char value).
	* os_dep.c (GC_get_maps): Remove static "init_buf" variable (of char
	size) and initialize "maps_buf" to NULL since it is allocated anyway
	(since maps_size is non-zero).
	* os_dep.c (GC_register_data_segments): Remove static "dummy" variable
	(of char size) and use GC_pages_executable instead.

2012-02-14  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gcconfig.h (NO_DYLD_BIND_FULLY_IMAGE): Do not define
	if already defined (e.g., by compiler -D option).

2012-02-10  Ivan Maidanski <ivmai@mail.ru>

	* mark_rts.c (GC_add_roots_inner): Fix update of GC_root_size value
	for Win32 (adjust GC_root_size before altering r_start/r_end).

2012-02-01  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (GC_dont_gc): Improve comment (add note for new client
	code).
	* include/gc.h (GC_is_disabled): New API function.
	* misc.c (GC_is_disabled): Likewise.

2012-02-01  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (GC_stackbottom): Improve comment (add note for
	new client code).

2012-02-01  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (GC_base): Fix a typo in the comment.

2012-02-01  Ivan Maidanski <ivmai@mail.ru>

	* cord/cordtest.c (main): Print "SUCCEEDED" message to stdout
	instead of stderr.

2012-01-31  Ivan Maidanski <ivmai@mail.ru>

	* allchblk.c (GC_add_to_fl): Append ';' after FREE_ASSERT().
	* allchblk.c (GC_remove_from_fl): Fix a typo in a comment.

2012-01-26  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gcconfig.h (USE_GET_STACKBASE_FOR_MAIN): Define if
	PLATFORM_ANDROID.

2012-01-26  Ivan Maidanski <ivmai@mail.ru>  (really Daniel R. Grayson)

	* mark_rts.c (GC_add_roots_inner): Round "b" pointer up to word
	boundary.
	* include/gc.h (GC_add_roots): Update the comment.

2012-01-24  Ivan Maidanski <ivmai@mail.ru>

	* pthread_support.c (STAT_READ, STAT_BUF_SIZE): Move the definition
	out of PLATFORM_ANDROID condition.
	* pthread_support.c (GC_get_nprocs_present): New static function
	obtaining number of avalable CPUs from
	"/sys/devices/system/cpu/present" (only Linux/arm excluding NaCl).
	* pthread_support.c (GC_thr_init): Invoke GC_get_nprocs_present
	(unless set from the environment variable) to workaround a bug in
	some Linux/arm kernels (including Android).

2012-01-24  Ivan Maidanski <ivmai@mail.ru>

	* pthread_support.c (GC_get_nprocs): Change "result" local variable
	type to int from word (to match returned value type); remove redundant
	cast; initialize "result" variable just before its use.

2012-01-23  Ivan Maidanski <ivmai@mail.ru>

	* os_dep.c (GC_sigbus_count): Fix a typo in a comment.

2012-01-20  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (AC_INIT): Update bug reports email.
	* doc/gcdescr.html: Likewise.
	* doc/README.cords: Likewise.
	* doc/overview.html: Fix email address.

2012-01-18  Ivan Maidanski <ivmai@mail.ru>

	* tests/realloc_test.c (main): Prevent NULL pointer dereference
	(exit with an error message in case of NULL returned by GC_malloc).

2012-01-17  Ivan Maidanski <ivmai@mail.ru>

	* cord/cordtest.c (FNAME1, FNAME2): Do not specify folder
	(platform-dependent) for temporary file; use same short file name
	(DOS-compatible) for all targets.

2012-01-13  Ivan Maidanski <ivmai@mail.ru>

	* extra/gc.c: Include gc_pthread_redirects.h (unless
	GC_NO_THREAD_REDIRECTS) to restore thread calls macro-based
	redirection after the corresponding undef's in pthread_support.c.
	* win32_threads.c: Restore thread calls macro-based redirection
	(unless GC_NO_THREAD_REDIRECTS) at the file end.
	* extra/gc.c: Remove "file not well tested" comment.

2012-01-10  Ivan Maidanski <ivmai@mail.ru>

	* pthread_stop_world.c (GC_restart_handler): Preserve errno value in
	case of sem_post or GC_log_printf invocation inside.

2011-12-30  Ivan Maidanski <ivmai@mail.ru>

	* Makefile.in: Regenerate.

2011-12-30  Ivan Maidanski <ivmai@mail.ru>

	* Makefile.am (pkginclude_HEADERS): Remove gc_allocator.h
	entry.
	* Makefile.am (include_HEADERS): Add include/extra/gc_cpp.h entry
	(only if CPLUSPLUS).
	* include/include.am (pkginclude_HEADERS): Remove include/gc_cpp.h
	entry.
	* include/include.am (include_HEADERS): Remove include/extra/gc_cpp.h
	entry.

2011-12-30  Ivan Maidanski <ivmai@mail.ru>

	* misc.c (GC_init): Append ';' after GC_ASSERT().
	* os_dep.c (GC_protect_heap): Likewise.

2011-12-30  Ivan Maidanski <ivmai@mail.ru>

	* tests/test_cpp.cc (GC_API_PRIV): New macro (same definition as in
	gc_priv.h).
	* tests/test_cpp.cc (GC_printf): Use GC_API_PRIV instead of GC_API.

2011-12-30  Ivan Maidanski <ivmai@mail.ru>

	* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Declare i, j
	local variables as unsigned (to prevent compiler warning in
	a comparison involving sizeof)

2011-12-27  Ivan Maidanski <ivmai@mail.ru>  (really Richard Sandiford)

	* include/private/gcconfig.h (HBLKSIZE): Define for MIPS.

2011-12-27  Ivan Maidanski <ivmai@mail.ru>  (really David Daney)

	* include/private/gcconfig.h (CPP_WORDSZ, ALIGNMENT): Handle
	mips64-linux n64 ABI.

2011-12-15  Ivan Maidanski <ivmai@mail.ru>

	* configure: Regenerate.

2011-12-15  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (ac_cv_fno_strict_aliasing): New variable (set to
	"skipped" if the client passed "-fstrict-aliasing" option to CFLAGS
	else set to "yes" if GCC supports "-fno-strict-aliasing" option,
	otherwise set to "no").
	* configure.ac (CFLAGS): Append "-fno-strict-aliasing" if
	ac_cv_fno_strict_aliasing is "yes" (only if GCC).

2011-12-13  Ivan Maidanski <ivmai@mail.ru>

	* configure: Regenerate.

2011-12-13  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (ac_is_dgux): Move down to below gc-debug processing
	(DG/UX) since it uses "enable_gc_debug" variable; remove FIXME.

2011-12-13  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (CFLAGS, CXXFLAGS): Preserve C/C++ flags passed by
	client (DG/UX only); remove code duplication (put common flags to
	"dgux_spec_opts" variable).

2011-11-23  Ivan Maidanski <ivmai@mail.ru>  (really Bruce Mitchener)

	* README: Fix typos.
	* doc/README.cmake: Likewise.
	* doc/README.darwin: Likewise.
	* autogen.sh: Set file 'executable' bit.

2011-11-15  Ivan Maidanski <ivmai@mail.ru>

	* pthread_support.c (GC_is_thread_tsd_valid): Check tsd more correctly
	using GC_thread and thread_local_freelists declarations; remove FIXME.
	* win32_threads.c (GC_is_thread_tsd_valid): Likewise.

2011-11-15  Ivan Maidanski <ivmai@mail.ru>

	* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Test result of
	GC_getspecific() for NULL in all cases except for USE_COMPILER_TLS and
	USE_WIN32_COMPILER_TLS (i.e., no-op implementation of GC_getspecific).

2011-10-10  Ivan Maidanski <ivmai@mail.ru>  (really Linas Vepstas)

	* include/private/gcconfig.h: Add machine description for Hexagon.

2011-09-30  Ivan Maidanski <ivmai@mail.ru>

	* tests/test.c (mktree): Insert CHECK_OUT_OF_MEMORY to report mktree()
	out-of-memory failures.
	* tests/trace_test.c (mktree): Test whether GC_MALLOC_ATOMIC returns
	NULL (exit with an error code and the appropriate message printed in
	this case).

2011-09-23  Ivan Maidanski <ivmai@mail.ru>

	* configure: Regenerate.

2011-09-23  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (NO_DEBUGGING): Define based on testing enable_gc_debug
	value (instead of based on with_cross_host value).

2011-09-23  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (THREAD_LOCAL_ALLOC): Test enable_shared and
	enable_static values properly when setting THREAD_LOCAL_ALLOC
	in case PARALLEL_MARK is off (Win32 only).

2011-09-22  Ivan Maidanski <ivmai@mail.ru>

	* configure: Regenerate.
	* include/private/config.h.in: Ditto.

2011-09-22  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (GC_DLL): New AC template; define if only the dynamic
	libraries are being built.
	* configure.ac (THREAD_LOCAL_ALLOC): Define for Win32 implicitly
	if static libraries are being built (i.e. GC_DLL is not defined).
	* doc/README.win32: Update "GNU Tools" section.

2011-09-22  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (THREADS): Change "posix" to "win32" in case of
	cross-compiling to MinGW.

2011-09-22  Ivan Maidanski <ivmai@mail.ru>

	* configure.ac (PARALLEL_MARK): Check --enable-parallel-mark also for
	Solaris.

2011-09-20  Ivan Maidanski <ivmai@mail.ru>

	* pthread_start.c (GC_inner_start_routine): Add volatile to "me" local
	variable to prevent its clobbering.

2011-09-20  Ivan Maidanski <ivmai@mail.ru>

	* tests/threadkey_test.c (main): Print a message if the test is
	skipped.

2011-09-14  Ivan Maidanski <ivmai@mail.ru>

	* backgraph.c (per_object_helper): Cast "i" local variable to word
	(instead of "sz") in a comparison.

2011-09-14  Ivan Maidanski <ivmai@mail.ru>

	* Makefile.direct (Makefile): Add rule to create (or overwrite)
	Makefile from Makefile.direct file.
	* Makefile.direct (clean): Remove "base_lib", "c++" files as well.

2011-09-13  Ivan Maidanski <ivmai@mail.ru>

	* CMakeLists.txt (CMAKE_LEGACY_CYGWIN_WIN32): Set to 0 (required for
	Cygwin).

2011-09-13  Ivan Maidanski <ivmai@mail.ru>

	* tests/test.c (check_heap_stats): Increase max_heap_sz value (for
	32-bit targets) from 15M by 1M (as the former is hit sometimes on
	Cygwin).

2011-09-13  Ivan Maidanski <ivmai@mail.ru>

	* CMakeLists.txt (cygwin): Remove "-D_REENTRANT" definition.
	* CMakeLists.txt (cord): Add gdi32 link library.

2011-09-13  Ivan Maidanski <ivmai@mail.ru>

	* cord/de.c (WIN32): Define also for Cygwin.

2011-09-13  Ivan Maidanski <ivmai@mail.ru>

	* gc_cpp.cc (operator delete): Do not define for Cygwin since already
	defined in include/gc_cpp.h file.

2011-09-08  Ivan Maidanski <ivmai@mail.ru>

	* cord/cordprnt.c (CORD_vsprintf): Cast "prec" and "width" local
	variables to size_t.
	* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Change
	type of "i" local variable to int.
	* pthread_support.c (start_mark_threads): Likewise.
	* os_dep.c (GC_repeat_read): Change type of "num_read" to size_t.
	* os_dep.c (GC_get_maps): Change type of "result" local variable from
	int to ssize_t; cast "result" to size_t in comparison.
	* pthread_support.c (GC_remove_all_threads_but_me): Cast "result" to
	int.
	* pthread_support.c (GC_wait_for_gc_completion): Change type of
	"old_gc_no" local variable to word.
	* pthread_support.c (GC_lock): Change type of "i" local variable to
	unsigned.
	* tests/staticrootstest.c (main): Cast sizeof() value to int in
	comparisons.

2011-09-07  Ivan Maidanski <ivmai@mail.ru>

	* os_dep.c (GC_find_limit_with_bound): Inside loop, set result local
	volatile variable and do break instead of return (this also suppresses
	compiler warning about the potential clobbering of "bound" variable
	by setjmp).

2011-09-07  Ivan Maidanski <ivmai@mail.ru>

	* include/gc.h (GC_get_heap_size, GC_get_free_bytes,
	GC_get_unmapped_bytes, GC_get_bytes_since_gc, GC_get_total_bytes):
	Refine comment.
	* include/gc.h (GC_HAVE_GET_HEAP_USAGE_SAFE): New macro.
	* include/gc.h (GC_get_heap_usage_safe): New API function.
	* misc.c (GC_get_heap_usage_safe): Likewise.
	* include/gc_mark.h (GC_get_heap_size_inner, GC_get_free_bytes_inner):
	Remove API function.
	* misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): Likewise.
	* misc.c (GC_get_heap_size): Add comment.
	* misc.c (GC_get_heap_size, GC_get_free_bytes, GC_get_unmapped_bytes,
	GC_get_bytes_since_gc, GC_get_total_bytes): Remove locking.
	* misc.c (GC_get_unmapped_bytes): Do not test USE_MUNMAP (not needed
	after locking removal).
	* misc.c (GC_get_bytes_since_gc, GC_get_total_bytes): Cast result to
	size_t.

2011-09-06  Ivan Maidanski <ivmai@mail.ru>

	* include/gc_mark.h (GC_set_start_callback): Refine comment (the
	function acquires the GC lock).
	* include/gc.h (GC_set_all_interior_pointers, GC_set_stop_func,
	GC_get_stack_base): Likewise.
	* include/gc.h (GC_get_version, GC_get_gc_no, GC_get_parallel,
	GC_set_find_leak, GC_get_all_interior_pointers,
	GC_get_dont_precollect, GC_get_pages_executable, GC_set_max_heap_size,
	GC_set_force_unmap_on_gcollect): Refine comment (the function is
	lock-free).

2011-08-31  Ivan Maidanski <ivmai@mail.ru>

	* tests/initsecondarythread.c: Include windows.h instead of pthread.h
	unless GC_PTHREADS.
	* tests/thread_leak_test.c: Likewise.
	* tests/initsecondarythread.c (thread): Use WINAPI and set return
	type to DWORD unless GC_PTHREADS.
	* tests/thread_leak_test.c (test): Likewise.
	* tests/initsecondarythread.c (main): Use HANDLE, CreateThread and
	WaitForSingleObject instead of pthread_t, pthread_create and
	pthread_join, respectively, unless GC_PTHREADS.
	* tests/thread_leak_test.c (main): Likewise.

2011-08-31  Ivan Maidanski <ivmai@mail.ru>

	* tests/initsecondarythread.c (GC_NO_THREAD_REDIRECTS): Add comment.
	* tests/initsecondarythread.c: Include stdio.h.
	* tests/initsecondarythread.c (thread): Cast result of malloc to void;
	return arg parameter instead of NULL (to suppress compiler warnings).
	* tests/initsecondarythread.c (main): Define "code" local variable;
	store result of pthread_create and pthread_join to "code" variable;
	exit application with an error code (with the corresponding error
	message) if pthread_create or pthread_join fails.

2011-08-31  Ivan Maidanski <ivmai@mail.ru>  (really Jean-Claude Beaudoin)

	* include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Add FIXME
	that this is no longer needed with the recent GLibC.

2011-08-24  Ivan Maidanski <ivmai@mail.ru>

	* hpux_test_and_clear.s: Remove.
	* Makefile.am (EXTRA_DIST): Remove hpux_test_and_clear.s.
	* Makefile.direct (SRCS): Ditto.
	* Makefile.dj (SRCS): Ditto.
	* Makefile.dj (SRCS): Remove missing gcc_support.c,
	include/gc_alloc.h, include/gc_local_alloc.h.
	* doc/gcdescr.html: Remove information about gc_local_alloc.h.
	* doc/gcinterface.html: Ditto.
	* doc/scale.html: Ditto.
	* doc/gcinterface.html: Remove information about gc_alloc.h.
	* tests/test_cpp.cc: Don't include missing old gc_alloc.h (include
	new_gc_alloc.h instead); don't test __GNUC__.
	* tests/test_cpp.cc (main): Use gc_alloc class instead of alloc (don't
	test __GNUC__).
	* windows-untested/vc60/gc.dsp (SOURCE): Don't include missing
	gc_alloc.h, gc_local_alloc.h.
	* windows-untested/vc60/libgc.dsp (SOURCE): Ditto.
	* windows-untested/vc70/gc.vcproj (Header Files): Ditto.
	* windows-untested/vc70/libgc.vcproj (Header Files): Ditto.
	* windows-untested/vc71/gc.vcproj (Header Files): Ditto.
	* windows-untested/vc71/libgc.vcproj (Header Files): Ditto.
	* Makefile.in: Regenerate.

2011-08-21  Ivan Maidanski <ivmai@mail.ru>

	* allchblk.c (GC_allochblk_nth): Cast MAX_BLACK_LIST_ALLOC and
	HBLKSIZE to signed_word.
	* mallocx.c (GC_generic_malloc_many): Cast my_bytes_allocd to word.
	* mark.c (GC_do_local_mark): Cast the result of local_top minus
	local_mark_stack to word (since is non-negative).
	* misc.c (GC_base): Declare sz as unsigned word.
	* misc.c (GC_enable_incremental): Cast bytes_written to size_t in
	comparison to len.
	* obj_map.c (GC_initialize_offsets): Declare 'i' as unsigned.
	* os_dep.c (GC_or_pages): Ditto.
	* typd_mlc.c (GC_init_explicit_typing): Ditto.
	* ptr_chck.c (GC_is_visible): Cast the result of p minus base to word.
	* typd_mlc.c (GC_make_descriptor): Cast last_set_bit to word (since
	non-negative) when compared to BITMAP_BITS.

2011-08-14  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

	* configure.ac: Remove checks for ar and ranlib.
	* configure.ac: Replace AC_CHECK_HEADER with PKG_CHECK_MODULES when
	checking for libatomic_ops.  The macro sets the appropriate flags, so
	simplify accordingly.
	* Makefile.am, configure.ac: Set ATOMIC_OPS_CFLAGS in configure.ac
	instead of conditionally doing it in Makefile.am, to be more
	consistent with the pkg-config case.
	* configure.ac: Fix a typo and some phrases.
	* Makefile.in: Regenerate.
	* aclocal.m4: Ditto.
	* configure: Ditto.

2011-08-11  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

	* configure.ac: Since we no longer bundle libatomic_ops, we must
	check for the sub-directory before using it, in case we didn't
	find an installed version.
	* Makefile.am: Don't include libatomic_ops in the distribution.
	* Makefile.in: Regenerate.
	* configure: Ditto.

2011-08-09  Ivan Maidanski <ivmai@mail.ru> (really Jie Liu)

	* configure.ac: Add GC_RTEMS_PTHREADS AH_TEMPLATE and configure
	for rtems.
	* os_dep.c: Add GC_get_stack_base if GC_RTEMS_PTHREADS for rtems.
	* pthread_stop_world.c (GC_stop_init): Add ifdef SA_RESTART.
	* pthread_stop_world.c (GC_stop_init): Use sigprocmask for rtems
	when defined GC_RTEMS_PTHREADS.
	* pthread_support.c: Exclude sys/mman.h for rtems.
	* pthread_support.c (GC_thr_init): Set default GC_nprocs (1) for
	rtems.
	* include/gc_config_macros.h: Define GC_RTEMS_PTHREADS for rtems
	pthread and define GC_NO_DLOPEN for rtems.
	* include/private/gc_locks.h: Define USE_PTHREAD_LOCKS for rtems.
	* include/private/gcconfig.h: Use rtems_get_stack_bottom()
	for InitStackBottom; and use SIGUSR1 for SIG_SUSPEND, SIGUSR2
	for SIG_THR_RESTART on rtems.
	* include/private/thread_local_alloc.h: Use USE_PTHREAD_SPECIFIC
	for rtems.
	* tests/test.c (Init): Use exit(0) for rtems instead of return.
	* configure: Regenerate.
	* include/private/config.h.in: Ditto.

2011-07-26  Ivan Maidanski <ivmai@mail.ru>

	* tests/realloc_test.c: New file.
	* tests/tests.am (TESTS, check_PROGRAMS): Add realloc_test.
	* .cvsignore: Add realloc_test.
	* configure: Regenerate.
	* Makefile.in: Ditto.

2011-07-14  Ivan Maidanski <ivmai@mail.ru>

	* .cvsignore: Add more auto-generated files.

2011-07-14  Ivan Maidanski <ivmai@mail.ru>

	* new_hblk.c (GC_build_fl): Adjust "h" local variable cast type
	when setting obj_link (to prevent compiler warning); reformat the
	comment.
	* tests/test.c (reverse_test_inner): Use proper type when touching
	"b" and "c" local variables (to prevent compiler warning).

2011-07-05  Ivan Maidanski <ivmai@mail.ru>

	* misc.c (GC_init): Use HOTTER_THAN (instead of STACK_GROWS_DOWN)
	for GC_stackbottom assertion.
	* os_dep.c (GC_enclosing_mapping): Define only if IA64 or
	INCLUDE_LINUX_THREAD_DESCR; make GC_INNER.
	* pthread_support.c (GC_enclosing_mapping): Declare (only if
	INCLUDE_LINUX_THREAD_DESCR).
	* os_dep.c (GC_get_main_stack_base): Don't call pthread_getattr_np
	if REDIRECT_MALLOC as the former is observed to call redirected
	malloc (while GC is not initialized yet) on some Linux platforms.
	* include/private/gc_priv.h (MAX_HEAP_SECTS): Don't use a smaller
	value for SMALL_CONFIG if USE_PROC_FOR_LIBRARIES defined.

2011-07-05  Ivan Maidanski <ivmai@mail.ru>

	* malloc.c (GC_init_lib_bounds): Call GC_init (to ensure GC is
	initialized before doing GC_text_mapping).
	* misc.c (GC_init): Add a check for GC_init recursion in case of
	malloc is redirected (abort with the corresponding message).
	* pthread.c (GC_thr_init): Place GC_add_roots_inner call into
	"else" branch to prevent "local variable might be uninitialized"
	compiler warning; add comment.

2011-07-05  Ivan Maidanski <ivmai@mail.ru>

	* dyn_load.c (GC_register_dynamic_libraries): Remove duplicate
	call of GC_FirstDLOpenedLinkMap (twice).
	* dyn_load.c (GC_register_main_static_data): Add comment.
	* cord/cordbscs.c (CORD_riter): Check for empty string passed (do
	not call CORD_riter4 if CORD_len() returned zero).
	* cord/cordbscs.c (CORD_init_min_len): Replace the K&R-style
	function definition with the ANSI C one.
	* cord/cordbscs.c: Expand all tabs to spaces; remove
	trailing spaces at EOLn.
	* tests/threadkey_test.c (on_thread_exit_inner): Check
	GC_pthread_create() result.

2011-07-04  Ivan Maidanski <ivmai@mail.ru>

	* include/private/gcconfig.h (etext): Don't define if unused
	(NetBSD).
	* include/private/gcconfig.h (GC_data_start, DATASTART): Define
	for NetBSD/amd64 if ELF.
	* include/private/gcconfig.h (SEARCH_FOR_DATA_START): Don't define
[--snip--]
