]> granicus.if.org Git - gc/log
gc
9 years agoFix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
Ivan Maidanski [Tue, 21 Oct 2014 06:31:11 +0000 (10:31 +0400)]
Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)

* include/include.am (dist_noinst_HEADERS): Add msvc_dbg.h entry.

9 years agoFix missing error handling of pthread_attr_init/getstacksize
Ivan Maidanski [Mon, 20 Oct 2014 20:54:28 +0000 (00:54 +0400)]
Fix missing error handling of pthread_attr_init/getstacksize

* misc.c (GC_init): Explicitly ignore returned value of
pthread_mutexattr_destroy.
* os_dep.c (GC_get_main_stack_base, GC_get_stack_base, GC_dirty_init):
Likewise.
* pthread_support.c (start_mark_threads, pthread_create): Likewise.
* tests/test.c (main): Likewise.
* win32_threads.c (start_mark_threads): Likewise.
* pthread_support.c (pthread_create): ABORT (with the appropriate
message) in case of pthread_attr_getstacksize or pthread_attr_init
failure.
* tests/test.c (main): Print error code and FAIL if pthread_attr_init
or pthread_attr_setstacksize failed (only if GC_PTHREADS).

9 years agoFix __alloc_size__ availability detection (Clang)
Yusuke Suzuki [Wed, 1 Oct 2014 18:38:02 +0000 (03:38 +0900)]
Fix __alloc_size__ availability detection (Clang)

Since __clang_major__/__clang_minor__ etc. are vendor dependent values,
we cannot implement the feature detection based on it.
For example, Apple clang versioning is different from the FreeBSD clang.
(At this time, Apple clang version is "6.0 (clang-600.0.51)" and
__clang_major__ is 6.)
Instead of this, we can use the clang feature detection macro,
__has_attribute.

* include/gc_config_macros.h (GC_ATTR_ALLOC_SIZE): Replace predefined
__clang_major/minor__ testing with __has_attribute() one (in case of
clang).

9 years agoWorkaround 'unknown attribute __alloc_size__' warning for Clang 3.5 (trunk)
Ivan Maidanski [Wed, 24 Sep 2014 18:47:59 +0000 (22:47 +0400)]
Workaround 'unknown attribute __alloc_size__' warning for Clang 3.5 (trunk)

* include/gc_config_macros.h (GC_ATTR_ALLOC_SIZE): Define to empty if
clang 3.5.0 (workaround "unknown attribute '__alloc_size__' ignored"
warning in clang3.5 (trunk)).

9 years agoFix missing error handling of pthreads_mutex_init and cond_wait
Ivan Maidanski [Sat, 27 Sep 2014 15:30:06 +0000 (19:30 +0400)]
Fix missing error handling of pthreads_mutex_init and cond_wait

* include/private/darwin_semaphore.h (sem_init): Destroy sem->mutex if
sem->cond initialization failed.
* include/private/darwin_semaphore.h (sem_post): Ignore
pthread_mutex_unlock result in case of pthread_cond_signal.
* include/private/darwin_semaphore.h (sem_wait): Unlock mutex and
return error (-1) if pthread_cond_wait failed.
* include/private/darwin_semaphore.h (sem_init): If pshared then
return -1 (with the appropriate errno code set) instead of ABORT.
* include/private/darwin_semaphore.h (sem_init, sem_post, sem_wait):
Treat non-zero value returned by pthread functions as error (instead
of only negative values).
* include/private/darwin_semaphore.h (sem_init, sem_post, sem_wait):
Reformat code.
* misc.c (GC_init): Abort (with the appropriate message) if
pthread_mutex[attr]_init failed (SN_TARGET_PS3 case only).
* specific.c (GC_key_create_inner): If pthread_mutex_init failed then
return its error code.

9 years agoAlso enable the TSX workaround for i386 (Linux)
Jan Alexander Steffens (heftig) [Thu, 11 Sep 2014 21:06:46 +0000 (23:06 +0200)]
Also enable the TSX workaround for i386 (Linux)

* include/private/gcconfig.h (GLIBC_2_19_TSX_BUG): Define for
LINUX/I386 (if __GLIBC__).

9 years agoUpdate AUTHORS file
Ivan Maidanski [Tue, 23 Sep 2014 19:42:17 +0000 (23:42 +0400)]
Update AUTHORS file

9 years agoRelax mark_mutex attribute needed to disable elision (Linux/x64)
Jan Alexander Steffens (heftig) [Thu, 11 Sep 2014 21:01:16 +0000 (23:01 +0200)]
Relax mark_mutex attribute needed to disable elision (Linux/x64)

* pthread_support.c (setup_mark_lock): Pass PTHREAD_MUTEX_NORMAL
(instead of PTHREAD_MUTEX_ERRORCHECK) to pthread_mutexattr_settype
(actually, any valid settype call disables lock elision in glibc 2.19).

9 years agoFix setup_mark_lock missing prototype
Ivan Maidanski [Tue, 23 Sep 2014 19:20:08 +0000 (23:20 +0400)]
Fix setup_mark_lock missing prototype
(and do not call it if no parallel marker)

* include/private/pthread_support.h (GC_setup_mark_lock): Remove
prototype.
* misc.c (GC_init): Remove GC_setup_mark_lock call (move it to
GC_thr_init).
* pthread_support.c (setup_mark_lock): Rename from GC_setup_mark_lock;
add prototype (only if PARALLEL_MARK).
* pthread_support.c (GC_thr_init): Call setup_mark_lock() unless
available_markers_m1 is 0.

10 years agoMerge branch 'fix_tsx_bug' into release-7_4
Ivan Maidanski [Wed, 10 Sep 2014 23:14:49 +0000 (03:14 +0400)]
Merge branch 'fix_tsx_bug' into release-7_4

10 years agoFix and code refactoring of lock elision workaround (Linux/x64)
Ivan Maidanski [Sat, 19 Jul 2014 08:52:54 +0000 (12:52 +0400)]
Fix and code refactoring of lock elision workaround (Linux/x64)

* configure.ac (HAVE_LIBC_VERSION_H, HAVE_GNU_GET_LIBC_VERSION): Remove
(revert change in previous commit).
* include/private/gcconfig.h (GLIBC_2_19_TSX_BUG): New macro defined
for Linux/x86_64 (if Glibc used) to workaround a bug in Glibc lock
elision implementation.
* pthread_support.c: Move include of gnu/libc-version.h to gcconfig.h
(used to check whether lock elision workaround needed).
* misc.c (GC_init): Reformat code.
* pthread_support.c (mark_mutex): Initialize (to
PTHREAD_MUTEX_INITIALIZER) even lock elision workaround is needed
(revert change in previous commit).
* pthread_support.c (parse_version): New static function (defined only
if GLIBC_2_19_TSX_BUG).
* pthread_support.c (GC_setup_mark_lock): Use parse_version to check
target Glibc version properly; do not reinitialize mutex unless
workaround needed; call ABORT (with the appropriate message) in case
of a failure in pthread_mutexattr_init/settype, pthread_mutex_init.

10 years agoWorkaround Linux NTPL lock elision bug.
Paul Bone [Wed, 25 Jun 2014 01:17:50 +0000 (11:17 +1000)]
Workaround Linux NTPL lock elision bug.

glibc 2.19 on Linux x86-64 platforms includes support for lock elision,
by using Intel's TSX support when it is available.  Without modifying an
application this converts suitable critical sections that use mutex into
transactional memory critical sections.  See http://lwn.net/Articles/534758/
If a problem occurs that means that transactional memory can't be used, such
as a system call or buffer overflow, the pthreads implementation will catch
this error and retry the critical section using a normal mutex.

I noticed that since upgrading glibc that programs using Boehm GC crash, one
of these crashes was an assertion that the owner field of a mutex was
invalid.  The assertion was generated by the pthreads implementation.
I believe that there is a bug in glibc that when a mutex cannot be used
safely for transactions that some series of events causes it's owner field
to be set incorrectly (or cleared when it shouldn't be).

I've found that I can work around this problem by having Boehm GC use an
error checking mutex, which I believe doesn't use lock elision and in my
testing doesn't crash.

XXX: This work-around mostly works except for linking the feature detection
in configure.ac to the conditional compilation in pthread_support.c as there
isn't an obvious way to make it work for automake and Makefile.direct.
Could I have some help updating the build system please?

include/private/pthread_support.h:
pthread_support.c:
    Define GC_setup_mark_lock()  This procedure creates the lock specifying a
    pthread_mutexattr_t structure.  This is used to disable lock elision on
    Linux with glibc 2.19 or greater.

configure.ac:
    If we're using Linux then check for the gnu extensions required to
    identify the version of glibc at runtime.

misc.c:
    Call GC_setup_mark_lock() when initialising the collector.

10 years agoFix signedness of char values passed to isspace, iscntrl, isxdigit
Ivan Maidanski [Sun, 15 Jun 2014 07:39:12 +0000 (11:39 +0400)]
Fix signedness of char values passed to isspace, iscntrl, isxdigit
(eliminate 'array subscript has type char' GCC warning)

* cord/tests/de_win.c (WinMain, plain_chars, control_chars): Cast char
value to unsigned char when passed to isspace(), iscntrl().
* os_dep.c (GC_parse_map_entry): Change type of "start_start",
"end_start", "maj_dev_start", "p" local variables from char* to
unsgined char* (as isspace(), isxdigit() expect non-negative values);
insert casts between char* and unsigned char* where needed.
* os_dep.c (GC_parse_map_entry): Remove "endp" local variable (use "p"
variable directly instead).

10 years agoFix 'variable unused' warning in GC_save_callers
Ivan Maidanski [Sat, 14 Jun 2014 15:55:15 +0000 (19:55 +0400)]
Fix 'variable unused' warning in GC_save_callers

* os_dep.c (GC_save_callers): Do not declare "i" local variable unless
it is used.

10 years agoFix file descriptor resource leak in GC_register_data_segments (OS/2)
Ivan Maidanski [Fri, 13 Jun 2014 14:22:30 +0000 (18:22 +0400)]
Fix file descriptor resource leak in GC_register_data_segments (OS/2)

* os_dep.c (GC_register_data_segments): Call fclose(myexefile) on
return (only if OS2).

10 years agoFix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
Ivan Maidanski [Mon, 9 Jun 2014 22:25:31 +0000 (02:25 +0400)]
Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)

* Makefile.am (ASM_CPP_OPTIONS): Move comment to configure.ac.
* Makefile.am (COMPILER_XLC): Rename to ASM_WITH_CPP_UNSUPPORTED.
* configure.ac (COMPILER_XLC): Likewise.
* configure.ac (compiler_suncc): New variable (set to "yes" if Solaris
Sun C compiler).
* configure.ac (ASM_WITH_CPP_UNSUPPORTED): Define not only for
compiler_xlc but also for compiler_suncc.

10 years agoFix CFLAGS in configure regarding -O flag passing to SunCC compiler
Ivan Maidanski [Sun, 8 Jun 2014 13:24:17 +0000 (17:24 +0400)]
Fix CFLAGS in configure regarding -O flag passing to SunCC compiler

* configure.ac (CFLAGS): Add -O flag if Solaris SunCC (i.e., not GCC)
regardless of threads support (i.e., even in case it is off).

10 years agoBump version to 7.4.2 gc7_4_2
Ivan Maidanski [Tue, 3 Jun 2014 05:54:04 +0000 (09:54 +0400)]
Bump version to 7.4.2

* ChangeLog: Set release date.
* README.md: Bump micro version.
* configure.ac (AC_INIT): Likewise.
* include/gc_version.h (GC_TMP_VERSION_MICRO): Likewise.

10 years agoUpdate ChangeLog file
Ivan Maidanski [Mon, 2 Jun 2014 22:23:10 +0000 (02:23 +0400)]
Update ChangeLog file

10 years agoFix 'op_sz variable unused' warning in GC_core_finalized_malloc
Ivan Maidanski [Sat, 31 May 2014 09:40:23 +0000 (13:40 +0400)]
Fix 'op_sz variable unused' warning in GC_core_finalized_malloc
(Apply commit 462f697 from 'master' branch.)

* fnlz_mlc.c (GC_core_finalized_malloc): Remove "op_sz" local variable.

Conflicts:

    fnlz_mlc.c

10 years agoFix crash when using GC_malloc_many() as first allocation call
Bruce Hoult [Thu, 29 May 2014 06:16:50 +0000 (18:16 +1200)]
Fix crash when using GC_malloc_many() as first allocation call

* mallocx.c (GC_CALL GC_generic_malloc_many): Do not dereference
ok_reclaim_list if it is NULL.

10 years agoFix GC_finalized_malloc failure on disclaim_test
Petter Urkedal [Sun, 25 May 2014 13:57:03 +0000 (15:57 +0200)]
Fix GC_finalized_malloc failure on disclaim_test
(revert part of commit 63fd11d)

The finalizer closure is placed in the first word in order to use the
lower bits to distinguish live objects from objects on the free list.
The downside of this is that we need one-word offset interior pointers,
and that GC_base does not return the start of the user region.

* fnlz_mlc.c (GC_finalized_disclaim): Move finalizer closure for
finalized object kinds back to the start of objects.
* fnlz_mlc.c (GC_init_finalized_malloc): Call
GC_register_displacement_inner() as GC_finalized_malloc returns
displaced pointer.
* fnlz_mlc.c (GC_core_finalized_malloc, GC_finalized_malloc): Store
fclos in first word of created object (instead of the last word);
return pointer to object displaced by 1 word.

10 years agoFix PARALLEL_MARK for Windows 7+
Ivan Maidanski [Thu, 29 May 2014 19:32:45 +0000 (23:32 +0400)]
Fix PARALLEL_MARK for Windows 7+
(Apply commit 57cc049 from 'master' branch.)

* doc/README.macros (DONT_USE_SIGNALANDWAIT): Remove.
* win32_threads.c (DONT_USE_SIGNALANDWAIT, GC_mark_mutex_waitcnt,
SignalObjectAndWait_type, signalObjectAndWait_func): Likewise.
* win32_threads.c (GC_marker_cv, GC_mark_thread, start_mark_threads,
GC_mark_mutex_state, GC_acquire_mark_lock, GC_release_mark_lock,
GC_wait_marker, GC_notify_all_marker, GC_thr_init): Do not check
DONT_USE_SIGNALANDWAIT macro (assume it is always on as multi-core
marker based on NT SignalObjectAndWait is broken in Windows 7+ leading
to a deadlock sometimes because the function is no longer atomic).

Conflicts:

    doc/README.macros

10 years agoFix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
Ivan Maidanski [Wed, 28 May 2014 20:46:21 +0000 (00:46 +0400)]
Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc

* misc.c (GC_new_kind_inner, GC_new_proc_inner): Move ABORT call so
that to be immediately followed by return (to workaround
"array subscript is above array bounds" warning reported by MinGW
GCC 4.5.2); do not increase elements count in case of overflow.

10 years ago.gitignore: Ignore all .deps, .dirstamp
Ivan Maidanski [Wed, 28 May 2014 17:59:47 +0000 (21:59 +0400)]
.gitignore: Ignore all .deps, .dirstamp

10 years agoUpdate TODO (Android 'gold' linker issue fixed in b746e63)
Ivan Maidanski [Mon, 26 May 2014 20:07:32 +0000 (00:07 +0400)]
Update TODO (Android 'gold' linker issue fixed in b746e63)

10 years agoUpdate ChangeLog file
Ivan Maidanski [Sun, 25 May 2014 20:03:39 +0000 (00:03 +0400)]
Update ChangeLog file

10 years agoRemove non-existing DISCARD_WORDS from GC data structure ASCII diagram
Ivan Maidanski [Mon, 9 Dec 2013 04:44:05 +0000 (08:44 +0400)]
Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram

* doc/tree.html (picture): Remove DISCARD_WORDS (since always zero
and already removed from the code in gc-6.0alpha6).

10 years agoRemove barrett_diagram file duplicated by tree.html
Ivan Maidanski [Mon, 9 Dec 2013 04:08:05 +0000 (08:08 +0400)]
Remove barrett_diagram file duplicated by tree.html

* Makefile.direct (DOC_FILES): Remove doc/barrett_diagram entry.
* Makefile.dj (OTHER_FILES): Likewise.
* doc/doc.am (dist_pkgdata_DATA): Likewise.
* doc/barrett_diagram: Remove file (as the content is duplicated in
doc/tree.html).

10 years agoUpdate AUTHORS file
Ivan Maidanski [Thu, 22 May 2014 22:17:26 +0000 (02:17 +0400)]
Update AUTHORS file

10 years agoFix (enable) Cygwin-64 build
Bernd Edlinger [Thu, 22 May 2014 21:53:21 +0000 (01:53 +0400)]
Fix (enable) Cygwin-64 build

* include/gc.h (GC_DATASTART, GC_DATAEND): Define for Cygwin-64.
* include/private/gcconfig.h (X86_64): Likewise.
* include/private/gcconfig.h (OS_TYPE, DATASTART, DATAEND, STACK_GRAN,
NEED_FIND_LIMIT, USE_MMAP_ANON): Define for Cygwin-64 (code copied
from Cygwin-32 block).
* os_dep.c (GC_get_stack_base): Get the stack base for Cygwin-64
(implementation based on NtCurrentTeb call).

10 years agoFix 'source file in a subdirectory' Automake warnings
Ivan Maidanski [Thu, 22 May 2014 20:21:23 +0000 (00:21 +0400)]
Fix 'source file in a subdirectory' Automake warnings

* configure.ac (AM_INIT_AUTOMAKE): Enable subdir-objects (to avoid
future incompatibilities as "cord" and "tests" source files are in
subdirectories).

10 years agoFix typos in ChangeLog (in items for ancient GC releases)
Ivan Maidanski [Fri, 16 May 2014 19:31:38 +0000 (23:31 +0400)]
Fix typos in ChangeLog (in items for ancient GC releases)

* ChangeLog: Fix typos ("nonexistent", "to", "posting", "bit rot",
"likely", "flaky").
* ChangeLog: Fix typos in surname (Juan Jose Garcia-Ripoll,
Paolo Molaro, Andreas Tobler).
* ChangeLog: Fix incorrect article ("a finalizable").

10 years agoUpdate AUTHORS file (add more persons mentioned in ChangeLog)
Ivan Maidanski [Thu, 15 May 2014 22:25:18 +0000 (02:25 +0400)]
Update AUTHORS file (add more persons mentioned in ChangeLog)

10 years agoRestore contribution information for ancient releases in ChangeLog
Ivan Maidanski [Thu, 15 May 2014 22:21:00 +0000 (02:21 +0400)]
Restore contribution information for ancient releases in ChangeLog
(revert part of commit ba8ef9e)

10 years agoUpdate AUTHORS file (specify email for some more contributors)
Ivan Maidanski [Thu, 15 May 2014 18:35:25 +0000 (22:35 +0400)]
Update AUTHORS file (specify email for some more contributors)

10 years agoFix typo in person name in gc_cpp.h comment
Ivan Maidanski [Thu, 15 May 2014 17:41:21 +0000 (21:41 +0400)]
Fix typo in person name in gc_cpp.h comment

* include/gc_cpp.h: Fix typo in surname (John Ellis) in comment.

10 years agoUpdate Xerox FTP host name in overview.html
Ivan Maidanski [Thu, 15 May 2014 17:30:10 +0000 (21:30 +0400)]
Update Xerox FTP host name in overview.html

* doc/overview.html: Update FTP host name (ftp.parc.xerox.com).

10 years agoChangeLog: Add information about ancient release dates
Ivan Maidanski [Mon, 12 May 2014 04:48:59 +0000 (08:48 +0400)]
ChangeLog: Add information about ancient release dates

10 years agoRemove duplicate entry and non-contributor persons from AUTHORS file
Ivan Maidanski [Fri, 9 May 2014 11:28:38 +0000 (15:28 +0400)]
Remove duplicate entry and non-contributor persons from AUTHORS file
(remove entries occasionally leaked from GCC and Mono downstreams;
revert part of commits e1dc74a7b23e1c8a8747eb89)

10 years agoUpdate AUTHORS file (specify email for most contributors)
Ivan Maidanski [Sat, 3 May 2014 20:30:13 +0000 (00:30 +0400)]
Update AUTHORS file (specify email for most contributors)

10 years agoFix typos in names in AUTHORS and ChangeLog files
Ivan Maidanski [Sat, 3 May 2014 18:50:50 +0000 (22:50 +0400)]
Fix typos in names in AUTHORS and ChangeLog files

* AUTHORS: Fix typo in surname (Bryce McKinlay, Slava Sysoltsev).
* ChangeLog: Likewise.
* AUTHORS: Fix typo in name or surname (Philip Brown, Rutger Ovidius).
* AUTHORS: Place surname after 1st name (Tommaso Tagliapietra).
* AUTHORS: Remove computer system name (Harris NightHawk).

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sat, 3 May 2014 05:47:50 +0000 (09:47 +0400)]
Update AUTHORS file

10 years agoFix machdep .lo files path in configure (SPARC, IA-64)
Ivan Maidanski [Sun, 27 Apr 2014 06:36:21 +0000 (10:36 +0400)]
Fix machdep .lo files path in configure (SPARC, IA-64)

* configure.ac (machdep): Remove "src/" path prefix for .lo files
(sparc_netbsd_mach_dep, sparc_mach_dep, ia64_save_regs_in_stack).

10 years agoFix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc
Baruch Siach [Sat, 26 Apr 2014 17:50:07 +0000 (21:50 +0400)]
Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc

* include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Do not
define for uClibc, as it may not have fenv.h.

10 years agoFix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
Ivan Maidanski [Tue, 22 Apr 2014 22:04:11 +0000 (02:04 +0400)]
Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)

* misc.c (GC_CreateLogFile): Use TEXT() for each of concatenated
literals (fix "concatenating mismatched strings" error if UNICODE
defined).

10 years agoFix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
Ivan Maidanski [Tue, 22 Apr 2014 21:28:32 +0000 (01:28 +0400)]
Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
(Apply commit 36aa13d from 'master' branch.)

* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page, GC_debug_malloc_stubborn,
GC_debug_malloc_atomic, GC_debug_strdup, GC_debug_strndup,
GC_debug_wcsdup, GC_debug_malloc_uncollectable,
GC_debug_malloc_atomic_uncollectable,
GC_debug_generic_or_special_malloc, GC_debug_malloc_replacement): Add
GC_ATTR_MALLOC attribute to API function definition (to avoid MS VC
warning about redefinition of a symbol previously declared with
__declspec).
* fnlz_mlc.c (GC_finalized_malloc): Likewise.
* gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
GC_gcj_malloc_ignore_off_page): Likewise.
* malloc.c (GC_generic_malloc, GC_malloc_atomic, GC_malloc,
GC_malloc_uncollectable): Likewise.
* mallocx.c (GC_generic_or_special_malloc,
GC_generic_malloc_ignore_off_page, GC_malloc_ignore_off_page,
GC_malloc_atomic_ignore_off_page, GC_malloc_many, GC_memalign,
GC_malloc_atomic_uncollectable, GC_strdup, GC_strndup, GC_wcsdup):
Likewise.
* stubborn.c (GC_malloc_stubborn): Likewise.
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic, GC_gcj_malloc):
Likewise.
* typd_mlc.c (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page,
GC_calloc_explicitly_typed): Likewise.

Conflicts:

    dbg_mlc.c
    mallocx.c

10 years agoFix a typo in gc_config_macros.h comment (redundant "an" article)
Ivan Maidanski [Mon, 31 Mar 2014 22:07:05 +0000 (02:07 +0400)]
Fix a typo in gc_config_macros.h comment (redundant "an" article)

* include/gc_config_macros.h (GC_ADD_CALLER): Fix a typo in comment
(redundant "an" article).

10 years agoFix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
Ivan Maidanski [Sun, 30 Mar 2014 17:05:35 +0000 (21:05 +0400)]
Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure

* headers.c (GC_scratch_alloc): Do not update GC_scratch_last_end_ptr
if allocation failed ("result" variable is NULL).

10 years agoFix out-of-memory case in new_back_edges, push_in_progress (backgraph)
Ivan Maidanski [Sun, 30 Mar 2014 08:53:48 +0000 (12:53 +0400)]
Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)

* backgraph.c (new_back_edges): Abort if not enough memory.
* backgraph.c (push_in_progress): Prevent null pointer dereference in
BCOPY() if allocation failed (due to not enough memory).

10 years agoFix GET_MEM argument rounding in GC_scratch_alloc and similar
Ivan Maidanski [Sun, 30 Mar 2014 08:31:49 +0000 (12:31 +0400)]
Fix GET_MEM argument rounding in GC_scratch_alloc and similar
(Prevent abort in GC_unix_mmap_get_mem if the allocation size is not
a multiple of a page size.)
(Apply commit 180b56c from 'master' branch.)

* backgraph.c (new_back_edges, push_in_progress): Use
ROUNDUP_PAGESIZE_IF_MMAP() to adjust GET_MEM() argument (when needed).
* headers.c (GC_scratch_alloc): Likewise.
* misc.c (GC_envfile_init): Likewise.
* include/private/gc_priv.h (ROUNDUP_PAGESIZE_IF_MMAP): New macro.
* include/private/gcconfig.h (MMAP_SUPPORTED): Move definition from
os_dep.c (as needed for ROUNDUP_PAGESIZE_IF_MMAP() definition).
* include/private/gcconfig.h (GET_MEM): Refine comment (regarding its
argument).

Conflicts:

    headers.c
    include/private/gc_priv.h

10 years agoUpdate emails/links due to project site and ML transition
Ivan Maidanski [Sun, 23 Feb 2014 12:56:54 +0000 (16:56 +0400)]
Update emails/links due to project site and ML transition
(www.hpl.hp.com/personal/Hans_Boehm -> www.hboehm.info;
gc@linux.hpl.hp.com -> bdwgc@lists.opendylan.org)
(Apply commit a17570c from 'master' branch.)

* AUTHORS: Update email.
* doc/gc.man: Likewise.
* README.QUICK: Change external link to gcinterface.html to local one
(pointing to the file in "doc" folder).
* README.md: Replace BDWGC site URL (www.hpl.hp.com/personal/Hans_Boehm
to www.hboehm.info).
* doc/gc.man: Likewise.
* doc/gcdescr.html: Likewise.
* doc/gcinterface.html: Likewise.
* doc/overview.html: Likewise.
* doc/scale.html: Likewise.
* README.md: Update mailing list info (gc@linux.hpl.hp.com to
bdwgc@lists.opendylan.org, gc-announce@linux.hpl.hp.com to
bdwgc-announce@lists.opendylan.org).
* configure.ac: Likewise.
* doc/gcdescr.html: Likewise.
* doc/overview.html: Likewise.
* doc/tree.html: Remove unnecessary external link.

Conflicts:

    configure.ac

10 years agoFix or remove broken URLs in documentation
Ivan Maidanski [Sun, 23 Feb 2014 08:53:55 +0000 (12:53 +0400)]
Fix or remove broken URLs in documentation

* doc/README.cords: Remove broken link to reality.sgi.com.
* doc/README.environment: Fix link to HPL tech reports.
* doc/overview.html: Remove broken link to parcftp.xerox.com.
* doc/overview.html: Fix (or update) external links.

10 years agoFix typo in GC overview file
Ivan Maidanski [Sat, 22 Feb 2014 17:26:13 +0000 (21:26 +0400)]
Fix typo in GC overview file

* doc/overview.html: Fix a typo ("See").

10 years agoFix GC_sig_suspend initialization when non-constant SIGRTMIN used
Ivan Maidanski [Fri, 31 Jan 2014 20:32:08 +0000 (00:32 +0400)]
Fix GC_sig_suspend initialization when non-constant SIGRTMIN used

* pthread_stop_world.c (SIGNAL_UNSET): New macro.
* pthread_stop_world.c (GC_sig_suspend, GC_sig_thr_restart): Initialize
to SIGNAL_UNSET (instead of SIG_SUSPEND/THR_RESTART).
* pthread_stop_world.c (GC_get_suspend_signal): Return SIG_SUSPEND if
GC_sig_suspend is SIGNAL_UNSET.
* pthread_stop_world.c (GC_get_thr_restart_signal): Return
SIG_THR_RESTART if GC_sig_thr_restart is SIGNAL_UNSET.
* pthread_stop_world.c (GC_unblock_gc_signals): Add assertion for
initialization of GC_sig_suspend and GC_sig_thr_restart.
* pthread_stop_world.c (GC_stop_init): Replace SIGNAL_UNSET value for
GC_sig_suspend, GC_sig_thr_restart to SIG_SUSPEND and SIG_THR_RESTART,
respectively.

10 years agoFix 'e.g.' typos in comments and documentation
Ivan Maidanski [Fri, 31 Jan 2014 17:04:28 +0000 (21:04 +0400)]
Fix 'e.g.' typos in comments and documentation

* doc/README.cmake: Fix typo (e.g.).
* doc/README.solaris2: Likewise.
* doc/README.solaris2: Likewise.
* doc/README.win32: Likewise.
* include/gc.h (GC_register_my_thread): Fix typo in a comment (e.g.).
* include/leak_detector.h: Likewise.
* misc.c (GC_VSNPRINTF): Likewise.
* pthread_stop_world.c (GC_unblock_gc_signals): Likewise.

10 years agoAdd config option to use STGRTMIN-based signals for thread suspend/resume
David Grove [Wed, 8 Jan 2014 23:18:16 +0000 (18:18 -0500)]
Add config option to use STGRTMIN-based signals for thread suspend/resume

Change motivated by using BDWGC in the X10 runtime on systems where
IBM Parallel Environment is used to launch the X10 processes. PE
is already using the signals BDWCG is using for its own purposes, so
we need to force the GC to use different ones to avoid a conflict.

* configure.ac (sigrt-signals): Handle new option.
* configure.ac (GC_USESIGRT_SIGNALS): New AC define.
* include/private/gc_priv.h (SIG_SUSPEND): Force to be defined to
_SIGRTMIN+6 if GC_USESIGRT_SIGNALS (Darwin is excluded anyway).
* pthread_stop_world.c (SIG_THR_RESTART): Force to be defined to
_SIGRTMIN+5 if GC_USESIGRT_SIGNALS; reformat code.

10 years agoFix find stackbottom on BlueGene P/Q systems
David Grove [Wed, 8 Jan 2014 22:54:28 +0000 (17:54 -0500)]
Fix find stackbottom on BlueGene P/Q systems
(Use HEURISTIC2 instead of LINUX_STACKBOTTOM)

* include/private/gcconfig.h (NO_PTHREAD_GETATTR_NP, HEURISTIC2): Define
for BlueGene systems (instead of LINUX_STACKBOTTOM).

10 years agoCheck for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
David Grove [Wed, 8 Jan 2014 23:07:41 +0000 (18:07 -0500)]
Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
(Patch originally contributed to X10 project by Kamada-san.)

* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT): Do not define
if __FUJITSU.

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sat, 11 Jan 2014 13:57:06 +0000 (17:57 +0400)]
Update AUTHORS file

10 years agoAllow parallel mark to be enabled on powerpc-linux systems
David Grove [Wed, 8 Jan 2014 23:01:28 +0000 (18:01 -0500)]
Allow parallel mark to be enabled on powerpc-linux systems
(Tested using X10 on both BlueGene/Q and Power7/Linux platforms.)

* configure.ac (GC_LINUX_THREADS, PARALLEL_MARK, THREAD_LOCAL_ALLOC):
Define for powerpc*-*-linux* target.

10 years agoFix data roots registration for Android/x86 and NDK ARM 'gold' linker
Ivan Maidanski [Thu, 26 Dec 2013 21:41:05 +0000 (01:41 +0400)]
Fix data roots registration for Android/x86 and NDK ARM 'gold' linker

* include/gc.h (_etext, __dso_handle): Declare weak symbol (only if
Android).
* os_dep.c (_etext, __dso_handle): Likewise.
* include/gc.h (GC_INIT_CONF_ROOTS): If __data_start is incorrect
(less than _etext or missing but __dso_handle (which is typically
located at data section start) is greater than _etext as observed for
code produced by "gold" linker of Android NDK r9b) then use
__dso_handle as the lowest bound of registered data root instead of
__data_start (only if Android); update comment.
* os_dep.c (GC_init_linux_data_start): Likewise.
* os_dep.c (__data_start, data_start): Reformat code.

10 years agoFix mark stack excessive growth during parallel mark
Andrew Horton [Sat, 21 Dec 2013 13:06:36 +0000 (13:06 +0000)]
Fix mark stack excessive growth during parallel mark
(The growth observed in applications that implement things like weak
hash tables and iterate over the members marking entries using the
supplied GC_MARK_AND_PUSH macro.)

When overflow is signaled, only set GC_mark_stack_too_small if we
are using the global mark stack.  In parallel mode, local mark stack
is used, so the global mark stack is grown by GC_return_mark_stack
mainly.

* mark.c (GC_signal_mark_stack_overflow): Do not set
GC_mark_stack_too_small if GC_parallel.

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sun, 22 Dec 2013 08:58:02 +0000 (12:58 +0400)]
Update AUTHORS file

10 years agoBump GC_collect_at_heapsize in GC_add_to_heap. In the normal case it is
Andrew Horton [Sun, 15 Dec 2013 15:55:04 +0000 (15:55 +0000)]
Bump GC_collect_at_heapsize in GC_add_to_heap. In the normal case it is
recalculated straight after. But in the case where it's called directly
from alloc_mark_stack, it isn't. If the mark stack gets very large,
this can cause GC_should_collect to always return true, and
GC_alloc_large to get stuck in a loop calling GC_collect_or_expand.

10 years agoFix 'attribute declaration must precede definition' warning (clang-3.1)
Ivan Maidanski [Wed, 18 Dec 2013 19:33:50 +0000 (23:33 +0400)]
Fix 'attribute declaration must precede definition' warning (clang-3.1)

* extra/gc.c: Include gc_inline.h explicitly before including mallocx.c
(to workaround "attribute declaration must precede definition" warning
reported by clang-3.1 for GC_generic_malloc_many); define
GC_PTHREAD_REDIRECTS_ONLY before including gc_pthread_redirects.h.
* include/gc_pthread_redirects.h (GC_dlopen, GC_pthread_sigmask,
GC_PTHREAD_CREATE_CONST, GC_pthread_create, GC_pthread_join,
GC_pthread_detach, GC_pthread_cancel, GC_pthread_exit): Do not declare
if GC_PTHREAD_REDIRECTS_ONLY defined (to workaround
"attribute declaration must precede definition" warning reported by
clang-3.1).

10 years agoFix typo in GC_collect_or_expand comment
Ivan Maidanski [Tue, 17 Dec 2013 05:37:20 +0000 (09:37 +0400)]
Fix typo in GC_collect_or_expand comment

* alloc.c (GC_collect_or_expand): Fix a typo in comment ("setting").

10 years agoFix ok_init assignment (missing cast) in GC_new_kind_inner
Ivan Maidanski [Sun, 15 Dec 2013 16:54:12 +0000 (20:54 +0400)]
Fix ok_init assignment (missing cast) in GC_new_kind_inner

* misc.c (GC_new_kind_inner): Add cast from int to GC_bool for ok_init.

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sun, 8 Dec 2013 08:38:22 +0000 (12:38 +0400)]
Update AUTHORS file

10 years agoFix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
Yusuke Suzuki [Mon, 2 Dec 2013 03:50:52 +0000 (12:50 +0900)]
Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES

* CMakeLists.txt: Since latest OSX compiler (clang) provided by Xcode is
not accept "-arch ppc"; So if CMAKE_OSX_ARCHITECTURES is defined by
client, CMakeLists.txt should not force "ppc;i386;x86_64".

10 years agoFix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
Yusuke Suzuki [Mon, 2 Dec 2013 03:38:45 +0000 (12:38 +0900)]
Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD

* CMakeLists.txt: Fix broken ADD_DEFINITION for kFreeBSD.

11 years agoFix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
Ivan Maidanski [Sat, 23 Nov 2013 20:16:38 +0000 (00:16 +0400)]
Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2

* pthread_stop_world.c (GC_suspend_handler_inner): If signal number
is zero then silently return (instead of ABORT) if FREEBSD (to
workaround a bug in FreeBSD 9.2-RELEASE regarding signals processing,
bug is observed only if THREAD_LOCAL_ALLOC defined).

11 years agoFix ABORT message in GC_restart_handler
Ivan Maidanski [Thu, 21 Nov 2013 22:12:25 +0000 (02:12 +0400)]
Fix ABORT message in GC_restart_handler

* pthread_stop_world.c (GC_restart_handler): Fix ABORT message.

11 years agoBump version to 7.4.0; change policy regarding version numbers gc7_4_0
Ivan Maidanski [Sun, 17 Nov 2013 09:40:36 +0000 (13:40 +0400)]
Bump version to 7.4.0; change policy regarding version numbers

* ChangeLog: Update.
* README.md: Bump version.
* configure.ac (AC_INIT): Likewise.
* include/gc_version.h (GC_TMP_VERSION_MINOR): Likewise.
* alloc.c (GC_version, GC_get_version): Replace GC_TMP_ALPHA_VERSION
with GC_VERSION_MICRO.
* doc/debugging.html: Remove comment about "alpha" versions.
* doc/overview.html: Likewise.
* include/gc.h (GC_get_version): Update comment.
* include/gc_version.h (GC_NOT_ALPHA): Remove.
* include/gc_version.h (GC_TMP_ALPHA_VERSION): Replace with
GC_TMP_VERSION_MICRO; add comment about policy.
* m4/gc_set_version.m4 (GC_ALPHA_VERSION): Replace with
GC_VERSION_MICRO; update comments; adjust version format test.
* tests/test.c (GC_ALPHA_VERSION): Remove.
* tools/add_gc_prefix.c (GC_ALPHA_VERSION): Likewise.
* tools/gcname.c (GC_ALPHA_VERSION): Likewise.
* tests/test.c (CHECH_GCLIB_VERSION): Replace GC_ALPHA_VERSION with
GC_VERSION_MICRO.
* tools/add_gc_prefix.c (main): Replace "gc%d.%d[alpha%d]" print
format with "gc-%d.%d.%d" one.
* tools/gcname.c (main): Likewise.
* windows-untested/gc.ver (_BETA, GC_VERSION_MICRO): Remove.

11 years agoUpdate ChangeLog file
Ivan Maidanski [Sat, 16 Nov 2013 10:39:23 +0000 (14:39 +0400)]
Update ChangeLog file

11 years agoUpdate TODO file (add 1 item about parallel marker)
Ivan Maidanski [Sat, 16 Nov 2013 10:25:27 +0000 (14:25 +0400)]
Update TODO file (add 1 item about parallel marker)

11 years agoEnable prefetch operations by default (GCC 3.0+)
Ivan Maidanski [Sat, 16 Nov 2013 09:06:34 +0000 (13:06 +0400)]
Enable prefetch operations by default (GCC 3.0+)

* include/private/gcconfig.h (PREFETCH): Update comment; remove FIXME.
* include/private/gcconfig.h (NO_PREFETCH_FOR_WRITE): Define if
USE_I686_PREFETCH defined but not FORCE_WRITE_PREFETCH.
* include/private/gcconfig.h (PREFETCH, PREFETCH_FOR_WRITE,
CLEAR_DOUBLE): Reformat code (for IA64).
* include/private/gcconfig.h (PREFETCH, PREFETCH_FOR_WRITE): Make
default definition to GCC (v3+) built-in operation for all platforms
(instead of only for Linux/x64) unless NO_PREFETCH (or
NO_PREFETCH_FOR_WRITE, respectively) defined.

11 years agoUpdate AUTHORS file
Ivan Maidanski [Fri, 15 Nov 2013 20:22:57 +0000 (00:22 +0400)]
Update AUTHORS file

11 years agoStart of port to QNX
Kevin Tew [Thu, 29 Sep 2011 20:42:04 +0000 (14:42 -0600)]
Start of port to QNX
(Apply commit 5643815)

* include/private/gcconfig.h (I386, OS_TYPE, SA_RESTART, HEURISTIC1,
etext, DATASTART, _end, DATAEND, mach_type_known): Define for QNX.

11 years agoWorkaround 'ELF_DATA/EM_ALPHA redefined' warning in Android link.h
Ivan Maidanski [Mon, 11 Nov 2013 18:32:18 +0000 (22:32 +0400)]
Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android link.h
(revert part of commit a6e4ee9)

* dyn_load.c: Include asm/elf.h and linux/elf-em.h explicitly, and
undefine ELF_DATA and EM_ALPHA (if PLATFORM_ANDROID and
BIONIC_ELFDATA_REDEF_BUG are defined) to avoid "macro redefined"
warnings reported for link.h of Android Bionic.

11 years agoFix a typo in ChangeLog
Ivan Maidanski [Sun, 10 Nov 2013 15:44:03 +0000 (19:44 +0400)]
Fix a typo in ChangeLog

11 years agoUpdate ChangeLog file
Ivan Maidanski [Sun, 10 Nov 2013 13:31:08 +0000 (17:31 +0400)]
Update ChangeLog file

11 years agoFix dyn_load.c compilation for Android 4.3
Ivan Maidanski [Sat, 9 Nov 2013 07:56:35 +0000 (11:56 +0400)]
Fix dyn_load.c compilation for Android 4.3

* dyn_load.c (struct link_map, r_debug): Define explicitly (matching
that of Android 4.2 Bionic) instead of include linker.h (only if
PLATFORM_ANDROID); remove workaround enabled by
BIONIC_ELFDATA_REDEF_BUG regarding ELF_DATA redefinition (as linker.h
is not included); update comment.

11 years agoEliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
Ivan Maidanski [Sat, 9 Nov 2013 07:37:09 +0000 (11:37 +0400)]
Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth

* allchblk.c (GC_allochblk_nth): Replace "for" condition with
conditional "return" since otherwise GCC reports
"'hhdr' may be used uninitialized" warning in case of -O0 optimization
level; remove comment about bogus compiler warning; refine comment
for "thishdr" local variable.

11 years agoFix race in GC_print_all_errors regarding GC_leaked
Ivan Maidanski [Mon, 16 Sep 2013 04:50:49 +0000 (08:50 +0400)]
Fix race in GC_print_all_errors regarding GC_leaked

* reclaim.c (GC_add_leaked): Remove FIXME.
* reclaim.c (GC_print_all_errors): Declare n_leaked, leaked[] local
variables initialized from GC_[n_]leaked while holding the allocation
lock (reset GC_n_leaked and GC_leaked[] as well); add GC_ASSERT for
n_leaked; use [n_]leaked while printing leaked objects count and
pointers.
* reclaim.c (GC_print_all_errors): Acquire lock to reset
printing_errors.

11 years agoAdd weak attribute to avoid __data_start undefined messages (s390x)
Neale Ferguson [Thu, 9 May 2013 19:42:58 +0000 (15:42 -0400)]
Add weak attribute to avoid __data_start undefined messages (s390x)
(Apply commit 8d3e3ac from 'mono_libgc' branch.)

* include/private/gcconfig.h (__data_start, _end): Add "weak"
attribute for Linux/s390.

Conflicts:

    include/private/gcconfig.h

11 years agoMerge (dummy) remote-tracking branch 'pcpa/master'
Ivan Maidanski [Sun, 15 Sep 2013 13:26:14 +0000 (17:26 +0400)]
Merge (dummy) remote-tracking branch 'pcpa/master'

Conflicts:
    include/gc_mark.h
    include/private/gc_priv.h
    mark.c
    os_dep.c

11 years agoAdjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
Ivan Maidanski [Sun, 15 Sep 2013 11:04:35 +0000 (15:04 +0400)]
Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)

* misc.c (__pthread_register_cancel, __pthread_unregister_cancel):
Move prototypes to pthread_support.c.
* pthread_support.c (__pthread_unregister_cancel,
__pthread_unregister_cancel): Declare only if
PTHREAD_REGISTER_CANCEL_WEAK_STUBS defined.

11 years agoAdd weak stubs for pthread_cancel API.
Alex Rozenman [Sun, 2 Jun 2013 08:40:22 +0000 (11:40 +0300)]
Add weak stubs for pthread_cancel API.

11 years agoMerge (dummy) branch 'fnlz-requires-all-interior'
Ivan Maidanski [Sun, 15 Sep 2013 09:43:38 +0000 (13:43 +0400)]
Merge (dummy) branch 'fnlz-requires-all-interior'

11 years agoRevert "All interior pointers must be enabled for finalized allocation."
Ivan Maidanski [Sun, 15 Sep 2013 09:41:53 +0000 (13:41 +0400)]
Revert "All interior pointers must be enabled for finalized allocation."
(Ensuring all-interior-pointers mode is no longer needed.)

This reverts commit 97f113395e228567eec1f9105bccdd7d3db6c66e.

11 years agoMerge (dummy) remote-tracking branch 'paurkedal/t/thread_create_bug'
Ivan Maidanski [Sat, 14 Sep 2013 17:07:26 +0000 (21:07 +0400)]
Merge (dummy) remote-tracking branch 'paurkedal/t/thread_create_bug'

Conflicts:
    pthread_start.c
    pthread_support.c

11 years agoMerge (dummy) remote-tracking branch 'paurkedal/remove-disclaim-cd'
Ivan Maidanski [Sat, 14 Sep 2013 09:54:05 +0000 (13:54 +0400)]
Merge (dummy) remote-tracking branch 'paurkedal/remove-disclaim-cd'

Conflicts:
    include/private/gc_priv.h

11 years agoMerge (dummy) remote-tracking branch 'paurkedal/finalizer-at-end'
Ivan Maidanski [Sat, 14 Sep 2013 09:23:22 +0000 (13:23 +0400)]
Merge (dummy) remote-tracking branch 'paurkedal/finalizer-at-end'

Conflicts:
    fnlz_mlc.c
    tests/disclaim_test.c

11 years agoDetect dladdr() presence by configure
Ivan Maidanski [Sat, 14 Sep 2013 08:20:17 +0000 (12:20 +0400)]
Detect dladdr() presence by configure

* configure.ac (have_dladdr): Add check for "dladdr" presence.
* configure.ac (HAVE_DLADDR): New AC define based on have_dladdr.

11 years agoExplicitly specify that Darwin, Linux and Solaris platforms have dladdr()
Ivan Maidanski [Fri, 13 Sep 2013 19:33:32 +0000 (23:33 +0400)]
Explicitly specify that Darwin, Linux and Solaris platforms have dladdr()

* include/private/gcconfig.h (HAVE_DLADDR): Define also for DARWIN
(conditionally), LINUX and SOLARIS (conditionally).

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
(Apply commit a7a5666 from 'release-7_2' branch.)

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

Conflicts:

    include/private/gc_pmark.h

11 years agoMerge branch 'freebsd-ports-devel-boehm-gc-integrate'
Ivan Maidanski [Tue, 3 Sep 2013 20:32:48 +0000 (00:32 +0400)]
Merge branch 'freebsd-ports-devel-boehm-gc-integrate'

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)

11 years agoRename subthread_create to subthreadcreate_test (Makefile)
Ivan Maidanski [Mon, 2 Sep 2013 09:11:02 +0000 (13:11 +0400)]
Rename subthread_create to subthreadcreate_test (Makefile)

* tests/tests.am (TESTS, check_PROGRAMS, subthreadcreate_SOURCES,
subthreadcreate_test_LDADD): Rename "subthread_create" to
"subthreadcreate_test" (except for .c file).
* .gitignore: Likewise.