Ivan Maidanski [Wed, 15 Mar 2017 21:41:11 +0000 (00:41 +0300)]
Update AUTHORS file
Samuel Martin [Wed, 15 Mar 2017 21:39:37 +0000 (00:39 +0300)]
configure.ac: add check for NO_GETCONTEXT definition
* configure.ac: Add AC_CHECK_FUNCS(getcontext); add -DNO_GETCONTEXT to
CFLAGS if $ac_cv_func_getcontext is "no".
Ivan Maidanski [Tue, 14 Mar 2017 22:58:41 +0000 (01:58 +0300)]
Fix GC_SIZE_MAX definition (Linux/musl-gcc)
* include/private/gc_priv.h [SIZE_MAX && !CPPCHECK] (GC_SIZE_MAX): Cast
SIZE_MAX to size_t explicitly (to workaround incorrect definition
of SIZE_MAX - e.g. it is defined as ~0ULL in musl-tools which is not
correct for a 32-bit target).
Ivan Maidanski [Tue, 14 Mar 2017 22:45:16 +0000 (01:45 +0300)]
Refine configure messages when checking for compiler option support
* configure.ac (AC_MSG_CHECKING): Refine message when checking for
a compiler option support (replace "gcc" with "compiler").
Ivan Maidanski [Tue, 14 Mar 2017 08:57:14 +0000 (11:57 +0300)]
Travis CI: Test also build system based on Makefile.direct
Ivan Maidanski [Tue, 14 Mar 2017 06:56:51 +0000 (09:56 +0300)]
Travis CI: Test MARK_BIT_PER_OBJ and SMALL_CONFIG in separate builds
(fix commit 817ea6f)
Perform MARK_BIT_PER_OBJ testing only in 32-bit mode (for now).
Also test -D NO_GETENV.
Ivan Maidanski [Tue, 14 Mar 2017 06:50:09 +0000 (09:50 +0300)]
Travis CI: Test also compilation of PROC_VDB code
Ivan Maidanski [Tue, 14 Mar 2017 06:43:28 +0000 (09:43 +0300)]
Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
This is to check that PROC_VDB code compilation is ok. The code will
not work on a non-Solaris host, of course, because of lack of "pagedata"
file, so -D NO_INCREMENTAL should be additionally specified to avoid
abort during GC initialization (in gctest).
* os_dep.c [PROC_VDB && GC_NO_SYS_FAULT_H]: Do not include sys/fault.h
and sys/procfs.h.
* os_dep.c [PROC_VDB && GC_NO_SYS_FAULT_H] (PG_MODIFIED,
struct prpageheader, struct prasmap): Define explicitly.
* os_dep.c [PROC_VDB && GC_NO_SYS_FAULT_H && CPPCHECK] (GC_read_dirty):
Call GC_noop1 for dummy fields of prpageheader and prasmap.
Ivan Maidanski [Mon, 13 Mar 2017 21:31:08 +0000 (00:31 +0300)]
Fix 'ISO C90 forbids mixed declarations/code' compiler warning (gc_pmark)
* include/private/gc_pmark.h [MARK_BIT_PER_OBJ] (PUSH_CONTENTS_HDR):
Declare "obj_displ" local variable at the beginning of the block (not
after GC_STATIC_ASSERT).
Ivan Maidanski [Mon, 13 Mar 2017 21:08:26 +0000 (00:08 +0300)]
Rename 'test' to 'check' target in Makefile.direct
This is to match the target name in Makefile generated by configure.
* Makefile.direct: Update comment about testing (rename "test" target
to "check").
* Makefile.direct (check): Renamed from "test".
* Makefile.direct (test): Depend on check; add comment.
* README.QUICK (INSTALLATION): Leave information only about the recent
GC version.
* README.QUICK (INSTALLATION): Replace "make test" with "make check".
* README.md (Installation and Portability): Likewise.
Ivan Maidanski [Fri, 10 Mar 2017 21:54:45 +0000 (00:54 +0300)]
Travis CI: Test also -D CHECKSUMS, -D SMALL_CONFIG -D MARK_BIT_PER_OBJ
Ivan Maidanski [Fri, 10 Mar 2017 16:13:52 +0000 (19:13 +0300)]
Remove Makefile KandRtest target (that supported K&R C compiler)
* Makefile.direct (test): Execute setjmp_test, gctest directly (instead
of depending on KandRtest).
* Makefile.direct (KandRtest): Remove (with the comment about K&R C
compiler).
Ivan Maidanski [Fri, 10 Mar 2017 16:04:46 +0000 (19:04 +0300)]
Remove notes that K&R C compiler is unsupported
* README.QUICK: Remove a note that ANSI C compiler is required/assumed
(not a K&R C compiler).
* doc/README.cords: Likewise.
* doc/README.macros (GC_GCJ_SUPPORT): Likewise.
* include/gc_backptr.h: Likewise.
* pcr_interface.c [PCR]: Likewise.
* tools/if_not_there.c: Likewise.
Ivan Maidanski [Fri, 10 Mar 2017 08:33:45 +0000 (11:33 +0300)]
Travis CI: Put a space after '-D', '-U' for cppcheck, clang, gcc
(refactoring of commits bf2625a, c207f02, 44f5cce, 9ddd327, 9718222)
Ivan Maidanski [Fri, 10 Mar 2017 07:18:19 +0000 (10:18 +0300)]
Travis CI: Do not use atomic intrinsics on Linux/gcc-4.6
(fix commit 9ddd327)
GCC v4.6 does not support atomic intrinsics.
Ivan Maidanski [Thu, 9 Mar 2017 22:03:05 +0000 (01:03 +0300)]
Use __thread keyword for Android NDK r12b+ Clang (arm)
* include/private/gcconfig.h (GC_CLANG_PREREQ_FULL): New macro (to check
the required patch_level of Clang).
* include/private/thread_local_alloc.h [PLATFORM_ANDROID && ARM32]
(USE_COMPILER_TLS): Define for clang-3.8.256229 or later.
Ivan Maidanski [Thu, 9 Mar 2017 20:48:45 +0000 (23:48 +0300)]
Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
* include/private/gcconfig.h [CPPCHECK] (CPP_WORDSZ): Undefine
(platform-specific explicit value) and redefine to __SIZEOF_POINTER__*8.
Ivan Maidanski [Thu, 9 Mar 2017 20:36:33 +0000 (23:36 +0300)]
Travis CI: Test also with GC built-in atomic primitives
Ivan Maidanski [Thu, 9 Mar 2017 06:57:56 +0000 (09:57 +0300)]
Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
* tests/test_cpp.cc [(MSWIN32 && !__MINGW32__ || MSWINCE)
&& !NO_WINMAIN_ENTRY] (WinMain): Manually inline strtok(); add comment.
Ivan Maidanski [Wed, 8 Mar 2017 03:23:24 +0000 (06:23 +0300)]
Fix 'token not a valid binary' error during initsecondarythread compilation
(fix commit 4f98587)
* include/private/gc_priv.h (GC_CLANG_PREREQ): Remove.
* include/private/gcconfig.h (GC_CLANG_PREREQ): Define (moved from
gc_priv.h).
Ivan Maidanski [Tue, 7 Mar 2017 21:39:30 +0000 (00:39 +0300)]
Fix 'expected end of line in preprocessor' compilation error in gc_priv.h
(fix commit 4f98587)
* include/private/gc_priv.h [CANCEL_SAFE && GC_ASSERTIONS]: Remove
extra ')' in "#if" expression.
Ivan Maidanski [Tue, 7 Mar 2017 16:53:30 +0000 (19:53 +0300)]
Travis CI: Also test --enable-large-config in 32-bit mode (Linux)
Thomas Linder Puls [Mon, 6 Mar 2017 10:55:56 +0000 (11:55 +0100)]
Increase MAX_HEAP_SECTS (10 times) for large-config
This enables heaps larger than 128 GB on 64-bit targets.
* include/private/gc_priv.h [!MAX_HEAP_SECTS && LARGE_CONFIG]
(MAX_HEAP_SECTS): Increase value 10 times (from 8192 to 81920 if
64-bit target, from 768 to 7680 otherwise); remove comments.
Ivan Maidanski [Tue, 7 Mar 2017 16:23:49 +0000 (19:23 +0300)]
Workaround 'memory leak: result' cppcheck false error (POSIX)
The report is a false positive because result (returned by mmap) should
be equal to start_addr (passed to mmap).
* os_dep.c [USE_MUNMAP && !USE_WINALLOC] (GC_unmap, GC_unmap_gap): Call
GC_noop1(result) if CPPCHECK (same as for LINT2).
* os_dep.c [USE_MUNMAP && !USE_WINALLOC && NACL] (GC_remap): Likewise.
Ivan Maidanski [Tue, 7 Mar 2017 16:03:00 +0000 (19:03 +0300)]
Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]: Include time.h.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL] (GC_stop_world):
Use nanosleep() instead of usleep() if CPPCHECK.
Ivan Maidanski [Tue, 7 Mar 2017 15:52:08 +0000 (18:52 +0300)]
Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
* include/private/gc_priv.h (BCOPY, BZERO): Define to memcpy/set if
CPPCHECK (regardless of BCOPY_EXISTS).
Ivan Maidanski [Tue, 7 Mar 2017 15:41:13 +0000 (18:41 +0300)]
Eliminate 'scope of variable can be reduced' cppcheck warnings (Win32)
* os_dep.c [MSWIN32] (GC_register_root_section): Move "protect" local
variable declaration to the inner scope where the variable is actually
used.
* win32_threads.c [!MSWINCE && !CYGWIN32] (GC_CreateThread): Move
"thread_h" local variable declaration to the inner scope.
Ivan Maidanski [Tue, 7 Mar 2017 15:27:57 +0000 (18:27 +0300)]
Travis CI: Test also --enable-large-config --enable-munmap (Linux)
Ivan Maidanski [Tue, 7 Mar 2017 15:24:23 +0000 (18:24 +0300)]
Travis CI: Output gctest.log content
Ivan Maidanski [Tue, 7 Mar 2017 15:19:29 +0000 (18:19 +0300)]
Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
(code refactoring)
* cord/cordxtra.c (CORD_ATTR_UNUSED): Use GC_GNUC_PREREQ() instead of
direct use of __GNUC[_MINOR]__.
* gc_cpp.cc (GC_NEW_DELETE_NEED_THROW): Likewise.
* include/gc_config_macros.h (GC_API, GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE,
GC_ATTR_NONNULL, GC_ATTR_DEPRECATED, GC_RETURN_ADDR,
GC_RETURN_ADDR_PARENT, GC_PTHREAD_EXIT_ATTRIBUTE): Likewise.
* include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Likewise.
* include/gc_inline.h (GC_EXPECT, GC_PREFETCH_FOR_WRITE): Likewise.
* include/new_gc_alloc.h: Likewise.
* include/private/gc_priv.h (GC_INNER, GC_ATTR_UNUSED, EXPECT, GC_INLINE,
GC_ATTR_NOINLINE, GC_API_OSCALL, GC_ATTR_FORMAT_PRINTF,
NONNULL_ARG_NOT_NULL): Likewise.
* include/private/gc_priv.h [CANCEL_SAFE] (GC_cancel_disable_count):
Likewise.
* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT, PREFETCH,
GC_PREFETCH_FOR_WRITE): Likewise.
* include/private/gcconfig.h [I386 && LINUX && __ELF__]
(GC_NO_SIGSETJMP): Likewise.
* include/private/gcconfig.h [X86_64 && MSWIN32] (MPROTECT_VDB):
Likewise.
* include/private/thread_local_alloc.h [CYGWIN32] (USE_PTHREAD_SPECIFIC):
Likewise.
* include/private/thread_local_alloc.h [LINUX && !ARM32 && !AVR32
|| PLATFORM_ANDROID && !__clang__] (USE_COMPILER_TLS): Likewise.
* mark.c [MSWIN32 || MSWINCE] (GC_mark_some): Likewise.
* mark_rts.c (GC_approx_sp): Likewise.
* tests/test_cpp.cc (ATTR_UNUSED): Likewise.
* tools/setjmp_t.c (nested_sp): Likewise.
* include/gc_config_macros.h (GC_GNUC_PREREQ): New macro (not for
public use).
* include/private/gc_priv.h (GC_CLANG_PREREQ): New private macro.
* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT): Refine comment.
* include/private/thread_local_alloc.h [LINUX && !ARM32 && !AVR32
|| PLATFORM_ANDROID && !__clang__] (USE_COMPILER_TLS): Use
GC_CLANG_PREREQ() instead of direct use of __clang_major__ and
__clang_minor__.
* mark.c [MSWIN32 || MSWINCE] (GC_mark_some): Likewise.
Ivan Maidanski [Sun, 5 Mar 2017 05:22:39 +0000 (08:22 +0300)]
Eliminate 'condition ret==NULL always true' cppcheck style warning (Amiga)
* extra/AmigaOS.c [GC_AMIGA_FASTALLOC && !GC_AMIGA_ONLYFAST
&& GC_AMIGA_GC] (GC_amiga_allocwrapper_any): Do not check ret==NULL
twice.
* extra/AmigaOS.c [GC_AMIGA_FASTALLOC && GC_AMIGA_GC]
(GC_amiga_allocwrapper_fast): Likewise.
* extra/AmigaOS.c [GC_AMIGA_GC] (GC_amiga_realloc): Likewise.
Ivan Maidanski [Fri, 3 Mar 2017 15:24:43 +0000 (18:24 +0300)]
Travis CI: Also test with Unexpected behavior sanitizer (UBSan)
Ivan Maidanski [Fri, 3 Mar 2017 14:53:10 +0000 (17:53 +0300)]
Fix 'overriding commands for target check-without-...' Makefile warnings
(fix commit 8f20303)
Makefile.am includes cord.am and tests.am, so check-without-test-driver
should be defined only at one place.
* cord/cord.am (check-without-test-driver): Remove.
* tests/tests.am (check-without-test-driver): Add ./cordtest$(EXEEXT)
execution.
Ivan Maidanski [Thu, 2 Mar 2017 21:42:01 +0000 (00:42 +0300)]
Update AUTHORS file
Mikael Djurfeldt [Sun, 26 Feb 2017 19:09:56 +0000 (20:09 +0100)]
Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
(fix commits 62097c3, 9f48082)
Include <sys/time.h> to get struct timeval defined and select() declared.
* pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD]: Include sys/time.h
before GC_brief_async_signal_safe_sleep definition.
Ivan Maidanski [Wed, 1 Mar 2017 23:23:32 +0000 (02:23 +0300)]
Add Makefile target to run all tests without test-driver
This could be used to catch errors reported by MemorySanitizer
(the traditional "make check" shows the tests with MSan errors as
skipped, so it does not lead to a non-zero exit code of make itself).
* cord/cord.am (check-without-test-driver): New phony target (to
compile, link and execute the tests not using test-driver).
* tests/tests.am (check-without-test-driver): Likewise.
Ivan Maidanski [Wed, 1 Mar 2017 23:03:11 +0000 (02:03 +0300)]
Fix missing .exe for disclaim test filenames in Makefile (MinGW)
(fix commit 6c1a924)
Also add 4 blank lines to improve tests.am readability.
* tests/tests.am [ENABLE_DISCLAIM] (TESTS): Add $(EXEEXT) suffix to
disclaim_test, disclaim_bench.
Ivan Maidanski [Wed, 1 Mar 2017 22:10:29 +0000 (01:10 +0300)]
Update shared libraries version info to differentiate against v7.6
There are no API/implementation changes in libcord and libgccpp against
release-7_6 for now, so the corresponding version info is made the same.
There some implementation changes in libgc (without API changes) against
release-7_6, so the version info is made not the same (although there
are no API changes, 4:x:2 is already in use/reserved for release-7_6).
* Makefile.am (LIBGC_VER_INFO): Change version info to 5:0:3
(release-7_6 is supposed to use 4:x:2).
* Makefile.am (LIBGCCPP_VER_INFO): Change version info to 4:0:3
(the same one as release-7_6 uses at present).
* cord/cord.am (LIBCORD_VER_INFO): Likewise.
Ivan Maidanski [Wed, 1 Mar 2017 08:10:00 +0000 (11:10 +0300)]
Move libraries version info to the beginning of Makefile.am
(code refactoring)
* Makefile.am (LIBGC_VER_INFO, LIBGCCPP_VER_INFO): New variable; add
comment about the version update rule.
* cord/cord.am (LIBCORD_VER_INFO): Likewise.
* Makefile.am (libgc_la_LDFLAGS, libgccpp_la_LDFLAGS): Use
LIBGC[CPP]_VER_INFO instead the direct hard-coding of version info.
* cord/cord.am (libcord_la_LDFLAGS): Likewise.
Max Mouratov [Wed, 1 Mar 2017 03:12:14 +0000 (08:12 +0500)]
Update AUTHORS file
Ivan Maidanski [Tue, 28 Feb 2017 22:25:34 +0000 (01:25 +0300)]
Eliminate 'checking unsigned variable < 0' cppcheck warning in gc_inline
* include/gc_inline.h (GC_FAST_MALLOC_GRANS): Replace
(word)my_entry<=num_direct with (signed_word)my_entry-num_direct<=0
to avoid "checking unsigned var < 0" warning if num_direct==0
(no overflow is expected in (signed_word)my_entry-num_direct as it is
guaranteed that (word)my_entry<=num_direct+GC_TINY_FREELISTS+1).
Ivan Maidanski [Tue, 28 Feb 2017 21:45:45 +0000 (00:45 +0300)]
Fix name typos in GC_FAST_MALLOC_GRANS comment
* include/gc_inline.h (GC_FAST_MALLOC_GRANS): Fix typos in names in
comment ("num_direct", "generic_malloc").
Ivan Maidanski [Tue, 28 Feb 2017 21:25:51 +0000 (00:25 +0300)]
Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
* include/gc_inline.h [!GC_ASSERT && !NDEBUG] (GC_ASSERT): Define as
assert(x); include assert.h.
Ivan Maidanski [Tue, 28 Feb 2017 21:12:32 +0000 (00:12 +0300)]
Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
* doc/README.macros (GC_BUILTIN_ATOMIC): Document.
* doc/porting.html (atomic_ops): Replace GC7+ with GC v7; remove note
that libatomic_ops contains more primitives than needed by GC; remove
note about GC_test_and_set of older GC versions (pre-v7); add note
about gc_atomic_ops.h file (optional replacement of libatomic_ops).
Ivan Maidanski [Tue, 28 Feb 2017 20:41:03 +0000 (23:41 +0300)]
Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
Also add GC_ prefix to NO_PREFETCH_FOR_WRITE.
* include/gc_inline.h [!GC_PREFETCH_FOR_WRITE] (GC_PREFETCH_FOR_WRITE):
Copy the definition from gcconfig.h.
* include/private/gcconfig.h (NO_PREFETCH_FOR_WRITE): Rename to
GC_NO_PREFETCH_FOR_WRITE.
Ivan Maidanski [Tue, 28 Feb 2017 20:02:55 +0000 (23:02 +0300)]
Eliminate 'label not used' cppcheck false warnings in GC_mark_X
(code refactoring of PUSH_CONTENTS[_HDR] to eliminate 'goto' statement)
* include/private/gc_hdrs.h (HC_GET_HDR): Remove exit_label argument;
replace goto with break; remove do-while(0) (as break is now used to
pass control to some place of the caller).
* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
* include/private/gc_pmark.h [!USE_MARK_BYTES] (OR_WORD_EXIT_IF_SET):
Likewise.
* include/private/gc_pmark.h (PUSH_CONTENTS, PUSH_CONTENTS_HDR):
Remove exit_label argument (and the comment about it).
* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Refine comment
about the exit.
* mark.c (GC_mark_from): Remove PUSH_CONTENTS exit<N> argument.
* typd_mlc.c (GC_typed_mark_proc): Likewise.
* mark.c (GC_mark_and_push, GC_mark_and_push_stack): Remove
PUSH_CONTENTS_HDR label argument and the label itself.
Ivan Maidanski [Mon, 27 Feb 2017 21:38:51 +0000 (00:38 +0300)]
Travis CI: Output config.h content
Ivan Maidanski [Mon, 27 Feb 2017 21:32:50 +0000 (00:32 +0300)]
Travis CI: Move cppcheck to parent (home) folder
(fix commit
b89b137e)
Ivan Maidanski [Mon, 27 Feb 2017 21:26:00 +0000 (00:26 +0300)]
Travis CI: Reformat 'env' section (describe each configuration in a line)
(fix commits
9a3ca02a,
7f295679,
5d52904e)
Ivan Maidanski [Mon, 20 Feb 2017 21:32:49 +0000 (00:32 +0300)]
Fix typo in GC_AMIGA_GC documentation in README
* doc/README.amiga (GC_AMIGA_GC): Fix a typo ("very").
Ivan Maidanski [Mon, 20 Feb 2017 21:25:29 +0000 (00:25 +0300)]
Update AUTHORS file
Klemens Zwischenbrugger [Mon, 20 Feb 2017 21:17:57 +0000 (00:17 +0300)]
Fix various typos in comments and printed messages
This patch contains some spelling fixes (just in comments and C strings
passed to printf) as found by bot (https://github.com/ka7/misspell_fixer).
* SMakefile.amiga: Fix typo in comment ("don't").
* WCC_MAKEFILE (SYSTEM): Fix typo in comment ("uncomment").
* configure.ac [!GCC] (gc_cflags): Fix typo in comment ("actually").
* configure.ac (NO_CLOCK): Fix typo in comment ("targeting").
* doc/README.amiga: Fix typos in documentation ("there's", "compliant",
"documentation").
* extra/AmigaOS.c [GC_AMIGA_PRINTSTATS] (GC_amiga_free_all_mem): Fix
typos in printed messages ("succeeded", "succeeding").
* include/gc.h (GC_get_heap_size): Fix typo in comment ("below").
* tools/setjmp_t.c (main): Fix typo in printed message ("won't").
Ivan Maidanski [Wed, 15 Feb 2017 21:55:15 +0000 (00:55 +0300)]
Do not specify version info for test libraries (Automake)
* tests/tests.am (libstaticrootslib_test_la_LDFLAGS,
libstaticrootslib2_test_la_LDFLAGS): Remove -version-info option.
Ivan Maidanski [Wed, 15 Feb 2017 21:42:22 +0000 (00:42 +0300)]
.gitignore: Ignore *.sancov (generated by ASan)
Ivan Maidanski [Wed, 15 Feb 2017 08:56:06 +0000 (11:56 +0300)]
Fix typo in Makefile.am comment
* Makefile.am (SUBDIRS): Fix typo in comment ("to be").
Ivan Maidanski [Tue, 14 Feb 2017 19:53:56 +0000 (22:53 +0300)]
Travis CI: Add source check by cppcheck
Ivan Maidanski [Tue, 14 Feb 2017 19:31:28 +0000 (22:31 +0300)]
Travis CI: Test -D LINT2 in Linux/x86 builds, not during test coverage
(fix commit a373d52)
Ivan Maidanski [Tue, 14 Feb 2017 18:59:28 +0000 (21:59 +0300)]
Travis CI: fix -D KEEP_BACK_PTRS option passed to clang in CSA_CHECK
(fix commit 3663fd5)
Ivan Maidanski [Tue, 14 Feb 2017 18:42:02 +0000 (21:42 +0300)]
Travis CI: fix 'bits/predefs.h not found' in CSA_CHECK build
(fix commit 3663fd5)
Ivan Maidanski [Tue, 14 Feb 2017 18:23:35 +0000 (21:23 +0300)]
Travis CI: fix missing "fi" in the script
(fix commit 3663fd5)
Ivan Maidanski [Tue, 14 Feb 2017 10:44:34 +0000 (13:44 +0300)]
Eliminate 'value of GC_INLINE unknown' cppcheck info message
(fix commit 46a2411)
* include/private/gc_atomic_ops.h (AO_INLINE): Check GC_PRIVATE_H is
defined instead of "ifdef GC_INLINE".
Ivan Maidanski [Tue, 14 Feb 2017 10:34:53 +0000 (13:34 +0300)]
Travis CI: Pass -D LINT2 to CFLAGS during test coverage check
Ivan Maidanski [Tue, 14 Feb 2017 10:28:56 +0000 (13:28 +0300)]
Travis CI: Add source check by Clang Static Analyzer
Ivan Maidanski [Tue, 14 Feb 2017 08:24:18 +0000 (11:24 +0300)]
Workaround '!GC_page_size is always false' cppcheck style warning
* os_dep.c [!MSWIN32] (GC_setpagesize): Do not check that GC_page_size
is non-zero if CPPCHECK.
Ivan Maidanski [Fri, 10 Feb 2017 13:11:44 +0000 (16:11 +0300)]
Update ChangeLog file
Ivan Maidanski [Fri, 10 Feb 2017 12:52:36 +0000 (15:52 +0300)]
Update ChangeLog file (v7.6 changes only)
Ivan Maidanski [Fri, 10 Feb 2017 11:18:00 +0000 (14:18 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Thu, 2 Feb 2017 19:47:52 +0000 (22:47 +0300)]
Travis CI: Test --disable-static --disable-threads
Ivan Maidanski [Thu, 2 Feb 2017 19:38:54 +0000 (22:38 +0300)]
Travis CI: Test --enable-gc-assertions (only with -m32 and gcov)
Ivan Maidanski [Thu, 2 Feb 2017 19:26:27 +0000 (22:26 +0300)]
Travis CI: Test --enable-munmap only once (for gcov only)
Ivan Maidanski [Thu, 2 Feb 2017 19:13:42 +0000 (22:13 +0300)]
Travis CI: Test also --disable-gc-debug and --enable-large-config
Ivan Maidanski [Thu, 2 Feb 2017 18:20:37 +0000 (21:20 +0300)]
Travis CI: Do not apply gcov to gc-debug code
Ivan Maidanski [Thu, 2 Feb 2017 17:59:51 +0000 (20:59 +0300)]
Add Coveralls (test coverage status) badge to README
Ivan Maidanski [Thu, 2 Feb 2017 17:49:36 +0000 (20:49 +0300)]
Travis CI: Fix base directory for lcov
(fix commit 8270bf2)
Ivan Maidanski [Wed, 1 Feb 2017 19:41:47 +0000 (22:41 +0300)]
Travis CI: Fix gcov exclude matrix and fix lcov usage
(fix commit 8270bf2)
Ivan Maidanski [Wed, 1 Feb 2017 17:33:27 +0000 (20:33 +0300)]
Travis CI: Report test coverage for Linux/x64 (single-obj-compilation)
Ivan Maidanski [Wed, 1 Feb 2017 17:24:16 +0000 (20:24 +0300)]
Travis CI: Refactoring (rename ENABLE_CPP variable to CONF_CPP)
(fix commit 6c48bae)
Ivan Maidanski [Wed, 1 Feb 2017 09:02:26 +0000 (12:02 +0300)]
Travis CI: Refactoring (CFLAGS_EXTRA_M, wrap long lines)
Ivan Maidanski [Tue, 31 Jan 2017 23:30:18 +0000 (02:30 +0300)]
Fix enable_parallel_mark condition in CMake script
* CMakeLists.txt [enable_parallel_mark] (ADD_DEFINITIONS): Add
-DPARALLEL_MARK; remove ADD_DEFINITIONS("-DPARALLEL_MARK") in other
places; remove ${} for enable_parallel_mark in IF.
Ivan Maidanski [Tue, 31 Jan 2017 23:21:22 +0000 (02:21 +0300)]
Fix MS VC warning about compiling unused checksums and thread_local_alloc
* CMakeLists.txt (SRC): Remove checksums.c (to avoid MS VC warning
about unused file).
* CMakeLists.txt (SRC): Do not add thread_local_alloc.c unless
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") present.
Ivan Maidanski [Tue, 31 Jan 2017 21:43:43 +0000 (00:43 +0300)]
.gitignore: Ignore coverage.info (generated by lcov)
Ivan Maidanski [Tue, 31 Jan 2017 18:25:59 +0000 (21:25 +0300)]
.gitignore: Ignore all *.gc.log and *.tlog (generated by CMake)
(fix commit f4047f9)
Ivan Maidanski [Tue, 31 Jan 2017 08:59:23 +0000 (11:59 +0300)]
Travis CI: Fix linux/i686 build; set language to C++
(fix commit caa4a79)
Note: libgccpp and test_cpp are disabled for 32-bit builds currently.
Ivan Maidanski [Tue, 31 Jan 2017 07:38:22 +0000 (10:38 +0300)]
Fix a typo in comment of GC_mark_some
(fix commit 84c0313)
* mark.c [(MSWIN32 || MSWINCE) && !__clang__ && __GNUC__>=4]
(GC_mark_some): Fix typo in comment ("pedantic").
Ivan Maidanski [Mon, 30 Jan 2017 03:51:12 +0000 (06:51 +0300)]
Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
* os_dep.c [I386 && LINUX && SAVE_CALL_CHAIN] (struct frame): Do not
declare fr_arg[NARGS] field if NARGS is zero.
Ivan Maidanski [Sun, 29 Jan 2017 05:51:30 +0000 (08:51 +0300)]
Travis CI: compile both for x86 and x64
Ivan Maidanski [Sun, 29 Jan 2017 05:39:43 +0000 (08:39 +0300)]
Travis CI: Exclude osx/gcc builds
(gcc is an alias to clang on OS X)
Ivan Maidanski [Thu, 26 Jan 2017 08:01:08 +0000 (11:01 +0300)]
Fix AO_compiler_barrier definition in gc_atomic_ops private header
(fix commit 46a2411)
See AO_compiler_barrier definition in gcc/generic.h of libatomic_ops.
* include/private/gc_atomic_ops.h [GC_BUILTIN_ATOMIC]
(AO_compiler_barrier): Use __atomic_signal_fence(__ATOMIC_SEQ_CST)
instead of atomic_thread_fence.
Ivan Maidanski [Thu, 26 Jan 2017 07:53:32 +0000 (10:53 +0300)]
Appveyor CI: build/test with GCJ support
Ivan Maidanski [Wed, 25 Jan 2017 20:52:53 +0000 (23:52 +0300)]
Fix GCJ support in CMake build script
* CMakeLists.txt [enable_gcj_support] (SRC): Add gcj_mlc.c.
* CMakeLists.txt [enable_gcj_support] (ADD_DEFINITIONS):
Add -DGC_ENABLE_SUSPEND_THREAD only if enable_threads.
Ivan Maidanski [Wed, 25 Jan 2017 09:16:56 +0000 (12:16 +0300)]
Add AO primitives implementation to GC based on C11 atomic intrinsic
* Makefile.direct (SRCS): Add include/private/gc_atomic_ops.h.
* include/include.am (dist_noinst_HEADERS): Likewise.
* include/private/gc_atomic_ops.h: New file; define needed AO entities
if GC_BUILTIN_ATOMIC, otherwise include atomic_ops.h.
* include/private/gc_locks.h [THREADS && GC_PTHREADS
&& !GC_WIN32_THREADS]: Include gc_atomic_ops.h instead of atomic_ops.h.
* include/private/gc_priv.h [PARALLEL_MARK || THREADS && MPROTECT_VDB]:
Likewise.
* include/private/specific.h: Likewise.
* pthread_stop_world.c: Include private/gc_atomic_ops.h instead of
atomic_ops.h.
* tests/subthread_create.c: Likewise.
* thread_local_alloc.c [THREAD_LOCAL_ALLOC && GC_GCJ_SUPPORT]: Likewise.
* typd_mlc.c [GC_FORCE_INCLUDE_ATOMIC_OPS || GC_BUILTIN_ATOMIC]:
Likewise.
* win32_threads.c [GC_DLL && !GC_NO_THREADS_DISCOVERY && !MSWINCE]:
Likewise.
Ivan Maidanski [Mon, 23 Jan 2017 23:10:16 +0000 (02:10 +0300)]
Do not x86 asm in PUSH_CONTENTS_HDR for NaCl
* include/private/gc_pmark.h [I386 && __GNUC__] (LONG_MULT): Do not use
asm-based implementation ("mull") if NACL (i.e. fallback to plain C).
Ivan Maidanski [Thu, 19 Jan 2017 21:36:41 +0000 (00:36 +0300)]
Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
Issue #137 (bdwgc).
This reverts commit
57f36b93c1f1f2beb6bbbf0cb38c714b518abfdd.
Because it breaks gctest "list reversal" if compiled with
GC_GCJ_SUPPORT for MinGW/x86. This is caused by the fact that static
data roots could be between two GC heap regions thus GC with the patch
skips scanning of a reachable GCJ object with a descriptor located in
the static data roots.
To fix the issue (#92) of mistaking the free list pointers in free
objects for being type descriptor pointers, another approach should be
taken (e.g. marking objects in free lists).
Ivan Maidanski [Thu, 19 Jan 2017 07:45:22 +0000 (10:45 +0300)]
Add assertion to allocobj that live unmarked object cannot be reclaimed
* alloc.c (GC_allocobj): Add assertion before GC_continue_reclaim call
that either GC_is_full_gc is FALSE or the corresponding ok_reclaim_list
element is NULL (i.e. GC_continue_reclaim call is a no-op).
Ivan Maidanski [Wed, 18 Jan 2017 08:58:42 +0000 (11:58 +0300)]
Eliminate 'GC_collecting is set but never used' code defect (Win32)
* include/private/gc_locks.h [USE_PTHREAD_LOCKS && GC_PTHREADS]
(GC_collecting): Do not declare if GC_WIN32_THREADS.
* include/private/gc_locks.h [USE_PTHREAD_LOCKS && GC_PTHREADS]
(ENTER_GC, EXIT_GC): Do not define if GC_WIN32_THREADS; remove
trailing ';', add cast to void.
* win32_threads.c [USE_PTHREAD_LOCKS] (GC_collecting): Remove definition.
Ivan Maidanski [Wed, 18 Jan 2017 08:47:44 +0000 (11:47 +0300)]
Add configure --enable-gcov option (enable code coverage analysis)
* configure.ac (gcov): New --enable-* option.
* configure.ac [enable_gcov] (CFLAGS): Add "--coverage" option.
* configure.ac [enable_gcov && !enable_shared] (CXXFLAGS): Add
"--coverage" option (the shared library build is skipped to workaround
a bug in GCC or linker, atlist for gcc-4.8.4/x86_64).
* configure.ac [enable_gcov] (CFLAGS, CXXFLAGS): Filter out compiler
"-O" options (except for -O0).
Ivan Maidanski [Mon, 16 Jan 2017 21:14:44 +0000 (00:14 +0300)]
Fix lack of 2 trailing zeros in _MSC_VER numbers
_MSC_VER value consists of 4 digits (as of VS 2015).
* include/gc_config_macros.h [!GC_ATTR_MALLOC && !__GNUC__ && _MSC_VER]
(GC_ATTR_MALLOC): Replace _MSC_VER>=14 with _MSC_VER>=1400.
* include/private/gc_priv.h [!__GNUC__ && _MSC_VER] (GC_ATTR_NOINLINE):
Likewise.
* include/gc_config_macros.h [!GC_BUILD && !__GNUC__ && _MSC_VER]
(GC_ATTR_DEPRECATED): Replace _MSC_VER>=12 with _MSC_VER>=1200.
Paul Bone [Sat, 14 Jan 2017 07:02:54 +0000 (10:02 +0300)]
New API function (GC_dump_named) to produce named dumps
gc_dump() now prints a label (name) for the dump, by default the name
is created using the current garbage collection number (GC_get_gc_no).
An arbitrary name could be provided using GC_dump_named() instead.
The naming makes it easier to work with multiple dumps in a single log.
* include/gc.h (GC_dump_named): New public API function declaration.
* include/gc.h (GC_dump): Update comment (the current collection number
is printed at the beginning of the dump).
* misc.c [!NO_DEBUGGING] (GC_dump): Just call GC_dump_named(NULL).
* misc.c [!NO_DEBUGGING] (GC_dump_named): Move code from GC_dump;
start dump with the "GC Dump" followed by either the name specified or
the current collection number (if name is null).
Ivan Maidanski [Fri, 13 Jan 2017 17:24:07 +0000 (20:24 +0300)]
.gitignore: Ignore gcov c/h output files
Ivan Maidanski [Wed, 11 Jan 2017 21:58:41 +0000 (00:58 +0300)]
Use EXPECT FALSE for mark_from code documented as executed rarely
* mark.c (GC_mark_from): Use EXPECT(cond, FALSE) instead of
"Rarely executed" comment.