]> granicus.if.org Git - gc/log
gc
12 years agoFix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
Ivan Maidanski [Sun, 23 Dec 2012 12:13:45 +0000 (16:13 +0400)]
Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)

* os_dep.c (detect_GetWriteWatch): Pass 0 (instead of GC_page_size)
to Win32 VirtualFree if GWW_VDB (dwSize must be 0 if MEM_RELEASE
according to MSDN).

12 years agoMerge branch 'mmouratov-7_2d-fix' into release-7_2
Ivan Maidanski [Sun, 23 Dec 2012 15:38:45 +0000 (19:38 +0400)]
Merge branch 'mmouratov-7_2d-fix' into release-7_2

12 years agoFix GC_print_trace missing unlock
Ivan Maidanski [Sun, 23 Dec 2012 08:53:34 +0000 (12:53 +0400)]
Fix GC_print_trace missing unlock

* mark.c (GC_print_trace): Perform UNLOCK (if "lock" is on) before
return (inside loop).

12 years agoFix typo and refine comment of GC_enable in public header
Ivan Maidanski [Sun, 9 Dec 2012 19:15:28 +0000 (23:15 +0400)]
Fix typo and refine comment of GC_enable in public header

* include/gc.h (GC_enable): Fix typo and refine comment.

12 years agoFix GC_win32_free_heap compilation error for Cygwin
Ivan Maidanski [Sun, 23 Dec 2012 12:03:36 +0000 (16:03 +0400)]
Fix GC_win32_free_heap compilation error for Cygwin
(fix commit 'caa5af9')

* os_dep.c (GC_win32_free_heap): Do not invoke virtual free for
Cygwin, remove "else" branch  (only if MSWIN32 but not CYGWIN32).

12 years agoUpdate ChangeLog
Ivan Maidanski [Sat, 8 Dec 2012 07:32:51 +0000 (11:32 +0400)]
Update ChangeLog

12 years agoFix GC_malloc_explicitly_typed_ignore_off_page for large allocations
Reimer Behrends [Sat, 8 Dec 2012 06:33:06 +0000 (10:33 +0400)]
Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations

* typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page): Use
BYTES_TO_GRANULES instead of BYTES_TO_WORDS when calculating "lg"
local variable value.

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 25 Nov 2012 19:37:32 +0000 (23:37 +0400)]
Update ChangeLog

12 years agoFix GC_CreateThread 'dwStackSize' argument type for Win64
Ivan Maidanski [Sun, 25 Nov 2012 18:35:06 +0000 (22:35 +0400)]
Fix GC_CreateThread 'dwStackSize' argument type for Win64
(Apply commit b9260aa from 'master' branch.)

* include/gc.h (GC_uintptr_t): Define (for Win32/CE) even if
GC_NO_THREAD_DECLS; move definition upper than GC_CreateThread.
* include/gc.h (GC_WIN32_SIZE_T): New macro (defined as GC_uintptr_t,
Win32 threads only).
* include/gc.h (GC_CreateThread): Use GC_WIN32_SIZE_T instead of DWORD
type for "dwStackSize" argument (Win32 threads only).
* win32_threads.c (GC_CreateThread): Likewise.
* tests/test.c (fork_a_thread): Verify types of GC_CreateThread
arguments by explicit casts (only if GC_WIN32_THREADS).

Conflicts:

    include/gc.h

12 years agoFix heap sections overflow for Win32/Cygwin with enabled parallel marker
Ivan Maidanski [Mon, 19 Nov 2012 05:36:04 +0000 (09:36 +0400)]
Fix heap sections overflow for Win32/Cygwin with enabled parallel marker

* include/private/gc_priv.h (MAX_HEAP_SECTS): Define to 384 instead of
128 if Win32/Cygwin and PARALLEL_MARK.

12 years agoFix GC_marker_Id elements initialization (WinCE)
Ivan Maidanski [Sun, 18 Nov 2012 19:20:23 +0000 (23:20 +0400)]
Fix GC_marker_Id elements initialization (WinCE)
(Apply commit 33bd64c from 'master' branch.)

* win32_threads.c (GC_marker_cv, GC_marker_Id): Move variable
definition up to precede GC_mark_thread (only if PARALLEL_MARK and
DONT_USE_SIGNALANDWAIT).
* win32_threads.c (GC_mark_thread): Set corresponding element of
GC_marker_Id[] to GetCurrentThreadId() value (only if PARALLEL_MARK
and DONT_USE_SIGNALANDWAIT).
* win32_threads.c (start_mark_threads): Do not set GC_marker_Id[]
elements here because GetCurrentThreadId should be invoked from the
corresponding thread; update comment (only if PARALLEL_MARK and
DONT_USE_SIGNALANDWAIT).

Conflicts:

    win32_threads.c

12 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 12 Nov 2012 04:33:43 +0000 (08:33 +0400)]
Update ChangeLog

12 years agoFix Win32 GC_write preventing potential infinite recursion at abort
Ivan Maidanski [Sun, 11 Nov 2012 14:57:29 +0000 (18:57 +0400)]
Fix Win32 GC_write preventing potential infinite recursion at abort
(Apply commit 608fe46 from 'master' branch.)

* misc.c (GC_write): Define "inside_write" static variable (only
for Win32 and only if THREADS and GC_ASSERTIONS or
GC_PRINT_VERBOSE_STATS); if this variable is set then just return,
set this variable if GC_write_disabled or GC_log is
INVALID_HANDLE_VALUE just before ABORT call (to prevent infinite
recursion).
* misc.c (GC_abort): Do not call WRITE if GC_write_disabled
(only for Win32 and only if THREADS and GC_ASSERTIONS) to prevent
abort in GC_write.

Conflicts:

misc.c

12 years agoFix GC_lock comment (pthreads)
Ivan Maidanski [Thu, 8 Nov 2012 18:17:28 +0000 (22:17 +0400)]
Fix GC_lock comment (pthreads)

* pthread_support.c (GC_lock): Fix USE_SPIN_LOCK macro name in comment.

12 years agoFix unit in comment for some counters in gc_priv.h
Ivan Maidanski [Tue, 6 Nov 2012 03:13:29 +0000 (07:13 +0400)]
Fix unit in comment for some counters in gc_priv.h

* include/private/gc_priv.h (_GC_arrays): Fix comment for
_bytes_allocd_before_gc, _bytes_allocd, _composite_in_use and
_atomic_in_use fields (replace "words" unit with "bytes").
* include/private/gc_priv.h (GC_objfreelist): Fix comment (replace
"words" unit with "bytes").

12 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 24 Oct 2012 04:51:59 +0000 (08:51 +0400)]
Update ChangeLog

12 years agoFix potential double fclose in test_extras (cordtest)
Ivan Maidanski [Wed, 24 Oct 2012 04:29:42 +0000 (08:29 +0400)]
Fix potential double fclose in test_extras (cordtest)

* cord/tests/cordtest.c (test_extras): Explicitly clear cord handles
obtained from CORD_from_file(), invoke GC_gcollect and
GC_invoke_finalizers to force f1a, f1b, f2 handles to be closed before
removing the files; remove the second attempts to remove the files on
rename failure (print a warning instead) as it might cause double
fclose (or double free); add comments.

12 years agoFix pthread_attr_t resource leak in pthread_create
Ivan Maidanski [Wed, 24 Oct 2012 03:18:03 +0000 (07:18 +0400)]
Fix pthread_attr_t resource leak in pthread_create

* pthread_support.c (pthread_create): Cleanup my_attr resource by
calling pthread_attr_destroy (only if GC_ASSERTIONS).

12 years agoFix GC_clear_stack by declaring 'dummy' local array as volatile
Ivan Maidanski [Tue, 23 Oct 2012 03:45:51 +0000 (07:45 +0400)]
Fix GC_clear_stack by declaring 'dummy' local array as volatile

* misc.c (GC_clear_stack): Declare "dummy" local array as volatile to
prevent optimizing it out by compiler; add cast of "dummy" to void*
(to un-volatile the pointer) in BZERO call (only if THREADS).

12 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 22 Oct 2012 06:25:57 +0000 (10:25 +0400)]
Update ChangeLog

12 years agoFix GC_unix_mmap_get_mem for open of /dev/zero failure
Ivan Maidanski [Fri, 19 Oct 2012 05:10:07 +0000 (09:10 +0400)]
Fix GC_unix_mmap_get_mem for open of /dev/zero failure
(Apply commit 2c62153 from 'master' branch.)

* os_dep.c (GC_unix_mmap_get_mem): Check open("/dev/zero") (or open
of similar file on Symbian) result and abort (with the appropriate
message) on failure (only if USE_MMAP_ANON is undefined).

Conflicts:

os_dep.c

12 years agoFix: VirtualAlloc leaks when freeing the heap on win32
Max Mouratov [Sun, 21 Oct 2012 14:39:17 +0000 (20:39 +0600)]
Fix: VirtualAlloc leaks when freeing the heap on win32

12 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 18 Oct 2012 16:06:51 +0000 (20:06 +0400)]
Update ChangeLog

12 years agoFix vsprintf_args cleanup in CORD_vsprintf
Ivan Maidanski [Wed, 17 Oct 2012 18:07:54 +0000 (22:07 +0400)]
Fix vsprintf_args cleanup in CORD_vsprintf

* cord/cordprnt.c (CORD_vsprintf): Invoke va_end (before return) for
vsprintf_args initialized by [__]va_copy (only if __va_copy defined
or GCC but not DJGPP).

12 years agoFix sizeof in GC_push_thread_structures
Ivan Maidanski [Wed, 17 Oct 2012 17:21:11 +0000 (21:21 +0400)]
Fix sizeof in GC_push_thread_structures
(Apply commit 4d6dd8b from 'master' branch.)

* pthread_support.c (GC_push_thread_structures): Fix sizeof argument
(take size of GC_thread_key variable instead of its address) if
THREAD_LOCAL_ALLOC.
* win32_threads.c (GC_push_thread_structures): Likewise.

Conflicts:

win32_threads.c

12 years agoUpdate ChangeLog
Ivan Maidanski [Sat, 29 Sep 2012 10:16:37 +0000 (14:16 +0400)]
Update ChangeLog

12 years agoFix a typo in comment of GC_with_callee_saves_pushed
Ivan Maidanski [Sat, 29 Sep 2012 08:27:39 +0000 (12:27 +0400)]
Fix a typo in comment of GC_with_callee_saves_pushed

* mach_dep.c (GC_with_callee_saves_pushed): Fix a typo in comment.

12 years agoMerge branch 'gc-7_2-hotfix-4' into release-7_2
Ivan Maidanski [Sat, 22 Sep 2012 07:40:15 +0000 (11:40 +0400)]
Merge branch 'gc-7_2-hotfix-4' into release-7_2

12 years agoUpdate (regenerate) configure files; update ChangeLog
Ivan Maidanski [Wed, 19 Sep 2012 05:21:48 +0000 (09:21 +0400)]
Update (regenerate) configure files; update ChangeLog

* configure: Regenerate (by autoreconf -vif using autoconf-2.68,
automake-1.11.3 and libtool-2.4.2).
* Makefile.in: Likewise.
* aclocal.m4: Likewise.
* compile: Likewise.
* config.guess: Likewise.
* config.sub: Likewise.
* depcomp: Likewise.
* install-sh: Likewise.
* ltmain.sh: Likewise.
* m4/libtool.m4: Likewise.
* m4/ltoptions.m4: Likewise.
* m4/ltversion.m4: Likewise.
* missing: Likewise.

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 16 Sep 2012 16:13:33 +0000 (20:13 +0400)]
Update ChangeLog

12 years agoFix null-pointer dereference in CORD_substr_closure
Ivan Maidanski [Tue, 11 Sep 2012 19:55:32 +0000 (23:55 +0400)]
Fix null-pointer dereference in CORD_substr_closure

* cord/cordbscs.c (CORD_substr_closure): Prevent SEGV if CORD_from_fn
returned NULL/CORD_EMPTY (in case "n" argument is zero).

12 years agoFix min_bytes_allocd comment
Ivan Maidanski [Tue, 11 Sep 2012 19:23:13 +0000 (23:23 +0400)]
Fix min_bytes_allocd comment

* alloc.c (min_bytes_allocd): Fix comment (replace "words" with
"bytes").

12 years agoFix min_bytes_allocd preventing potential infinite loop in GC_allocobj
Ivan Maidanski [Tue, 11 Sep 2012 04:30:25 +0000 (08:30 +0400)]
Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj

* alloc.c (min_bytes_allocd): Do not return zero in case of big
GC_free_space_divisor value (return 1 instead to prevent infinite loop
in GC_allocobj if GC_adj_bytes_allocd returns zero); update comment.

12 years agoUpdate information about GC_free_space_divisor in README
Ivan Maidanski [Tue, 11 Sep 2012 04:17:59 +0000 (08:17 +0400)]
Update information about GC_free_space_divisor in README

* README (GC_free_space_divisor): Update information.

12 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 5 Sep 2012 22:12:14 +0000 (02:12 +0400)]
Update ChangeLog

12 years agoFix GC_get_stack_base assembly code (Cygwin/Clang)
Colin LeMahieu [Wed, 5 Sep 2012 22:02:16 +0000 (02:02 +0400)]
Fix GC_get_stack_base assembly code (Cygwin/Clang)

* os_dep.c (GC_get_stack_base): Use inline assembly statement instead
of variable assembly attribute (to workaround clang 3.1 linkage error
on Cygwin).

12 years ago.gitignore: remove path prefix for config.h and stamp-h1
Ivan Maidanski [Thu, 30 Aug 2012 04:39:25 +0000 (08:39 +0400)]
.gitignore: remove path prefix for config.h and stamp-h1

* .gitignore: Add include/config.h.in (to ignore); remove path for
config.h and stamp-h1 (to ignore files both located in /include/private
(old behavior) and in /include folders).

Conflicts:

.gitignore

12 years agoRegenerate configure; update ChangeLog
Ivan Maidanski [Mon, 27 Aug 2012 04:33:58 +0000 (08:33 +0400)]
Regenerate configure; update ChangeLog

12 years agoFix unportable '==' test operators in configure
Thomas Klausner [Sun, 26 Aug 2012 18:58:17 +0000 (22:58 +0400)]
Fix unportable '==' test operators in configure
(apply patch 'e091c07' from master branch)

* configure.ac: Replace all unportable '==' test operators with '='
ones.

Conflicts:

configure.ac

12 years ago[7.2d] gc7_2d
Ivan Maidanski [Thu, 9 Aug 2012 19:36:20 +0000 (23:36 +0400)]
[7.2d]

Change version in README to 7.2d; update ChangeLog

12 years agoMerge branch 'gc-7_2-hotfix-3' into release-7_2
Ivan Maidanski [Thu, 9 Aug 2012 19:29:11 +0000 (23:29 +0400)]
Merge branch 'gc-7_2-hotfix-3' into release-7_2

12 years agoUpdate (regenerate) config.guess/sub, libtool.m4; update ChangeLog
Ivan Maidanski [Sun, 5 Aug 2012 09:38:33 +0000 (13:38 +0400)]
Update (regenerate) config.guess/sub, libtool.m4; update ChangeLog

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 2 Aug 2012 04:43:34 +0000 (08:43 +0400)]
Update ChangeLog

12 years agoFix GC_clear_stack_inner by using GC_approx_sp
Ivan Maidanski [Wed, 1 Aug 2012 22:02:08 +0000 (02:02 +0400)]
Fix GC_clear_stack_inner by using GC_approx_sp

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

12 years agoFix all address-of-dummy operations by using GC_approx_sp() instead
Ivan Maidanski [Thu, 2 Aug 2012 03:42:43 +0000 (07:42 +0400)]
Fix all address-of-dummy operations by using GC_approx_sp() instead
(a joint commit of commits 'd6acbd' and '57b94a3' in master branch)

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

12 years agoFix GC_call_with_stack_base to prevent its tail-call optimization
Ivan Maidanski [Wed, 1 Aug 2012 19:12:22 +0000 (23:12 +0400)]
Fix GC_call_with_stack_base to prevent its tail-call optimization

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Sat, 21 Jul 2012 08:17:04 +0000 (12:17 +0400)]
Update ChangeLog

12 years agoFix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
Ivan Maidanski [Fri, 20 Jul 2012 20:36:34 +0000 (00:36 +0400)]
Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
(commit '7ff92dc' from master branch)

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 27 Jun 2012 19:30:53 +0000 (23:30 +0400)]
Update ChangeLog

12 years agoFix thread-related tests for pthreads-w32
Ivan Maidanski [Sun, 17 Jun 2012 16:25:09 +0000 (20:25 +0400)]
Fix thread-related tests for pthreads-w32

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

12 years agotest_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
Ivan Maidanski [Sat, 16 Jun 2012 08:54:36 +0000 (12:54 +0400)]
test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)

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

12 years agoFix test_cpp (ensure the collector recognizes pointers to interiors)
Ivan Maidanski [Sat, 16 Jun 2012 08:34:06 +0000 (12:34 +0400)]
Fix test_cpp (ensure the collector recognizes pointers to interiors)

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

12 years ago[7.2c] gc7_2c
Ivan Maidanski [Mon, 11 Jun 2012 12:58:43 +0000 (16:58 +0400)]
[7.2c]

Change version in README to 7.2c; update ChangeLog

12 years agoMerge branch 'gc-7_2-hotfix-2'
Ivan Maidanski [Tue, 26 Jun 2012 12:55:42 +0000 (16:55 +0400)]
Merge branch 'gc-7_2-hotfix-2'

12 years agoUpdate ChangeLog
Ivan Maidanski [Fri, 8 Jun 2012 17:22:19 +0000 (21:22 +0400)]
Update ChangeLog

12 years agoFix CORD_cat_char_star to prevent SEGV in case of out-of-memory
Ivan Maidanski [Fri, 8 Jun 2012 17:10:17 +0000 (21:10 +0400)]
Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 7 Jun 2012 19:01:35 +0000 (23:01 +0400)]
Update ChangeLog

12 years agoFix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
Ivan Maidanski [Thu, 7 Jun 2012 18:00:37 +0000 (22:00 +0400)]
Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
(if out of memory)

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Sat, 2 Jun 2012 09:05:51 +0000 (13:05 +0400)]
Update ChangeLog

12 years agoFix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
Tsugutomo Enami [Thu, 31 May 2012 23:12:24 +0000 (03:12 +0400)]
Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Sat, 2 Jun 2012 08:48:43 +0000 (12:48 +0400)]
Update ChangeLog

12 years agoFix visibility of GC_push_all/conditional, GC_push_other_roots symbols
Ivan Maidanski [Sat, 2 Jun 2012 08:33:03 +0000 (12:33 +0400)]
Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols

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

12 years agoFix visibility of GC_clear/set_mark_bit (unhide symbols)
Ivan Maidanski [Sat, 2 Jun 2012 07:13:19 +0000 (11:13 +0400)]
Fix visibility of GC_clear/set_mark_bit (unhide symbols)

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

12 years ago[7.2b] gc7_2b
Ivan Maidanski [Tue, 22 May 2012 20:57:48 +0000 (00:57 +0400)]
[7.2b]

Change version in README to 7.2b; update ChangeLog

12 years agoChange version in README to 7.2-rev-b; update ChangeLog
Ivan Maidanski [Sun, 20 May 2012 07:43:25 +0000 (11:43 +0400)]
Change version in README to 7.2-rev-b; update ChangeLog

12 years agoUpdate ChangeLog
Ivan Maidanski [Sat, 19 May 2012 19:15:47 +0000 (23:15 +0400)]
Update ChangeLog

12 years agoFix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
Ivan Maidanski [Wed, 16 May 2012 04:34:10 +0000 (08:34 +0400)]
Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)

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

12 years ago[7.2] gc7_2
Ivan Maidanski [Fri, 11 May 2012 16:33:43 +0000 (20:33 +0400)]
[7.2]

Bump libgc version to 7.2 (final)

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 1 May 2012 15:04:42 +0000 (19:04 +0400)]
Update ChangeLog

12 years agoSet GC_GRANULE_BYTES/GC_GRANULE_WORDS for x32
H.J. Lu [Mon, 16 Apr 2012 16:27:45 +0000 (09:27 -0700)]
Set GC_GRANULE_BYTES/GC_GRANULE_WORDS for x32
(Apply commit 4a0675b from 'master' branch)

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

12 years agoDefine ALIGNMENT and CPP_WORDSZ for x32
H.J. Lu [Mon, 16 Apr 2012 16:26:07 +0000 (09:26 -0700)]
Define ALIGNMENT and CPP_WORDSZ for x32

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 29 Apr 2012 14:13:21 +0000 (18:13 +0400)]
Update ChangeLog

12 years agoFix compiler warning in GC_check_fl_marks
Ivan Maidanski [Sun, 29 Apr 2012 14:06:16 +0000 (18:06 +0400)]
Fix compiler warning in GC_check_fl_marks

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

12 years agoFix GC_check_fl_marks regarding concurrent access
Petter Urkedal [Sat, 21 Apr 2012 09:28:12 +0000 (13:28 +0400)]
Fix GC_check_fl_marks regarding concurrent access

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 22 Apr 2012 11:35:55 +0000 (15:35 +0400)]
Update ChangeLog

12 years agoFix GC_remove_all_threads_but_me to cleanup thread-specific data storage
Ivan Maidanski [Sat, 21 Apr 2012 15:57:25 +0000 (19:57 +0400)]
Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage

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

12 years agoCode refactoring of GC_check_tls_for/GC_check_fl_marks
Ivan Maidanski [Fri, 20 Apr 2012 05:12:47 +0000 (09:12 +0400)]
Code refactoring of GC_check_tls_for/GC_check_fl_marks
(Apply commit e67ab08 from 'master' branch)

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

12 years agoFix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
Niklas Therning [Tue, 17 Apr 2012 11:38:29 +0000 (15:38 +0400)]
Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)

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

12 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 11 Apr 2012 20:06:27 +0000 (00:06 +0400)]
Update ChangeLog

12 years agoFix a typo in comment in pthread_support.h
Ivan Maidanski [Wed, 11 Apr 2012 20:01:55 +0000 (00:01 +0400)]
Fix a typo in comment in pthread_support.h

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

12 years agoRegenerate configure; update ChangeLog
Ivan Maidanski [Tue, 3 Apr 2012 04:37:33 +0000 (08:37 +0400)]
Regenerate configure; update ChangeLog

12 years agoFIX: Disable incremental mode on Darwin if fork handling requested
Ivan Maidanski [Mon, 2 Apr 2012 18:31:22 +0000 (22:31 +0400)]
FIX: Disable incremental mode on Darwin if fork handling requested

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

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