]> granicus.if.org Git - gc/log
gc
7 years agoFix OSF1 host pattern in CMakeLists.txt
Ivan Maidanski [Thu, 4 May 2017 21:49:53 +0000 (00:49 +0300)]
Fix OSF1 host pattern in CMakeLists.txt

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && osf]: Replace ".*-.*-osf*"
pattern ".*-.*-osf.*" (a missing "." before "*" is added).

7 years agoFix missing win32_threads.c compilation for Cygwin (CMake)
Ivan Maidanski [Wed, 3 May 2017 08:09:50 +0000 (11:09 +0300)]
Fix missing win32_threads.c compilation for Cygwin (CMake)

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-cygwin*] (SRC): Add
win32_threads.c.
* CMakeLists.txt (win32_threads): Remove commented out variable
definition.

7 years agoFix AO_SRC_DIR target name in NT_*_MAKEFILE
Ivan Maidanski [Tue, 18 Apr 2017 08:42:06 +0000 (11:42 +0300)]
Fix AO_SRC_DIR target name in NT_*_MAKEFILE

* NT_STATIC_THREADS_MAKEFILE (AO_SCR_DIR): Rename target to
$(AO_SRC_DIR).
* NT_X64_STATIC_THREADS_MAKEFILE (AO_SCR_DIR): Likewise.
* NT_X64_THREADS_MAKEFILE (AO_SCR_DIR): Likewise.

7 years agoFix a typo in comment in NT_MAKEFILE
Ivan Maidanski [Tue, 18 Apr 2017 08:37:26 +0000 (11:37 +0300)]
Fix a typo in comment in NT_MAKEFILE

* NT_MAKEFILE (gctest.exe): Fix typo ("application") in comment.
* NT_STATIC_THREADS_MAKEFILE (gctest.exe): Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE (gctest.exe): Likewise.
* NT_X64_THREADS_MAKEFILE (gctest.exe): Likewise.

7 years agoUpdate AUTHORS file (add Ryan Gonzalez)
Ivan Maidanski [Thu, 13 Apr 2017 15:33:20 +0000 (18:33 +0300)]
Update AUTHORS file (add Ryan Gonzalez)

7 years agoFix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
Ryan Gonzalez [Thu, 13 Apr 2017 15:31:00 +0000 (18:31 +0300)]
Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)

Issue #154 (bdwgc).

* dyn_load.c [SOLARISDL && !USE_PROC_FOR_LIBRARIES]
(GC_FirstDLOpenedLinkMap): Do not dereference d_un.d_ptr if it is null.
* dyn_load.c [(SCO_ELF || DGUX || HURD || LINUX || FREEBSD || NACL
|| NETBSD || OPENBSD) && !USE_PROC_FOR_LIBRARIES]
(GC_FirstDLOpenedLinkMap): Likewise.

7 years agoEliminate 'signed/unsigned mismatch' compiler warning in gctest (MS VC)
Ivan Maidanski [Thu, 20 Apr 2017 08:26:11 +0000 (11:26 +0300)]
Eliminate 'signed/unsigned mismatch' compiler warning in gctest (MS VC)
(fix commit 014d92d)

* tests/test.c (bm_huge): Add explicit casts of GC_signed_word values
to GC_word.

7 years ago.gitignore: Ignore cord/tests/de_win.rbj
Ivan Maidanski [Sat, 22 Apr 2017 06:58:56 +0000 (09:58 +0300)]
.gitignore: Ignore cord/tests/de_win.rbj

7 years ago.gitignore: Ignore auto-generated test_cpp.cpp
Ivan Maidanski [Wed, 19 Apr 2017 21:17:55 +0000 (00:17 +0300)]
.gitignore: Ignore auto-generated test_cpp.cpp

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Wed, 12 Apr 2017 07:15:05 +0000 (10:15 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoTravis CI: Test also Intel x32 builds (Linux)
Ivan Maidanski [Wed, 29 Mar 2017 20:33:42 +0000 (23:33 +0300)]
Travis CI: Test also Intel x32 builds (Linux)

7 years agoTravis CI: Test also 32-bit, 64-bit builds with clang-4.0, gcc-5 (Linux)
Ivan Maidanski [Wed, 29 Mar 2017 20:29:47 +0000 (23:29 +0300)]
Travis CI: Test also 32-bit, 64-bit builds with clang-4.0, gcc-5 (Linux)
(Cherry-pick commit 80085ae from 'master' branch.)

7 years agoTravis CI: Test --disable-static without assertions
Ivan Maidanski [Mon, 10 Apr 2017 21:27:36 +0000 (00:27 +0300)]
Travis CI: Test --disable-static without assertions

7 years agoTravis CI: Test also --enable-redirect-malloc
Ivan Maidanski [Thu, 16 Mar 2017 21:42:52 +0000 (00:42 +0300)]
Travis CI: Test also --enable-redirect-malloc
(Cherry-pick commits c62abbba83901c from 'master' branch.)

7 years agoTravis CI: Test builds with -D LINT2
Ivan Maidanski [Mon, 27 Mar 2017 21:38:01 +0000 (00:38 +0300)]
Travis CI: Test builds with -D LINT2
(Cherry-pick commit 518eb14 from 'master' branch.)

7 years agoTravis CI: Test --enable-large-config without --enable-munmap
Ivan Maidanski [Mon, 10 Apr 2017 19:37:31 +0000 (22:37 +0300)]
Travis CI: Test --enable-large-config without --enable-munmap

7 years agoTravis CI: Also test --enable-large-config in 32-bit mode (Linux)
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)
(Cherry-pick commit 4e08ea9 from 'master' branch.)

7 years agoTravis CI: Test also with -std=c11 (in single-threaded mode only)
Ivan Maidanski [Tue, 28 Mar 2017 20:22:17 +0000 (23:22 +0300)]
Travis CI: Test also with -std=c11 (in single-threaded mode only)
(Cherry-pick commits 47483e72a1b2bb from 'master' branch.)

7 years agoTravis CI: Test also -D POINTER_MASK
Ivan Maidanski [Thu, 16 Mar 2017 08:33:49 +0000 (11:33 +0300)]
Travis CI: Test also -D POINTER_MASK
(Cherry-pick commit 8de183d from 'master' branch.)

7 years agoTravis CI: Test also ENABLE_TRACE macro
Ivan Maidanski [Thu, 16 Mar 2017 08:31:48 +0000 (11:31 +0300)]
Travis CI: Test also ENABLE_TRACE macro
(Cherry-pick commit 7913227 from 'master' branch.)

7 years agoTravis CI: Test also various -D DEBUG_x
Ivan Maidanski [Thu, 16 Mar 2017 08:18:58 +0000 (11:18 +0300)]
Travis CI: Test also various -D DEBUG_x
(Cherry-pick commits 19db2c60eaf773 from 'master' branch.)

7 years agoTravis CI: Test also -D DBG_HDRS_ALL -D SHORT_DBG_HDRS
Ivan Maidanski [Fri, 17 Mar 2017 07:25:58 +0000 (10:25 +0300)]
Travis CI: Test also -D DBG_HDRS_ALL -D SHORT_DBG_HDRS
(Cherry-pick commit d9409e8 from 'master' branch.)

7 years agoTravis CI: Also test with musl-gcc (Linux)
Ivan Maidanski [Mon, 27 Mar 2017 22:07:10 +0000 (01:07 +0300)]
Travis CI: Also test with musl-gcc (Linux)
(Cherry-pick commits 07d989511263e5 from 'master' branch.)

7 years agoTravis CI: Test also -D CHECKSUMS, -D SMALL_CONFIG, -D MARK_BIT_PER_OBJ
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
(Cherry-pick commits 817ea6f6d5f40e from 'master' branch.)

7 years agoTravis CI: Output gctest.log content
Ivan Maidanski [Tue, 7 Mar 2017 15:24:23 +0000 (18:24 +0300)]
Travis CI: Output gctest.log content
(Cherry-pick commit 6738fe3 from 'master' branch.)

7 years agoTravis CI: Output config.h content
Ivan Maidanski [Mon, 27 Feb 2017 21:38:51 +0000 (00:38 +0300)]
Travis CI: Output config.h content
(Cherry-pick commit 631a74a from 'master' branch.)

7 years agoTravis CI: Replace multiple CONF_x with a single CONF_OPTIONS variable
Ivan Maidanski [Sun, 9 Apr 2017 14:42:40 +0000 (17:42 +0300)]
Travis CI: Replace multiple CONF_x with a single CONF_OPTIONS variable
(Cherry-pick commit 0138d60 from 'master' branch.)

7 years agoTravis CI: Specify test configurations using 'matrix:include'
Ivan Maidanski [Fri, 24 Mar 2017 15:34:09 +0000 (18:34 +0300)]
Travis CI: Specify test configurations using 'matrix:include'
(Cherry-pick commit 369d606 from 'master' branch.)

Also, require "sudo" only where needed.

7 years agoChangeLog: remove trailing dots
Ivan Maidanski [Wed, 5 Apr 2017 08:01:48 +0000 (11:01 +0300)]
ChangeLog: remove trailing dots
(Cherry-pick commit cf5aa64 from 'release-7_6' branch.)

7 years agoUpdate shared libraries version info to differentiate against v7.2
Ivan Maidanski [Fri, 7 Apr 2017 16:14:24 +0000 (19:14 +0300)]
Update shared libraries version info to differentiate against v7.2

There some API changes in libgc against v7.2, so the "current" number
of the version info is incremented, thus the version info is now 3:0:1.

There are no API changes in libcord and libgccpp against v7.2
but some implementation changes exist, 2:*:* version info is reserved
for v7.2, so the version info for libcord and libgccpp is now 3:0:2.

* Makefile.am (LIBGC_VER_INFO): Change version info to 3:0:1.
* Makefile.am (LIBGCCPP_VER_INFO): Change version info to 3:0:2.
* cord/cord.am (LIBCORD_VER_INFO): Likewise.

7 years agoFix GC shared library tests failure (musl)
Ivan Maidanski [Fri, 17 Mar 2017 08:21:13 +0000 (11:21 +0300)]
Fix GC shared library tests failure (musl)

Detect dl_iterate_phdr() presence by configure.

* configure.ac (dl_iterate_phdr): Add AC_CHECK_FUNCS for.
* configure.ac [ac_cv_func_dl_iterate_phdr] (HAVE_DL_ITERATE_PHDR):
AC_DEFINE it.

7 years agoUse AC_DEFINE for defining NO_GETCONTEXT in configure
Ivan Maidanski [Wed, 15 Mar 2017 21:49:22 +0000 (00:49 +0300)]
Use AC_DEFINE for defining NO_GETCONTEXT in configure
(code refactoring of commit 7c13fb8)

* configure.ac [!ac_cv_func_getcontext]: Use AC_DEFINE(NO_GETCONTEXT)
instead of directly adding -D NO_GETCONTEXT to CFLAGS.

7 years agoUpdate AUTHORS file
Ivan Maidanski [Wed, 15 Mar 2017 21:41:11 +0000 (00:41 +0300)]
Update AUTHORS file

7 years agoconfigure.ac: add check for NO_GETCONTEXT definition
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".

7 years agoAllow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
Ivan Maidanski [Fri, 17 Mar 2017 08:05:56 +0000 (11:05 +0300)]
Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)

Do not redefine HAVE_DL_ITERATE_PHDR macro if already defined.

* dyn_load.c [OPENBSD>=200519] (HAVE_DL_ITERATE_PHDR): Do not define
if already defined.
* dyn_load.c [!USE_PROC_FOR_LIBRARIES && (__GLIBC__>=2
|| PLATFORM_ANDROID)] (HAVE_DL_ITERATE_PHDR): Likewise.
* dyn_load.c [!USE_PROC_FOR_LIBRARIES && HAVE_DL_ITERATE_PHDR
&& !DL_ITERATE_PHDR_STRONG] (dl_iterate_phdr): Define as weak symbol
(even if HAVE_DL_ITERATE_PHDR is defined outside this file).

7 years agoSupport CFLAGS_EXTRA when checking for inline and dladdr (configure)
Ivan Maidanski [Thu, 23 Mar 2017 08:38:38 +0000 (11:38 +0300)]
Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
(fix commits 0e175f35dedb24)

* configure.ac (AC_C_INLINE, AC_TRY_COMPILE(dladdr)): Add $CFLAGS_EXTRA
to CFLAGS temporarily (restore CFLAGS after the check).

7 years agoEliminate 'ISO C forbids object to function pointer conversion' warning
Ivan Maidanski [Thu, 16 Mar 2017 07:22:29 +0000 (10:22 +0300)]
Eliminate 'ISO C forbids object to function pointer conversion' warning
(Cherry-pick commit c69ae9c from 'release-7_6' branch.)

* dyn_load.c [SOLARISDL && !USE_PROC_FOR_LIBRARIES
&& SUNOS53_SHARED_LIB] (GC_FirstDLOpenedLinkMap): Cast result of dlsym()
to word type before casting it to a function pointer.
* pthread_support.c [GC_USE_DLOPEN_WRAP] (GC_init_real_syms): Likewise.

7 years agoEliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
Ivan Maidanski [Wed, 15 Mar 2017 22:02:12 +0000 (01:02 +0300)]
Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)

* os_dep.c [REDIRECT_MALLOC] (GC_in_save_callers): Add missing type
(GC_bool) of the declared variable.

7 years agoFix missing .exe for disclaim test filenames in Makefile (MinGW)
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.

7 years agoFix mixed include of GC public header and gc_priv.h in disclaim bench/test
Ivan Maidanski [Thu, 30 Mar 2017 19:06:09 +0000 (22:06 +0300)]
Fix mixed include of GC public header and gc_priv.h in disclaim bench/test

Include gc_priv.h should be avoided in tests (if possible) or, at
least, this include should not precede include of the public GC
headers (because, e.g., gc_priv.h define GC_BUILD which influences
declspec of the GC public symbols in case of a shared library).

* tests/disclaim_bench.c: Move include gc_priv.h to be after
gc_disclaim.h; add comment.
* tests/disclaim_bench.c [HAVE_CONFIG_H]: Include "config.h" (before
include gc_disclaim.h).

7 years agoFix GC_SIZE_MAX definition (Linux/musl-gcc)
Ivan Maidanski [Tue, 14 Mar 2017 22:58:41 +0000 (01:58 +0300)]
Fix GC_SIZE_MAX definition (Linux/musl-gcc)
(Cherry-pick commit f40fab8 from 'release-7_6' branch.)

* include/private/gc_priv.h [SIZE_MAX] (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).

7 years agoFix gc.h compliance to strict ANSI (pthreads)
Ivan Maidanski [Thu, 30 Mar 2017 21:11:04 +0000 (00:11 +0300)]
Fix gc.h compliance to strict ANSI (pthreads)
(Cherry-pick commits 15542970970110 from 'master' branch.)

If -std=cXX option is passed to gcc/clang then sigset_t is undefined,
thus GC_pthread_sigmask declaration should be omitted.  However, this
symbol should be available during GC source code audit by cppcheck.

* include/gc_pthread_redirects.h [!GC_NO_PTHREAD_SIGMASK]
(GC_pthread_sigmask): Declare only if GC_PTHREAD_SIGMASK_NEEDED or
_POSIX_C_SOURCE >= 199506 or _XOPEN_SOURCE >= 500, or _BSD_SOURCE
or _GNU_SOURCE.
* tests/test.c [CPPCHECK && !_GNU_SOURCE && GC_PTHREADS] (_GNU_SOURCE):
Likewise.

7 years agoFix finalize.c compilation in 'strict ANSI' mode
Ivan Maidanski [Thu, 23 Mar 2017 20:12:07 +0000 (23:12 +0300)]
Fix finalize.c compilation in 'strict ANSI' mode

This and some other GC .c files include gc_pmark.h directly (not
gc_priv.h), so the compiler complains that sigset_t (used in
gc_pthread_redirects.h) is undefined if 'strict ANSI' mode is on and
_GNU_SOURCE is not defined before including system headers.

* include/private/gc_pmark.h [(__linux__ || __GLIBC__ || __GNU__)
&& GC_PTHREADS && !GC_NO_PTHREAD_SIGMASK] (_GNU_SOURCE): Define (before
including other headers).

7 years agoFix static assertion violation in LONG_MULT for 64-bit targets
Ivan Maidanski [Thu, 23 Mar 2017 19:44:11 +0000 (22:44 +0300)]
Fix static assertion violation in LONG_MULT for 64-bit targets

* include/private/gc_pmark.h [MARK_BIT_PER_OBJ] (PUSH_CONTENTS_HDR):
Cast displ to unsigned32 when passed to LONG_MULT (it is safe because
displ is less than HBLKSIZE).

7 years agoFix tools/setjmp_t hang (OS X)
Ivan Maidanski [Thu, 23 Mar 2017 00:16:12 +0000 (03:16 +0300)]
Fix tools/setjmp_t hang (OS X)

* tools/setjmp_t.c (main): Declare "y" static variable as volatile (to
prevent reordering/optimization of y++).

7 years agoFix gctest thread stack overflow (musl-gcc)
Ivan Maidanski [Fri, 17 Mar 2017 07:39:57 +0000 (10:39 +0300)]
Fix gctest thread stack overflow (musl-gcc)
(Cherry-pick commits 3bfeb8a21b68ca from 'master' branch.)

* tests/test.c (BIG): Remove commented out defined(MSWIN32); define
to 1000 if NO_GETCONTEXT (and UNIX_LIKE); update comment.

7 years agoFix 'ISO C90 forbids mixed declarations/code' compiler warning (gc_pmark)
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).

7 years agoMove libraries version info to the beginning of Makefile.am
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.

7 years agoUpdate AUTHORS file
Max Mouratov [Wed, 1 Mar 2017 03:12:14 +0000 (08:12 +0500)]
Update AUTHORS file

7 years agoFix typo in comment at GC_setup_temporary_fault_handler declaration
Ivan Maidanski [Thu, 23 Mar 2017 00:24:49 +0000 (03:24 +0300)]
Fix typo in comment at GC_setup_temporary_fault_handler declaration

* include/private/gc_priv.h (GC_setup_temporary_fault_handler): Fix typo
in comment (replace trailing ';' with a dot).

7 years agoFix name typos in GC_FAST_MALLOC_GRANS comment
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").

7 years agoFix typo in GC_AMIGA_GC documentation in README
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").

7 years agoUpdate AUTHORS file
Ivan Maidanski [Mon, 20 Feb 2017 21:25:29 +0000 (00:25 +0300)]
Update AUTHORS file

7 years agoFix various typos in comments and printed messages
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").

7 years agoFix typo in Makefile.am comment
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").

7 years ago.gitignore: Ignore gctest_* and lib*gc.so produced by Makefile.direct
Ivan Maidanski [Wed, 22 Mar 2017 08:31:16 +0000 (11:31 +0300)]
.gitignore: Ignore gctest_* and lib*gc.so produced by Makefile.direct

7 years ago.gitignore: Ignore bsd-libgc.a, bsd-libleak.a
Ivan Maidanski [Mon, 20 Mar 2017 20:10:48 +0000 (23:10 +0300)]
.gitignore: Ignore bsd-libgc.a, bsd-libleak.a

7 years ago.gitignore: Ignore *.sancov (generated by ASan)
Ivan Maidanski [Wed, 15 Feb 2017 21:42:22 +0000 (00:42 +0300)]
.gitignore: Ignore *.sancov (generated by ASan)

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Fri, 10 Feb 2017 11:18:00 +0000 (14:18 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoTravis CI: test also without --enable-munmap
Ivan Maidanski [Tue, 7 Feb 2017 08:44:57 +0000 (11:44 +0300)]
Travis CI: test also without --enable-munmap

7 years agoTravis CI: test --enable-gc-assertions
Ivan Maidanski [Tue, 7 Feb 2017 08:19:59 +0000 (11:19 +0300)]
Travis CI: test --enable-gc-assertions

7 years agoTravis CI: Test --disable-static --disable-threads
Ivan Maidanski [Thu, 2 Feb 2017 19:47:52 +0000 (22:47 +0300)]
Travis CI: Test --disable-static --disable-threads
(Cherry-pick commit 7f29567 from 'master' branch.)

7 years agoTravis CI: Test also --disable-gc-debug and --enable-large-config
Ivan Maidanski [Thu, 2 Feb 2017 19:13:42 +0000 (22:13 +0300)]
Travis CI: Test also --disable-gc-debug and --enable-large-config
(Cherry-pick commit 823a32f from 'master' branch.)

7 years agoTravis CI configuration: test also pointer backtracing
Ivan Maidanski [Mon, 28 Nov 2016 10:11:35 +0000 (13:11 +0300)]
Travis CI configuration: test also pointer backtracing
(Cherry-pick commits 3130765b475ea9 from 'master' branch.)

7 years agoTravis CI configuration: also build and test C++
Ivan Maidanski [Mon, 28 Nov 2016 06:46:28 +0000 (09:46 +0300)]
Travis CI configuration: also build and test C++
(Cherry-pick part of commits f2b0f7f6c48bae7807132 from 'master'.)

Note: libgccpp and test_cpp are disabled for Linux/x86 builds currently.

7 years agoTravis CI: compile both for x86 and x64
Ivan Maidanski [Sun, 29 Jan 2017 05:51:30 +0000 (08:51 +0300)]
Travis CI: compile both for x86 and x64
(Cherry-pick part of commits caa4a796c48bae64eb548 from 'master'.)

7 years agoTravis CI: Exclude osx/gcc builds
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)

7 years agoFix enable_parallel_mark condition in CMake script
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.

7 years agoAppveyor CI: build/test with GCJ support
Ivan Maidanski [Thu, 26 Jan 2017 07:53:32 +0000 (10:53 +0300)]
Appveyor CI: build/test with GCJ support
(Cherry-pick commit ad57086 from 'master' branch.)

7 years agoAdd configure --enable-gcov option (enable code coverage analysis)
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).

7 years agoSupport CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
Ivan Maidanski [Fri, 9 Dec 2016 00:21:05 +0000 (03:21 +0300)]
Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)

* Makefile.am (CFLAGS, CXXFLAGS): Append $(CFLAGS_EXTRA).
* configure.ac: Add AC_SUBST(CFLAGS_EXTRA).

7 years agoWorkaround 'index out of bounds' UBSan false warning in push_marked
Ivan Maidanski [Fri, 9 Dec 2016 23:07:25 +0000 (02:07 +0300)]
Workaround 'index out of bounds' UBSan false warning in push_marked

* mark.c (GC_push_marked): Cast (h+1)->hb_body to word before
subtraction of sz value (and cast the result back to ptr_t).
* mark.c [ENABLE_DISCLAIM] (GC_push_unconditionally): Likewise.

7 years agoFix MS VC warning about compiling unused checksums and thread_local_alloc
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.

7 years agoFix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
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.

7 years agoFix 'execvp argument incompatible pointer type' compiler warning (tools)
Ivan Maidanski [Mon, 9 Jan 2017 21:03:07 +0000 (00:03 +0300)]
Fix 'execvp argument incompatible pointer type' compiler warning (tools)

* tools/if_mach.c (main): Cast the 2nd argument of execvp to void* (to
avoid compiler warning as the argument of execvp() prototype could be
of "const char* const*" or "char**" type).
* tools/if_not_there.c (main): Likewise.

7 years agoSuppress 'tainted string passed to vulnerable operation' false defects
Ivan Maidanski [Tue, 15 Nov 2016 07:48:31 +0000 (10:48 +0300)]
Suppress 'tainted string passed to vulnerable operation' false defects

* include/private/gc_priv.h (TRUSTED_STRING): New tagging macro; add
comment.
* misc.c (GC_init): Process the result of GETENV("GC_LOG_FILE") by
TRUSTED_STRING.
* tools/if_mach.c (main): Process argv[3] by TRUSTED_STRING (before
passing the string to execvp).
* tools/if_not_there.c (main): Declare "fname" local variable;
process argv[1] and argv[2] by TRUSTED_STRING (before passing the
strings to fopen/opendir and execvp, respectively).

7 years agoFix (adjust) GC_scratch_alloc actual argument type
Ivan Maidanski [Tue, 20 Dec 2016 07:21:07 +0000 (10:21 +0300)]
Fix (adjust) GC_scratch_alloc actual argument type

* dyn_load.c [IRIX5 || USE_PROC_FOR_LIBRARIES && !LINUX]
(GC_register_dynamic_libraries): Do not cast GC_scratch_alloc argument
to word type (it should be of size_t).
* headers.c (alloc_hdr, GC_init_headers, get_index): Likewise.
* os_dep.c [PROC_VDB] (GC_proc_buf_size): Change type from word to size_t.
* os_dep.c [PROC_VDB] (GC_read_dirty): Change type of new_size local
variable (which is passed to GC_scratch_alloc) from word to size_t.

7 years agoFix 'context local variable might be clobbered by setjmp' compiler warning
Ivan Maidanski [Mon, 5 Dec 2016 23:21:33 +0000 (02:21 +0300)]
Fix 'context local variable might be clobbered by setjmp' compiler warning

* mach_dep.c (GC_with_callee_saves_pushed): Mark "context" local
variable as volatile (to prevent it from potential clobbering).

7 years agowindows-untested: Fix paths to gc_version.h
Ivan Maidanski [Wed, 11 Jan 2017 21:19:24 +0000 (00:19 +0300)]
windows-untested: Fix paths to gc_version.h

* windows-untested/gc.ver: Include gc_version.h instead of ../version.h.
* windows-untested/vc60/gc.dsp (SOURCE): Replace version.h with
include\gc_version.h.
* windows-untested/vc60/libgc.dsp (SOURCE): Likewise.
* windows-untested/vc60/libgcmt.dsp (SOURCE): Likewise.
* windows-untested/vc70/gc.vcproj (Filter.File): Likewise.
* windows-untested/vc70/libgc.vcproj (Filter.File): Likewise.
* windows-untested/vc70/libgcmt.vcproj (Filter.File): Likewise.
* windows-untested/vc71/gc.vcproj (Filter.File): Likewise.
* windows-untested/vc71/libgc.vcproj (Filter.File): Likewise.
* windows-untested/vc71/libgcmt.vcproj (Filter.File): Likewise.

7 years agoFix GCJ support in CMake build script
Ivan Maidanski [Wed, 25 Jan 2017 20:52:53 +0000 (23:52 +0300)]
Fix GCJ support in CMake build script
(Cherry-pick part of commit 29d5a7e from 'release-7_6' branch.)

* CMakeLists.txt [enable_gcj_support] (SRC): Add gcj_mlc.c.

7 years agoFix lack of 2 trailing zeros in _MSC_VER numbers
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.

7 years agoFix GC_noop6 definition to avoid its calls to be optimized away
Ivan Maidanski [Mon, 12 Dec 2016 23:34:28 +0000 (02:34 +0300)]
Fix GC_noop6 definition to avoid its calls to be optimized away
(fix commits e3ec4a51586a21)

* include/private/gc_priv.h (GC_ATTR_NOINLINE): New macro (effective
for GCC/Clang and MS VC currently).
* mark.c (GC_noop6): Use GC_ATTR_NOINLINE attribute; call
AO_compiler_barrier if PARALLEL_MARK (or GC_PTHREADS and not
GC_WIN32_THREADS), otherwise call GC_noop1(0); add
comment.

7 years agoFix Makefile.direct recursive invocation
Ivan Maidanski [Mon, 9 Jan 2017 07:29:29 +0000 (10:29 +0300)]
Fix Makefile.direct recursive invocation

* Makefile.direct (bsd-libgc.a): Add "-f Makefile.direct" option.

7 years agoFix bm_huge initialization for 64-bit targets (gctest)
Ivan Maidanski [Thu, 22 Dec 2016 21:39:10 +0000 (00:39 +0300)]
Fix bm_huge initialization for 64-bit targets (gctest)

* tests/test.c (bm_huge): Make array size depend on word size
(5 elements for 64-bit targets); initialize elements (except the last
one) to -1 instead of 0xffffffff (so that all bits are ones even on
a 64-bit target); initialize last element to ((word)-1)>>8 instead of
0x00ffffff value.
* tests/test.c (typed_test): Fail if bm_huge descriptor contains wrong
bit values at certain positions (as it had before this fix).

7 years agoFix storage class of local variable in register_dynamic_libraries (Irix)
Ivan Maidanski [Mon, 19 Dec 2016 21:54:32 +0000 (00:54 +0300)]
Fix storage class of local variable in register_dynamic_libraries (Irix)

* dyn_load.c [IRIX5 || USE_PROC_FOR_LIBRARIES && !LINUX]
(GC_register_dynamic_libraries): Remove "static" for needed_sz local
variable (and initialize it to zero).

7 years agoFix GC_mark_stack_top assertion violation properly in mark_local
Ivan Maidanski [Sat, 10 Dec 2016 07:37:04 +0000 (10:37 +0300)]
Fix GC_mark_stack_top assertion violation properly in mark_local
(fix commit a563b883)

* mark.c (GC_mark_local): Remove assertion checking that
global_first_nonempty is not greater than GC_mark_stack_top+1 (because
global_first_nonempty could be bigger slightly more at some moments due
to concurrency between the markers); replace n_on_stack==0 with
my_top<my_first_nonempty (the latter is equivalent to
(signed_word)n_on_stack<=0).

7 years agoFix assertion in GC_steal_mark_stack for non-heap regions
Ivan Maidanski [Sat, 10 Dec 2016 07:14:39 +0000 (10:14 +0300)]
Fix assertion in GC_steal_mark_stack for non-heap regions
(similar to commit da2fcda)

* mark.c (GC_steal_mark_stack): Replace top->mse_descr.w with descr
in assertion; relax assertion condition for descr (length-containing
mse_descr.w could be larger than the current GC heap size if
mse_start points to a region in a stack or a program data root;
e.g. it could happen if MemorySanitizer is used).

7 years agoFix gc_cleanup destructor for non-heap objects (gc_cpp)
Ivan Maidanski [Fri, 9 Dec 2016 23:19:32 +0000 (02:19 +0300)]
Fix gc_cleanup destructor for non-heap objects (gc_cpp)
(Cherry-pick commit ed19165 from 'release-7_6' branch.)

* include/gc_cpp.h (gc_cleanup::~gc_cleanup): If GC_base(this) returns
null (could be if the object is not allocated dynamically) then do not
call GC_register_finalizer_ignore_self.

7 years agoFix '~' operator application to unsigned values shorter than word
Ivan Maidanski [Wed, 7 Dec 2016 08:32:30 +0000 (11:32 +0300)]
Fix '~' operator application to unsigned values shorter than word

Without the fix, unsigned result of "~" operator is zero-extended
to a wide type (word) thus the result has leading zeros (which is
not expected to be).

* dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_register_dynlib_callback):
Cast (sizeof(word)-1) to word before "~" operation.
* mark.c (GC_mark_from): Likewise.
* mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Likewise.
* mark_rts.c [!MSWIN32 && !MSWINCE && !CYGWIN32]
(GC_remove_roots_inner): Likewise.
* os_dep.c [SVR4 || AUX || DGUX || LINUX && SPARC]
(GC_SysVGetDataStart): Likewise.
* os_dep.c [!MSWIN32 && DATASTART_USES_BSDGETDATASTART]
(GC_FreeBSDGetDataStart): Likewise.
* dyn_load.c [(MSWIN32 || MSWINCE || CYGWIN32) && !GC_WIN32_THREADS]
(GC_cond_add_roots): Cast (dwAllocationGranularity-1) to word before
"~" operation.
* include/private/gc_priv.h (HBLKPTR): Cast (HBLKSIZE-1) to word
before "~" operation.
* os_dep.c [USE_WINALLOC || CYGWIN32] (GC_win32_get_mem): Likewise.
* mark.c (GC_mark_from): Change type of new_size local variable from
int to word.
* os_dep.c [OPENBSD] (GC_find_limit_openbsd, GC_skip_hole_openbsd):
Change type of pgsz local variable from size_t to word (to avoid
implicit unsigned value extension after "~" operation).
* os_dep.c [PROC_VDB] (GC_read_dirty): Cast (sizeof(long)-1) to word
before "~" operation.

7 years agoFix 'bogus LR' detection in FindTopOfStack (Darwin)
Ivan Maidanski [Wed, 7 Dec 2016 08:02:59 +0000 (11:02 +0300)]
Fix 'bogus LR' detection in FindTopOfStack (Darwin)
(fix commit 5742f86)

* darwin_stop_world.c [!DARWIN_DONT_PARSE_STACK] (GC_FindTopOfStack):
Use "UL" suffix (instead of "U") for 0x3 (on the right side of the
comparison) to avoid implicit unsigned int-to-long value extension
of "~" operator result.

7 years agoFix potential data race in GC_SysVGetDataStart (SPARC)
Ivan Maidanski [Mon, 5 Dec 2016 21:49:33 +0000 (00:49 +0300)]
Fix potential data race in GC_SysVGetDataStart (SPARC)

* os_dep.c [SVR4 || AUX || DGUX || LINUX && SPARC]
(GC_SysVGetDataStart): Use AO_fetch_and_add(p,0) if available instead
of non-atomic read/write in *p = *p statement (thus, to avoid data race
though it is highly unlikely).

7 years agoWorkaround 'redundant assignment of *result to itself' cppcheck warning
Ivan Maidanski [Tue, 18 Oct 2016 10:05:02 +0000 (13:05 +0300)]
Workaround 'redundant assignment of *result to itself' cppcheck warning

* os_dep.c [DGUX || LINUX && SPARC] (GC_SysVGetDataStart): Call
GC_noop1(&v) if CPPCHECK where v = *result.

7 years agoRevert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
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).

7 years agoFix gc_allocator.h file name in new_gc_alloc.h comment
Ivan Maidanski [Wed, 11 Jan 2017 21:26:25 +0000 (00:26 +0300)]
Fix gc_allocator.h file name in new_gc_alloc.h comment

* include/new_gc_alloc.h: Rename gc_alloc.h to gc_allocator.h in comment;
refine the comment about the STL alloc header.

7 years agoFix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
Ivan Maidanski [Wed, 11 Jan 2017 08:26:11 +0000 (11:26 +0300)]
Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
(Cherry-pick commit d4eb7ca from 'release-7_6' branch.)

* doc/debugging.html: Rename backptr.h to gc_backptr.h.
* include/gc_mark.h (GC_DS_PER_OBJECT): Rename DS_TAGS to GC_DS_TAGS in
the comment.
* include/private/gc_priv.h (hblkhdr.hb_descr): Rename mark.h to
gc_mark.h in the comment.

7 years agoFix a typo in push_roots comment
Ivan Maidanski [Wed, 28 Dec 2016 21:19:14 +0000 (00:19 +0300)]
Fix a typo in push_roots comment

* mark_rts.c (GC_push_roots): Fix a typo in comment ("GC_push_one").

7 years agoFix typo in GC_build_fl_clear2 comment
Ivan Maidanski [Fri, 23 Dec 2016 16:10:33 +0000 (19:10 +0300)]
Fix typo in GC_build_fl_clear2 comment

* new_hblk.c [!SMALL_CONFIG] (GC_build_fl_clear2): Fix a typo in
comment ("to").

7 years agoFix typo in GET_MEM comment
Ivan Maidanski [Fri, 16 Dec 2016 21:21:21 +0000 (00:21 +0300)]
Fix typo in GET_MEM comment

* include/private/gcconfig.h (GET_MEM): Fix typo in comment (HBLKSIZE).

7 years agoFix a typo in comment in GC_SysVGetDataStart
Ivan Maidanski [Mon, 5 Dec 2016 20:54:57 +0000 (23:54 +0300)]
Fix a typo in comment in GC_SysVGetDataStart
(Cherry-pick commit 6d6663e from 'release-7_6' branch.)

* os_dep.c [SVR4 || AUX || DGUX || LINUX && SPARC]
(GC_SysVGetDataStart): Fix a typo in comment ("brought").

7 years ago.gitignore: Ignore coverage.info (generated by lcov)
Ivan Maidanski [Tue, 31 Jan 2017 21:43:43 +0000 (00:43 +0300)]
.gitignore: Ignore coverage.info (generated by lcov)