]> granicus.if.org Git - gc/log
gc
6 years agoFix typos in documentation (regarding 'non-incremental')
Ivan Maidanski [Thu, 4 Apr 2019 21:47:37 +0000 (00:47 +0300)]
Fix typos in documentation (regarding 'non-incremental')

* doc/gcdescr.md (Introduction): Fix typos ("non-incremental",
"this operation").
* mark.c (GC_collection_in_progress): Fix a typo in comment
("non-incremental").

6 years agoUpdate documentation about the incremental collector support
Ivan Maidanski [Thu, 4 Apr 2019 21:34:04 +0000 (00:34 +0300)]
Update documentation about the incremental collector support
(a cherry-pick of commit 5d4fd4de from 'master')

* doc/README.darwin (Important Usage Notes): Remove outdated note about
flaky incremental mode.
* doc/README.darwin (Implementation Information): Remove information
about old incremental collector implementation.
* doc/README.win32 (Watcom compiler): Refine information about the
incremental mode support.
* doc/scale.md (Options for enhanced scalability): Refine when the
dedicated marker threads are created.

6 years agoRefine GC_parallel documentation in gc.h
Ivan Maidanski [Wed, 3 Apr 2019 08:09:37 +0000 (11:09 +0300)]
Refine GC_parallel documentation in gc.h

* include/gc.h [GC_THREADS] (GC_parallel): Refine comment about the
case when it is non-zero.

6 years agoFix a typo (GC_NPROCS spelling) in a comment in gc.h
Ivan Maidanski [Wed, 3 Apr 2019 08:00:00 +0000 (11:00 +0300)]
Fix a typo (GC_NPROCS spelling) in a comment in gc.h

* include/gc.h [GC_THREADS] (GC_parallel): Fix a typo in comment
("GC_NPROCS").

6 years agoRemove a misleading comment about Solaris in gc.h
Ivan Maidanski [Wed, 3 Apr 2019 07:49:59 +0000 (10:49 +0300)]
Remove a misleading comment about Solaris in gc.h

* include/gc.h: Remove a comment about Solaris.

6 years agoFix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
Ivan Maidanski [Tue, 2 Apr 2019 20:11:41 +0000 (23:11 +0300)]
Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
(fix of commit 6c535e8d6)

* include/private/gcconfig.h [IA64 && CYGWIN32] (OS_TYPE, DATASTART,
DATAEND, STACK_GRAN, NEED_FIND_LIMIT, USE_MMAP_ANON): Do not define.
* include/private/gcconfig.h [X86_64 && CYGWIN32] (OS_TYPE): Define.
* include/private/gcconfig.h [X86_64 && CYGWIN32 && USE_MMAP]
(USE_MMAP_ANON): Define.

6 years agoAvoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
Ivan Maidanski [Mon, 1 Apr 2019 19:21:54 +0000 (22:21 +0300)]
Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED

Even if GC_DEBUG is defined, "d" argument of GC_CALLOC_EXPLICITLY_TYPED
and GC_MALLOC_EXPLICITLY_TYPED should be used anyway.

* include/gc_typed.h [GC_DEBUG] (GC_MALLOC_EXPLICITLY_TYPED,
GC_CALLOC_EXPLICITLY_TYPED): Cast d to void.

6 years agoUpdate ChangeLog file (v8.0 changes)
Ivan Maidanski [Wed, 27 Mar 2019 18:13:55 +0000 (21:13 +0300)]
Update ChangeLog file (v8.0 changes)

6 years agoUpdate ChangeLog file (v7.6 changes)
Ivan Maidanski [Wed, 27 Mar 2019 17:59:20 +0000 (20:59 +0300)]
Update ChangeLog file (v7.6 changes)
(a cherry-pick of commit 3b645a40 from 'release-7_6')

6 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Wed, 27 Mar 2019 17:44:00 +0000 (20:44 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)
(a cherry-pick of commit 0c7bb67e from 'release-7_4')

6 years agoFix printf format specifier in simple_example.md
Ivan Maidanski [Tue, 26 Mar 2019 20:09:49 +0000 (23:09 +0300)]
Fix printf format specifier in simple_example.md

* doc/simple_example.md (Writing the program): Adjust printf format
specifier to match the argument type.

6 years agowindows-untested: Update after include/gc_inl.h removal
Ivan Maidanski [Tue, 19 Mar 2019 19:46:30 +0000 (22:46 +0300)]
windows-untested: Update after include/gc_inl.h removal

6 years agoFix incorrect markup formatting in documentation
Ivan Maidanski [Mon, 25 Mar 2019 13:51:37 +0000 (16:51 +0300)]
Fix incorrect markup formatting in documentation

* doc/gcdescr.md (Mark phase): Terminate list at a proper sentence.
* doc/leak.md: Likewise.
* doc/scale.md (Performance): Fix markup table format.

6 years agoFix configure message about 'AIX gcc optimization fix'
Ivan Maidanski [Sun, 24 Mar 2019 09:03:01 +0000 (12:03 +0300)]
Fix configure message about 'AIX gcc optimization fix'

* configure.ac [$host=*aix*]: Update comment and AC_MSG_CHECKING
message to match the checked condition.

6 years agoRefine GC_INIT documentation about its multiple invocation
Ivan Maidanski [Sun, 24 Mar 2019 08:30:40 +0000 (11:30 +0300)]
Refine GC_INIT documentation about its multiple invocation

* include/gc.h (GC_INIT): Add comment about GC_INIT() multiple calls.

6 years agoFix various typos mostly in documentation files
Ivan Maidanski [Fri, 22 Mar 2019 07:04:52 +0000 (10:04 +0300)]
Fix various typos mostly in documentation files
(a cherry-pick of commit a558019b from 'master')

* OS2_MAKEFILE: Fix a typo in comment ("it is there").
* README.md: Fix typos ("is not", "gc_inline.h", "bytes from",
"processed").
* doc/README.OS2: Fix typos ("how", "linking").
* doc/README.amiga: Fix typos ("GC", "e.g.", "GC_*_typed", "i.e.",
"SMakefile.amiga", "communications").
* doc/README.cmake: Fix a typo ("go to").
* doc/README.ews4800: Fix a typo ("a unique").
* doc/README.solaris2: Fix a typo ("toolchain").
* doc/finalization.md: Fix incorrect number of markup '#' symbols to
denote H2 header.
* doc/overview.md: Likewise.
* doc/gcdescr.md: Fix typos ("collects", "then advances", "is not",
"treated by").
* doc/gcinterface.md: Fix typos ("Build it", "Allocates",
"deallocates", "forces", "Causes", "Replaces", "Registers",
"traceable_alloc", "single_client_traceable_alloc").
* doc/leak.md: Fix typos ("there is").
* doc/overview.md (Further reading): Replace "&" with "and".
* doc/porting.md: Add missing ")" symbol; add missing comma; fix typos
("region_start", "region_end", "collector's", "are needed",
"GC_save_callers").
* include/private/gc_priv.h: Fix a typo in comment ("gc_inline.h").
* os_dep.c [GWW_VDB] (detect_GetWriteWatch, GC_gww_read_dirty): Fix
abbreviation ("Win2K") in a comment.
* os_dep.c [MSWIN32] (GC_wnt): Likewise.
* os_dep.c [GWW_VDB] (GC_gww_read_dirty): Fix a typo in comment
("behavior").

6 years agoUpdate AUTHORS file (add Alaskan Emily)
Ivan Maidanski [Wed, 20 Mar 2019 07:31:49 +0000 (10:31 +0300)]
Update AUTHORS file (add Alaskan Emily)

6 years agoFix compiling by Makefile.direct on OpenBSD/UltraSparc
Alaskan Emily [Fri, 15 Mar 2019 04:07:13 +0000 (21:07 -0700)]
Fix compiling by Makefile.direct on OpenBSD/UltraSparc

Issue #269 (bdwgc).

* Makefile.direct (mach_dep.o): Remove sparc_sunos4_mach_dep.s
dependency.
* Makefile.direct [SPARC OPENBSD] (mach_dep.o): Use $CC instead of $AS;
compile sparc_mach_dep.S instead of sparc_sunos4_mach_dep.s.

6 years agoUpdate copyright information (year) in alloc.c and README.QUICK
Ivan Maidanski [Wed, 20 Mar 2019 06:57:40 +0000 (09:57 +0300)]
Update copyright information (year) in alloc.c and README.QUICK

* README.QUICK (Copyright): Update year (2018 to 2019).
* alloc.c (Copyright): Likewise.
* alloc.c (GC_copyright): Update copyright year.

6 years agoSupport MSYS builds by CMake
Ivan Maidanski [Wed, 20 Mar 2019 06:23:45 +0000 (09:23 +0300)]
Support MSYS builds by CMake

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.*]
(GC_THREADS, _REENTRANT): Define macro.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.*
&& enable_parallel_mark] (PARALLEL_MARK): Likewise.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.*
&& enable_thread_local_alloc] (THREAD_LOCAL_ALLOC): Likewise.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.*
&& enable_thread_local_alloc] (SRC): Add thread_local_alloc.c.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.*] (SRC):
Add win32_threads.c.

6 years agoUpdate AUTHORS file (add Peter Budai)
Ivan Maidanski [Wed, 20 Mar 2019 06:15:00 +0000 (09:15 +0300)]
Update AUTHORS file (add Peter Budai)

6 years agoSupport MSYS builds in configure
Peter Budai [Sat, 15 Sep 2018 09:35:20 +0000 (11:35 +0200)]
Support MSYS builds in configure

* configure.ac [$THREADS=pthreads && $host=*-*-msys*] (GC_THREADS,
_REENTRANT): Define AC macro.
* configure.ac [$THREADS=pthreads && $host=*-*-msys*]
(use_parallel_mark, use_thread_local_alloc, THREADDLLIBS,
win32_threads): Set variable.
* configure.ac [$host=*-*-msys*]: Do not AC_CHECK_LIB(dl).
* configure.ac [$GCC=yes && $enable_cplusplus=yes && $host=*-*-msys*
&& $SUPC!="libsupc++.a"] (CXXLIBS): Set variable.

6 years agoUpdate AUTHORS file (add Richard Zidlicky)
Ivan Maidanski [Tue, 19 Mar 2019 19:54:11 +0000 (22:54 +0300)]
Update AUTHORS file (add Richard Zidlicky)

6 years ago[8.0.4] v8.0.4
Ivan Maidanski [Sat, 2 Mar 2019 07:09:42 +0000 (10:09 +0300)]
[8.0.4]

Bump gc version to 8.0.4

* ChangeLog (8.0.4): Set release date.
* Makefile.am (LIBGC_VER_INFO): Increment revision (change version info
of libgc.so to 5:3:4).
* README.md: Bump micro version.
* configure.ac (AC_INIT): Likewise.
* include/gc_version.h (GC_TMP_VERSION_MICRO): Likewise.

6 years agoUpdate ChangeLog file (v8.0 changes)
Ivan Maidanski [Fri, 1 Mar 2019 21:47:38 +0000 (00:47 +0300)]
Update ChangeLog file (v8.0 changes)

6 years agoUpdate ChangeLog file (set v7.4.18 release date)
Ivan Maidanski [Fri, 1 Mar 2019 16:39:55 +0000 (19:39 +0300)]
Update ChangeLog file (set v7.4.18 release date)

6 years agoUpdate ChangeLog file (set v7.2n release date)
Ivan Maidanski [Fri, 1 Mar 2019 07:26:55 +0000 (10:26 +0300)]
Update ChangeLog file (set v7.2n release date)

6 years agoAvoid potential race in hb_sz access between realloc and reclaim_block
Ivan Maidanski [Tue, 26 Feb 2019 22:32:53 +0000 (01:32 +0300)]
Avoid potential race in hb_sz access between realloc and reclaim_block

Issue #240 (bdwgc).

GC_realloc might be changing the block size while GC_reclaim_block
is examining it.  The change to the size field is benign, i.e.
GC_reclaim would work correctly with either value, since we are not
changing the number of objects in the block.  But seeing a half-updated
value (though unlikely to occur in practice) could be probably bad.
Using unordered atomic fetch of hb_sz field should solve the issue.

* reclaim.c (GC_block_nearly_full, GC_reclaim_small_nonempty_block):
Add sz argument; use sz instead of hhdr->hb_sz.
* reclaim.c (GC_reclaim_clear, GC_reclaim_uninit, GC_reclaim_check):
Skip the assertion about hhdr->hb_sz if THREADS.
* reclaim.c [ENABLE_DISCLAIM] (GC_disclaim_and_reclaim): Likewise.
* reclaim.c [AO_HAVE_load] (GC_reclaim_block): Use AO_load to access
hhdr->hb_sz; add comments.
* reclaim.c (GC_reclaim_block): Pass sz to
GC_reclaim_small_nonempty_block() and GC_block_nearly_full().
* reclaim.c (GC_continue_reclaim, GC_reclaim_all): Pass hhdr->hb_sz to
GC_reclaim_small_nonempty_block().
* reclaim.c [!EAGER_SWEEP && ENABLE_DISCLAIM]
(GC_reclaim_unconditionally_marked): Likewise.

6 years agoFix 'duplicate symbol' error for tests using multiple static libs (OS X)
Ivan Maidanski [Tue, 26 Feb 2019 21:48:12 +0000 (00:48 +0300)]
Fix 'duplicate symbol' error for tests using multiple static libs (OS X)

Issue #263 (bdwgc).

If configured with --enable-static, libtool passes libgc.a to gcc
twice (with a relative path and with an absolute one) when linking
tests that depend on libcord.a, libgccpp.a or libstaticrootslib_test.a
which, in turn, depends on libgc.a.  Double specification of libgc.a
seems to confuse ld tool of MacOS 10.14.

The workaround is to omit libgc.la in *_LDADD specification of the
mentioned tests when the shared libraries are not requested, at least.

* configure.ac (ENABLE_SHARED): New AM_CONDITIONAL.
* cord/cord.am (cordtest_LDADD): Do not add libgc.la unless
ENABLE_SHARED; add comment.
* tests/tests.am (staticrootstest_LDADD): Likewise.
* tests/tests.am [CPLUSPLUS && !AVOID_CPP_LIB] (test_cpp_LDADD):
Likewise.

6 years agoAvoid a full GC when growing finalizer tables if in incremental mode
Jonas Echterhoff [Thu, 21 Feb 2019 10:49:16 +0000 (11:49 +0100)]
Avoid a full GC when growing finalizer tables if in incremental mode
(a cherry-pick of commits 6e0590ef1c23bad10a from 'master')

Issue Unity-Technologies#37 (bdwgc).

* finalize.c (GC_grow_table): Do not call GC_try_to_collect_inner
if GC_incremental; add comment.
* tests/test_cpp.cc (C::Test): Call GC_gcollect() if incremental mode
and nFreed is too low.

6 years ago.gitignore: Ignore /out folder
Ivan Maidanski [Tue, 26 Feb 2019 20:11:29 +0000 (23:11 +0300)]
.gitignore: Ignore /out folder

6 years agoUpdate ChangeLog file (v8.0 changes)
Ivan Maidanski [Sun, 17 Feb 2019 17:09:02 +0000 (20:09 +0300)]
Update ChangeLog file (v8.0 changes)

6 years agoUpdate ChangeLog file (v7.6 changes)
Ivan Maidanski [Sun, 17 Feb 2019 16:53:15 +0000 (19:53 +0300)]
Update ChangeLog file (v7.6 changes)
(a cherry-pick of commit 1d3beb1c from 'release-7_6')

6 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Sat, 16 Feb 2019 22:49:24 +0000 (01:49 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)
(a cherry-pick of commit dd4558f0 from 'release-7_4')

6 years agoAvoid unexpected heap growth in gctest caused by GC_disable
Ivan Maidanski [Fri, 15 Feb 2019 20:40:49 +0000 (23:40 +0300)]
Avoid unexpected heap growth in gctest caused by GC_disable
(fix of commit 8fc1ebf6d)

Issue #264 (bdwgc).

This commit eliminates the scenario when one thread disables garbage
collections while other threads intensively allocate memory objects.

* tests/test.c (run_one_test): Do not call GC_disable and GC_enable.
* tests/test.c (run_single_threaded_test): New function (which tests
GC_disable and GC_enable).
* tests/test.c (main): Call run_single_threaded_test() (before
check_heap_stats).

6 years agoAppVeyor CI: Fix 'no source or binary dir provided' cmake error
Ivan Maidanski [Fri, 15 Feb 2019 20:22:58 +0000 (23:22 +0300)]
AppVeyor CI: Fix 'no source or binary dir provided' cmake error

The error is fixed by passing "." argument to cmake.

6 years agoFix thread_info() count argument value (OS X)
Ivan Maidanski [Thu, 14 Feb 2019 19:55:20 +0000 (22:55 +0300)]
Fix thread_info() count argument value (OS X)

* darwin_stop_world.c [DEBUG_THREADS || GC_ASSERTIONS]
(GC_thread_resume): Set outCount to THREAD_BASIC_INFO_COUNT (instead
of THREAD_INFO_MAX) to match the size of info passed to thread_info().

6 years agoFix 'wrong __data_start/_end pair' error on Android
Ivan Maidanski [Wed, 13 Feb 2019 22:06:26 +0000 (01:06 +0300)]
Fix 'wrong __data_start/_end pair' error on Android
(a cherry-pick of commit e1ef3b22 from 'master')

Issue #259 (bdwgc).

* include/gc.h [(HOST_ANDROID || __ANDROID__)
&& IGNORE_DYNAMIC_LOADING] (_etext, __data_start, __end__, _end): Do
not declare weak symbols.
* os_dep.c [SEARCH_FOR_DATA_START && (LINUX || HURD) && HOST_ANDROID]
(etext, __dso_handle): Likewise.
* include/gc.h [(HOST_ANDROID || __ANDROID__)
&& IGNORE_DYNAMIC_LOADING] (GC_find_limit): Declare function as public.
* include/gc.h [(HOST_ANDROID || __ANDROID__)
&& IGNORE_DYNAMIC_LOADING] (GC_INIT_CONF_ROOTS): Update comment;
do not use _etext, __data_start, __end__, _end symbols; use
GC_find_limit(__dso_handle,1) as the end of the added GC data root.
* include/private/gc_priv.h [SEARCH_FOR_DATA_START
|| NETBSD && __ELF__] (GC_find_limit): Change ptr_t type to void*,
GC_bool to int.
* include/private/gcconfig.h [(SPARC || ALPHA) && FREEBSD]
(GC_find_limit): Likewise.
* os_dep.c [NEED_FIND_LIMIT || USE_PROC_FOR_LIBRARIES] (GC_find_limit):
Likewise.
* include/private/gcconfig.h [(SPARC || ALPHA) && FREEBSD]
(DATAEND): Cast the result to ptr_t.
* include/private/gcconfig.h [AARCH64 && LINUX && HOST_ANDROID]
(SEARCH_FOR_DATA_START): Remove outdated comment about __data_start.
* os_dep.c [SEARCH_FOR_DATA_START && (LINUX || HURD)
&& !IGNORE_PROG_DATA_START && HOST_ANDROID]
(GC_init_linux_data_start): Do not compare __dso_handle to _etext and
do not use __dso_handle as data start.
* os_dep.c [SEARCH_FOR_DATA_START] (GC_init_linux_data_start): Cast the
result of GC_find_limit() to ptr_t.
* os_dep.c [NETBSD && __ELF__] (GC_init_netbsd_elf): Likewise.
* os_dep.c [LINUX_STACKBOTTOM && IA64] (GC_get_register_stack_base):
Likewise.
* os_dep.c [!AMIGA && !HAIKU && !OS2 && !MSWIN32 && !MSWINCE
&& !CYGWIN32 && !GC_OPENBSD_THREADS && (!GC_SOLARIS_THREADS
|| _STRICT_STDC)] (GC_get_main_stack_base): Likewise.
* os_dep.c [DATASTART_USES_BSDGETDATASTART] (GC_FreeBSDGetDataStart):
Likewise.

6 years agoFix GetThreadContext stale register values use if WoW64 (Win32)
Hamayama [Thu, 7 Feb 2019 21:51:25 +0000 (00:51 +0300)]
Fix GetThreadContext stale register values use if WoW64 (Win32)

Issue #262 (bdwgc).

* misc.c [MSWIN32 && !MSWINRT_FLAVOR && !MSWIN_XBOX1]
(GC_win32_MessageBoxA): Do not define unless SMALL_CONFIG.
* misc.c [MSWIN32 && !_WIN64 && GC_WIN32_THREADS && CHECK_NOT_WOW64]
(GC_init): Do not call IsWow64Process() and GC_win32_MessageBoxA().
* win32_threads.c [I386] (isWow64): New static variable.
* win32_threads.c [I386] (GC_push_stack_for): If isWow64 then set also
CONTEXT_EXCEPTION_REQUEST and CONTEXT_SEGMENTS bits in ContextFlags;
if isWow64, and CONTEXT_EXCEPTION_REPORTING and
CONTEXT_EXCEPTION_ACTIVE are set on return from GetThreadContext then
call GetThreadSelectorEntry and use StackLimit of FS selector to set
sp local variable (instead of context.Esp); add comment.
* win32_threads.c [I386 && DEBUG_THREADS] (GC_push_stack_for): Call
GC_log_printf() to report TIB stack limit/base and the case when
CONTEXT_EXCEPTION_REQUEST is not supported.
* win32_threads.c [I386] (GC_thr_init): Set isWow64 by IsWow64Process()
if the later is available.

6 years agoFix 'undefined reference to __data_start' linker error (Android/aarch64)
Ivan Maidanski [Fri, 25 Jan 2019 07:44:25 +0000 (10:44 +0300)]
Fix 'undefined reference to __data_start' linker error (Android/aarch64)

As of NDK r18b, __data_start symbol is only provided by bfd linker.

* include/private/gcconfig.h [AARCH64 && LINUX && HOST_ANDROID]
(__data_start): Do not declare extern variable.
* include/private/gcconfig.h [AARCH64 && LINUX && HOST_ANDROID]
(SEARCH_FOR_DATA_START): Define (instead of DATASTART); add comment.

6 years agoWorkaround 'wrong __data_start/_end' if __end__ is incorrect (Android)
Ivan Maidanski [Thu, 24 Jan 2019 21:54:18 +0000 (00:54 +0300)]
Workaround 'wrong __data_start/_end' if __end__ is incorrect (Android)

Issue #259 (bdwgc).

To prevent use of __end__ symbol, "-D BROKEN_UUENDUU_SYM" should be
passed to CFLAGS.

* include/private/gcconfig.h [HOST_ANDROID && __clang__] (DATAEND):
Do not redefine to __end__ if BROKEN_UUENDUU_SYM.

6 years agoFix 'unexpected mark stack overflow' abort in push_all_stack
Ivan Maidanski [Mon, 21 Jan 2019 22:01:45 +0000 (01:01 +0300)]
Fix 'unexpected mark stack overflow' abort in push_all_stack

Issue #260 (bdwgc).

* mark.c [!NEED_FIXUP_POINTER] (GC_push_all_stack): Call
GC_push_all_eager() instead of GC_push_all() if GC_mark_stack_top is
rather close to GC_mark_stack_limit.

6 years agoTravis CI: Test with -D BSD_TIME passed to CFLAGS
Ivan Maidanski [Sat, 5 Jan 2019 08:56:58 +0000 (11:56 +0300)]
Travis CI: Test with -D BSD_TIME passed to CFLAGS

6 years agoEnsure result of every variant of MS_TIME_DIFF has unsigned long type
Ivan Maidanski [Fri, 4 Jan 2019 16:55:34 +0000 (19:55 +0300)]
Ensure result of every variant of MS_TIME_DIFF has unsigned long type
(code refactoring)

Previously, MS_TIME_DIFF had the result of long type for Nintendo and
Win32 targets.

* include/private/gc_priv.h [!NO_CLOCK && BSD_TIME] (MS_TIME_DIFF): Add
comment.
* include/private/gc_priv.h [!NO_CLOCK && !BSD_TIME && (MSWIN32
|| MSWINCE || NN_PLATFORM_CTR)] (MS_TIME_DIFF): Cast result to
unsigned long (instead of long).

6 years agoFix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
Ivan Maidanski [Fri, 4 Jan 2019 16:37:50 +0000 (19:37 +0300)]
Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
(fix of commit 6b2796b69)

* include/private/gc_priv.h [!NO_CLOCK && BSD_TIME] (MS_TIME_DIFF):
Cast the result of a.tv_usec-b.tv_usec to long (so that the result of
the division should be negative if a.tv_usec is less than b.tv_usec).

6 years agoFix invalid initializer of CLOCK_TYPE variables if BSD_TIME
Ivan Maidanski [Sat, 5 Jan 2019 08:52:53 +0000 (11:52 +0300)]
Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
(fix of commits 7e59301c106ecaefca)

* alloc.c [!NO_CLOCK] (GC_start_time): Initialize to
CLOCK_TYPE_INITIALIZER (instead of 0).
* alloc.c [!NO_CLOCK] (GC_try_to_collect_inner, GC_stopped_mark,
GC_finish_collection): Initialize local variable of CLOCK_TYPE type to
CLOCK_TYPE_INITIALIZER (instead of 0); remove comment (duplicating that
in gc_priv.h).
* reclaim.c [!NO_CLOCK] (GC_reclaim_all): Likewise.
* include/private/gc_priv.h [!NO_CLOCK] (CLOCK_TYPE_INITIALIZER):
Define macro.

6 years agoSupport de_win.c compilation by Makefile.direct (cord/de)
Ivan Maidanski [Thu, 27 Dec 2018 09:03:29 +0000 (12:03 +0300)]
Support de_win.c compilation by Makefile.direct (cord/de)

* Makefile.direct (cord/de): Add dependency on de_win.c and de_win.h;
compile cord/tests/de_win.c (in case of if_not_there case).
* cord/tests/de_win.c [!__BORLANDC__ && !__CYGWIN__ && !__MINGW32__
&& !__NT__ && !_WIN32 && !WIN32]: Skip the whole file (compile
"extern int GC_quiet" instead).

6 years agoAvoid test.o rebuild on tests folder timestamp change (Makefile.direct)
Ivan Maidanski [Thu, 27 Dec 2018 08:36:15 +0000 (11:36 +0300)]
Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)

* Makefile.direct (tests/test.o): Remove dependency on "tests" target;
execute "mkdir tests".
* Makefile.direct (tests): Remove target.

6 years ago[8.0.2] v8.0.2
Ivan Maidanski [Sun, 23 Dec 2018 20:10:08 +0000 (23:10 +0300)]
[8.0.2]

Bump gc version to 8.0.2

* ChangeLog (8.0.2): Set release date.
* Makefile.am (LIBGC_VER_INFO): Increment revision (change version info
of libgc.so to 5:2:4).
* README.md: Bump micro version.
* configure.ac (AC_INIT): Likewise.
* include/gc_version.h (GC_TMP_VERSION_MICRO): Likewise.
* README.md: Remove "experimental release" note.

6 years agoUpdate ChangeLog file (v8.0 changes)
Ivan Maidanski [Sun, 23 Dec 2018 08:56:50 +0000 (11:56 +0300)]
Update ChangeLog file (v8.0 changes)

6 years agoTurn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
Ivan Maidanski [Sun, 23 Dec 2018 07:50:15 +0000 (10:50 +0300)]
Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct

* BCC_MAKEFILE (defines): Add -D USE_MUNMAP.
* NT_MAKEFILE (CFLAGS_DEFAULT): Likewise.
* WCC_MAKEFILE [MSWIN32] (DEFS): Likewise.
* digimars.mak (DEFINES): Likewise.
* Makefile.direct (CFLAGS): Add -D USE_MMAP -D USE_MUNMAP.

6 years agoDocument HANDLE_FORK macro optional usage in Makefile.direct
Ivan Maidanski [Sat, 22 Dec 2018 18:55:17 +0000 (21:55 +0300)]
Document HANDLE_FORK macro optional usage in Makefile.direct

* Makefile.direct (CFLAGS): Add comment about -D HANDLE_FORK.

6 years agoDo not prevent GC from looking at environment variables (BCC_MAKEFILE)
Ivan Maidanski [Sat, 22 Dec 2018 18:49:22 +0000 (21:49 +0300)]
Do not prevent GC from looking at environment variables (BCC_MAKEFILE)

* BCC_MAKEFILE (defines): Remove -D NO_GETENV.

6 years agoTurn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
Ivan Maidanski [Sat, 22 Dec 2018 18:27:19 +0000 (21:27 +0300)]
Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles

* BCC_MAKEFILE (defines): Add -D GC_GCJ_SUPPORT.
* Makefile.direct (CFLAGS): Likewise.
* OS2_MAKEFILE (CFLAGS): Likewise.
* WCC_MAKEFILE (DEFS): Likewise.
* digimars.mak (DEFINES): Likewise.
* BCC_MAKEFILE (XXXOBJS): Add XXXgcj_mlc.obj.
* NT_MAKEFILE (CFLAGS_DEFAULT): New variable (value copied from .c.obj);
add -D GC_GCJ_SUPPORT.
* NT_MAKEFILE (OBJS): Add gcj_mlc.obj.
* OS2_MAKEFILE (OBJS): Likewise.
* WCC_MAKEFILE (OBJS): Likewise.
* digimars.mak (OBJS): Likewise.
* NT_MAKEFILE (.c.obj, .cpp.obj): Use CFLAGS_DEFAULT variable.

6 years agoAbort with appropriate message if executable pages cannot be allocated
Ivan Maidanski [Thu, 20 Dec 2018 23:33:49 +0000 (02:33 +0300)]
Abort with appropriate message if executable pages cannot be allocated

This may happen e.g. if PaX MPROTECT feature is enabled.

* os_dep.c [!OS2 && !PCR && !AMIGA && !USE_WINALLOC && !MACOS
&& !DOS4GW && !NONSTOP && !SN_TARGET_PSP2 && !RTEMS && !__CC_ARM
&& MMAP_SUPPORTED] (GC_unix_mmap_get_mem): Treat result==MAP_FAILED as
unlikely; if the first mmap call returns MAP_FAILED then ABORT with the
appropriate message if GC_pages_executable (and errno is EACCES).

6 years agoAllow to force executable pages allocation in gctest
Ivan Maidanski [Thu, 20 Dec 2018 08:34:12 +0000 (11:34 +0300)]
Allow to force executable pages allocation in gctest

Pass -D TEST_PAGES_EXECUTABLE to CFLAGS to enable the executable pages
allocation in gctest even if the collector is compiled with
NO_EXECUTE_PERMISSION.

* tests/test.c (INIT_PAGES_EXECUTABLE): New macro (calls
GC_set_pages_executable(1) if TEST_PAGES_EXECUTABLE).
* tests/test.c (GC_COND_INIT): Call INIT_PAGES_EXECUTABLE (before
GC_OPT_INIT).
* tests/test.c [!PCR && !GC_WIN32_THREADS && !GC_PTHREADS && CPPCHECK]
(main): Remove UNTESTED(GC_set_pages_executable).

6 years agoDefine GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
Ivan Maidanski [Tue, 18 Dec 2018 23:17:58 +0000 (02:17 +0300)]
Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts

This matches the policy of configure and CMakeLists.txt.

* BCC_MAKEFILE (defines): Add -D GC_ATOMIC_UNCOLLECTABLE.
* NT_MAKEFILE (.cpp.obj): Likewise.
* Makefile.direct (CFLAGS): Add -D JAVA_FINALIZATION; reorder options.
* NT_MAKEFILE (.c.obj): Add -D GC_ATOMIC_UNCOLLECTABLE
-D JAVA_FINALIZATION.
* OS2_MAKEFILE (CFLAGS): Likewise.
* WCC_MAKEFILE (DEFS): Likewise.
* build/s60v3/libgc.mmp: Likewise.
* digimars.mak (DEFINES): Likewise.
* gc.mak [$CFG=="gc - Win32 Release" || $CFG=="gc - Win32 Debug"]
(CPP_PROJ): Likewise.
* NT_MAKEFILE (.cpp.obj): Remove redundant -I $(AO_INCLUDE_DIR)
-D ALL_INTERIOR_POINTERS.

6 years agoDo not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
Ivan Maidanski [Wed, 5 Dec 2018 22:47:19 +0000 (01:47 +0300)]
Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
(code refactoring of commits 272283d5bd6c7ee31d2178db2b6)

* include/private/gc_priv.h [THREADS && !NN_PLATFORM_CTR
&& !SN_TARGET_ORBIS && !SN_TARGET_PSP2 && !AO_HAVE_compiler_barrier]
(AO_HAVE_compiler_barrier): Define private macro (after include
gc_atomic_ops.h).
* mark.c [!BASE_ATOMIC_OPS_EMULATED] (GC_noop6): Call
AO_compiler_barrier() only if AO_HAVE_compiler_barrier.
* pthread_support.c [(USE_SPIN_LOCK || !NO_PTHREAD_TRYLOCK)
&& !BASE_ATOMIC_OPS_EMULATED] (GC_pause): Likewise.
* tests/test.c (AO_t): Define only if AO_HAVE_compiler_barrier is not
defined.

6 years agoDo not use 'ifndef AO_CLEAR' in disclaim_weakmap_test
Ivan Maidanski [Wed, 5 Dec 2018 22:02:30 +0000 (01:02 +0300)]
Do not use 'ifndef AO_CLEAR' in disclaim_weakmap_test
(code refactoring of commit 95e074727)

* tests/disclaim_weakmap_test.c [!GC_PTHREADS] (AO_t): Define (as
GC_word).
* tests/disclaim_weakmap_test.c (AO_t): Do not check whether AO_CLEAR
is defined; remove comment.

6 years agoEliminate 'assigned value never used' compiler warning in test_cpp WinMain
Ivan Maidanski [Thu, 6 Dec 2018 08:23:52 +0000 (11:23 +0300)]
Eliminate 'assigned value never used' compiler warning in test_cpp WinMain

* tests/test_cpp.cc [(MSWIN32 && !__MINGW32__ || MSWINCE)
&& !NO_WINMAIN_ENTRY] (WinMain): Remove first argv[argc]=cmd (when cmd
points to a space or tab character).

6 years agoUpdate NO_EXECUTE_PERMISSION documentation
Ivan Maidanski [Tue, 18 Dec 2018 23:28:21 +0000 (02:28 +0300)]
Update NO_EXECUTE_PERMISSION documentation

* doc/README.macros (NO_EXECUTE_PERMISSION): Update and refine the
documentation (e.g. mention memory unmapping).

6 years agoDefault to non-executable memory allocation across all make scripts
Ivan Maidanski [Tue, 18 Dec 2018 21:48:13 +0000 (00:48 +0300)]
Default to non-executable memory allocation across all make scripts

This matches the policy of Makefile.direct, configure and CMakeLists.txt.

* BCC_MAKEFILE (defines): Add -D NO_EXECUTE_PERMISSION.
* NT_MAKEFILE (.c.obj): Likewise.
* OS2_MAKEFILE (CFLAGS): Likewise.
* WCC_MAKEFILE (DEFS): Likewise.
* digimars.mak (DEFINES): Likewise.
* gc.mak [$CFG=="gc - Win32 Release" || $CFG=="gc - Win32 Debug"]
(CPP_PROJ): Likewise.

6 years agoFix executable memory allocation in GC_unix_get_mem
Ivan Maidanski [Thu, 20 Dec 2018 08:12:06 +0000 (11:12 +0300)]
Fix executable memory allocation in GC_unix_get_mem

Previously, sbrk() was used for the memory allocation even if the
executable pages were requested.

* os_dep.c [!OS2 && !PCR && !AMIGA && !USE_WINALLOC && !MACOS
&& !DOS4GW && !NONSTOP && !SN_TARGET_PSP2 && !RTEMS && !__CC_ARM
&& MMAP_SUPPORTED] (GC_unix_get_mem): Do not call GC_unix_sbrk_get_mem
if GC_pages_executable; add comment.

6 years agoFix 'mprotect remapping failed' abort on NetBSD with PaX enabled
Ivan Maidanski [Thu, 20 Dec 2018 21:54:55 +0000 (00:54 +0300)]
Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled

Issue #255 (bdwgc).

Without this patch, GC_remap() works on NetBSD which has the PaX feature
only if PaX MPROTECT is off (sysctl -w security.pax.mprotect.enabled=0).

* os_dep.c [USE_MUNMAP && !USE_WINALLOC && NETBSD] (GC_remap): Call
mmap() instead of mprotect().

6 years agoTravis CI: Remove testing with TSan in release-8_0 branch
Ivan Maidanski [Fri, 14 Dec 2018 07:19:38 +0000 (10:19 +0300)]
Travis CI: Remove testing with TSan in release-8_0 branch

Currently, sanitized gctest may fail because of some known race.

6 years agoUpdate ChangeLog file (set v7.6.10 release date)
Ivan Maidanski [Thu, 13 Dec 2018 06:47:35 +0000 (09:47 +0300)]
Update ChangeLog file (set v7.6.10 release date)

6 years agoUpdate ChangeLog file (set v7.4.16 release date)
Ivan Maidanski [Thu, 13 Dec 2018 05:57:24 +0000 (08:57 +0300)]
Update ChangeLog file (set v7.4.16 release date)

6 years agoUpdate ChangeLog file (set v7.2m release date)
Ivan Maidanski [Tue, 11 Dec 2018 19:46:20 +0000 (22:46 +0300)]
Update ChangeLog file (set v7.2m release date)

6 years agoUpdate ChangeLog file (v8.0 changes)
Ivan Maidanski [Tue, 4 Dec 2018 09:06:26 +0000 (12:06 +0300)]
Update ChangeLog file (v8.0 changes)

6 years agoUpdate ChangeLog file (v7.6 changes)
Ivan Maidanski [Tue, 4 Dec 2018 08:42:54 +0000 (11:42 +0300)]
Update ChangeLog file (v7.6 changes)

6 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Mon, 3 Dec 2018 22:40:03 +0000 (01:40 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

6 years agoRefine HIDE_POINTER documentation for the case of the leak-finding mode
Ivan Maidanski [Thu, 29 Nov 2018 09:04:07 +0000 (12:04 +0300)]
Refine HIDE_POINTER documentation for the case of the leak-finding mode

* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Refine comment
(warn about usage in the leak-finding mode).

6 years agoTravis CI: Pass extra/gc.c to cppcheck --enable=unusedFunction
Ivan Maidanski [Wed, 28 Nov 2018 09:09:59 +0000 (12:09 +0300)]
Travis CI: Pass extra/gc.c to cppcheck --enable=unusedFunction
(a cherry-pick of commit 53aa42b3 from 'master')

This fixes a dozen of 'the function is never used' cppcheck style
warnings (for GC_core_gcj_malloc, GC_durango_get_mem,
GC_FreeBSDGetDataStart, GC_haiku_get_mem, GC_mprotect_resume,
GC_mprotect_stop, GC_remove_roots_subregion, GC_win32_get_mem,
GC_wince_get_mem).

6 years agoPrefix internal durango_get_mem symbol with 'GC_'
Ivan Maidanski [Wed, 28 Nov 2018 09:03:04 +0000 (12:03 +0300)]
Prefix internal durango_get_mem symbol with 'GC_'
(code refactoring of commit d16debf3e)

Issue #173 (bdwgc).

* include/private/gcconfig.h [MSWIN_XBOX1] (durango_get_mem): Rename
to GC_durango_get_mem; change return type from void* to ptr_t; remove
page_size argument.
* os_dep.c [MSWIN_XBOX1] (durango_get_mem): Likewise.
* include/private/gcconfig.h [MSWIN_XBOX1] (GET_MEM): Use
GC_durango_get_mem (instead of durango_get_mem).

6 years agoAdd test using disclaim notifiers to implement a weak map
Petter Urkedal [Mon, 8 Oct 2018 18:40:58 +0000 (20:40 +0200)]
Add test using disclaim notifiers to implement a weak map
(a cherry-pick of commits 0cc2c0eebb8b8c6eba42195e074720cfa75,
0592da8302fb24 from 'master')

Issue #239 (bdwgc).

disclaim_weakmap_test is added.

* README.md (Copyright & Warranty): Add copyright information about
disclaim_weakmap_test.c file.
* tests/disclaim_weakmap_test.c: New file.
* tests/tests.am (TESTS, check_PROGRAMS): Add
disclaim_weakmap_test.
* tests/tests.am (disclaim_weakmap_test_SOURCES,
disclaim_weakmap_test_LDADD): Define.

6 years agoFix GC_register_disclaim_proc for leak-finding mode
Ivan Maidanski [Thu, 29 Nov 2018 08:46:48 +0000 (11:46 +0300)]
Fix GC_register_disclaim_proc for leak-finding mode

Issue #252 (bdwgc).

This makes the behavior of GC_register_disclaim_proc() and
GC_finalized_malloc() somewhat consistent with
GC_register_disappearing_link() and GC_register_finalizer() when
find-leak is on.  The documentation is updated accordingly.

* fnlz_mlc.c [ENABLE_DISCLAIM] (GC_finalized_disclaim): Add assertion
that GC_find_leak is off.
* fnlz_mlc.c [ENABLE_DISCLAIM] (GC_register_disclaim_proc): Do not
assign ok_disclaim_proc, ok_mark_unconditionally fields if GC_find_leak.
* include/gc_disclaim.h (GC_register_disclaim_proc,
GC_finalized_malloc): Refine comment about leak-find mode and GC_free
invocation.

6 years agoTravis CI: Test with -D TEST_WITH_SYSTEM_MALLOC passed to CFLAGS
Ivan Maidanski [Fri, 23 Nov 2018 18:41:07 +0000 (21:41 +0300)]
Travis CI: Test with -D TEST_WITH_SYSTEM_MALLOC passed to CFLAGS

6 years agoTravis CI: Use latest (1.85) release version of cppcheck
Ivan Maidanski [Tue, 27 Nov 2018 08:16:51 +0000 (11:16 +0300)]
Travis CI: Use latest (1.85) release version of cppcheck

6 years agoTravis CI: Pass -D GC_BUILTIN_ATOMIC to cppcheck, remove --quiet flag
Ivan Maidanski [Thu, 22 Nov 2018 13:39:52 +0000 (16:39 +0300)]
Travis CI: Pass -D GC_BUILTIN_ATOMIC to cppcheck, remove --quiet flag
(back-port of commit 1d7cf245b from 'master')

6 years agoTravis CI: Execute cppcheck without sudo and -U long
Ivan Maidanski [Thu, 8 Nov 2018 09:22:04 +0000 (12:22 +0300)]
Travis CI: Execute cppcheck without sudo and -U long

6 years agoWorkaround 'value of _MAX_PATH is unknown' cppcheck warning
Ivan Maidanski [Thu, 22 Nov 2018 05:29:31 +0000 (08:29 +0300)]
Workaround 'value of _MAX_PATH is unknown' cppcheck warning

* include/private/gcconfig.h [CPPCHECK] (_MAX_PATH): Undefine.

6 years agoWorkaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
Ivan Maidanski [Wed, 14 Nov 2018 08:02:01 +0000 (11:02 +0300)]
Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
(a cherry-pick of commits 85422f322b7fe6 from 'master')

Also, this commit adjusts the workaround for FIXUP_POINTER.

* include/private/gcconfig.h [CPPCHECK] (CLOCKS_PER_SEC, FIXUP_POINTER,
POINTER_MASK, POINTER_SHIFT, REDIRECT_REALLOC): Undefine.
* include/private/gcconfig.h [!FIXUP_POINTER && POINTER_MASK]
(FIXUP_POINTER): Same definition regardless of CPPCHECK.

6 years agoWorkaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
Ivan Maidanski [Fri, 9 Nov 2018 08:35:37 +0000 (11:35 +0300)]
Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some

Cppcheck does not support GNU-specific "&&label" syntax currently.

* mark.c [WRAP_MARK_SOME && (MSWIN32 || MSWINCE) && __GNUC__
&& !GC_GNUC_PREREQ(4,7) && !GC_CLANG_PREREQ(3,3)] (GC_mark_some): Skip
"er.alt_path=&&handle_ex" statement if CPPCHECK.

6 years agoWorkaround 'GC_dump function is never used' cppcheck warning
Ivan Maidanski [Fri, 23 Nov 2018 08:57:29 +0000 (11:57 +0300)]
Workaround 'GC_dump function is never used' cppcheck warning

* tests/test.c [!PCR && !GC_WIN32_THREADS && !GC_PTHREADS && CPPCHECK
&& !NO_DEBUGGING] (main): Add UNTESTED(GC_dump).

6 years agoEliminate 'function is never used' cppcheck warning for calloc/realloc
Ivan Maidanski [Fri, 23 Nov 2018 18:36:20 +0000 (21:36 +0300)]
Eliminate 'function is never used' cppcheck warning for calloc/realloc

* tests/test.c [TEST_WITH_SYSTEM_MALLOC] (run_one_test): Call calloc(),
realloc() and free().

6 years agoAdd initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
Ivan Maidanski [Fri, 23 Nov 2018 11:42:57 +0000 (14:42 +0300)]
Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE

* tests/test.c (run_one_test): Call GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(),
GC_disable(), GC_MALLOC_IGNORE_OFF_PAGE(), GC_enable().

6 years agoRemove strlen calls with a constant string argument in msvc_dbg
Ivan Maidanski [Wed, 7 Nov 2018 07:00:21 +0000 (10:00 +0300)]
Remove strlen calls with a constant string argument in msvc_dbg
(code refactoring)

* extra/msvc_dbg.c (GetDescriptionFromAddress): Replace
strlen(<literal_str>) to sizeof(<literal_str>)-1.

6 years agoWorkaround 'nonlocal var will use ptr to local var' cppcheck false positive
Ivan Maidanski [Thu, 22 Nov 2018 11:34:03 +0000 (14:34 +0300)]
Workaround 'nonlocal var will use ptr to local var' cppcheck false positive

* extra/msvc_dbg.c (sym_namebuf_u): New union type.
* extra/msvc_dbg.c (GetSymbolNameFromAddress): Use sym_namebuf_u
instead of anonymous union.
* os_dep.c [MPROTECT_VDB && DARWIN] (mp_reply_s, mp_msg_s): Move struct
type definition out of GC_mprotect_thread (adding mp_ prefix).

6 years agoEliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
Ivan Maidanski [Fri, 9 Nov 2018 17:08:20 +0000 (20:08 +0300)]
Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep

* mach_dep.c (GC_with_callee_saves_pushed): Change type of "context"
local variable from void* volatile to volatile ptr_t.
* os_dep.c [(SVR4 || AIX || DGUX || (LINUX && SPARC)) && !PCR]
(GC_SysVGetDataStart): Change type of "result" local variable from
char* volatile to volatile ptr_t.

6 years agoWorkaround 'local variable obj_displ shadows outer symbol' cppcheck warning
Ivan Maidanski [Fri, 9 Nov 2018 08:14:02 +0000 (11:14 +0300)]
Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
(fix of commit 8d64dbd10)

* include/private/gc_pmark.h [MARK_BIT_PER_OBJ] (GC_push_contents_hdr):
Do not declare obj_displ if MARK_BIT_PER_GRANULE.

6 years agoWorkaround 'local variable end shadows outer symbol' cppcheck warnings
Ivan Maidanski [Fri, 9 Nov 2018 07:35:36 +0000 (10:35 +0300)]
Workaround 'local variable end shadows outer symbol' cppcheck warnings

* include/private/gcconfig.h [SPARC && FREEBSD] (end): Do not declare
external variable if CPPCHECK.
* include/private/gcconfig.h [MIPS && EWS4800 && (!_MIPS_SZPTR
|| _MIPS_SZPTR!=64)] (end): Likewise.
* include/private/gcconfig.h [ALPHA && FREEBSD] (end): Likewise.
* include/private/gcconfig.h [!DATAEND] (end): Likewise.
* include/private/gcconfig.h [I386 && RTEMS] (end): Do not declare
(because it automatically declared in DATAEND is undefined).
* include/private/gcconfig.h [I386 && RTEMS] (DATAEND): Do not define.
* include/private/gcconfig.h [MIPS && EWS4800]: Adjust indentation.

6 years agoAppveyor CI: Use 'make check-without-test-driver' for Cygwin
Ivan Maidanski [Thu, 15 Nov 2018 21:30:37 +0000 (00:30 +0300)]
Appveyor CI: Use 'make check-without-test-driver' for Cygwin

6 years agoAppveyor CI: Test with cygwin (32-bit) configuration
Ivan Maidanski [Sun, 4 Nov 2018 09:10:40 +0000 (12:10 +0300)]
Appveyor CI: Test with cygwin (32-bit) configuration

6 years agoAppveyor CI: Test with cygwin64 configuration
Ivan Maidanski [Tue, 23 Oct 2018 23:09:47 +0000 (02:09 +0300)]
Appveyor CI: Test with cygwin64 configuration
(a cherry-pick of commits 696dd85ad29c77c4 from 'master')

6 years agoAppveyor CI: Test with MinGW and mingw-w64 configurations
Ivan Maidanski [Tue, 23 Oct 2018 08:19:11 +0000 (11:19 +0300)]
Appveyor CI: Test with MinGW and mingw-w64 configurations
(a cherry-pick of commits 5533d1c7d29c77c4 (partly) from 'master')

6 years agoAppveyor CI: Refactoring of script to use environment matrix
Ivan Maidanski [Tue, 23 Oct 2018 07:34:13 +0000 (10:34 +0300)]
Appveyor CI: Refactoring of script to use environment matrix
(a cherry-pick of commits e9b50024d29c77c4 (partly) from 'master')

6 years agoTravis CI: Test with FIND_LEAK
Ivan Maidanski [Wed, 21 Nov 2018 22:01:46 +0000 (01:01 +0300)]
Travis CI: Test with FIND_LEAK

6 years agoTravis CI: Test with AO_USE_PTHREAD_DEFS passed in CFLAGS to configure
Ivan Maidanski [Wed, 21 Nov 2018 09:30:24 +0000 (12:30 +0300)]
Travis CI: Test with AO_USE_PTHREAD_DEFS passed in CFLAGS to configure

6 years agoWorkaround 'local address assignment to a global variable' CSA warning
Ivan Maidanski [Tue, 13 Nov 2018 08:02:49 +0000 (11:02 +0300)]
Workaround 'local address assignment to a global variable' CSA warning

* include/gc.h [(!__GNUC__ || __INTEL_COMPILER) && LINT2]
(GC_reachable_here): Transform ptr in the same way as COVERT_DATAFLOW()
does.
* mach_dep.c (GC_with_callee_saves_pushed): Transform the argument of
GC_noop1() by COVERT_DATAFLOW().
* misc.c [!ASM_CLEAR_CODE] (GC_clear_stack_inner): Likewise.
* misc.c (GC_call_with_stack_base, GC_call_with_gc_active): Likewise.
* pthread_support.c (GC_call_with_gc_active): Likewise.
* win32_threads.c (GC_call_with_gc_active): Likewise.
* misc.c (GC_call_with_gc_active): Transform &stacksect by
COVERT_DATAFLOW() when storing to GC_stackbottom.
* pthread_support.c (GC_call_with_gc_active): Likewise.

6 years agoEliminate 'non-virtual destructor for class with inheritors' CSA warning
Ivan Maidanski [Mon, 12 Nov 2018 18:16:42 +0000 (21:16 +0300)]
Eliminate 'non-virtual destructor for class with inheritors' CSA warning

* tests/test_cpp.cc (A): Add virtual empty destructor.