]> granicus.if.org Git - gc/log
gc
11 years agoFix collection of objects referenced only from GC_mark_stack_X variables
Ivan Maidanski [Fri, 6 Sep 2013 19:36:39 +0000 (23:36 +0400)]
Fix collection of objects referenced only from GC_mark_stack_X variables

* include/private/gc_pmark.h (mse): Move to gc_priv.h (as used by
GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack).
* include/private/gc_pmark.h (GC_mark_stack_limit, GC_mark_stack_top,
GC_mark_stack): Remove variable declaration.
* include/private/gc_priv.h (_GC_arrays): Add _mark_stack,
_mark_stack_limit, _mark_stack_top fields.
* include/private/gc_priv.h (GC_mark_stack_limit, GC_mark_stack_top,
GC_mark_stack): Define macro (redirecting to the corresponding field
of GC_arrays).
* mark.c (GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_top):
Remove variable; move comment to gc_priv.h.
* mark.c (GC_push_marked1, GC_push_marked2, GC_push_marked4): Undefine
GC_mark_stack_top and GC_mark_stack_limit macros (before redefining
them to local variables) at function start, redefine them back to the
corresponding field of GC_arrays at function exit.

11 years agoUpdate (regenerate) configure files; update ChangeLog
Ivan Maidanski [Mon, 2 Sep 2013 10:15:55 +0000 (14:15 +0400)]
Update (regenerate) configure files; update ChangeLog

* configure: Regenerate.
* Makefile.in: Likewise.

11 years ago.gitignore: Ignore cord/tests/de_win.res
Ivan Maidanski [Mon, 2 Sep 2013 10:03:50 +0000 (14:03 +0400)]
.gitignore: Ignore cord/tests/de_win.res

11 years ago.gitignore: Ignore *.log, *.trs files produced by 'make check' (Autoconf)
Ivan Maidanski [Mon, 2 Sep 2013 09:42:10 +0000 (13:42 +0400)]
.gitignore: Ignore *.log, *.trs files produced by 'make check' (Autoconf)
(Apply commit f346b01 from 'master' branch.)

Conflicts:

    .gitignore

11 years ago.gitignore: Ignore .gch files
Ivan Maidanski [Sun, 27 Jan 2013 10:33:59 +0000 (14:33 +0400)]
.gitignore: Ignore .gch files

11 years agotests: Append _test suffix to 'initsecondarythread' binary file names
Ivan Maidanski [Mon, 2 Sep 2013 08:55:47 +0000 (12:55 +0400)]
tests: Append _test suffix to 'initsecondarythread' binary file names
(Apply commit 2695007 from 'master' branch.)

* tests/tests.am (TESTS, check_PROGRAMS, initsecondarythread_SOURCES,
initsecondarythread_LDADD): Rename initsecondarythread to
initsecondarythread_test (except for .c file).
* .gitignore: Likewise.

Conflicts:

    tests/tests.am

11 years agoReplace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac
Ivan Maidanski [Sun, 1 Sep 2013 10:00:08 +0000 (14:00 +0400)]
Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac
(Apply commit cd6cb86 from 'master' branch.)

* configure.ac (INCLUDES): Replace with AM_CFLAGS (as the former is
deprecated in Automake 1.13.4).
* configure.ac (CXXINCLUDES): Replace with AM_CPPFLAGS.

Conflicts:

    configure.ac

11 years agoRegenerate configure files by autoconf-2.69, automake-1.13.4
Ivan Maidanski [Mon, 2 Sep 2013 08:17:00 +0000 (12:17 +0400)]
Regenerate configure files by autoconf-2.69, automake-1.13.4

* configure: Regenerate (by autoreconf -vif using autoconf-2.69,
automake-1.13.4 and libtool-2.4.2).
* Makefile.in: Likewise.
* aclocal.m4: Likewise.
* compile: Likewise.
* config.guess: Likewise.
* config.sub: Likewise.
* configure: Likewise.
* depcomp: Likewise.
* install-sh: Likewise.
* ltmain.sh: Likewise.
* m4/libtool.m4: Likewise.
* missing: Likewise.
* mkinstalldirs: Likewise.
* test-driver: New generated file.

11 years agoUpdate (regenerate) configure files; update ChangeLog
Ivan Maidanski [Wed, 28 Aug 2013 22:54:47 +0000 (02:54 +0400)]
Update (regenerate) configure files; update ChangeLog

* configure: Regenerate.

11 years agoconfigure: Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD
Ivan Maidanski [Mon, 27 Feb 2012 03:55:29 +0000 (07:55 +0400)]
configure: Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD

* configure.ac (PARALLEL_MARK): Define for freebsd if
enable_parallel_mark is yes.
* configure.ac (THREAD_LOCAL_ALLOC): Always define for freebsd (if
posix threads).

11 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 25 Aug 2013 09:34:56 +0000 (13:34 +0400)]
Update ChangeLog

11 years agoMerge branch 'freebsd-ports-devel-boehm-gc-threaded' into release-7_2
Ivan Maidanski [Sun, 25 Aug 2013 09:09:11 +0000 (13:09 +0400)]
Merge branch 'freebsd-ports-devel-boehm-gc-threaded' into release-7_2

11 years agoRemove changes in Makefile.in and doc/gc.man specific to FreeBSD ports
Ivan Maidanski [Sun, 25 Aug 2013 08:37:19 +0000 (12:37 +0400)]
Remove changes in Makefile.in and doc/gc.man specific to FreeBSD ports
(Revert part of commit 8666ba2 from 'freebsd-ports-devel-boehm-gc' branch.)

* Makefile.in (pkgdatadir): Move from "doc" to base folder.
* doc/gc.man: Remove "PORT INFORMATION".

11 years agoUse __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86) gc7_2d-freebsd
Ivan Maidanski [Sun, 25 Aug 2013 05:59:42 +0000 (09:59 +0400)]
Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)

* include/gc_config_macros.h (GC_RETURN_ADDR_PARENT): Use
__builtin_extract_return_addr (since the address passed to dladdr);
do not define the macro for GCC pre-v4.

11 years agoPrevent use of unsupported __builtin_return_address(1) in GC_DBG_EXTRAS
Ivan Maidanski [Sat, 24 Aug 2013 16:32:11 +0000 (20:32 +0400)]
Prevent use of unsupported __builtin_return_address(1) in GC_DBG_EXTRAS

* include/gc_config_macros.h (GC_CAN_SAVE_CALL_STACKS): Define also
for __amd64__ (synonym for __x86_64__).
* include/gc_config_macros.h (GC_RETURN_ADDR_PARENT): Define only for
x86 and x86_64 (which have frame-pointer register, for other targets
GCC might report "unsupported argument to __builtin_return_address"
warning).

11 years agoDefine GC_caller_func_offset only if HAVE_DLADDR and GC_RETURN_ADDR_PARENT
Ivan Maidanski [Sat, 24 Aug 2013 14:43:29 +0000 (18:43 +0400)]
Define GC_caller_func_offset only if HAVE_DLADDR and GC_RETURN_ADDR_PARENT

* dbg_mlc.c (GC_caller_func_offset): Do not define (and do not include
dlfcn.h) unless GC_ADD_CALLER; test HAVE_DLADDR (and
GC_RETURN_ADDR_PARENT) instead of FREEBSD macro.
* dbg_mlc.c (GC_caller_func_offset): Use STATIC; replace the K&R-style
function definition with the ANSI C one; remove unnecessary "const" in
type casts; do not call dladdr() if address is 0.
* dbg_mlc.c (GC_debug_malloc, GC_debug_realloc): Move assignment of
"s" argument to "unknown" to GC_caller_func_offset (if GC_ADD_CALLER).
* dbg_mlc.c (GC_debug_realloc): Do not call GC_caller_func_offset if
"p" argument is NULL (i.e., if redirected to GC_debug_malloc)..
* include/private/gcconfig.h (HAVE_DLADDR): Define for FREEBSD.

11 years agoReplace GC_DBG_RA with GC_DBG_EXTRAS macro
Ivan Maidanski [Fri, 23 Aug 2013 19:42:26 +0000 (23:42 +0400)]
Replace GC_DBG_RA with GC_DBG_EXTRAS macro

* dbg_mlc.c (GC_debug_malloc_replacement,
GC_debug_realloc_replacement): Use GC_DBG_EXTRAS (instead of
"GC_DBG_RA NULL, 0").
* malloc.c (GC_debug_malloc_replacement): Likewise.
* mallocx.c (GC_debug_realloc_replacement): Likewise.
* include/private/gc_priv.h (GC_DBG_EXTRAS): New macro (similar to
GC_EXTRAS but pass NULL/0 instead of __FILE__and __LINE__);
pass "unknown" instead of NULL unless GC_ADD_CALLER.
* include/private/gc_priv.h (GC_DBG_RA): Remove.

11 years agoAdjust GC_debug_malloc/realloc_replacement macro to match the API function
Ivan Maidanski [Fri, 23 Aug 2013 18:51:07 +0000 (22:51 +0400)]
Adjust GC_debug_malloc/realloc_replacement macro to match the API function

* malloc.c (GC_debug_malloc_replacement): Pass NULL (instead of
"unknown") to "s" argument of GC_debug_malloc to match that
replacement definition in dbg_mlc.c.
* mallocx.c (GC_debug_realloc_replacement): Likewise.

11 years agoFix old_segv/bus_act variables initialization for FreeBSD
Ivan Maidanski [Thu, 22 Aug 2013 06:58:58 +0000 (10:58 +0400)]
Fix old_segv/bus_act variables initialization for FreeBSD

* os_dep.c (old_segv_act): Define static variable for FREEBSD (same as
for NETBSD).
* os_dep.c (GC_set_and_save_fault_handler): Reformat code (related to
FreeBSD).
* os_dep.c (GC_reset_fault_handler): Initialize old_segv_act (and
old_bus_act) for FREEBSD (same as for NETBSD).

11 years agoReformat gcconfig.h (related to FreeBSD/arm)
Ivan Maidanski [Thu, 22 Aug 2013 06:24:39 +0000 (10:24 +0400)]
Reformat gcconfig.h (related to FreeBSD/arm)

* include/private/gcconfig.h (ALIGNMENT, OS_TYPE, DYNAMIC_LOADING,
HEURISTIC2, etext, SEARCH_FOR_DATA_START): Reformat (adjust
indentation) for FreeBSD/arm.

11 years agoAdjust configure.ac to match configure regarding FreeBSD/sparc64
Ivan Maidanski [Sun, 21 Jul 2013 15:34:37 +0000 (19:34 +0400)]
Adjust configure.ac to match configure regarding FreeBSD/sparc64

* configure.ac (Configuration of machine-dependent code): Handle
sparc64-*-freebsd* case.

11 years agoMerge branch 'freebsd-ports-devel-boehm-gc-7_2d' into freebsd-ports-devel-boehm-gc
Ivan Maidanski [Sun, 21 Jul 2013 15:23:15 +0000 (19:23 +0400)]
Merge branch 'freebsd-ports-devel-boehm-gc-7_2d' into freebsd-ports-devel-boehm-gc

Conflicts:
Makefile.in
configure
dbg_mlc.c
include/gc.h
include/private/gcconfig.h
os_dep.c

11 years agoFix GC_caller_func_offset and GC_DBG_RA names
Ivan Maidanski [Sun, 21 Jul 2013 14:27:07 +0000 (18:27 +0400)]
Fix GC_caller_func_offset and GC_DBG_RA names

* dbg_mlc.c (GC_caller_func_offset): Test FREEBSD macro instead of
__FreeBSD__ (since the former is always defined in gcconfig.h included
from this file indirectly).
* dyn_load.c (ElfW): Likewise.
* dbg_mlc.c (GC_caller_func): Fix name to GC_caller_func_offset.
* dbg_mlc.c (GC_debug_realloc): Invoke GC_caller_func_offset if
GC_ADD_CALLER (same as in GC_debug_malloc and commit 2cdf7ec).
* include/private/gc_priv.h (RA): Fix name to GC_DBG_RA.
* include/private/gcconfig.h (X86_64): Test __x86_64__ in addition to
__amd64__ for FreeBSD (proposed in commit b54833a).

11 years agoFreeBSD New ports collection for boehm-gc v7.2d
Vitaly Magerya [Sun, 21 Jul 2013 12:53:31 +0000 (16:53 +0400)]
FreeBSD New ports collection for boehm-gc v7.2d

* Makefile.in (pkgdatadir): Move to "doc" folder.
* configure (Configuration of machine-dependent code): Handle
sparc64-*-freebsd*.
* dbg_mlc.c (GC_caller_func_offset): New function (empty unless
FreeBSD).
* dbg_mlc.c (GC_debug_malloc): Invoke GC_caller_func_offset if
GC_ADD_CALLER.
* dbg_mlc.c (GC_debug_malloc_replacement,
GC_debug_realloc_replacement): Pass NULL (instead of "unknown") to
GC_debug_malloc/realloc.
* doc/gc.man: Add "PORT INFORMATION".
* dyn_load.c (ElfW): Define for __FreeBSD__.
* include/gc.h (GC_RETURN_ADDR_PARENT): New macro.
* include/private/gc_priv.h (RA): Define to "GC_RETURN_ADDR_PARENT,"
if GC_RETURN_ADDR_PARENT defined.
* include/private/gcconfig.h (IA64, ARM32,
ALIGNMENT, OS_TYPE, DYNAMIC_LOADING, HEURISTIC2,
etext, SEARCH_FOR_DATA_START): Define for FreeBSD.
* os_dep.c (GC_set_and_save_fault_handler): Invoke sigaction(SIGBUS)
for FreeBSD.
* os_dep.c (AIM): Define before include machine/trap.h if FreeBSD/ppc.
* os_dep.c (CODE_OK): Define to test "code" against EXC_DSI (instead
of BUS_PAGE_FAULT) if FreeBSD/ppc.

11 years agoFreeBSD New ports collection for boehm-gc v7.1 gc7_1-freebsd
Mike McGaughey [Sun, 21 Jul 2013 11:47:53 +0000 (15:47 +0400)]
FreeBSD New ports collection for boehm-gc v7.1
(Imported from freebsd-ports/devel/boehm-gc)

* Makefile.in (pkgdatadir): Move to "doc" folder.
* configure (Configuration of machine-dependent code): Handle
sparc64-*-freebsd*.
* dbg_mlc.c (GC_caller_func_offset): New function (empty unless
FreeBSD).
* dbg_mlc.c (GC_debug_malloc, GC_debug_realloc): Invoke
GC_caller_func_offset if GC_ADD_CALLER.
* dbg_mlc.c (RA): Define to GC_RETURN_ADDR_PARENT (if the latter is
defined).
* dbg_mlc.c (GC_debug_malloc_replacement,
GC_debug_realloc_replacement): Pass NULL (instead of "unknown") to
GC_debug_malloc/realloc.
* doc/gc.man: Add "PORT INFORMATION".
* dyn_load.c (ElfW): Define for FreeBSD.
* include/private/gcconfig.h (X86_64, IA64, POWERPC, ARM32,
mach_type_known, ALIGNMENT, OS_TYPE, DYNAMIC_LOADING, HEURISTIC2,
etext, SEARCH_FOR_DATA_START): Likewise.
* os_dep.c (old_bus_act): Likewise.
* include/gc.h (GC_RETURN_ADDR_PARENT): New macro.
* os_dep.c (GC_set_and_save_fault_handler): Invoke sigaction(SIGBUS)
for FreeBSD.
* os_dep.c (AIM): Define before include machine/trap.h if FreeBSD/ppc.
* os_dep.c (CODE_OK): Define to test "code" against EXC_DSI (instead
of BUS_PAGE_FAULT) if FreeBSD/ppc.

11 years agoUpdate (regenerate) configure files; update ChangeLog
Ivan Maidanski [Sat, 20 Jul 2013 14:37:36 +0000 (18:37 +0400)]
Update (regenerate) configure files; update ChangeLog

11 years agoFix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
Ivan Maidanski [Sat, 20 Jul 2013 13:01:01 +0000 (17:01 +0400)]
Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)

* pthread_stop_world.c (GC_push_all_stacks): Use
traced_stack_sect->prev instead of traced_stack_sect if saved_stack_ptr
(of traced_stack_sect) is the same as stop_info.stack_ptr of the
examined thread (thus preventing assertion violation in
GC_push_all_stack_sections invoked during incremental collection).

11 years agoFix stackbottom/stack_end assignment in GC_call_with_gc_active
Ivan Maidanski [Sat, 20 Jul 2013 11:21:37 +0000 (15:21 +0400)]
Fix stackbottom/stack_end assignment in GC_call_with_gc_active

* misc.c (GC_call_with_gc_active): Add GC_noop1 call between "fn" call
and "return" statement to discourage the compiler from treating the
function call as a tail one (thus ensuring "stackbottom" COOLER_THAN
any stack pointer value obtained inside "fn").
* pthread_support.c (GC_call_with_gc_active): Likewise.
* win32_threads.c (GC_call_with_gc_active): Likewise.

11 years agoFix assertion violation in GC_mark_from prefetch loop
Ivan Maidanski [Wed, 17 Jul 2013 06:07:19 +0000 (10:07 +0400)]
Fix assertion violation in GC_mark_from prefetch loop

* mark.c (GC_mark_from): If "descr" is less than size of word then
skip prefetching and PUSH_CONTENTS of the current entry (thus,
eliminate assertion violation in the prefetch loop) if SMALL_CONFIG is
not defined.

11 years agoFix typo in comment of GC_mark_from
Ivan Maidanski [Tue, 16 Jul 2013 12:58:28 +0000 (16:58 +0400)]
Fix typo in comment of GC_mark_from

* mark.c (GC_mark_from): Fix typo (capitalization) in comment ("ASAP").

11 years agoFix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
Ivan Maidanski [Mon, 15 Jul 2013 09:33:12 +0000 (13:33 +0400)]
Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)

* win32_threads.c (GC_PTHREAD_PTRVAL): Define also if
GC_PTHREADS_PARAMARK (even w/o GC_WIN32_PTHREADS).

11 years agoFix more typos in comments and documentation
Ivan Maidanski [Thu, 11 Jul 2013 08:44:35 +0000 (12:44 +0400)]
Fix more typos in comments and documentation
(Apply commit 6da20ac from 'master' branch.)

* alloc.c: Fix typo ("overflow").
* configure.ac: Fix typo ("optimization").
* doc/README.amiga: Fix typos ("also", "specific", "unnecessary").
* doc/README.cords: Fix typos ("descendants", "highlighted").
* doc/README.changes: Fix typos ("[un]collectible").
* README.md: Likewise.
* dbg_mlc.c: Likewise.
* doc/README.hp: Likewise.
* doc/README.linux: Likewise.
* doc/gcdescr.html: Likewise.
* doc/gcinterface.html: Likewise.
* include/gc_mark.h: Likewise.
* include/gc_pthread_redirects.h: Likewise.
* include/new_gc_alloc.h: Likewise.
* include/private/dbg_mlc.h: Likewise.
* include/private/gc_pmark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* new_hblk.c: Likewise.
* doc/README.changes: Fix typo ("multi-threaded").
* cord/cordxtra.c: Likewise.
* doc/debugging.html: Likewise.
* doc/gcinterface.html: Likewise.
* doc/leak.html: Likewise.
* doc/overview.html: Likewise.
* doc/simple_example.html: Likewise.
* include/gc_mark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* os_dep.c: Likewise.
* ptr_chck.c: Likewise.
* README.md: Fix typo ("pointer-free").
* allchblk.c: Likewise.
* doc/debugging.html: Likewise.
* doc/gcdescr.html: Likewise.

Conflicts:

    ChangeLog
    doc/README
    doc/README.amiga
    doc/gcdescr.html
    doc/gcinterface.html
    include/gc_mark.h

11 years agoFix typos in comments
Ondrej Bilka [Thu, 11 Jul 2013 07:57:32 +0000 (11:57 +0400)]
Fix typos in comments
(Apply commit af45302 from 'master' branch.)

* blacklst.c: Fix typo ("even though").
* cord/cordbscs.c: Fix typo ("exponentially").
* cord/cordxtra.c: Fix typo ("represented").
* dyn_load.c: Fix typos ("uncollectible", "occurred").
* extra/AmigaOS: Fix typos ("specific", "necessary", "always",
"effectiveness").
* finalize.c: Fix typo ("descendants").
* include/cord.h: Fix typo ("idiosyncrasies").
* include/gc.h: Fix typo ("collectible").
* include/gc_allocator.h: Fix typos ("allocator", "[un]collectible").
* mach_dep.c: Fix typo ("erroneously").
* malloc.c: Fix typos ("[un]collectible", "pointer-free",
"initialization").
* mallocx.c: Fix typos ("largely", "pointer-free", "uncollectible").
* mark.c: Fix typos ("[un]collectible", "even though").
* misc.c: Fix typo ("erroneously").
* os_dep.c: Fix typos ("non-addressable", "happening", "pointer-free").
* tests/test.c: Fix typos ("uncollectible", "reversed").
* tests/test_cpp.cc: Fix typos ("[un]collectible").
* typd_mlc.c: Fix typo ("copyright").
* win32_threads.c: Fix typos ("optimization", "uncollectible").

Conflicts:

    cord/cordxtra.c
    extra/AmigaOS.c
    malloc.c
    tests/test_cpp.cc

11 years agoFix missing tabs in SMakefile.amiga
Ivan Maidanski [Wed, 10 Jul 2013 11:16:04 +0000 (15:16 +0400)]
Fix missing tabs in SMakefile.amiga
(Apply commit 065a811 from 'master' branch.)

* SMakefile.amiga (clean, test, gctest, setjmp_t, gc*.lib, setjmp_t):
Fix indentation (replace spaces with tabs).

Conflicts:

    SMakefile.amiga

11 years agoFix typo in comment of signalObjectAndWait_func (Win32)
Ivan Maidanski [Wed, 12 Jun 2013 05:20:45 +0000 (09:20 +0400)]
Fix typo in comment of signalObjectAndWait_func (Win32)

* win32_threads.c (signalObjectAndWait_func): Fix a typo in comment.

11 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 30 May 2013 04:02:23 +0000 (08:02 +0400)]
Update ChangeLog

11 years agoFix triple-letter typos in comments and documentation
Ivan Maidanski [Fri, 3 May 2013 20:21:20 +0000 (00:21 +0400)]
Fix triple-letter typos in comments and documentation

* doc/README.changes: Fix triple-letter typos.
* doc/overview.html: Likewise.
* mark.c (GC_push_marked1): Fix a triple-letter typo in a comment.
* os_dep.c (GC_register_data_segments): Likewise.

Conflicts:

    ChangeLog

11 years agoUpdate (regenerate) configure files; update ChangeLog
Ivan Maidanski [Thu, 28 Feb 2013 04:30:45 +0000 (08:30 +0400)]
Update (regenerate) configure files; update ChangeLog

* Makefile.in: Regenerate.

11 years agoFix tests makefile to link with new GNU ld linking rules
Andy Wingo [Wed, 13 Feb 2013 14:45:33 +0000 (15:45 +0100)]
Fix tests makefile to link with new GNU ld linking rules
(Apply commit 99f98bd from 'master' branch.)

* tests/tests.am (gctest_LDADD, threadleaktest_LDADD,
threadkey_test_LDADD,
initsecondarythread_LDADD): Link to pthreads (or appropriate
threading libraries) as needed; fixes failure to link with new GNU ld
linking rules.

Conflicts:

    tests/tests.am

11 years agoFix reference to debugging-related README file in README and Makefile.dj
Ivan Maidanski [Fri, 28 Dec 2012 03:22:06 +0000 (07:22 +0400)]
Fix reference to debugging-related README file in README and Makefile.dj
(Apply commit 070b30d from 'master' branch.)

* doc/README: Change README.debugging to debugging.html.
* Makefile.dj (OTHER_FILES): Likewise.

Conflicts:

    Makefile.dj

12 years agoUpdate ChangeLog
Ivan Maidanski [Sun, 23 Dec 2012 16:09:06 +0000 (20:09 +0400)]
Update ChangeLog

12 years agoFix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
Ivan Maidanski [Sun, 23 Dec 2012 14:52:10 +0000 (18:52 +0400)]
Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC

* os_dep.c (GC_win32_free_heap): Test GLOBAL_ALLOC_TEST instead of
GC_no_win32_dlls to determine whether the memory is allocated using
GlobalAlloc (only if MSWIN32).

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