]> granicus.if.org Git - gc/log
gc
12 years agoAdd public GC_set_handle_fork to control forked child handling support
Ivan Maidanski [Mon, 2 Apr 2012 16:18:12 +0000 (20:18 +0400)]
Add public GC_set_handle_fork to control forked child handling support
(Apply commit 1e882b9 from 'master' branch)

* 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.

12 years agoCheck pthread_atfork result (POSIX threads)
Ivan Maidanski [Mon, 20 Feb 2012 17:58:21 +0000 (21:58 +0400)]
Check pthread_atfork result (POSIX threads)

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

12 years agoRemove redundant public GC_HAVE_GET_HEAP_USAGE_SAFE macro
Ivan Maidanski [Fri, 30 Mar 2012 03:53:06 +0000 (07:53 +0400)]
Remove redundant public GC_HAVE_GET_HEAP_USAGE_SAFE macro

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

12 years agoconfigure: add --enable-handle-fork option
Andy Wingo [Tue, 27 Mar 2012 11:20:37 +0000 (13:20 +0200)]
configure: add --enable-handle-fork option

* 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.

12 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 28 Mar 2012 16:27:31 +0000 (20:27 +0400)]
Update ChangeLog

12 years agodoc: Update README for Solaris regarding multi-threading support
Ivan Maidanski [Wed, 28 Mar 2012 16:17:33 +0000 (20:17 +0400)]
doc: Update README for Solaris regarding multi-threading support

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 26 Mar 2012 03:34:12 +0000 (07:34 +0400)]
Update ChangeLog

12 years agoFix a typo and improve comment in dyn_load.c (Android)
Ivan Maidanski [Mon, 26 Mar 2012 03:30:07 +0000 (07:30 +0400)]
Fix a typo and improve comment in dyn_load.c (Android)

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 25 Mar 2012 07:57:09 +0000 (11:57 +0400)]
Update ChangeLog

12 years agoFix GC_clear_stack declaration and make it public
Ivan Maidanski [Sat, 24 Mar 2012 10:24:27 +0000 (14:24 +0400)]
Fix GC_clear_stack declaration and make it public
(Includes reverting part of commit b2345fb)

* 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.

12 years agoFix visibility of some GC internal symbols used by GCJ
Ivan Maidanski [Sun, 25 Mar 2012 06:32:05 +0000 (10:32 +0400)]
Fix visibility of some GC internal symbols used by GCJ
(Includes reverting part of commits 68b9f2791d5df5b2345fb)

* 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.

12 years agoFix HIDE_POINTER definition in gc.h
Ivan Maidanski [Sat, 24 Mar 2012 08:08:45 +0000 (12:08 +0400)]
Fix HIDE_POINTER definition in gc.h
(Revert part of commit 14d2724)

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

12 years agoFix gc.h compatibility regression by adding GC_PTR
Ivan Maidanski [Sat, 24 Mar 2012 06:01:22 +0000 (10:01 +0400)]
Fix gc.h compatibility regression by adding GC_PTR
(Revert part of commit e35a417)

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 19 Mar 2012 04:20:12 +0000 (08:20 +0400)]
Update ChangeLog

12 years agoFix GC_ALPHA_VERSION comparison in gctest and tools files
Ivan Maidanski [Fri, 16 Mar 2012 15:11:08 +0000 (19:11 +0400)]
Fix GC_ALPHA_VERSION comparison in gctest and tools files
(Apply commit 3b6bc1e from 'master' branch)

* 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.

12 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 15 Mar 2012 17:25:03 +0000 (21:25 +0400)]
Update ChangeLog

12 years agoSpeedup calloc size overflow check by preventing division if small values
Hans Boehm [Thu, 15 Mar 2012 17:09:05 +0000 (21:09 +0400)]
Speedup calloc size overflow check by preventing division if small values

* 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.

12 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 15 Mar 2012 16:45:12 +0000 (20:45 +0400)]
Update ChangeLog

12 years agoFix calloc-related code to prevent SIZE_MAX redefinition in sys headers
Ivan Maidanski [Thu, 15 Mar 2012 16:30:11 +0000 (20:30 +0400)]
Fix calloc-related code to prevent SIZE_MAX redefinition in sys headers

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 15 Mar 2012 15:49:53 +0000 (19:49 +0400)]
Update ChangeLog

12 years agoFix allocation size overflows due to rounding.
Xi Wang [Wed, 14 Mar 2012 20:55:08 +0000 (04:55 +0800)]
Fix allocation size overflows due to rounding.

* 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.

12 years agoFix calloc() overflow
Xi Wang [Wed, 14 Mar 2012 20:46:49 +0000 (04:46 +0800)]
Fix calloc() overflow

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 6 Mar 2012 17:02:58 +0000 (21:02 +0400)]
Update ChangeLog

12 years agoFix gctest (for Win32) to avoid GC_print_stats internal variable usage
Ivan Maidanski [Tue, 6 Mar 2012 16:26:24 +0000 (20:26 +0400)]
Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
(Apply commit 9dc445d from 'master' branch)

* 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.

12 years agoFix GC_READ_ENV_FILE code for Cygwin
Ivan Maidanski [Tue, 6 Mar 2012 16:10:11 +0000 (20:10 +0400)]
Fix GC_READ_ENV_FILE code for Cygwin

* 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).

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 4 Mar 2012 10:45:30 +0000 (14:45 +0400)]
Update ChangeLog

12 years agoFix GC_init static assertion for clang/x64 (Darwin)
Ivan Maidanski [Sun, 4 Mar 2012 10:43:47 +0000 (14:43 +0400)]
Fix GC_init static assertion for clang/x64 (Darwin)

* 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.

12 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 27 Feb 2012 18:01:37 +0000 (22:01 +0400)]
Update ChangeLog

12 years agoFix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
Ivan Maidanski [Mon, 27 Feb 2012 17:49:35 +0000 (21:49 +0400)]
Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)

* 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).

12 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 27 Feb 2012 04:41:12 +0000 (08:41 +0400)]
Update ChangeLog

12 years agoFix 'volatile' keyword placement in GC_SysVGetDataStart
Ivan Maidanski [Mon, 27 Feb 2012 04:03:14 +0000 (08:03 +0400)]
Fix 'volatile' keyword placement in GC_SysVGetDataStart

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 26 Feb 2012 17:25:39 +0000 (21:25 +0400)]
Update ChangeLog

12 years agoFix fork() handling on Cygwin (update child thread Id properly and
Ivan Maidanski [Sun, 26 Feb 2012 15:55:56 +0000 (19:55 +0400)]
Fix fork() handling on Cygwin (update child thread Id properly and
update child thread-local storage pointer)

* 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.

12 years agoFix GC_remove_all_threads_but_me for fork-unfriendly TLS implementations
Ivan Maidanski [Sun, 26 Feb 2012 15:36:11 +0000 (19:36 +0400)]
Fix GC_remove_all_threads_but_me for fork-unfriendly TLS implementations

* 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).

12 years agoRegenerate configure; update ChangeLog
Ivan Maidanski [Sat, 25 Feb 2012 17:03:52 +0000 (21:03 +0400)]
Regenerate configure; update ChangeLog

12 years agoFix configure to compile win32_threads.c for MinGW pthreads-w32 target
Ivan Maidanski [Sat, 25 Feb 2012 16:51:20 +0000 (20:51 +0400)]
Fix configure to compile win32_threads.c for MinGW pthreads-w32 target

* 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).

12 years agoUpdate ChangeLog
Ivan Maidanski [Sat, 25 Feb 2012 11:06:29 +0000 (15:06 +0400)]
Update ChangeLog

12 years agoFix SIG_SUSPEND definition (Win32)
Ivan Maidanski [Sat, 25 Feb 2012 10:59:05 +0000 (14:59 +0400)]
Fix SIG_SUSPEND definition (Win32)

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

12 years ago.gitignore: Add 'pthreads-w32' external library
Ivan Maidanski [Sat, 25 Feb 2012 10:52:12 +0000 (14:52 +0400)]
.gitignore: Add 'pthreads-w32' external library

12 years agoUpdate ChangeLog
Ivan Maidanski [Fri, 24 Feb 2012 11:19:12 +0000 (15:19 +0400)]
Update ChangeLog

12 years agoFix Cygwin support to handle fork() properly
Ivan Maidanski [Fri, 24 Feb 2012 10:34:34 +0000 (14:34 +0400)]
Fix Cygwin support to handle fork() properly
(Apply commit 11e95a1 from 'master' branch)

* 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.

12 years agoFix fork() handling for Darwin partially
Ivan Maidanski [Fri, 24 Feb 2012 07:29:48 +0000 (11:29 +0400)]
Fix fork() handling for Darwin partially
(still not handled well for Darwin if GC incremental mode is on)

* 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.

12 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 21 Feb 2012 17:51:04 +0000 (21:51 +0400)]
Update ChangeLog

12 years agoFix Win32 GC_unregister_my_thread to ensure no ongoing incremental GC
Ivan Maidanski [Tue, 21 Feb 2012 17:12:47 +0000 (21:12 +0400)]
Fix Win32 GC_unregister_my_thread to ensure no ongoing incremental GC

* 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.

12 years agoFix gctest to include unistd.h if HANDLE_FORK
Ivan Maidanski [Tue, 21 Feb 2012 16:43:35 +0000 (20:43 +0400)]
Fix gctest to include unistd.h if HANDLE_FORK

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

12 years agoFix gcconfig to turn on POSIX fork() support by default
Andy Wingo [Mon, 20 Feb 2012 17:51:21 +0000 (21:51 +0400)]
Fix gcconfig to turn on POSIX fork() support by default
(define HANDLE_FORK on Unix platforms with pthreads)

* 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.

12 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 16 Feb 2012 21:23:22 +0000 (01:23 +0400)]
Update ChangeLog

12 years agoFix GC_push_all/selected boundaries check
Ivan Maidanski [Thu, 16 Feb 2012 18:47:28 +0000 (22:47 +0400)]
Fix GC_push_all/selected boundaries check

* 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.

12 years agoFix GC_finalizer_nested size to workaround alignment problem in Watcom
Ivan Maidanski [Thu, 16 Feb 2012 18:05:31 +0000 (22:05 +0400)]
Fix GC_finalizer_nested size to workaround alignment problem in Watcom

* 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.

12 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 15 Feb 2012 04:39:41 +0000 (08:39 +0400)]
Update ChangeLog

12 years agoPrevent NO_DYLD_BIND_FULLY_IMAGE redefinition (Darwin)
Ivan Maidanski [Tue, 14 Feb 2012 19:34:30 +0000 (23:34 +0400)]
Prevent NO_DYLD_BIND_FULLY_IMAGE redefinition (Darwin)

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Fri, 10 Feb 2012 04:31:07 +0000 (08:31 +0400)]
Update ChangeLog

12 years agoFix GC_root_size update in GC_add_roots_inner (Win32)
Ivan Maidanski [Fri, 10 Feb 2012 04:26:40 +0000 (08:26 +0400)]
Fix GC_root_size update in GC_add_roots_inner (Win32)

* 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).

12 years agoUpdate ChangeLog
Ivan Maidanski [Fri, 3 Feb 2012 16:42:22 +0000 (20:42 +0400)]
Update ChangeLog

12 years agoAdd GC_is_disabled new function to GC API
Ivan Maidanski [Wed, 1 Feb 2012 17:25:44 +0000 (21:25 +0400)]
Add GC_is_disabled new function to GC API

* 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.

12 years agoRefine GC_stackbottom description in gc.h
Ivan Maidanski [Wed, 1 Feb 2012 17:17:18 +0000 (21:17 +0400)]
Refine GC_stackbottom description in gc.h

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

12 years agoFix a typo in gc.h comment
Ivan Maidanski [Wed, 1 Feb 2012 16:56:28 +0000 (20:56 +0400)]
Fix a typo in gc.h comment

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

12 years agocordtest: Report success to stdout instead of stderr
Ivan Maidanski [Wed, 1 Feb 2012 16:36:20 +0000 (20:36 +0400)]
cordtest: Report success to stdout instead of stderr

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 31 Jan 2012 04:31:11 +0000 (08:31 +0400)]
Update ChangeLog

12 years agoFix FREE_ASSERT usage (fix missing trailing semi-colon)
Ivan Maidanski [Tue, 31 Jan 2012 04:24:26 +0000 (08:24 +0400)]
Fix FREE_ASSERT usage (fix missing trailing semi-colon)

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

13 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 26 Jan 2012 16:55:49 +0000 (20:55 +0400)]
Update ChangeLog

13 years agoFix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
Ivan Maidanski [Thu, 26 Jan 2012 05:16:10 +0000 (09:16 +0400)]
Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
(causing pthread_attr_getstack to be used to get main stack base
even in single-threaded mode instead of GC_linux_main_stack_base)

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

13 years agoFix GC_add_roots_inner for Mac OS X (enable GC_dyld_image_add to
Daniel R. Grayson [Thu, 26 Jan 2012 04:42:33 +0000 (08:42 +0400)]
Fix GC_add_roots_inner for Mac OS X (enable GC_dyld_image_add to
pass unaligned segment start to GC_add_roots)

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

13 years agoWorkaround some Linux/arm kernels bug to get correct GC_nprocs value
Ivan Maidanski [Tue, 24 Jan 2012 15:31:53 +0000 (19:31 +0400)]
Workaround some Linux/arm kernels bug to get correct GC_nprocs value

* 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).

13 years agoFix GC_get_nprocs (Linux) returned variable type
Ivan Maidanski [Tue, 24 Jan 2012 04:39:47 +0000 (08:39 +0400)]
Fix GC_get_nprocs (Linux) returned variable type

* 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.

13 years ago.gitignore: Add gc.log
Ivan Maidanski [Tue, 24 Jan 2012 04:23:17 +0000 (08:23 +0400)]
.gitignore: Add gc.log

13 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 23 Jan 2012 17:33:38 +0000 (21:33 +0400)]
Update ChangeLog

13 years agoFix a typo in a comment in os_dep.c
Ivan Maidanski [Mon, 23 Jan 2012 03:48:48 +0000 (07:48 +0400)]
Fix a typo in a comment in os_dep.c

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

13 years agoRegenerate configure; update ChangeLog
Ivan Maidanski [Fri, 20 Jan 2012 19:08:50 +0000 (23:08 +0400)]
Regenerate configure; update ChangeLog

13 years agoUpdate bug reports email address (recommend GC mailing list)
Ivan Maidanski [Fri, 20 Jan 2012 18:29:49 +0000 (22:29 +0400)]
Update bug reports email address (recommend GC mailing list)
(Apply commit fee74d3 from 'master' branch)

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

13 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 18 Jan 2012 04:52:01 +0000 (08:52 +0400)]
Update ChangeLog

13 years agoFix realloc_test to check GC_malloc result for NULL
Ivan Maidanski [Wed, 18 Jan 2012 04:39:17 +0000 (08:39 +0400)]
Fix realloc_test to check GC_malloc result for NULL

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

13 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 17 Jan 2012 15:54:57 +0000 (19:54 +0400)]
Update ChangeLog

13 years agoFix cordtest temporary file names for Win32
Ivan Maidanski [Tue, 17 Jan 2012 04:19:04 +0000 (08:19 +0400)]
Fix cordtest temporary file names for Win32

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

13 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 16 Jan 2012 05:40:44 +0000 (09:40 +0400)]
Update ChangeLog

13 years agoFix extra/gc.c to enable GC source inclusion from multi-threaded app
Ivan Maidanski [Fri, 13 Jan 2012 15:53:47 +0000 (19:53 +0400)]
Fix extra/gc.c to enable GC source inclusion from multi-threaded app

* 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.

13 years agoFix GC_restart_handler to preserve errno if needed
Ivan Maidanski [Tue, 10 Jan 2012 17:00:59 +0000 (21:00 +0400)]
Fix GC_restart_handler to preserve errno if needed

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

13 years ago.gitignore: Ignore *.gc.log files
Ivan Maidanski [Thu, 12 Jan 2012 03:29:56 +0000 (07:29 +0400)]
.gitignore: Ignore *.gc.log files

13 years agoRegenerate configure; update ChangeLog
Ivan Maidanski [Fri, 30 Dec 2011 10:27:03 +0000 (14:27 +0400)]
Regenerate configure; update ChangeLog

13 years agoFix configure --enable-cplusplus make install
Ivan Maidanski [Wed, 28 Dec 2011 10:55:57 +0000 (14:55 +0400)]
Fix configure --enable-cplusplus make install
(Apply commit b71d819)

* 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.

13 years agoFix GC_ASSERT usage (fix missing trailing semi-colon)
Ivan Maidanski [Thu, 29 Dec 2011 06:38:09 +0000 (10:38 +0400)]
Fix GC_ASSERT usage (fix missing trailing semi-colon)

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

13 years agoFix GC_printf import declarator in test_cpp.cc
Ivan Maidanski [Wed, 28 Dec 2011 08:44:06 +0000 (12:44 +0400)]
Fix GC_printf import declarator in test_cpp.cc

* 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.

13 years agoFix compiler warning in GC_dyld_image_add/remove (Darwin)
Ivan Maidanski [Wed, 28 Dec 2011 06:42:49 +0000 (10:42 +0400)]
Fix compiler warning in GC_dyld_image_add/remove (Darwin)

* 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)

13 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 27 Dec 2011 12:52:27 +0000 (16:52 +0400)]
Update ChangeLog

13 years agoFix gcconfig.h to define HBLKSIZE for Linux/mips
Richard Sandiford [Tue, 27 Dec 2011 07:25:27 +0000 (11:25 +0400)]
Fix gcconfig.h to define HBLKSIZE for Linux/mips
(Apply part of commit 438c5d9 from 'gcc_boehmgc' branch)

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

13 years agoFix gcconfig.h to handle mips64-linux target
David Daney [Tue, 27 Dec 2011 07:18:11 +0000 (11:18 +0400)]
Fix gcconfig.h to handle mips64-linux target
(Apply part of commit 3cf0bae from 'gcc_boehmgc' branch)

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

13 years ago.gitignore: Ignore config.cache
Ivan Maidanski [Thu, 22 Dec 2011 07:10:25 +0000 (11:10 +0400)]
.gitignore: Ignore config.cache

13 years agoRegenerate configure; update ChangeLog
Ivan Maidanski [Thu, 15 Dec 2011 13:58:47 +0000 (17:58 +0400)]
Regenerate configure; update ChangeLog

13 years agoFix configure to disable GCC aliasing optimization unless forced to
Ivan Maidanski [Thu, 15 Dec 2011 13:42:01 +0000 (17:42 +0400)]
Fix configure to disable GCC aliasing optimization unless forced to

* 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).

13 years ago.gitignore: Ignore Gcov files (.gcda, .gcno)
Ivan Maidanski [Tue, 13 Dec 2011 14:43:27 +0000 (18:43 +0400)]
.gitignore: Ignore Gcov files (.gcda, .gcno)

13 years ago.gitignore: Ignore disclaim tests executables
Ivan Maidanski [Fri, 30 Sep 2011 09:44:36 +0000 (13:44 +0400)]
.gitignore: Ignore disclaim tests executables

13 years agoRegenerate configure; update ChangeLog
Ivan Maidanski [Tue, 13 Dec 2011 07:19:46 +0000 (11:19 +0400)]
Regenerate configure; update ChangeLog

13 years agoFix use of enable_gc_debug in configure (DG/UX on AViiON)
Ivan Maidanski [Tue, 13 Dec 2011 07:06:44 +0000 (11:06 +0400)]
Fix use of enable_gc_debug in configure (DG/UX on AViiON)

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

13 years agoPreserve client-specified CFLAGS for DG/UX
Ivan Maidanski [Thu, 1 Dec 2011 09:47:26 +0000 (13:47 +0400)]
Preserve client-specified CFLAGS for DG/UX

* 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).

13 years agoFix some typos.
Bruce Mitchener [Fri, 9 Dec 2011 04:23:00 +0000 (11:23 +0700)]
Fix some typos.

13 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 23 Nov 2011 11:31:59 +0000 (15:31 +0400)]
Update ChangeLog

13 years agoTypo fixes in README, doc/README.cmake, doc/README.darwin
Bruce Mitchener [Wed, 23 Nov 2011 06:59:04 +0000 (13:59 +0700)]
Typo fixes in README, doc/README.cmake, doc/README.darwin
(Apply commit 72f0c9f)

13 years agoFlag autogen.sh as executable.
Bruce Mitchener [Wed, 23 Nov 2011 07:00:07 +0000 (14:00 +0700)]
Flag autogen.sh as executable.

13 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 15 Nov 2011 11:54:53 +0000 (15:54 +0400)]
Update ChangeLog

13 years agoImplement precise value boundary check in GC_is_thread_tsd_valid
Ivan Maidanski [Tue, 15 Nov 2011 11:01:52 +0000 (15:01 +0400)]
Implement precise value boundary check in GC_is_thread_tsd_valid

* 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.