The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (libgc, bdwgc, boehm-gc)

Overview

Boehm-Demers-Weiser Garbage Collector

Travis-CI build status AppVeyor CI build status Codecov.io Coveralls test coverage status Coverity Scan build status LGTM Code Quality: Cpp LGTM Total Alerts

This is version 8.1.0 (next release development) of a conservative garbage collector for C and C++.

Download

You might find a more recent/stable version on the Download page, or BDWGC site.

Also, the latest bug fixes and new features are available in the development repository.

Overview

This is intended to be a general purpose, garbage collecting storage allocator. The algorithms used are described in:

  • Boehm, H., and M. Weiser, "Garbage Collection in an Uncooperative Environment", Software Practice & Experience, September 1988, pp. 807-820.

  • Boehm, H., A. Demers, and S. Shenker, "Mostly Parallel Garbage Collection", Proceedings of the ACM SIGPLAN '91 Conference on Programming Language Design and Implementation, SIGPLAN Notices 26, 6 (June 1991), pp. 157-164.

  • Boehm, H., "Space Efficient Conservative Garbage Collection", Proceedings of the ACM SIGPLAN '91 Conference on Programming Language Design and Implementation, SIGPLAN Notices 28, 6 (June 1993), pp. 197-206.

  • Boehm H., "Reducing Garbage Collector Cache Misses", Proceedings of the 2000 International Symposium on Memory Management.

Possible interactions between the collector and optimizing compilers are discussed in

  • Boehm, H., and D. Chase, "A Proposal for GC-safe C Compilation", The Journal of C Language Translation 4, 2 (December 1992).

and

  • Boehm H., "Simple GC-safe Compilation", Proceedings of the ACM SIGPLAN '96 Conference on Programming Language Design and Implementation.

Unlike the collector described in the second reference, this collector operates either with the mutator stopped during the entire collection (default) or incrementally during allocations. (The latter is supported on fewer machines.) On the most common platforms, it can be built with or without thread support. On a few platforms, it can take advantage of a multiprocessor to speed up garbage collection.

Many of the ideas underlying the collector have previously been explored by others. Notably, some of the run-time systems developed at Xerox PARC in the early 1980s conservatively scanned thread stacks to locate possible pointers (cf. Paul Rovner, "On Adding Garbage Collection and Runtime Types to a Strongly-Typed Statically Checked, Concurrent Language" Xerox PARC CSL 84-7). Doug McIlroy wrote a simpler fully conservative collector that was part of version 8 UNIX (tm), but appears to not have received widespread use.

Rudimentary tools for use of the collector as a leak detector are included, as is a fairly sophisticated string package "cord" that makes use of the collector. (See doc/README.cords and H.-J. Boehm, R. Atkinson, and M. Plass, "Ropes: An Alternative to Strings", Software Practice and Experience 25, 12 (December 1995), pp. 1315-1330. This is very similar to the "rope" package in Xerox Cedar, or the "rope" package in the SGI STL or the g++ distribution.)

Further collector documentation can be found in the overview.

General Description

This is a garbage collecting storage allocator that is intended to be used as a plug-in replacement for C's malloc.

Since the collector does not require pointers to be tagged, it does not attempt to ensure that all inaccessible storage is reclaimed. However, in our experience, it is typically more successful at reclaiming unused memory than most C programs using explicit deallocation. Unlike manually introduced leaks, the amount of unreclaimed memory typically stays bounded.

In the following, an "object" is defined to be a region of memory allocated by the routines described below.

Any objects not intended to be collected must be pointed to either from other such accessible objects, or from the registers, stack, data, or statically allocated bss segments. Pointers from the stack or registers may point to anywhere inside an object. The same is true for heap pointers if the collector is compiled with ALL_INTERIOR_POINTERS defined, or GC_all_interior_pointers is otherwise set, as is now the default.

Compiling without ALL_INTERIOR_POINTERS may reduce accidental retention of garbage objects, by requiring pointers from the heap to the beginning of an object. But this no longer appears to be a significant issue for most programs occupying a small fraction of the possible address space.

There are a number of routines which modify the pointer recognition algorithm. GC_register_displacement allows certain interior pointers to be recognized even if ALL_INTERIOR_POINTERS is not defined. GC_malloc_ignore_off_page allows some pointers into the middle of large objects to be disregarded, greatly reducing the probability of accidental retention of large objects. For most purposes it seems best to compile with ALL_INTERIOR_POINTERS and to use GC_malloc_ignore_off_page if you get collector warnings from allocations of very large objects. See here for details.

WARNING: pointers inside memory allocated by the standard malloc are not seen by the garbage collector. Thus objects pointed to only from such a region may be prematurely deallocated. It is thus suggested that the standard malloc be used only for memory regions, such as I/O buffers, that are guaranteed not to contain pointers to garbage collectible memory. Pointers in C language automatic, static, or register variables, are correctly recognized. (Note that GC_malloc_uncollectable has semantics similar to standard malloc, but allocates objects that are traced by the collector.)

WARNING: the collector does not always know how to find pointers in data areas that are associated with dynamic libraries. This is easy to remedy IF you know how to find those data areas on your operating system (see GC_add_roots). Code for doing this under SunOS, IRIX 5.X and 6.X, HP/UX, Alpha OSF/1, Linux, and win32 is included and used by default. (See doc/README.win32 for Win32 details.) On other systems pointers from dynamic library data areas may not be considered by the collector. If you're writing a program that depends on the collector scanning dynamic library data areas, it may be a good idea to include at least one call to GC_is_visible to ensure that those areas are visible to the collector.

Note that the garbage collector does not need to be informed of shared read-only data. However, if the shared library mechanism can introduce discontiguous data areas that may contain pointers then the collector does need to be informed.

Signal processing for most signals may be deferred during collection, and during uninterruptible parts of the allocation process. Like standard ANSI C mallocs, by default it is unsafe to invoke malloc (and other GC routines) from a signal handler while another malloc call may be in progress.

The allocator/collector can also be configured for thread-safe operation. (Full signal safety can also be achieved, but only at the cost of two system calls per malloc, which is usually unacceptable.)

WARNING: the collector does not guarantee to scan thread-local storage (e.g. of the kind accessed with pthread_getspecific). The collector does scan thread stacks, though, so generally the best solution is to ensure that any pointers stored in thread-local storage are also stored on the thread's stack for the duration of their lifetime. (This is arguably a longstanding bug, but it hasn't been fixed yet.)

Installation and Portability

The collector operates silently in the default configuration. In the event of problems, this can usually be changed by defining the GC_PRINT_STATS or GC_PRINT_VERBOSE_STATS environment variables. This will result in a few lines of descriptive output for each collection. (The given statistics exhibit a few peculiarities. Things don't appear to add up for a variety of reasons, most notably fragmentation losses. These are probably much more significant for the contrived program "test.c" than for your application.)

On most Unix-like platforms, the collector can be built either using a GNU autoconf-based build infrastructure (type ./configure; make in the simplest case), or with a classic makefile by itself (type make -f Makefile.direct).

Please note that the collector source repository does not contain configure and similar auto-generated files, thus the full procedure of autoconf-based build of master branch of the collector could look like:

git clone git://github.com/ivmai/bdwgc.git
cd bdwgc
git clone git://github.com/ivmai/libatomic_ops.git
./autogen.sh
./configure
make -j
make check

Cloning of libatomic_ops is now optional provided the compiler supports atomic intrinsics.

Below we focus on the collector build using classic makefile. For the Makefile.direct-based process, typing make check instead of make will automatically build the collector and then run setjmp_test and gctest. Setjmp_test will give you information about configuring the collector, which is useful primarily if you have a machine that's not already supported. Gctest is a somewhat superficial test of collector functionality. Failure is indicated by a core dump or a message to the effect that the collector is broken. Gctest takes about a second to two to run on reasonable 2007 vintage desktops. It may use up to about 30 MB of memory. (The multi-threaded version will use more. 64-bit versions may use more.) make check will also, as its last step, attempt to build and test the "cord" string library.)

Makefile.direct will generate a library gc.a which you should link against. Typing "make cords" will build the cord library (cord.a).

The GNU style build process understands the usual targets. make check runs a number of tests. make install installs at least libgc, and libcord. Try ./configure --help to see the configuration options. It is currently not possible to exercise all combinations of build options this way.

All include files that need to be used by clients will be put in the include subdirectory. (Normally this is just gc.h. make cords adds "cord.h" and "ec.h".)

The collector currently is designed to run essentially unmodified on machines that use a flat 32-bit or 64-bit address space. That includes the vast majority of Workstations and X86 (X >= 3) PCs.

In a few cases (Amiga, OS/2, Win32, MacOS) a separate makefile or equivalent is supplied. Many of these have separate README.system files.

Dynamic libraries are completely supported only under SunOS/Solaris, (and even that support is not functional on the last Sun 3 release), Linux, FreeBSD, NetBSD, IRIX 5&6, HP/UX, Win32 (not Win32S) and OSF/1 on DEC AXP machines plus perhaps a few others listed near the top of dyn_load.c. On other machines we recommend that you do one of the following:

  1. Add dynamic library support (and send us the code).
  2. Use static versions of the libraries.
  3. Arrange for dynamic libraries to use the standard malloc. This is still dangerous if the library stores a pointer to a garbage collected object. But nearly all standard interfaces prohibit this, because they deal correctly with pointers to stack allocated objects. (strtok is an exception. Don't use it.)

In all cases we assume that pointer alignment is consistent with that enforced by the standard C compilers. If you use a nonstandard compiler you may have to adjust the alignment parameters defined in gc_priv.h. Note that this may also be an issue with packed records/structs, if those enforce less alignment for pointers.

A port to a machine that is not byte addressed, or does not use 32 bit or 64 bit addresses will require a major effort. A port to plain MSDOS or win16 is hard.

For machines not already mentioned, or for nonstandard compilers, some porting suggestions are provided here.

The C Interface to the Allocator

The following routines are intended to be directly called by the user. Note that usually only GC_malloc is necessary. GC_clear_roots and GC_add_roots calls may be required if the collector has to trace from nonstandard places (e.g. from dynamic library data areas on a machine on which the collector doesn't already understand them.) On some machines, it may be desirable to set GC_stackbottom to a good approximation of the stack base (bottom).

Client code may include "gc.h", which defines all of the following, plus many others.

  1. GC_malloc(bytes) - Allocate an object of a given size. Unlike malloc, the object is cleared before being returned to the user. GC_malloc will invoke the garbage collector when it determines this to be appropriate. GC_malloc may return 0 if it is unable to acquire sufficient space from the operating system. This is the most probable consequence of running out of space. Other possible consequences are that a function call will fail due to lack of stack space, or that the collector will fail in other ways because it cannot maintain its internal data structures, or that a crucial system process will fail and take down the machine. Most of these possibilities are independent of the malloc implementation.

  2. GC_malloc_atomic(bytes) - Allocate an object of a given size that is guaranteed not to contain any pointers. The returned object is not guaranteed to be cleared. (Can always be replaced by GC_malloc, but results in faster collection times. The collector will probably run faster if large character arrays, etc. are allocated with GC_malloc_atomic than if they are statically allocated.)

  3. GC_realloc(object, new_bytes) - Change the size of object to be of a given size. Returns a pointer to the new object, which may, or may not, be the same as the pointer to the old object. The new object is taken to be atomic if and only if the old one was. If the new object is composite and larger than the original object then the newly added bytes are cleared. This is very likely to allocate a new object.

  4. GC_free(object) - Explicitly deallocate an object returned by GC_malloc or GC_malloc_atomic, or friends. Not necessary, but can be used to minimize collections if performance is critical. Probably a performance loss for very small objects (<= 8 bytes).

  5. GC_expand_hp(bytes) - Explicitly increase the heap size. (This is normally done automatically if a garbage collection failed to reclaim enough memory. Explicit calls to GC_expand_hp may prevent unnecessarily frequent collections at program startup.)

  6. GC_malloc_ignore_off_page(bytes) - Identical to GC_malloc, but the client promises to keep a pointer to the somewhere within the first 256 bytes of the object while it is live. (This pointer should normally be declared volatile to prevent interference from compiler optimizations.) This is the recommended way to allocate anything that is likely to be larger than 100 KB or so. (GC_malloc may result in a failure to reclaim such objects.)

  7. GC_set_warn_proc(proc) - Can be used to redirect warnings from the collector. Such warnings should be rare, and should not be ignored during code development.

  8. GC_enable_incremental() - Enables generational and incremental collection. Useful for large heaps on machines that provide access to page dirty information. Some dirty bit implementations may interfere with debugging (by catching address faults) and place restrictions on heap arguments to system calls (since write faults inside a system call may not be handled well).

  9. GC_register_finalizer(object, proc, data, 0, 0) and friends - Allow for registration of finalization code. User supplied finalization code ((*proc)(object, data)) is invoked after object becomes unreachable. For more sophisticated uses, and for finalization ordering issues, see gc.h.

The global variable GC_free_space_divisor may be adjusted up from it default value of 3 to use less space and more collection time, or down for the opposite effect. Setting it to 1 will almost disable collections and cause all allocations to simply grow the heap.

The variable GC_non_gc_bytes, which is normally 0, may be changed to reflect the amount of memory allocated by the above routines that should not be considered as a candidate for collection. Careless use may, of course, result in excessive memory consumption.

Some additional tuning is possible through the parameters defined near the top of gc_priv.h.

If only GC_malloc is intended to be used, it might be appropriate to define:

#define malloc(n) GC_malloc(n)
#define calloc(m,n) GC_malloc((m)*(n))

For small pieces of VERY allocation intensive code, gc_inline.h includes some allocation macros that may be used in place of GC_malloc and friends.

All externally visible names in the garbage collector start with GC_. To avoid name conflicts, client code should avoid this prefix, except when accessing garbage collector routines.

There are provisions for allocation with explicit type information. This is rarely necessary. Details can be found in gc_typed.h.

The C++ Interface to the Allocator

The Ellis-Hull C++ interface to the collector is included in the collector distribution. If you intend to use this, type ./configure --enable-cplusplus; make (or make -f Makefile.direct c++) after the initial build of the collector is complete. See gc_cpp.h for the definition of the interface. This interface tries to approximate the Ellis-Detlefs C++ garbage collection proposal without compiler changes.

Very often it will also be necessary to use gc_allocator.h and the allocator declared there to construct STL data structures. Otherwise subobjects of STL data structures will be allocated using a system allocator, and objects they refer to may be prematurely collected.

Use as Leak Detector

The collector may be used to track down leaks in C programs that are intended to run with malloc/free (e.g. code with extreme real-time or portability constraints). To do so define FIND_LEAK in Makefile. This will cause the collector to print a human-readable object description whenever an inaccessible object is found that has not been explicitly freed. Such objects will also be automatically reclaimed.

If all objects are allocated with GC_DEBUG_MALLOC (see the next section) then, by default, the human-readable object description will at least contain the source file and the line number at which the leaked object was allocated. This may sometimes be sufficient. (On a few machines, it will also report a cryptic stack trace. If this is not symbolic, it can sometimes be called into a symbolic stack trace by invoking program "foo" with tools/callprocs.sh foo. It is a short shell script that invokes adb to expand program counter values to symbolic addresses. It was largely supplied by Scott Schwartz.)

Note that the debugging facilities described in the next section can sometimes be slightly LESS effective in leak finding mode, since in the latter GC_debug_free actually results in reuse of the object. (Otherwise the object is simply marked invalid.) Also, note that most GC tests are not designed to run meaningfully in FIND_LEAK mode.

Debugging Facilities

The routines GC_debug_malloc, GC_debug_malloc_atomic, GC_debug_realloc, and GC_debug_free provide an alternate interface to the collector, which provides some help with memory overwrite errors, and the like. Objects allocated in this way are annotated with additional information. Some of this information is checked during garbage collections, and detected inconsistencies are reported to stderr.

Simple cases of writing past the end of an allocated object should be caught if the object is explicitly deallocated, or if the collector is invoked while the object is live. The first deallocation of an object will clear the debugging info associated with an object, so accidentally repeated calls to GC_debug_free will report the deallocation of an object without debugging information. Out of memory errors will be reported to stderr, in addition to returning NULL.

GC_debug_malloc checking during garbage collection is enabled with the first call to this function. This will result in some slowdown during collections. If frequent heap checks are desired, this can be achieved by explicitly invoking GC_gcollect, e.g. from the debugger.

GC_debug_malloc allocated objects should not be passed to GC_realloc or GC_free, and conversely. It is however acceptable to allocate only some objects with GC_debug_malloc, and to use GC_malloc for other objects, provided the two pools are kept distinct. In this case, there is a very low probability that GC_malloc allocated objects may be misidentified as having been overwritten. This should happen with probability at most one in 2**32. This probability is zero if GC_debug_malloc is never called.

GC_debug_malloc, GC_debug_malloc_atomic, and GC_debug_realloc take two additional trailing arguments, a string and an integer. These are not interpreted by the allocator. They are stored in the object (the string is not copied). If an error involving the object is detected, they are printed.

The macros GC_MALLOC, GC_MALLOC_ATOMIC, GC_REALLOC, GC_FREE, GC_REGISTER_FINALIZER and friends are also provided. These require the same arguments as the corresponding (nondebugging) routines. If gc.h is included with GC_DEBUG defined, they call the debugging versions of these functions, passing the current file name and line number as the two extra arguments, where appropriate. If gc.h is included without GC_DEBUG defined then all these macros will instead be defined to their nondebugging equivalents. (GC_REGISTER_FINALIZER is necessary, since pointers to objects with debugging information are really pointers to a displacement of 16 bytes from the object beginning, and some translation is necessary when finalization routines are invoked. For details, about what's stored in the header, see the definition of the type oh in dbg_mlc.c file.)

Incremental/Generational Collection

The collector normally interrupts client code for the duration of a garbage collection mark phase. This may be unacceptable if interactive response is needed for programs with large heaps. The collector can also run in a "generational" mode, in which it usually attempts to collect only objects allocated since the last garbage collection. Furthermore, in this mode, garbage collections run mostly incrementally, with a small amount of work performed in response to each of a large number of GC_malloc requests.

This mode is enabled by a call to GC_enable_incremental.

Incremental and generational collection is effective in reducing pause times only if the collector has some way to tell which objects or pages have been recently modified. The collector uses two sources of information:

  1. Information provided by the VM system. This may be provided in one of several forms. Under Solaris 2.X (and potentially under other similar systems) information on dirty pages can be read from the /proc file system. Under other systems (e.g. SunOS4.X) it is possible to write-protect the heap, and catch the resulting faults. On these systems we require that system calls writing to the heap (other than read) be handled specially by client code. See os_dep.c for details.

  2. Information supplied by the programmer. The object is considered dirty after a call to GC_end_stubborn_change provided the library has been compiled suitably. It is typically not worth using for short-lived objects. Note that bugs caused by a missing GC_end_stubborn_change or GC_reachable_here call are likely to be observed very infrequently and hard to trace.

Bugs

Any memory that does not have a recognizable pointer to it will be reclaimed. Exclusive-or'ing forward and backward links in a list doesn't cut it.

Some C optimizers may lose the last undisguised pointer to a memory object as a consequence of clever optimizations. This has almost never been observed in practice.

This is not a real-time collector. In the standard configuration, percentage of time required for collection should be constant across heap sizes. But collection pauses will increase for larger heaps. They will decrease with the number of processors if parallel marking is enabled.

(On 2007 vintage machines, GC times may be on the order of 5 ms per MB of accessible memory that needs to be scanned and processed. Your mileage may vary.) The incremental/generational collection facility may help in some cases.

Feedback, Contribution, Questions and Notifications

Please address bug reports and new feature ideas to GitHub issues. Before the submission please check that it has not been done yet by someone else.

If you want to contribute, submit a pull request to GitHub.

If you need help, use Stack Overflow. Older technical discussions are available in bdwgc mailing list archive - it can be downloaded as a compressed file or browsed at Narkive.

To get new release announcements, subscribe to RSS feed. (To receive the notifications by email, a 3rd-party free service like IFTTT RSS Feed can be setup.) To be notified on all issues, please watch the project on GitHub.

Copyright & Warranty

  • Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers
  • Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved.
  • Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
  • Copyright (c) 1999-2011 by Hewlett-Packard Development Company.
  • Copyright (c) 2008-2020 Ivan Maidanski

The files pthread_stop_world.c, pthread_support.c and some others are also

  • Copyright (c) 1998 by Fergus Henderson. All rights reserved.

The file include/gc.h is also

  • Copyright (c) 2007 Free Software Foundation, Inc

The files Makefile.am and configure.ac are

  • Copyright (c) 2001 by Red Hat Inc. All rights reserved.

The files extra/msvc_dbg.c and include/private/msvc_dbg.h are

  • Copyright (c) 2004-2005 Andrei Polushin

The file tests/initsecondarythread.c is

  • Copyright (c) 2011 Ludovic Courtes

The file tests/disclaim_weakmap_test.c is

  • Copyright (c) 2018 Petter A. Urkedal

Several files supporting GNU-style builds are copyrighted by the Free Software Foundation, and carry a different license from that given below.

THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.

Permission is hereby granted to use or copy this program for any purpose, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice.

A few of the files needed to use the GNU-style build procedure come with slightly different licenses, though they are all similar in spirit. A few are GPL'ed, but with an exception that should cover all uses in the collector. (If you are concerned about such things, I recommend you look at the notice in config.guess or ltmain.sh.)

Issues
  • Add disclaim callback and a

    Add disclaim callback and a "finalized" object kind

    • Add disclaim-closure to object kinds, and related flags to object kinds and heap-block headers.
    • Adjust reclaim code to call the disclaim procedure where applicable.
    • Adjust marking code to support unconditional marking when requested, to preserve links reachable from the disclaim procedure.
    • Add a "finalized" object kind.
    opened by paurkedal 45
  • gctest fails sometimes (List reversal produced incorrect list) with Mingw 32-bit

    gctest fails sometimes (List reversal produced incorrect list) with Mingw 32-bit

    Reported by @Hamayama in #260. OS: Windows 8.1 (64bit) DevTool: MSYS2/MinGW-w64 (32bit) (gcc version 7.3.0 (Rev2, Built by MSYS2 project)) Source: any (reproduced even on v7.4.16) How to reproduce: ./autogen.sh && ./configure --enable-threads=win32 --enable-large-config --disable-gcj-support && CPPFLAGS="-DDONT_ADD_BYTE_AT_END" make check COUNT=0; ERRCNT=0; while :; do ./gctest.exe || ((ERRCNT++)); ((COUNT++)); echo $COUNT $ERRCNT; done Output: TOTAL COUNT: 200 ERROR COUNT: 4 Reported error (one of):

    • 'List reversal produced incorrect list - collector is broken'
    • 'Wrong finalization data - collector is broken'
    • 'Clobbered a leaf - collector is broken'
    • 'Lost a node at level 3 - collector is broken'
    • 'Lost a node at level 9 - collector is broken'
    • 'Lost a node at level 11 - collector is broken'
    • 'Lost a node at level 13 - collector is broken'
    opened by ivmai 35
  • Support GC_init (and GC_get_stack_base) from non-main thread on FreeBSD

    Support GC_init (and GC_get_stack_base) from non-main thread on FreeBSD

    There are warnings such as "FreeBSD does not yet fully support threads with Boehm GC" issued while building on FreeBSD, but what exactly is not supported cannot be found, at least I couldn't found anything concrete online.

    I am attempting to port to FreeBSD a Python (CPython, to be precise) extension that uses Boehm GC, and face rather mysterious crashes of the GC in a threaded setting.

    Having a bit more documentation/examples on this would be great.

    Edit: the warnings were removed in a recent (April 2017) commit 1e40b9b0494d1dd2d289f71799e1d5d6dec4774f

    opened by dimpase 34
  • Downstream libgc releases (Sep 2021)

    Downstream libgc releases (Sep 2021)

    Just convenient place to keep record of pushing latest releases downstream.

    • https://github.com/ivmai/bdwgc/releases/download/v8.0.6/gc-8.0.6.tar.gz file_size: 1168660 md5: 4878e629f482600f2060f30853c7b415 sha1: 094b74e21c9091cb48e2a225924597b3db163c7c sha256: 3b4914abc9fa76593596773e4da671d7ed4d5390e3d46fbf2e5f155e121bea11 sha512: 2ea25003d585118e3ac0e12be9240e8195db511c6e94949f20453dc3cb771380bd5b956c04243b2a8ce31508587aa32de4f0f10a813577e6dbe8367688b7614e

    [1] https://repology.org/project/boehm-gc/packages

    other 
    opened by ivmai 33
  • Error linking 'checks' using static lib (MacOS 10.14)

    Error linking 'checks' using static lib (MacOS 10.14)

    On macOS Mojave 10.14.1 clang 7.0.1 (LLVM)

    Ran:

    ./configure --enable-static=yes --enable-shared=no --enable-cplusplus
    make
    make check
    

    Seemed that the tests were compiled but at linking:

    libtool: link: gcc -fexceptions -Wall -Wextra -Wpedantic -Wno-long-long -g -O2 -fno-strict-aliasing -o cordtest cord/tests/cordtest.o  ./.libs/libgc.a ./.libs/libcord.a /Users/frankcastellucci/Downloads/gc-8.0.2/.libs/libgc.a -lpthread
    ld: warning: ignoring file ./.libs/libgc.a, file was built for archive which is not the architecture being linked (x86_64): ./.libs/libgc.a
    ld: warning: ignoring file ./.libs/libcord.a, file was built for archive which is not the architecture being linked (x86_64): ./.libs/libcord.ald: warning: ignoring file /Users/frankcastellucci/Downloads/gc-8.0.2/.libs/libgc.a, file was built for archive which is not the architecture being linked (x86_64): /Users/frankcastellucci/Downloads/gc-8.0.2/.libs/libgc.a
    
    Undefined symbols for architecture x86_64:
      "_CORD__next", referenced from:
          _test_basics in cordtest.o
      "_CORD__pos_fetch", referenced from:
          _test_basics in cordtest.o
      "_CORD_balance", referenced from:
          _test_basics in cordtest.o
          _test_extras in cordtest.o
      "_CORD_cat", referenced from:
          _test_basics in cordtest.o
          _test_extras in cordtest.o
          _test_printf in cordtest.o
      "_CORD_catn", referenced from:
          _test_extras in cordtest.o
      "_CORD_chars", referenced from:
          _test_extras in cordtest.o
      "_CORD_chr", referenced from:
          _test_extras in cordtest.o
      "_CORD_cmp", referenced from:
          _test_extras in cordtest.o
          _test_printf in cordtest.o
      "_CORD_fprintf", referenced from:
          _main in cordtest.o
      "_CORD_from_char_star", referenced from:
          _test_basics in cordtest.o
      "_CORD_from_file", referenced from:
          _test_extras in cordtest.o
      "_CORD_from_file_lazy", referenced from:
          _test_extras in cordtest.o
      "_CORD_from_fn", referenced from:
          _test_basics in cordtest.o
      "_CORD_iter5", referenced from:
          _test_basics in cordtest.o
      "_CORD_len", referenced from:
          _test_basics in cordtest.o
          _test_extras in cordtest.o
      "_CORD_printf", referenced from:
          _test_printf in cordtest.o
      "_CORD_put", referenced from:
          _test_extras in cordtest.o
      "_CORD_rchr", referenced from:
          _test_extras in cordtest.o
      "_CORD_set_pos", referenced from:
          _test_basics in cordtest.o
      "_CORD_sprintf", referenced from:
          _test_printf in cordtest.o
      "_CORD_str", referenced from:
          _test_extras in cordtest.o
      "_CORD_substr", referenced from:
          _test_basics in cordtest.o
          _test_extras in cordtest.o
      "_CORD_to_char_star", referenced from:
          _test_extras in cordtest.o
          _test_printf in cordtest.o
      "_CORD_vfprintf", referenced from:
          _wrap_vfprintf in cordtest.o
      "_CORD_vprintf", referenced from:
          _wrap_vprintf in cordtest.o
      "_GC_enable_incremental", referenced from:
          _main in cordtest.o
      "_GC_gcollect", referenced from:
          _test_extras in cordtest.o
      "_GC_get_find_leak", referenced from:
          _main in cordtest.o
      "_GC_init", referenced from:
          _main in cordtest.o
      "_GC_invoke_finalizers", referenced from:
          _test_extras in cordtest.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [cordtest] Error 1
    make[1]: *** [check-am] Error 2
    make: *** [check-recursive] Error 1
    
    opened by FrankC01 29
  • Invalid memory access on GC_unmap_old

    Invalid memory access on GC_unmap_old

    I'm not sure if this is a GC problem, maybe this is a Crystal, I will be grateful for any help.

    I am use Crystal 1.2.2 with libgc 8.2.0 on Ubuntu 20.04.3 LTS (x86_64)

    09:37:08.318	Initiating full world-stop collection!
    09:37:08.319	65003520 bytes in heap blacklisted for interior pointers
    09:37:08.389	(empty)
    09:37:08.389	--> Marking for collection #900 after 991186128 allocated bytes
    09:37:08.482	Mark stack overflow; current size: 4096 entries
                  #^^^ String repeated 210 times
    09:37:08.528	Pushed 8 thread stacks
    09:37:08.528	Mark stack overflow; current size: 4096 entries
    09:37:08.528	Mark stack overflow; current size: 4096 entries
    09:37:09.748	Starting mark helper 3
    09:37:09.748	Starting mark helper 0
    09:37:09.748	Starting marking for mark phase number 899
    09:37:09.748	Starting mark helper 2
    09:37:09.748	Starting mark helper 1
    09:37:09.748	Pushed 8 thread stacks
    09:37:09.749	World-stopped marking took 1359 ms 940352 ns (952 ms in average)
    09:37:09.749	Finished marking for mark phase number 899
    09:37:09.749	Finished mark helper 0
    09:37:09.749	GC #900 freed 867889920 bytes, heap 5865472 KiB (+ 0 KiB unmapped + 204864 KiB internal)
    09:37:09.749	Finished mark helper 3
    09:37:09.749	Finished mark helper 1
    09:37:09.749	Finished mark helper 2
    09:37:09.760	Bytes recovered before sweep - f.l. count = -28952496
    09:37:09.810	In-use heap: 72% (806716 KiB pointers + 3463457 KiB other)
    09:37:09.810	Immediately reclaimed 114364240 bytes, heapsize: 6006243328 bytes (0 unmapped)
    09:37:09.822	Finalize and initiate sweep took 1 ms 416746 ns + 71 ms 162695 ns
    09:37:09.822	Complete collection took 1503 ms 644223 ns
    09:37:09.822	327 finalization-ready objects; 0/0 short/long links cleared
    09:37:09.822	3575 finalization entries; 49/0 short/long disappearing links alive
    
    09:37:49.862	Initiating full world-stop collection!
    09:37:49.863	64892928 bytes in heap blacklisted for interior pointers
    09:37:49.934	(empty)
    09:37:49.935	--> Marking for collection #901 after 1014325792 allocated bytes
    09:37:49.997	Mark stack overflow; current size: 4096 entries
                  #^^^ String repeated 212 times
    09:37:50.074	Pushed 8 thread stacks
    09:37:50.074	Mark stack overflow; current size: 4096 entries
    09:37:51.320	World-stopped marking took 1386 ms 46816 ns (952 ms in average)
    09:37:51.320	GC #901 freed 860060336 bytes, heap 5865472 KiB (+ 0 KiB unmapped + 204864 KiB internal)
    09:37:51.320	Finished mark helper 3
    09:37:51.320	Finished mark helper 1
    09:37:51.320	Starting mark helper 2
    09:37:51.320	Starting mark helper 0
    09:37:51.320	Pushed 8 thread stacks
    09:37:51.320	Finished marking for mark phase number 900
    09:37:51.320	Finished mark helper 2
    09:37:51.320	Finished mark helper 0
    09:37:51.320	Starting mark helper 3
    09:37:51.320	Starting mark helper 1
    09:37:51.320	Starting marking for mark phase number 900
    09:37:51.332	Bytes recovered before sweep - f.l. count = -27271568
    09:37:51.383	Immediately reclaimed 117574768 bytes, heapsize: 6006243328 bytes (0 unmapped)
    09:37:51.383	In-use heap: 72% (807380 KiB pointers + 3470112 KiB other)
    09:37:51.435	Invalid memory access (signal 11) at address 0x0
    09:37:51.435	unmap: mprotect failed at 0x7fb003bd4000 (length 12288), errno= 12
    09:37:51.435	unmap: mprotect failed
    09:37:51.436	[0x55838b8e4280] print_backtrace at /usr/share/crystal/src/exception/call_stack/libunwind.cr:95:5
    09:37:51.436	[0x55838b8e4135] -> at /usr/share/crystal/src/signal.cr:152:5
    09:37:51.437	[0x7fc72e00e3c0] ?? +140493447029696 in /lib/x86_64-linux-gnu/libpthread.so.0
    09:37:51.438	[0x55838d2c13f3] ?? +94023497552883 in /usr/bin/app
    09:37:51.438	[0x7fc72ddae941] abort +531 in /lib/x86_64-linux-gnu/libc.so.6
    09:37:51.439	[0x55838d2b4b33] ?? +94023497501491 in /usr/bin/app
    09:37:51.439	[0x55838d2c7fe6] GC_unmap_old +198 in /usr/bin/app
    09:37:51.440	[0x55838d2b420e] GC_try_to_collect_inner +366 in /usr/bin/app
    09:37:51.440	[0x55838d2b5837] GC_collect_or_expand +199 in /usr/bin/app
    09:37:51.441	[0x55838d2b94bb] GC_alloc_large +251 in /usr/bin/app
    09:37:51.442	[0x55838d2b9a43] GC_generic_malloc +307 in /usr/bin/app
    09:37:51.442	[0x55838d2b9bc1] GC_malloc_kind_global +225 in /usr/bin/app
    09:37:51.443	[0x55838d2ba0f1] GC_realloc +209 in /usr/bin/app
    09:37:51.445	[0x55838b8785d4] resize_to_capacity at /usr/share/crystal/src/string/builder.cr:131:5
    09:37:51.445	[0x55838b87836a] write at /usr/share/crystal/src/string/builder.cr:47:7
    09:37:51.445	[0x55838b878654] realloc at /usr/share/crystal/src/pointer.cr:353:18
    09:37:51.445	[0x55838b874ff7] __crystal_realloc64 at /usr/share/crystal/src/gc.cr:46:3
    09:37:51.445	[0x55838baf8b1d] realloc at /usr/share/crystal/src/gc/boehm.cr:120:5
    09:37:51.448	[0x55838badce34] gets_to_end at /usr/share/crystal/src/io.cr:562:11
                  # skipped
    09:37:51.489	[0x55838b8d7a5f] run at /usr/share/crystal/src/primitives.cr:266:3
    09:37:51.490	[0x55838b8dde7e] -> at /usr/share/crystal/src/fiber.cr:92:34
    09:37:51.491	[0x0] ???
    

    related issue in Crystal https://github.com/crystal-lang/crystal/issues/9805 which was closed with https://github.com/ivmai/bdwgc/issues/334

    opened by dammer 27
  • STACKBOTTOM define for HP_PA/HPUX in gc-7.6.12

    STACKBOTTOM define for HP_PA/HPUX in gc-7.6.12

    From John David Anglin [email protected]:

    The current default define for STACKBOTTOM on hppa*--hpux is provided by the following:

        /* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2       */
        /* to this.  Note that the GC must be initialized before the    */
        /* first putenv call.                                           */
        extern char ** environ;
        # STACKBOTTOM ((ptr_t)environ)
    

    Unfortunately, this is fragile and doesn't work with autogen which does a putenv call. It would seem to me safer to use HEURISTIC2 as the default.

    opened by ivmai 26
  • 7.2alpha6 fails to compile with clang

    7.2alpha6 fails to compile with clang

    Users of Homebrew have noticed the following problems when compiling with the default clang: 1 and 2.

    The issue seems to be around the following macro:

    libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -Os -w -pipe -march=native -Qunused-arguments -c os_dep.c  -fno-common -DPIC -o .libs/os_dep.o
    misc.c:943:7: error: array size is negative
          GC_STATIC_ASSERT((ptr_t)(word)(-1) > (ptr_t)0);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ./include/private/gc_priv.h:2143:51: note: expanded from macro 'GC_STATIC_ASSERT'
    # define GC_STATIC_ASSERT(expr) (void)sizeof(char[(expr)? 1 : -1])
                                                      ^~~~~~~~~~~~~~
    1 error generated.
    

    Nobody is quite sure what that macro is intended to be doing (whether it is a bug in clang or a bug in the macro which clang exposes), but in either case it seems like something we should report upstream.

    It compiles cleanly with LLVM.

    opened by apetresc 26
  • [CMake] Modernize CMake integration

    [CMake] Modernize CMake integration

    Hi @ivmai

    I'm a maintainer for vcpkg.

    A vcpkg contributor (@NNemec) and I are trying to port bdwgc to vcpkg, see: https://github.com/microsoft/vcpkg/pull/6405.

    While doing so, I've made some changes to the CMakeLists.txt file.

    The goal is to match the output of the CMake build to the files distributed in the Debian package (which, I assume is what most downstream consumers use).

    Using vcpkg`s CI, I can confirm that this results in successful builds for:

    • Windows 32-bit
    • Windows 64-bit
    • Windows UWP (Windows 10 Store apps)
    • Windows for ARM
    • x64-Linux (tested with Ubuntu)

    The existing CMakeLists.txt only produced succesful builds for Windows 32- and 64-bit.

    Both the existing version and the modified version fail to build correctly on Mac OS X, but that's something that can be added in a future PR.

    Note: this only produces C++ libraries.

    opened by vicroms 24
  • 8.0.0 regression: NetBSD pax mprotect problem

    8.0.0 regression: NetBSD pax mprotect problem

    New in 8.0.0, the self tests do not pass any longer on NetBSD with PaX mprotect enabled:

    gmake[2]: Entering directory '/scratch/devel/boehm-gc/work/gc-8.0.0'
    depbase=`echo tests/test.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DHAVE_CONFIG_H   -I./include -I./include   -g -I/usr/pkg/include   -fexceptions -DGC_VISIBILITY_HIDDEN_SET -fvisibility=hidden -Wall -Wextra -Wpedantic -Wno-long-long -O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/usr/pkg/include -fno-strict-aliasing  -MT tests/test.o -MD -MP -MF $depbase.Tpo -c -o tests/test.o tests/test.c &&\
    mv -f $depbase.Tpo $depbase.Po
    /bin/sh ./libtool  --tag=CC   --mode=link gcc   -fexceptions -DGC_VISIBILITY_HIDDEN_SET -fvisibility=hidden -Wall -Wextra -Wpedantic -Wno-long-long -O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/usr/pkg/include -fno-strict-aliasing   -Wl,-z,relro -Wl,-z,now -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -o gctest tests/test.o ./libgc.la   
    libtool: link: gcc -fexceptions -DGC_VISIBILITY_HIDDEN_SET -fvisibility=hidden -Wall -Wextra -Wpedantic -Wno-long-long -O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/scratch/devel/boehm-gc/work/.buildlink/include -fno-strict-aliasing -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-rpath -Wl,/usr/pkg/lib -o .libs/gctest tests/test.o  -L/scratch/devel/boehm-gc/work/.buildlink/lib -L./.libs -lgc -Wl,-rpath,/usr/pkg/lib
    gmake[2]: Leaving directory '/scratch/devel/boehm-gc/work/gc-8.0.0'
    mprotect remapping failed
    [1]   Abort trap (core dumped) ./gctest
    *** Error code 134
    

    This also affects users like guile.

    sysctl -w security.pax.mprotect.enabled=0
    

    is a workaround, but of course this should not be necessary.

    In 7.6.4 and 7.6.8 the tests worked fine:

    gmake[2]: Entering directory '/scratch/devel/boehm-gc/work/gc-7.6.8'
    depbase=`echo tests/test.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DHAVE_CONFIG_H   -I./include -I./include   -g -I/usr/pkg/include   -fexceptions -Wall -Wextra -Wpedantic -Wno-long-long -O2 -g -D_FORT
    IFY_SOURCE=2 -fstack-check -I/usr/pkg/include -fno-strict-aliasing  -MT tests/test.o -MD -MP -MF $depbase.Tpo -c -o tests/test.o tests/test
    .c &&\
    mv -f $depbase.Tpo $depbase.Po
    /bin/sh ./libtool  --tag=CC   --mode=link gcc   -fexceptions -Wall -Wextra -Wpedantic -Wno-long-long -O2 -g -D_FORTIFY_SOURCE=2 -fstack-che
    ck -I/usr/pkg/include -fno-strict-aliasing   -Wl,-z,relro -Wl,-z,now -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -o gctest tests/test.o ./libgc.la   
    libtool: link: gcc -fexceptions -Wall -Wextra -Wpedantic -Wno-long-long -O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/scratch/devel/boehm-gc/work/.buildlink/include -fno-strict-aliasing -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-rpath -Wl,/usr/pkg/lib -o .libs/gctest tests/test.o  -L/scratch/devel/boehm-gc/work/.buildlink/lib -L./.libs -lgc -Wl,-rpath,/usr/pkg/lib
    gmake[2]: Leaving directory '/scratch/devel/boehm-gc/work/gc-7.6.8'
    Completed 1 tests
    Allocated 757396 collectable objects
    Allocated 203 uncollectable objects
    Allocated 1270000 atomic objects
    Allocated 21760 stubborn objects
    Reallocated 126 objects
    Finalized 2202/2202 objects - finalization is probably ok
    Total number of bytes allocated is 105375862
    Total memory use by allocated blocks is 458752 bytes
    Final heap size is 7532544 bytes
    Final number of reachable objects is 412
    Completed 94 collections
    Collector appears to work
    gmake[2]: Entering directory '/scratch/devel/boehm-gc/work/gc-7.6.8'
    depbase=`echo tests/test_cpp.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    c++ -DHAVE_CONFIG_H   -I./include -I./include   -g -I/usr/pkg/include -fexceptions -O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/usr/pkg/include  -MT tests/test_cpp.o -MD -MP -MF $depbase.Tpo -c -o tests/test_cpp.o tests/test_cpp.cc &&\
    mv -f $depbase.Tpo $depbase.Po
    /bin/sh ./libtool  --tag=CXX   --mode=link c++ -fexceptions -O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/usr/pkg/include   -Wl,-z,relro -Wl,-z,now -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -o test_cpp tests/test_cpp.o libgccpp.la ./libgc.la   
    libtool: link: c++ -fexceptions -O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/scratch/devel/boehm-gc/work/.buildlink/include -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-rpath -Wl,/usr/pkg/lib -o .libs/test_cpp tests/test_cpp.o  -L/scratch/devel/boehm-gc/work/gc-7.6.8/.libs -L/scratch/devel/boehm-gc/work/.buildlink/lib -L./.libs -lgccpp -lgc -Wl,-rpath,/usr/pkg/lib
    gmake[2]: Leaving directory '/scratch/devel/boehm-gc/work/gc-7.6.8'
    Starting iteration 1
    Starting iteration 2
    Starting iteration 3
    Starting iteration 4
    Starting iteration 5
    Starting iteration 6
    Starting iteration 7
    Starting iteration 8
    Starting iteration 9
    Starting iteration 10
    The test appears to have succeeded.
    
    opened by 0-wiz-0 24
  • autoconf failures on mingw

    autoconf failures on mingw

    I am trying to compile bdwgc 7.2 release on mysys/mingw, while libatomic_ops compile without any problems, it seems that there is some problems on bdwgc autoconf script (configure.ac), it throws this error while issuing autoconf command from the autogen.sh

    configure.ac:70: error: possibly undefined macro: AC_MSG_ERROR If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:358: error: possibly undefined macro: AS_IF

    if i added this exception lines into configure.ac m4_pattern_allow([^dnl]) m4_pattern_allow([^AC_]) m4_pattern_allow([^AS_]) m4_pattern_allow([^m4])

    it will succeed to generate the configure scripts but failed when configure process.

    aclocal v 1.10 autoconf v 2.68

    opened by trippleflux 22
  • -lrt linkage required for Linux

    -lrt linkage required for Linux

    both configure.ac and CMakeLists.txt are missing logic to include -lrt for Linux 6/7 systems in the same way it included for other OS. i don't have Linux 8 to try at the moment but adding -lrt for the others resolves missing clock_gettime()

    opened by todd-richmond 1
  • Race between GC_calloc_explicitly_typed and GC_push_complex_descriptor

    Race between GC_calloc_explicitly_typed and GC_push_complex_descriptor

    Build: https://app.travis-ci.com/github/ivmai/bdwgc/jobs/569448228 Source: master (247e735) Host: Ubuntu/x64 How to reproduce: ./configure --disable-parallel-mark && make check CFLAGS_EXTRA="-fsanitize=thread -fno-omit-frame-pointer -D NTHREADS=10" && ./gctest Occurrence: rare

    Stack traces (sample):

     Read of size 8 at 0x7fd14e226328 by thread T4 (mutexes: write M4):
        // nelements = d -> ld.ld_nelements;
        #0 GC_push_complex_descriptor /home/travis/build/ivmai/bdwgc/extra/../typd_mlc.c:411:31 (libgc.so.1+0x3aaea)
        #1 GC_array_mark_proc /home/travis/build/ivmai/bdwgc/extra/../typd_mlc.c:477:26 (libgc.so.1+0x3a956)
        #2 GC_mark_from /home/travis/build/ivmai/bdwgc/extra/../mark.c:766:28 (libgc.so.1+0x3162d)
        #3 GC_mark_some /home/travis/build/ivmai/bdwgc/extra/../mark.c:379:17 (libgc.so.1+0x2b52f)
        #4 GC_collect_a_little_inner /home/travis/build/ivmai/bdwgc/extra/../alloc.c:707:17 (libgc.so.1+0xcc66)
    
    Previous write of size 8 at 0x7fd14e226328 by main thread:
        // lp -> ld_nelements = leaf.ld_nelements;
        #0 GC_calloc_explicitly_typed /home/travis/build/ivmai/bdwgc/extra/../typd_mlc.c:679:28 (libgc.so.1+0x1eca7)
        #1 typed_test /home/travis/build/ivmai/bdwgc/tests/gctest.c:1291:29 (lt-gctest+0x4b19cc)
    
    opened by ivmai 0
  • Use dynamic array to store static roots

    Use dynamic array to store static roots

    As wrote @drmeister in issue #394 (comment): there is a hard limit of 8192 root sets, I will investigate turning that into a dynamic array.

    struct roots _static_roots[MAX_ROOT_SETS];

    The solution might be implemented similar to commit 8e01d31bf

    feature-request 
    opened by ivmai 0
  • gctest hangs sometimes on Linux if compiled with ASan

    gctest hangs sometimes on Linux if compiled with ASan

    Source: release-8_2 (e4243cb) Build: https://app.travis-ci.com/github/ivmai/bdwgc/jobs/568009316 Host: Linux/amd64 How to build and run: ./configure --enable-cplusplus --enable-static && make check CFLAGS_EXTRA="-fsanitize=address -fno-common -fno-omit-frame-pointer"

    Related issues: #236, #442

    opened by ivmai 0
  • ASan reports 'Running thread was not suspended' in gctest

    ASan reports 'Running thread was not suspended' in gctest

    Source: master (fd4e579) Build (successful): https://app.travis-ci.com/github/ivmai/bdwgc/jobs/567979951 Host: Linux/arm64 (Ubuntu 16.04.7 LTS) Compiler: clang version 7.0.0 (tags/RELEASE_700/final) Buid: ./configure --enable-cplusplus --enable-static && make check CFLAGS_EXTRA="-fsanitize=address -fno-common -fno-omit-frame-pointer" Output (gctest):

    Switched to incremental mode
    Reading dirty bits from /proc
    ==11237==Running thread 11205 was not suspended. False leaks are possible.
    ==11237==Running thread 11219 was not suspended. False leaks are possible.
    ...
    ==11245==Running thread 11224 was not suspended. False leaks are possible.
    Completed 6 tests
    
    opened by ivmai 1
  • Replacement function 'operator new' cannot be declared inline (Cygwin)

    Replacement function 'operator new' cannot be declared inline (Cygwin)

    Source: master (2e1b8f205) Host: Cygwin (64-bit) Compiler: clang version 8.0.1 (tags/RELEASE_801/final) How to reproduce: Variant 1: clang++ -I include -c tests/cpp.cc Variant 2: CC=clang CXX=clang++ ./configure && make check Output:

    In file included from tests/cpp.cc:25:
    In file included from ./include/gc_cpp.h:2:
    ./include/gc/gc_cpp.h:289:5: warning: replacement function 'operator new[]' cannot be declared 'inline'
          [-Winline-new-delete]
        inline void* operator new[](size_t size)
        ^
    ./include/gc/gc_cpp.h:296:5: warning: replacement /bin/sh ./libtool  --tag=CC   --mode=link clang -Werror  -fexceptions -DGC_VISIBILITY_HIDDEN_SET -fvisibility=hidden -Wall -Wextra -Wpedantic -Wno-long-long -g -O2 -fno-strict-aliasing -O3 -D CPPCHECK   -o realloctest.exe tests/realloc.o  ./libgc.la
    function 'operator delete[]' cannot be declared 'inline'
          [-Winline-new-delete]
        inline void operator delete[](void* obj) GC_NOEXCEPT
        ^
    ./include/gc/gc_cpp.h:302:3: warning: replacement function 'operator new' cannot be declared 'inline'
          [-Winline-new-delete]
      inline void* operator new(size_t size)
      ^
    ./include/gc/gc_cpp.h:309:3: warning: replacement function 'operator delete' cannot be declared 'inline'
          [-Winline-new-delete]
      inline void operator delete(void* obj) GC_NOEXCEPT
      ^
    

    Note: not observed with gcc.

    opened by ivmai 3
Releases(v8.2.0)
  • v8.2.0(Sep 29, 2021)

    Changes

    • Add API for accessing incremental GC time limit with nanosecond precision
    • Add API function to force start of incremental collection
    • Add GC_ prefix to scan_ptr and some other static variables (refactoring)
    • Add GC_get/set_disable_automatic_collection API
    • Add I_HOLD_LOCK assertion to expand_hp_inner and related functions
    • Add assertion on free-list argument and result of GC_new_kind
    • Add assertion that GC is initialized to base incremental_protection_needs
    • Add assertions that GC_page_size is initialized
    • Add cordtest, staticrootstest, test_cpp, tracetest, disclaim tests (CMake)
    • Add debug messages on thread suspend/resume (Win32)
    • Add dummy testing of GC_incr_bytes_allocd/freed
    • Add table of contents in gcdescr.md
    • Add testing of GC_CALLOC/MALLOC_EXPLICITLY_TYPED (gctest)
    • Adjust formatting of numbered lists in README.md to match other .md files
    • Adjust highlighting of API prototypes in gcinterface.md
    • Adjust macro def/usage for AVR32, CRIS, NETBSD, OPENBSD, SH4 in gcconfig.h
    • Adjust printf calls in gctest check_heap_stats so that each has new-line
    • Allow incremental GC on Cygwin
    • Allow memory unmapping in case of MPROTECT_VDB
    • Allow to disable GWW or mprotect-based VDB at build
    • Allow to disable Glibc FPU exception mask and TSX workarounds (Linux)
    • Allow to disable __builtin_return_address(1) usage (x86 and x64)
    • Allow to specify custom value of LOG_PHT_ENTRIES
    • Always abort on failure to access /proc/self/maps (Linux)
    • Always define default_push_other_roots (code refactoring)
    • Avoid gcc stringop-overflow warning for intended overflow in smashtest
    • Avoid initial 3ms pause on world stop/start with GC_retry_signals (Linux)
    • Build cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE
    • Build gc as a shared multi-threaded library by default (CMake)
    • Build gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE
    • Build gctba library
    • Build shared libraries by default (WCC_MAKEFILE)
    • Change CLOCK_TYPE to timespec for Nintendo Switch (code refactoring)
    • Change EMSCRIPTEN macro for internal use to no-underscore format
    • Change log_size fields of finalizer to unsigned type (code refactoring)
    • Change type of toggleref_array_size/capacity to size_t (code refactoring)
    • Check leak of objects allocated by CRT malloc in gctest (MS VC)
    • Check real-symbols are already initialized in pthread_join/detach
    • Collapse multiple includes of windows.h (code refactoring)
    • Comments reformatting in mark.c to properly delimit sentences
    • Compile de test GUI app with resources (CMake)
    • Compile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)
    • Compile msvc_dbg.c by CMake script (MS VC)
    • Declare API function and print amount of memory obtained from OS
    • Define GC_win32_free_heap API function for all Windows targets
    • Define STATIC macro to static by default
    • Depend number of fork_a_thread calls on NTHREADS (gctest)
    • Detect dladdr() presence in CMake script
    • Detect presence of execinfo.h system header in CMake script
    • Detect presence of getcontext and dl_iterate_phdr in CMake script
    • Detect sigsetjmp() availability in CMake script
    • Disable Clang/GCC aliasing optimization in CMake script by default
    • Do not build tests by default (Makefile.direct and other Makefiles)
    • Do not build the tests by default (CMake)
    • Do not call GC_push_conditional unless PROC_VDB
    • Do not call add_to_our_memory with null pointer (refactoring)
    • Do not compile pthread_*.c files in Cygwin or MSYS (CMake)
    • Do not define GC_write_cs for Xbox One target
    • Do not define HAVE_NO_FORK for all Unix-like systems
    • Do not hard-code CMAKE_DL_LIBS value and install paths (CMake)
    • Do not hard-code finalizable objects limit which triggers GC
    • Do not update scratch_last_end_ptr unless used by reg dynamic libraries
    • Document GC_incr_bytes_allocd/freed API function
    • Eliminate '(long)size<=0 is always false' cppcheck FP
    • Eliminate 'Consecutive return is unnecessary' cppcheck style warning
    • Eliminate 'accessing GC_dont_gc without lock' in GC_init code defect FP
    • Eliminate 'bytes_freed access w/o lock in incr_bytes_free' code defect FP
    • Eliminate 'checking if unsigned i < 0' cppcheck FP in is_heap_base
    • Eliminate 'hash_val value is never used' cppcheck false positive
    • Eliminate 'passing tainted var maps_buf to tainted sink' code defect FP
    • Eliminate 'retry_cnt is assigned value but never used' cppcheck FP
    • Eliminate 'stop variable is always 0' compiler warning in print_callers
    • Eliminate 'struct member os_callback is never used' cppcheck warning
    • Eliminate 't->flags not atomically updated' code defect FP
    • Eliminate 'tmpl might be accessed at non-zero index' cppcheck error
    • Eliminate GCC warning of unsafe __builtin_return_address(1)
    • Eliminate code duplication in reclaim_clear and disclaim_and_reclaim
    • Eliminate double lock code defect false positive in generic_lock
    • Eliminate memory leak reported in add_current_malloc_heap at exit (Win32)
    • Emscripten single-threaded support (detect stack base, push registers)
    • Enable CMake-based build for Borland and Watcom compilers
    • Enable compilation without C runtime (Win32)
    • Enable fork testing in single-thread builds (Unix-like)
    • Enable mprotect-based incremental GC for Linux/arm and Linux/aarch64
    • Enable true incremental collection even if parallel marker is on
    • Enable use of __builtin_unwind_init() if clang-8 or later
    • Ensure ELFSIZE is defined in dyn_load.c for OpenBSD (code refactoring)
    • Ensure add_to_heap_inner arguments are valid (refactoring)
    • Ensure all getters and setters are run at least once by gctest (pthreads)
    • Export CMake targets with namespace BDWgc
    • Fix 'const obj must be initialized if not extern' error in gc_alloc_ptrs.h
    • Fix ./libgc.la dependency on FreeBSD (Automake)
    • Fix HOST determination in CMake script
    • Fix copyright message in de_win.rc, gc_cpp.cc, ec.h and specific.h
    • Fix missing OS_TYPE definition for some targets
    • Fix mmap(PROT_NONE) failure if RLIMIT_AS value is low (Linux)
    • Generate cordtest and de executable files in GC base folder
    • Generate pkg-config metadata file (CMake)
    • Get rid of some non-ELF ifdefs (code refactoring)
    • Handle potential incomplete buffer read in GC_linux_main_stack_base
    • Implement GET_TIME for Nintendo Switch
    • Increase NTHREADS value in tests if code coverage analysis
    • Install docs and man page if enable_docs (CMake)
    • Install gc_gcj.h and gc_pthread_redirects.h only if appropriate
    • Log abort message details even if not print_stats (unless SMALL_CONFIG)
    • Mark buffer returned by get_maps as const (code refactoring)
    • Move C++ GC_ATTR_EXPLICIT and GC_NOEXCEPT definition to gc_config_macros.h
    • Move GC state non-pointer variables into GC_arrays (code refactoring)
    • Move GC state pointer variables into GC_arrays
    • Move GC_scratch_recycle_inner() to alloc.c (refactoring)
    • Move GC_throw_bad_alloc definition to new C++ file
    • Move QNX and Emscripten macro definitions to proper place in gcconfig.h
    • Move definition of GC_n_mark_procs and GC_n_kinds from mark.c to misc.c
    • New API (GC_set_markers_count) to control number of parallel markers
    • New API function to clear GC exclusion table
    • New API function to get size of object debug header
    • New API standalone functions to acquire and release the allocator lock
    • New CMake option (disable_gc_debug) to remove debugging code
    • New CMake option (disable_handle_fork) to disable fork handling completely
    • New macro (CONSOLE_LOG) to enable logging to console on Win32
    • New macro (GCTEST_PRINT_VERBOSE) to enable verbose logging in test.c only
    • New macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)
    • OpenBSD does not use ELF_CLASS (code refactoring)
    • Pass -D GC_DLL -fvisibility=hidden if default configure build is requested
    • Pass -no-undefined linker flag if building shared libraries (CMake)
    • Print pid of child processes if verbose logging (gctest)
    • Read environment variables from a file on WinCE (CMake script)
    • Reduce stack-allocated buffer in get_nprocs from 4KB to 1.7KB
    • Refine flags field comment in pthread_support.h
    • Reflect result of VDB selection at runtime in incremental_protection_needs
    • Reformat code of GC_push_roots
    • Reformat gc.man (wrap long lines)
    • Reformatting and code refactoring of CMake script
    • Remove 'current users' section from overview.md
    • Remove 'distributed ports', 'scalable versions' sections from overview.md
    • Remove AC_MSG_RESULT for THREADDLLIBS (dgux386)
    • Remove Borland-specific Makefile and gc.mak script
    • Remove GC_eobjfreelist variable in typd_mlc.c (code refactoring)
    • Remove GC_gcj_malloc_initialized variable (code refactoring)
    • Remove Linux-specific commands for building cord/de from Makefile.direct
    • Remove Win32 main_thread static variable if threads discovery is disabled
    • Remove code duplication between GC_unmap and GC_unmap_gap (refactoring)
    • Remove code duplication between PROTECT and UNPROTECT macros (refactoring)
    • Remove commented out assignment of gc_use_mmap in configure (refactoring)
    • Remove dash characters comprising prefix of some verbose logs (gctest)
    • Remove dependency on user32.dll import library from static libgc (Win32)
    • Remove documentation specific to particular old BDWGC releases
    • Remove duplicate Linux-related macro definitions in gcconfig.h
    • Remove duplicate macro definitions in gcconfig.h except for Linux
    • Remove gcmt-dll generation, rename libgc-lib.a to libgc.a (CMake)
    • Remove goto statement in print_callers (code refactoring)
    • Remove limit on number of heap sections
    • Remove new_gc_alloc.h file
    • Remove redundant GC_with_callee_saves_pushed call in multi-threaded builds
    • Remove redundant check of GC_free argument in register_finalizer
    • Remove redundant type casts in backgraph HEIGHT_UNKNOWN/IN_PROGRESS
    • Remove unused GC_prev_heap_addr (refactoring)
    • Remove unused STACK_GRAN macro definitions (code refactoring)
    • Remove unused sparc_sunos4_mach_dep.s file
    • Remove useless empty statements after block ones (refactoring)
    • Remove weakobj_free_list variable in disclaim_weakmap_test (refactoring)
    • Rename READ to PROC_READ in os_dep.c (code refactoring)
    • Rename cord/cord test executable to de (CMake)
    • Rename ext_descr to typed_ext_descr_t (code refactoring)
    • Rename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE
    • Rename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile
    • Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
    • Rename nothreads option to disable_threads in NT_MAKEFILE
    • Repeat run_one_test NTHREADS times by gctest if single-threaded
    • Replace "msecs" with "ms" in all comments and messages
    • Replace 'stack base' with 'stack bottom' in the documentation
    • Replace SN_TARGET_ORBIS to PLATFORM_* and GC_NO_* macros
    • Replace _M_AMD64 macro with _M_X64 (code refactoring)
    • Replace find_limit_openbsd to find_limit_with_bound (OpenBSD 5.2+)
    • Replace obsolete AC_HELP_STRING with AS_HELP_STRING (refactoring)
    • Replace push_one calls with push_many_regs one for Win32 thread context
    • Report memory region bounds and errno on GC_unmap/remap failure
    • Report presence of process fork testing (gctest)
    • Report time with a nanosecond precision where available
    • Retry suspend/resume signals on all platforms by default
    • Run tree and typed tests in child process (gctest)
    • Set GC_collecting hint for GC_collect_a_little_inner calls (pthreads)
    • Set name of GC marker threads
    • Set so-version for installed shared libraries (CMake)
    • Simplify logged message in scratch_recycle
    • Simplify loops of collect_a_little/stopped_mark invoking mark_some
    • Support -fvisibility=hidden option in CMake script
    • Support CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)
    • Support FreeBSD/RISC-V, Linux/arc, LoongArch, OpenBSD/powerpc64
    • Support header files installation (CMake)
    • Support most configure options in CMake script
    • Suppress warnings in test_tinyfl() of gctest reported by Watcom C complier
    • Take nanoseconds into account when updating full_gc_total_time
    • Turn off C++ API by default, export it in gccpp library (CMake)
    • Turn on automatic fork() handling by default on Android
    • Update README.cmake regarding Unix, C++ and tests
    • Update libgc.so version info to differentiate against v8.0.x
    • Update the ASCII diagrams describing the tree structure for pointer lookups
    • Update the documentation to match the current GC implementation
    • Upgrade cmake_minimum_required(version) to 3.1
    • Use CreateThread without GC_ prefix in gctest (code refactoring)
    • Use KB/MB/GB abbreviations uniformly across entire documentation
    • Use USE_MMAP_ANON when USE_MMAP is configured on OpenBSD
    • Use a specific Emscripten allocator for Tiny
    • Use atomic primitives for Sony PlayStation Portable 2 and PS4
    • Use better precision Windows timers
    • Use clock_gettime() instead of clock() on Cygwin and Linux
    • Use compiler TLS on FreeBSD and NetBSD
    • Use mprotect-based VDB on PowerPC and S390 (Linux)
    • Use soft dirty bits on Linux (i386, powerpc, s390, x86_64)
    • Workaround 'condition result<=0 is always false' cppcheck FP in get_maps
    • Workaround 'push_regs configured incorrectly' error (GCC-11)
    • Workaround 'same value in both branches of ternary operator' cppcheck FP
    • Workaround various cppcheck false positives

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-8.2.0.tar.gz (see the Assets above, md5: c3c04af9c1e4209e315eee50efe7b320)

    Source code(tar.gz)
    Source code(zip)
    gc-8.2.0.tar.gz(1.12 MB)
  • v8.0.6(Sep 28, 2021)

    Changes

    • Add loop to handle abort error like in suspend logic on Darwin
    • Add support of OpenBSD/aarch64
    • Add threading libraries to bdw-gc.pc
    • Allocate start_info struct on the stack in GC_pthread_create
    • Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
    • Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
    • Avoid gcc stringop-overflow warning for intended overflow in smashtest
    • Check _MSVC_LANG macro in addition to __cplusplus (MS VC)
    • Compile C++ code with exception handling enabled in NT_MAKEFILE
    • Define OS_TYPE and DATAEND for UWP targets
    • Disable mprotect-based incremental GC if /proc roots are used (Linux)
    • Do not report 'Incremental GC incompatible' warning more than once
    • Do not use Manual VDB mode if C malloc is redirected
    • Do not use iOS private symbols
    • Eliminate 'GC_non_gc_bytes is deprecated' warning in new_gc_alloc.h
    • Eliminate 'GC_old_bus_handler defined but not used' compiler warning
    • Eliminate 'cast between incompatible func types' warnings for FARPROC vars
    • Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
    • Eliminate 'gc_pthread_redirects.h should contain header guard' code defect
    • Eliminate 'implicit declaration of sbrk' gcc warning if -std=c11 on Cygwin
    • Eliminate 'possible loss of data' BCC and MS VC warnings
    • Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
    • Eliminate 'unused function' compiler warnings (GC_add_map_entry, GC_lock)
    • Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
    • Enable sbrk-to-mmap fallback on major supported Unix-like platforms
    • Ensure process is running on one CPU core if AO ops are emulated with locks
    • Explicitly zero-initialize trace_buf (fix trace_buf initialization)
    • Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
    • Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
    • Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
    • Fix 'Wrong __data_start/_end pair' if -Bsymbolic-functions used (Linux)
    • Fix 'condition pred!=NULL is always true' compiler warning
    • Fix 'external linkage required for var because of dllimport' error on MinGW
    • Fix 'ulong undefined' compilation error on AIX
    • Fix 'undefined reference to __data_start' linker error on RISC-V
    • Fix 'use of undeclared BUS_PAGE_FAULT' compilation error on FreeBSD 12
    • Fix 'write to GC log failed' error (Cygwin)
    • Fix 'wrong finalization data' gctest failure on Windows
    • Fix CMake build on macOS Catalina
    • Fix GC_OPENBSD_THREADS definition (OpenBSD/hppa)
    • Fix GC_proc_fd value in child process at fork (Solaris)
    • Fix GC_with_callee_saves_pushed for Android NDK r23 (clang-12)
    • Fix MPROTECT_VDB definition for single-threaded GC builds
    • Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
    • Fix STACKBOTTOM on 32-bit HP/UX 11.11
    • Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
    • Fix assertion violation in register_dynlib_callback on Android
    • Fix build for OS X (CMake)
    • Fix building of shared library with C++ support on MinGW
    • Fix compiling by Makefile.direct on OpenBSD/UltraSparc
    • Fix configure message about 'AIX gcc optimization fix'
    • Fix cordtest build in SMakefile.amiga
    • Fix data race regarding *rlh value in generic_malloc_many
    • Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
    • Fix gc_allocator.h compilation by Clang
    • Fix gc_cflags variable name in configure (HP/UX)
    • Fix handling of areas smaller than page size in GC_scratch_recycle
    • Fix incorrect markup formatting in documentation
    • Fix misaligned tlfs passed to AO_load on m68k
    • Fix missing GC_quiet declaration in pcr_interface.c
    • Fix missing gc_dlopen.c and specific.c in CMake script
    • Fix missing scratch_last_end_ptr update (Irix)
    • Fix mmap() failures on AIX, HP/UX and Haiku
    • Fix overflow of scratch_free_ptr value
    • Fix page_was_[ever_]dirty() for static roots (Solaris)
    • Fix printf format specifier in simple_example.md
    • Fix save_callers for multi-threaded case if built-in backtrace unavailable
    • Fix subexpression widening in memhash() of disclaim_weakmap_test
    • Fix test_cpp failure caused by arbitrary link order (Win32)
    • Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
    • Fix various typos mostly in documentation files
    • Fix word size, data start and alignment for OpenBSD/mips64(el)
    • Include <alloca.h> when using alloca on AIX
    • Limit number of unmapped regions (Linux and DragonFly)
    • New macro to avoid system-wide new/delete inlining in gc_cpp.h (Win32)
    • Prevent GetThreadContext failure (Windows)
    • Prevent WARN of incompatible incremental GC if default or manual VDB
    • Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
    • Refactoring of WoW64 workaround (Win32)
    • Refine GC_INIT documentation about its multiple invocation
    • Refine GC_parallel documentation in gc.h
    • Refine do_blocking() documentation in gc.h
    • Remove a misleading comment about Solaris in gc.h
    • Remove cord .h files from list of non-installed headers (Automake)
    • Remove dead part of condition to define NEED_FIND_LIMIT in gc_priv.h
    • Remove gcmt-lib generation by CMake
    • Support MSYS builds by CMake and configure
    • Update documentation about the incremental collector support
    • Use HEURISTIC2 on OpenBSD when single-threaded
    • Use pstat_getprocvm to determine main stack bottom on HP-UX
    • Workaround 'expression is only useful for its side effects' WCC warning
    • Workaround clang-3.8/s390x bug when processing __builtin_frame_address
    • Workaround fread fail after enable_incremental if malloc redirected (Linux)

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-8.0.6.tar.gz (see the Assets above, md5: 4878e629f482600f2060f30853c7b415)

    Source code(tar.gz)
    Source code(zip)
    gc-8.0.6.tar.gz(1.11 MB)
  • v7.6.14(Sep 28, 2021)

    Changes

    • Add loop to handle abort error like in suspend logic on Darwin
    • Add support of OpenBSD/aarch64
    • Add threading libraries to bdw-gc.pc
    • Disable mprotect-based incremental GC if /proc roots are used (Linux)
    • Do not use iOS private symbols
    • Eliminate 'GC_old_bus_handler defined but not used' compiler warning
    • Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
    • Eliminate 'possible loss of data' BCC and MS VC warnings
    • Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
    • Eliminate 'unused function GC_add_map_entry' compiler warning
    • Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
    • Explicitly zero-initialize trace_buf (fix trace_buf initialization)
    • Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
    • Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
    • Fix 'ulong undefined' compilation error on AIX
    • Fix 'undefined reference to __data_start' linker error on RISC-V
    • Fix 'write to GC log failed' error
    • Fix GC_proc_fd value in child process at fork (Solaris)
    • Fix MPROTECT_VDB definition for single-threaded GC builds
    • Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
    • Fix STACKBOTTOM on 32-bit HP/UX 11.11
    • Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
    • Fix assertion violation in register_dynlib_callback on Android
    • Fix compiling by Makefile.direct on OpenBSD/UltraSparc
    • Fix configure message about 'AIX gcc optimization fix'
    • Fix cordtest build in SMakefile.amiga
    • Fix data race regarding *rlh value in generic_malloc_many
    • Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
    • Fix gc_allocator.h compilation by Clang
    • Fix gc_cflags variable name in configure (HP/UX)
    • Fix handling of areas smaller than page size in GC_scratch_recycle
    • Fix incorrect define GC_OPENBSD_THREADS on sparc64
    • Fix misaligned tlfs passed to AO_load on m68k
    • Fix missing GC_quiet declaration in pcr_interface.c
    • Fix missing gc_dlopen.c in CMake script
    • Fix missing scratch_last_end_ptr update (Irix)
    • Fix overflow of scratch_free_ptr value
    • Fix page_was_[ever_]dirty() for static roots (Solaris)
    • Fix printf format specifier in simple_example.html
    • Fix save_callers for multi-threaded case if built-in backtrace unavailable
    • Fix test_cpp failure caused by arbitrary link order (Win32)
    • Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
    • Fix various typos mostly in documentation files
    • Fix word size, data start and alignment for OpenBSD/mips64(el)
    • Prevent GetThreadContext failure (Windows)
    • Prevent WARN of incompatible incremental GC if default or manual VDB
    • Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
    • Refactoring of WoW64 workaround (Win32)
    • Remove a misleading comment about Solaris in gc.h
    • Workaround 'expression is only useful for its side effects' WCC warning
    • Workaround fread fail after enable_incremental if malloc redirected (Linux)

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-7.6.14.tar.gz (see the Assets above, md5: ac08ee4a73d69dac6ce1d725d20a2008)

    Source code(tar.gz)
    Source code(zip)
    gc-7.6.14.tar.gz(1.09 MB)
  • v7.4.20(Sep 28, 2021)

    Changes

    • Add loop to handle abort error like in suspend logic on Darwin
    • Disable mprotect-based incremental GC if /proc roots are used (Linux)
    • Do not hold GC_fault_handler_lock when in Sleep (Windows)
    • Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
    • Eliminate 'unused function GC_add_map_entry' compiler warning
    • Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
    • Explicitly zero-initialize trace_buf (fix trace_buf initialization)
    • Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
    • Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
    • Fix 'expected function body after declarator' clang error in gc_cpp.cc
    • Fix 'write to GC log failed' error
    • Fix GC_proc_fd value in child process at fork (Solaris)
    • Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
    • Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
    • Fix assertion violation in register_dynlib_callback on Android
    • Fix configure message about 'AIX gcc optimization fix'
    • Fix cordtest build in SMakefile.amiga
    • Fix data race regarding *rlh value in generic_malloc_many
    • Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
    • Fix fread failure after enable_incremental if malloc is redirected (Linux)
    • Fix gc_cflags variable name in configure (HP/UX)
    • Fix handling of areas smaller than page size on recycle scratch area
    • Fix incorrect define GC_OPENBSD_THREADS on sparc64
    • Fix misaligned tlfs passed to AO_load on m68k
    • Fix missing GC_quiet declaration in pcr_interface.c
    • Fix missing gc_dlopen.c in CMake script
    • Fix missing scratch_last_end_ptr update (Irix)
    • Fix overflow of scratch_free_ptr value
    • Fix page_was_[ever_]dirty() for static roots (Solaris)
    • Fix printf format specifier in simple_example.html
    • Fix save_callers for multi-threaded case if built-in backtrace unavailable
    • Fix various typos in comments and documentation files
    • Fix word size, data start and alignment for OpenBSD/mips64(el)
    • Prevent GetThreadContext failure (Windows)
    • Prevent WARN of incompatible incremental GC if default or manual VDB
    • Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
    • Refactoring of WoW64 workaround (Win32)
    • Remove a misleading comment about Solaris in gc.h

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.4.20.tar.gz (see the Assets above, md5: c84a52a6fdb38adb55e6394681f46651)

    Source code(tar.gz)
    Source code(zip)
    gc-7.4.20.tar.gz(1.07 MB)
  • v7.2o(Sep 28, 2021)

    Changes

    • Add loop to handle abort error like in suspend logic on Darwin
    • Disable mprotect-based incremental GC if /proc roots are used (Linux)
    • Explicitly zero-initialize trace_buf (fix trace_buf initialization)
    • Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
    • Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
    • Fix 'expected function body after declarator' clang error in gc_cpp.cc
    • Fix 'write to GC log failed' error
    • Fix GC_proc_fd value in child process at fork (Solaris)
    • Fix assertion violation in register_dynlib_callback on Android
    • Fix configure message about 'AIX gcc optimization fix'
    • Fix data race regarding *rlh value in generic_malloc_many
    • Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
    • Fix fread failure after enable_incremental if malloc is redirected (Linux)
    • Fix gc_cflags variable name in configure (HP/UX)
    • Fix handling of areas smaller than page size on recycle scratch area
    • Fix incorrect define GC_OPENBSD_THREADS on sparc64
    • Fix misaligned tlfs passed to AO_load on m68k
    • Fix missing GC_quiet declaration in pcr_interface.c
    • Fix missing gc_dlopen.c in CMake script
    • Fix missing scratch_last_end_ptr update (Irix)
    • Fix overflow of scratch_free_ptr value
    • Fix page_was_[ever_]dirty() for static roots (Solaris)
    • Fix printf format specifier in simple_example.html
    • Fix save_callers for multi-threaded case if built-in backtrace unavailable
    • Fix various typos in comments and documentation files
    • Fix word size, data start and alignment for OpenBSD/mips64(el)
    • Prevent WARN of incompatible incremental GC if default or manual VDB
    • Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
    • Remove a misleading comment about Solaris in gc.h

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.2o.tar.gz (see the Assets above, includes a copy of libatomic_ops-7.2j, md5: f86c1b25c21cb0855deafe5756e4dc8d)

    Source code(tar.gz)
    Source code(zip)
    gc-7.2o.tar.gz(1.32 MB)
  • v8.0.4(Mar 2, 2019)

    Changes

    • Avoid a full GC when growing finalizer tables if in incremental mode
    • Avoid potential race in hb_sz access between realloc and reclaim_block
    • Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
    • Avoid unexpected heap growth in gctest caused by GC_disable
    • Ensure result of every variant of MS_TIME_DIFF has unsigned long type
    • Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
    • Fix 'undefined reference to __data_start' linker error (Android/aarch64)
    • Fix 'unexpected mark stack overflow' abort in push_all_stack
    • Fix 'wrong __data_start/_end pair' error on Android
    • Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
    • Fix GetThreadContext stale register values use if WoW64 (Win32)
    • Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
    • Fix thread_info() count argument value (OS X)
    • Support de_win.c compilation by Makefile.direct (cord/de)

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-8.0.4.tar.gz (see the Assets above, md5: 67a5093e2f9f381bd550aa891d00b54b)

    Source code(tar.gz)
    Source code(zip)
    gc-8.0.4.tar.gz(1.10 MB)
  • v7.6.12(Mar 1, 2019)

    Changes

    • Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
    • Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
    • Fix 'undefined reference to __data_start' linker error (Android/aarch64)
    • Fix 'unexpected mark stack overflow' abort in push_all_stack
    • Fix 'wrong __data_start/_end pair' error on Android
    • Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
    • Fix GetThreadContext stale register values use if WoW64 (Win32)
    • Fix executable memory allocation in GC_unix_get_mem
    • Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
    • Fix thread_info() count argument value (OS X)
    • Update NO_EXECUTE_PERMISSION documentation

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-7.6.12.tar.gz (see the Assets above, md5: 8175e1be00c6cd6eac2e8d67bdf451df)

    Source code(tar.gz)
    Source code(zip)
    gc-7.6.12.tar.gz(1.09 MB)
  • v7.4.18(Mar 1, 2019)

  • v7.2n(Mar 1, 2019)

    Changes

    • Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
    • Fix 'unexpected mark stack overflow' abort in push_all_stack
    • Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
    • Fix GetThreadContext stale register values use if WoW64 (Win32)
    • Fix executable memory allocation in GC_unix_get_mem
    • Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.2n.tar.gz (see the Assets above, includes a copy of libatomic_ops-7.2i, md5: 1c86a0e7c7bccabaa2d8383e1014f5c8)

    Source code(tar.gz)
    Source code(zip)
    gc-7.2n.tar.gz(1.31 MB)
  • v8.0.2(Dec 23, 2018)

    Changes

    • Abort with appropriate message if executable pages cannot be allocated
    • Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
    • Add paths to filenames mentioned in the copyright section in README
    • Add test using disclaim notifiers to implement a weak map
    • Adjust #error messages format
    • Allow to force executable pages allocation in gctest
    • Avoid potential 'macro redefinition' errors for config.h macros
    • Call real pthread_sigmask instead of its wrapper in start_mark_threads
    • Check result of pthread_mutex_unlock in specific.c
    • Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
    • Default to non-executable memory allocation across all make scripts
    • Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
    • Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
    • Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
    • Do not use spin locks if AO test-and-set is emulated (pthreads)
    • Document HANDLE_FORK macro optional usage in Makefile.direct
    • Document assertion in the setters that used to return old value
    • Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
    • Eliminate 'casting signed to bigger unsigned int' CSA warning
    • Eliminate 'different const qualifiers' MS VC warnings in cordbscs
    • Eliminate 'function is never used' cppcheck warning for calloc/realloc
    • Eliminate 'non-virtual destructor for class with inheritors' CSA warning
    • Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
    • Eliminate 'struct member is never used' cppcheck warnings in os_dep
    • Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
    • Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
    • Eliminate redundant check in backwards_height
    • Fix 'USE_MUNMAP macro redefinition' error for NaCl
    • Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
    • Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
    • Fix 'too wide non-owner permissions are set for resource' code defect
    • Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
    • Fix GC_register_disclaim_proc for leak-finding mode
    • Fix a deadlock in write_fault_handler if AO_or is emulated
    • Fix comment typo in CMakeLists.txt
    • Fix concurrent bitmap update in GC_dirty
    • Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
    • Fix executable memory allocation in GC_unix_get_mem
    • Fix hbp overflow in GC_install_counts
    • Fix linkage with a system libatomic_ops shared library
    • Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
    • Fix marking of finalizer closure object
    • Fix marks and hb_n_marks consistency when disclaim returns true
    • Fix memory allocation on GCF (Linux/x64)
    • Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
    • Fix test_cpp assertion violation in find-leak mode
    • Fix tests linkage with internal atomic_ops.o
    • Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
    • Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
    • New macro to suppress printing of leaked objects
    • Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
    • Prefix internal durango_get_mem symbol with 'GC_'
    • Prevent double inclusion of javaxfc.h and private/specific.h
    • Print relevant message in tests not appropriate for leak detection mode
    • Reduce scope of local variables in GC_remove_all_threads_but_me
    • Refine HIDE_POINTER documentation for the case of the leak-finding mode
    • Refine documentation in gc_disclaim.h
    • Remove extra USE_MMAP definition for Interix
    • Remove redundant header double-inclusion checks in the private headers
    • Remove strlen calls with a constant string argument in msvc_dbg
    • Specify register_disclaim_proc and finalized_malloc argument as non-null
    • Support UWP/arm64 target
    • Test marking of finalizer closure object in disclaim_test
    • Turn off leak detection mode explicitly in cord/de
    • Turn off parallel marker, thread-local allocation if used AO ops emulated
    • Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
    • Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
    • Update NO_EXECUTE_PERMISSION documentation
    • Update documentation about arm64 ABI in gcconfig.h
    • Use AO_or in async_set_pht_entry_from_index if available
    • Use GC_WORD_MAX macro across all C source files
    • Use macro to operate on a flag residing in GC_stop_count
    • Use standalone private macro to guard against ptr_t redefinition
    • Workaround '#error' cppcheck messages in backgraph and private headers
    • Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
    • Workaround 'GC_dump function is never used' cppcheck warning
    • Workaround 'local address assignment to a global variable' CSA warning
    • Workaround 'local variable end shadows outer symbol' cppcheck warnings
    • Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
    • Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
    • Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
    • Workaround 'potential non-terminated string' false positive in cordbscs
    • Workaround 'value of _MAX_PATH is unknown' cppcheck warning
    • Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-8.0.2.tar.gz (see the Assets above, md5: 0c3e5a2de567a4f199dc07740bbf21d1)

    Source code(tar.gz)
    Source code(zip)
    gc-8.0.2.tar.gz(1.10 MB)
  • v7.6.10(Dec 13, 2018)

    Changes

    • Add paths to filenames mentioned in the copyright section in README
    • Call real pthread_sigmask instead of its wrapper in start_mark_threads
    • Eliminate 'casting signed to bigger unsigned int' CSA warning
    • Eliminate 'non-virtual destructor for class with inheritors' CSA warning
    • Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
    • Fix 'too wide non-owner permissions are set for resource' code defect
    • Fix 'undefined reference to GC_incremental' linker error in pthread_start
    • Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
    • Fix GC_register_disclaim_proc for leak-finding mode
    • Fix a deadlock in write_fault_handler if AO_or is emulated
    • Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
    • Fix concurrent bitmap update in GC_dirty
    • Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
    • Fix hbp overflow in GC_install_counts
    • Fix linkage with a system libatomic_ops shared library
    • Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
    • Fix marking of finalizer closure object
    • Fix marks and hb_n_marks consistency when disclaim returns true
    • Fix memory allocation on GCF (Linux/x64)
    • Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
    • Fix start_world not resuming all threads on Darwin
    • Fix test_cpp assertion violation in find-leak mode
    • Fix tests linkage with internal atomic_ops.o
    • Fix unneeded end_stubborn_change in disclaim_test
    • Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
    • New macro to suppress printing of leaked objects
    • Prevent double inclusion of javaxfc.h and private/specific.h
    • Reduce scope of local variables in GC_remove_all_threads_but_me
    • Refine HIDE_POINTER documentation for the case of the leak-finding mode
    • Refine documentation in gc_disclaim.h
    • Test marking of finalizer closure object in disclaim_test
    • Update documentation about arm64 ABI in gcconfig.h
    • Use AO_or in async_set_pht_entry_from_index if available
    • Use include gc.h with the angle brackets in the man page synopsis

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-7.6.10.tar.gz (see the Assets above, md5: 28bf15c7a5618715877a451f2721586c)

    Source code(tar.gz)
    Source code(zip)
    gc-7.6.10.tar.gz(1.09 MB)
  • v7.4.16(Dec 13, 2018)

    Changes

    • Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
    • Fix 'undefined reference to GC_incremental' linker error in pthread_start
    • Fix GC_register_disclaim_proc for leak-finding mode
    • Fix concurrent bitmap update in GC_dirty
    • Fix marking of finalizer closure object
    • Fix marks and hb_n_marks consistency when disclaim returns true
    • Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
    • Refine documentation in gc_disclaim.h

    Also, includes 7.2m changes

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.4.16.tar.gz (see the Assets above, md5: b27f2e9d2248d1b0a87ac18964eb5b43)

    Source code(tar.gz)
    Source code(zip)
    gc-7.4.16.tar.gz(1.06 MB)
  • v7.2m(Dec 11, 2018)

  • v8.0.0(Sep 5, 2018)

    Changes

    • Accept Android platform by both CMake and configure
    • Access finalize_now atomically to avoid TSan warning without no-sanitize
    • Acknowledge thread restart from suspend_handler (NetBSD)
    • Add a sanity check that load_acquire and store_release are available
    • Add AO primitives implementation to GC based on C11 atomic intrinsic
    • Add assertion for suspend_ack_sem in start_world
    • Add assertion to allocobj that live unmarked object cannot be reclaimed
    • Add assertions about held lock when accessing all_bottom_indices
    • Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
    • Add assertions to finalize and threads support for MANUAL_VDB needs
    • Add basic calculation of the total full-collection time
    • Add check that gc_cpp operator delete is called (test_cpp)
    • Add debug logging to new_thread about GC_threads hash table collisions
    • Add GC prefix to _MSVC_DBG_H macro
    • Add initial RISC-V support
    • Add Makefile target to run all tests without test-driver
    • Add test_atomic_ops to perform minimal testing of used atomic primitives
    • Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
    • Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
    • Allocate non-executable memory by default (CMake)
    • Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
    • Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
    • Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
    • Allow disabling of dynamic loading in CMake script and configure
    • Allow disabling of main static data registration in CMake and configure
    • Allow disabling of threads discovery in CMake script and configure
    • Allow gc_assertions enabling in CMake script
    • Allow gc_debug, redirect_malloc, large_config options in CMake script
    • Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
    • Allow mmap enabling in CMake script and configure
    • Allow passing -D DEFAULT_VDB to CFLAGS
    • Allow subthreadcreate_test to be compiled with zero NTHREADS
    • Allow to turn on spin locking even if thread-local allocations are used
    • Always include gc_atomic_ops.h unless threads are disabled
    • Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
    • Avoid duplication of code handling pthreads case in configure
    • Avoid potential data race during apply_to_each_object(reset_back_edge)
    • Avoid potential data race during GC_dump execution
    • Avoid potential race between malloc_kind and mark_thread_local_fls_for
    • Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
    • Avoid potential race in print_static_roots called by dyld_image_add/remove
    • Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
    • Avoid potential race when accessing size_map table
    • Avoid potential race when storing oh_back_ptr during parallel marking
    • Avoid SIGSEGV during GC_INIT on some Android devices
    • Build only shared libraries by default (configure)
    • Change pointer arguments of push_all[_eager]/conditional API to void* type
    • Change type of hb_sz field (of hblkhdr) from size_t to word
    • Check consistency of descr, adjust, clear arguments of GC_new_kind
    • Check that GC_WIN32_PTHREADS is not specified for Cygwin
    • Check thread_local is initialized before accessing thread_key
    • Collapse multiple BCOPY_EXISTS macro definitions
    • Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
    • Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
    • Compile checksums.c only if --enable-checksums is given (configure)
    • Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
    • Convert .html files to Markdown format
    • Convert code of .c files to valid C++ code
    • Decide between memory unmapping and mprotect-based dirty bits at runtime
    • Declare t local variable in the block where the variable is used
    • Define ABORT() using _CrtDbgBreak (if available) on Windows host
    • Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
    • Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
    • Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
    • Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
    • Define GC_THREADS instead of GC_x_THREADS in Makefiles
    • Define macro to specify the environment file name extension (Win32/WinCE)
    • Define static resend_lost_signals(), restart_all() in pthread_stop_world
    • Detect sigsetjmp() availability by configure
    • Determine whether to use compiler TLS for kFreeBSD at compile time
    • Do not call BCOPY and BZERO if size is zero
    • Do not call sem_getvalue in stop_world if one thread exists
    • Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
    • Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
    • Do not declare dl_iterate_phdr as weak for kFreeBSD
    • Do not include windows.h when compiling gc_cpp.cc
    • Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
    • Do not merge dynamic root with the existing static one in add_roots_inner
    • Do not print n_rescuing_pages value if incremental collections disabled
    • Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
    • Do not rebuild_root_index unless remove_root_at_pos is called
    • Do not specify version info for test libraries (Automake)
    • Do not use alternate thread library on Solaris
    • Do not use asm in GC_pause
    • Do not use PKG_CHECK_MODULES in configure
    • Do not use system clock consistently if NO_CLOCK
    • Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
    • Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
    • Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
    • Eliminate 'comparison is always false' code defect in get_maps
    • Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
    • Eliminate 'potential unsafe sign check of a bitwise operation' code defect
    • Enable alternative finalization interface (DISCLAIM) in all makefiles
    • Enable compilation for Cygwin with MPROTECT_VDB
    • Enable handle-fork and memory unmapping by default
    • Enable mprotect-based incremental GC for Win64 (GCC)
    • Expose API to control rate and max prior attempts of collect_a_little
    • Expose API to control the minimum bytes allocated before a GC occurs
    • Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
    • Fix 'doc' files installation folder
    • Fix build of cord tests as C++ files (Makefile.direct)
    • Fix comment typos in backgraph.c, de.c, gcconfig.h
    • Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
    • Fix start_world not resuming all threads on Darwin
    • Fix test_cpp failure in case GC_DEBUG is defined
    • Group common defines for POSIX platforms in configure and CMake scripts
    • Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
    • Handle pthread restart signals loss if retry_signals
    • Hide value stored to thread-specific entries for a test purpose
    • Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
    • Implement memory unmapping for Sony PS/3
    • Imply configure --single-obj-compilation if --disable-static
    • Include malloc.c in extra/gc.c after include gc_inline.h
    • Increase MAX_HEAP_SECTS (10 times) for large-config
    • Initial single-threaded support of Interix subsystem
    • Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
    • Initial support of TIZEN platform
    • Install gc.3 man page instead of copying gc.man to doc folder (configure)
    • Make extend_size_map() static (code refactoring)
    • Make subthreadcreate test compilable even without libatomic_ops
    • Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
    • Move de_win compiled resource files to cord/tests
    • Move pcr_interface.c, real_malloc.c to 'extra' folder
    • New API function (GC_dump_named) to produce named dumps
    • New API function (GC_is_incremental_mode)
    • New API function (get_expl_freed_bytes_since_gc)
    • New API function (get_size_map_at) to get content of size_map table
    • New API to stop and start the GC world externally
    • New API to turn on manual VDB at runtime
    • New field (expl_freed_bytes_since_gc) in public prof_stats_s
    • New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
    • New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
    • Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
    • Print time passed since GC initialization in GC_dump
    • Public API (GC_deinit) to allow Win32 critical sections deletion
    • Reduce probability of collision in threads hashtable for 64-bit targets
    • Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
    • Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
    • Reformat code and comments in gc_allocator.h
    • Remove 'dist' target from Makefile.direct
    • Remove a redundant check of __cplusplus in Symbian-specific .cpp files
    • Remove Android-specific code in gcconfig.h for M68K
    • Remove C++ WeakPointer and CleanUp API which lacks implementation
    • Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
    • Remove done_init static variable from fnlz_mlc.c
    • Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
    • Remove duplicated sample code in leak.md
    • Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
    • Remove GC code fragment (which already merged) from README.Mac
    • Remove GC_GNU_THREADS macro (HURD)
    • Remove GENERAL_MALLOC internal macro
    • Remove HIGH_BIT macro duplicating SIGNB
    • Remove lint-specific code
    • Remove Makefile KandRtest target (that supported K&R C compiler)
    • Remove MIN_WORDS macro from gc_priv.h
    • Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
    • Remove name of optional arguments of operator new and new[] in gc_cpp.h
    • Remove notes that K&R C compiler is unsupported
    • Remove PUSH_CONTENTS_HDR multi-line macro
    • Remove redundant check that clear_fl_marks argument is non-null
    • Remove redundant THREADS macro checks in alloc.c and gc_priv.h
    • Remove stubborn objects allocation code completely, remove stubborn.c
    • Remove unnecessary argument casts in add_roots_inner calls
    • Remove unnecessary type casts in n_set_marks
    • Remove unused USE_GENERIC macro definition and description
    • Remove version info in 'de' cord test application
    • Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
    • Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
    • Replace some FIXME items with TODO ones
    • Run command passed to if_not_there directly from Makefile.direct
    • Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
    • Skip grungy_pages update when mark state invalid to speedup read_dirty
    • Skip typed_test in gctest if NO_TYPED_TEST macro is defined
    • Support configure --disable-thread-local-alloc option (similar for CMake)
    • Support enable_checksums option in CMake script
    • Support Haiku multi-threaded build by CMake
    • Support threads for DragonFly in configure
    • Turn on 'atomic uncollectable' functionality by default (CMake)
    • Turn on GC assertions in NT_MAKEFILE for debug builds
    • Turn on gcj, disclaim and java finalization by default (CMake)
    • Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
    • Turn on incremental mode in cordtest and cord/de
    • Turn on incremental mode in disclaim_test, test_cpp and staticroots test
    • Turn on parallel marker by default for all multi-threaded builds
    • Update GC compilation and usage notes for Win32
    • Update shared libraries version info to differentiate against v7.6
    • Update top_index entry pointer only when the entry is constructed fully
    • Use __builtin_expect in SIZET_SAT_ADD macro
    • Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
    • Use __int64 instead of 'long long' in LONG_MULT if appropriate
    • Use __thread keyword for Android NDK r12b+ Clang (arm)
    • Use atomic allocation for leafs in reverse_test (gctest)
    • Use atomic load/store for the concurrently accessed variables in GC_lock
    • Use C11 static_assert if available
    • Use compiler atomic intrinsics by default if available (configure)
    • Use EXPECT FALSE for mark_from code documented as executed rarely
    • Use heap-allocated memory for local mark stack of non-marker thread
    • Use HOST_ANDROID define instead of PLATFORM_ANDROID
    • Use include gc.h with the angle brackets in the man page synopsis
    • Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
    • Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
    • Use noexcept specifier in gc_allocator and gc_cpp if C++11
    • Use same macro (NTHREADS) across all tests to specify number of threads
    • Use sigsetjmp() in setjmp_t tool if available
    • Use thread-local allocations for all multi-threaded builds
    • Use THREAD_EQUAL consistently to compare pthread_t values
    • Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
    • Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
    • Workaround Thread Sanitizer (TSan) false positive warnings

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-8.0.0.tar.gz (see the Assets above, md5: e1a614247b6d6a071f7677365fbf18a4)

    Source code(tar.gz)
    Source code(zip)
    gc-8.0.0.tar.gz(1.08 MB)
  • v7.6.8(Aug 12, 2018)

    Changes

    • Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
    • Add NetBSD/aarch64 and initial RISC-V support
    • Adjust formatting of configure help messages and config.h comments
    • Avoid multiple 'getcontext failed' warnings if getcontext is broken
    • Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
    • Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
    • Do not call GC_dirty_inner unless GC_incremental
    • Do not use NULL in gc_inline.h
    • Eliminate 'cast between incompatible function types' compiler warning
    • Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
    • Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
    • Eliminate 'declaration of var hides global declaration' compiler warning
    • Eliminate 'language extension used' Clang warning in gc.h
    • Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
    • Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
    • Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
    • Eliminate 'switch statement contains no case label' compiler warning
    • Eliminate 'variable might be uninitialized' warning in win32_start_inner
    • Eliminate duplicate clear_mark_bit call when removing disappearing link
    • Fast fail on invalid CPU parameter passed to NT_MAKEFILE
    • Fix 'collecting from unknown thread' abort in leak-finding mode
    • Fix 'pointer arithmetic with NULL' code defect in print_callers
    • Fix Borland version in documentation to match that in BCC_MAKEFILE
    • Fix comment about inv_sz computation in setup_header
    • Fix comments style in configure.ac and Makefile.am
    • Fix compilation by digimars.mak (DMC)
    • Fix compilation by WCC makefile
    • Fix compilation of darwin_stop_world for iOS 8+
    • Fix cords for MANUAL_VDB
    • Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
    • Fix GC_is_valid_displacement and GC_is_visible for non-small objects
    • Fix gctest in leak-finding mode
    • Fix infinite restarting of mark_some when a static root disappeared (Linux)
    • Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
    • Fix mark stack overflow checking in push_selected
    • Fix missing GC_dirty calls for GC-allocated objects used internally
    • Fix missing GC_dirty invocation from debug_end_stubborn_change
    • Fix MSWIN32 macro redefinition (WCC)
    • Fix multi-threaded gctest for the case of NTHREADS is set to zero
    • Fix new and delete operators definition for DigitalMars compiler
    • Fix NT_MAKEFILE for VS 2017
    • Fix potential null dereference in GC_CONS
    • Fix register_dynamic_libraries on Windows 10
    • Fix result computation in n_set_marks
    • Fix return type in GC_set_warn_proc API documentation
    • Fix tests for GC compiled with MANUAL_VDB
    • Fix the build for Emscripten
    • Fix typo in comment for CORD_ec_flush_buf prototype
    • Fix typos in ChangeLog and generic_malloc
    • Fix UNTESTED for multi-threaded API functions in gctest
    • Fix VirtualQuery call in case of malloc failure (Win32)
    • Install gc.3 man page instead of copying gc.man to doc folder (configure)
    • Keep pointer to the start of previous entry in remove_specific_after_fork
    • Move de_win compiled resource files to cord/tests
    • Never return null by C++ GC allocators and gc_cpp operator new
    • Perform thread_suspend in loop as it may be interrupted (Darwin)
    • Really abort if failed to read /proc for library registration (Linux)
    • Remove code duplication in gcj_malloc and malloc_explicitly_typed
    • Remove duplicate local variable in reclaim_block
    • Remove information how to send bugs from README.cords file
    • Remove libatomic_ops license information
    • Remove unused USE_GENERIC macro definition and description
    • Suppress 'functions containing switch are not expanded inline' bcc warning
    • Suppress 'non-member operator new/delete may not be inline' VC++ warning
    • Turn on incremental collection in gctest also if MANUAL_VDB
    • Update copyright information in alloc.c, gc.c/h and the documentation
    • Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
    • Update NT_MAKEFILE usage information in README files for Win32 and Win64
    • Workaround 'class C does not have a copy constructor' cppcheck warning
    • Workaround 'function nested_sp is never used' cppcheck style warning
    • Workaround 'opposite expression on both sides of &' cppcheck style warning
    • Workaround 'template-id not supported in this context' compiler error (WCC)

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-7.6.8.tar.gz (see the Assets above, md5: 9ae6251493ead5d0d13b044954cec7d7)

    Source code(tar.gz)
    Source code(zip)
    gc-7.6.8.tar.gz(1.07 MB)
  • v7.4.14(Aug 11, 2018)

    Changes

    • Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
    • Do not call GC_dirty_inner unless GC_incremental
    • Eliminate 'cast between incompatible function types' compiler warning
    • Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
    • Eliminate 'language extension used' Clang warning in gc.h
    • Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
    • Eliminate 'switch statement contains no case label' compiler warning
    • Eliminate 'variable might be uninitialized' warning in win32_start_inner
    • Eliminate duplicate clear_mark_bit call when removing disappearing link
    • Fix 'collecting from unknown thread' abort in leak-finding mode
    • Fix compilation by digimars.mak (DMC) and by WCC makefile
    • Fix cords for MANUAL_VDB
    • Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
    • Fix gctest in leak-finding mode
    • Fix missing GC_dirty calls for GC-allocated objects used internally
    • Fix missing GC_dirty invocation from debug_end_stubborn_change
    • Fix multi-threaded gctest for the case of NTHREADS is set to zero
    • Fix typos in ChangeLog and generic_malloc
    • Keep pointer to the start of previous entry in remove_specific_after_fork
    • New API function (GC_is_init_called) to check if BDWGC is initialized
    • Remove code duplication in gcj_malloc and malloc_explicitly_typed
    • Remove duplicate local variable in reclaim_block
    • Remove libatomic_ops license information from README
    • Workaround 'dynamic exception specifications deprecated in C++11' warning

    Also, includes 7.2l changes

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.4.14.tar.gz (see the Assets above, md5: 693ed1efc25e04a7a1113477800c2033)

    Source code(tar.gz)
    Source code(zip)
    gc-7.4.14.tar.gz(1.05 MB)
  • v7.2l(Aug 10, 2018)

    Changes

    • Fix 'pointer arithmetic with NULL' code defect in print_callers
    • Fix Borland version in documentation to match that in BCC_MAKEFILE
    • Fix comment about inv_sz computation in setup_header
    • Fix comments style in configure.ac and Makefile.am
    • Fix GC_is_valid_displacement and GC_is_visible for non-small objects
    • Fix global operator delete definition for C++14 in gc_cpp
    • Fix infinite restarting of mark_some when a static root disappeared (Linux)
    • Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
    • Fix mark stack overflow checking in push_selected
    • Fix MSWIN32 macro redefinition (WCC)
    • Fix potential null dereference in GC_CONS
    • Fix register_dynamic_libraries on Windows 10
    • Fix result computation in n_set_marks
    • Fix return type in GC_set_warn_proc API documentation
    • Fix typo in comment for CORD_ec_flush_buf prototype
    • Fix typos in ChangeLog
    • Fix VirtualQuery call in case of malloc failure (Win32)
    • Install gc.3 man page instead of copying gc.man to doc folder (configure)
    • Perform thread_suspend in loop as it may be interrupted (Darwin)
    • Workaround 'template-id not supported in this context' compiler error (WCC)

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.2l.tar.gz (see the Assets above, includes a copy of libatomic_ops-7.2i, md5: f4850e5c621cf92f14fff183a7abb450)

    Source code(tar.gz)
    Source code(zip)
    gc-7.2l.tar.gz(1.29 MB)
  • v7.6.6(Apr 20, 2018)

    Changes

    • Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
    • Eliminate 'boolean result used in bitwise operation' cppcheck warning
    • Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
    • Explicitly unblock GC signals on GC initialization
    • Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
    • Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
    • Fix arguments delimiter in pcr_interface.c (PCR)
    • Fix assertion violation in DllMain of win32_threads
    • Fix comment for debug_generic_malloc_inner[_ignore_off_page]
    • Fix data race during apply_to_each_object(reset_back_edge)
    • Fix dbg_mlc.c/o file name in documentation
    • Fix gctest with musl libc on s390x
    • Fix include gc_gcj.h in thread_local_alloc.c
    • Fix man section number (3)
    • Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
    • Fix missing new-line in ABORT_ARG definition
    • Fix missing SIGBUS handler setup for kFreeBSD
    • Fix null dereference in print_callers on backtrace_symbols failure
    • Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
    • Fix the collector hang when it is configured with --enable-gc-debug
    • Fix thread_suspend fail for threads registered from key destructor (OS X)
    • Fix type of local variables receiving result of PHT_HASH
    • Fix typo in AIX macro name
    • Fix typo in comment in specific.h
    • Fix unbounded heap growth in case of intensive disappearing links usage
    • Remove API symbols renaming in WCC_MAKEFILE
    • Support Haiku/amd64 and Haiku/x86 hosts
    • Support threads for DragonFly in configure
    • Workaround 'address of auto-variable returned' cppcheck error
    • Workaround gctest hang on kFreeBSD (if thread-local allocations are on)

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-7.6.6.tar.gz (see the Assets above, md5: c3df4f64f61433f6688ce9257a71fad4)

    Source code(tar.gz)
    Source code(zip)
    gc-7.6.6.tar.gz(1.07 MB)
  • v7.4.12(Apr 19, 2018)

    Changes

    • Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
    • Fix comment for debug_generic_malloc_inner[_ignore_off_page]
    • Fix gctest with musl libc on s390x
    • Fix missing new-line in ABORT_ARG definition
    • Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
    • Fix type of local variables receiving result of PHT_HASH
    • Remove API symbols renaming in WCC_MAKEFILE

    Also, includes 7.2k changes

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.4.12.tar.gz (see the Assets above, md5: 542f44ee3f348eb8213406a616ce0263)

    Source code(tar.gz)
    Source code(zip)
    gc-7.4.12.tar.gz(1.04 MB)
  • v7.2k(Apr 18, 2018)

    Changes

    • Fix arguments delimiter in pcr_interface.c (PCR)
    • Fix assertion violation in DllMain of win32_threads
    • Fix data race during apply_to_each_object(reset_back_edge)
    • Fix dbg_mlc.c/o file name in documentation
    • Fix include gc_gcj.h in thread_local_alloc.c
    • Fix man section number (3)
    • Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
    • Fix missing SIGBUS handler setup for kFreeBSD
    • Fix null dereference in print_callers on backtrace_symbols failure
    • Fix the collector hang when it is configured with --enable-gc-debug
    • Fix thread_suspend fail for threads registered from key destructor (OS X)
    • Fix typo in AIX macro name
    • Fix typo in comment in specific.h

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.2k.tar.gz (see the Assets above; includes a copy of libatomic_ops-7.2i, md5: b7fd911c76f5b64d378a9db729b900ed)

    Source code(tar.gz)
    Source code(zip)
    gc-7.2k.tar.gz(1.29 MB)
  • v7.6.4(Jan 26, 2018)

    Changes

    • Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
    • Change compiler invocation example in gc.man to use dynamic libgc
    • Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
    • Do not declare dl_iterate_phdr as weak for DragonFly
    • Fix 'cords' parallel build in Makefile.direct
    • Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
    • Fix error code in abort message if sem_wait failed in start_world (NetBSD)
    • Fix GC allocation mutex in child after a fork
    • Fix global operator delete definition for C++14 in gc_cpp
    • Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
    • Fix libgc version which was changed in linkage breaking way
    • Fix missing EOLn output in threadlibs tool
    • Fix threadlibs tool to output '-lpthread' for DragonFly
    • Prevent DATASTART redefinition for NaCl
    • Remove obsolete advice about linking with _DYNAMIC=0 (Linux)

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-7.6.4.tar.gz (see the Assets above)

    Source code(tar.gz)
    Source code(zip)
    gc-7.6.4.tar.gz(1.06 MB)
  • v7.4.10(Jan 23, 2018)

  • v7.2j(Jan 22, 2018)

  • v7.6.2(Dec 23, 2017)

    Note

    This release is not recommended for the downstream package maintainers (because of libgc version-info incompatible change).

    Changes

    • Add assertion that no hb_n_marks underflow occurs
    • Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
    • Add minimal testing of GC_set_bit (gctest)
    • Add more cases to huge_test to cover sizes close to word-type maximum
    • Add testing of new[]/delete[] (test_cpp)
    • Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
    • Adjust code indentation of calloc_explicitly_typed
    • Align local_mark_stack in help_marker explicitly
    • Allow custom TRACE_ENTRIES value
    • Allow gctest and thread_leak_test with zero NTHREADS
    • Avoid data race in finalized_count (gctest)
    • Code refactoring of divide-by-HBLKSIZE occurrences
    • Code refactoring of huge_test
    • Code refactoring of tests/subthread_create regarding AO add primitive
    • Compile thread_local_alloc only if multi-threaded build (Makefile.am)
    • Delete preprocessor output on make clean (Makefile.direct)
    • Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
    • Do not disable parallel mark for WRAP_MARK_SOME
    • Do not enable mprotect-based incremental mode if unmapping is on (gctest)
    • Do not install documentation if configure --disable-docs (new option)
    • Do not use tkill (Android)
    • Document base and size of objects allocated by finalized_malloc
    • Document configure 'syntax error' issue in README
    • Eliminate 'address of local variable returned' static analyzer warning
    • Eliminate 'array vs singleton' code defect in typed_test (gctest)
    • Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
    • Eliminate 'boolean result used in bitwise op' cppcheck false warning
    • Eliminate 'C-style pointer casting' cppcheck style warnings in test
    • Eliminate 'checking if unsigned variable is <0' cppcheck style warning
    • Eliminate 'class member var with name also defined in parent' warning
    • Eliminate 'comparison is always false' static analyzer warning in finalize
    • Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
    • Eliminate 'condition is always true' cppcheck style warning
    • Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
    • Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
    • Eliminate 'dereference of null' CSA false warning in array_mark_proc
    • Eliminate 'function result not used' code defect in GC_mark_local
    • Eliminate 'GC_collecting is set but never used' code defect (Win32)
    • Eliminate 'GC_record_fault is never used' cppcheck style warning
    • Eliminate 'integer shift by a negative amount' code defect in finalize
    • Eliminate 'label not used' cppcheck false warnings in GC_mark_X
    • Eliminate 'memory leak' code defect for scratch-allocated memory
    • Eliminate 'memory leak' code defect in remove_specific
    • Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
    • Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
    • Eliminate 'possible integer underflow' code defect (cord-de)
    • Eliminate 'potential overflow' static analyzer warning in test
    • Eliminate 'printf format specifies type void*' GCC pedantic warnings
    • Eliminate 'scope of variable can be reduced' cppcheck warnings
    • Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
    • Eliminate 'this statement may fall through' GCC warnings
    • Eliminate 'unnecessary comparison of static strings' cppcheck warning
    • Eliminate 'unsafe vsprintf is deprecated' compiler warning
    • Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
    • Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
    • Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
    • Eliminate 'value exceeds maximum object size' GCC warning in huge_test
    • Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
    • Eliminate 'value of DATASTART2 unknown' cppcheck info messages
    • Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
    • Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
    • Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
    • Eliminate 'write to memory that was const-qualified' code analyzer warning
    • Eliminate all 'scope of variable can be reduced' cppcheck style warnings
    • Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
    • Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
    • Eliminate CSA warning of non-virtual destructor in test_cpp base class
    • Eliminate CSA warning of staticroot that can be a local variable (tests)
    • Eliminate CSA warning of unmodified non-const static var (disclaim_test)
    • Eliminate redundant local variable in register_finalizer
    • Eliminate TSan (Thread Sanitizer) warnings in gctest
    • Eliminate UBSan warning of overflow during descr subtraction in mark_from
    • Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
    • Eliminate unsigned fl_builder_count underflow in mark_thread
    • Enable GC_is_tmp_root for all platforms
    • Execute more single-threaded GC tests by CMake
    • Expand tabs to spaces in de_win.rc (tests)
    • Export GC_dump_finalization/regions()
    • Export GC_is_tmp_root() and GC_print_trace[_inner]
    • Export GC_print_free_list()
    • Fix '32-bit value shift followed by expansion to 64-bit' code defect
    • Fix 'GC_written_pages never read' code defect (GWW_VDB)
    • Fix 'label cannot be reached' static analyzer warning in disclaim_test
    • Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
    • Fix 'syntax error' reported by cppcheck for mach_dep
    • Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
    • Fix 'variable assigned a value that is never used' cppcheck style warnings
    • Fix 'void pointers in calculations: behavior undefined' cppcheck warning
    • Fix assertion violation about disabled cancel in try_to_collect_inner
    • Fix atomic_ops build in Makefile.direct for Solaris
    • Fix Clang static analyzer warning about not found gc_priv.h in extra files
    • Fix compilation error in get_main_stack_base (Emscripten)
    • Fix compilation for winpthreads if HANDLE_FORK
    • Fix compilation if configured with --enable-werror on OS X
    • Fix cord/de build in Makefile.direct (Linux)
    • Fix data race in a list referenced by A.aa (gctest)
    • Fix data race in collectable_count (gctest)
    • Fix data race in do_local_mark when comparing active_count to helper_count
    • Fix data race in GC_suspend/resume_thread
    • Fix data race in last_stop_count access (suspend_handler_inner)
    • Fix data race in make_descriptor when setting explicit_typing_initialized
    • Fix data race in mark_thread when updating mark_no
    • Fix data race when getting object size in explicitly-typed allocators
    • Fix deadlock in GC_suspend_thread
    • Fix gctest failure for Darwin if CPPCHECK is defined
    • Fix lack of barriers to synchronize memory for suspend_handler
    • Fix marking of disclaim-reachable objects in the incremental mode
    • Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
    • Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
    • Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
    • Fix page calculation in checksums
    • Fix parallel build in Makefile.direct
    • Fix test_cpp and c++ parallel build in Makefile.direct
    • Fix typo in comment of GC_mark_some
    • Fix typos in cdescr.html and README.sgi
    • Make GC_INIT optional for clients even if thread-local allocations enabled
    • Match uclinux pattern in configure
    • Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
    • Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
    • New API function (GC_is_init_called) to check if BDWGC is initialized
    • New target (check-cpp) in Makefile.direct
    • Prevent abort in register_data_segments for Symbian and Emscripten
    • Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
    • Print realloc_count value in gctest
    • Put invariant name in quotes to make mark_state comments clearer
    • Refine configure messages when checking for compiler option support
    • Remove extraneous semicolons after AC_MSG_WARN (configure)
    • Remove page_was_dirty and remove_protection duplicate definitions
    • Remove unnecessary type casts of printf arguments to unsigned long
    • Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
    • Rename 'test' to 'check' target in Makefile.direct
    • Replace deprecated rewind to fseek in cordxtra
    • Report gcc/clang pedantic warnings (configure)
    • Skip thread suspend/resume API testing for Tru64 (OSF1)
    • Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
    • Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
    • Suppress 'tainted string passed to vulnerable operation' false defects
    • Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
    • Test GC initialization from non-main thread on FreeBSD and NetBSD
    • Test GCJ object creation with length-based descriptor (gctest)
    • Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
    • Update README regarding make cords with Makefile.direct
    • Update README to use autogen.sh on build from the source repository
    • Update shared libraries version info to differentiate against v7.4
    • Use mprotect instead of mmap in GC_unmap() on Cygwin
    • Use same style of include gc.h in documentation
    • Workaround '!GC_page_size is always false' cppcheck style warning
    • Workaround '#error' cppcheck error messages
    • Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
    • Workaround 'array compared to 0', 'untrusted loop bound' false defects
    • Workaround 'bad address arithmetic' static analysis tool false positive
    • Workaround 'checking if unsigned value is negative' cppcheck warning
    • Workaround 'checking unsigned value is negative' code defect in mark_from
    • Workaround 'comparison of identical expressions' false code defects
    • Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
    • Workaround 'condition is always false' cppcheck warning in get_next_stack
    • Workaround 'condition is always true' cppcheck style warnings in GC_init
    • Workaround 'function is never used' cppcheck style warnings
    • Workaround 'insecure libc pseudo-random number generator used' code defect
    • Workaround 'int shift by negative amount' false code defect in finalize
    • Workaround 'local variable size too big' static analyzer warning
    • Workaround 'memory leak: result' cppcheck false error (POSIX)
    • Workaround 'null pointer dereference' false positive in push_next_marked
    • Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
    • Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
    • Workaround 'obsolete function alloca() called' cppcheck warnings
    • Workaround 'passing untyped NULL to variadic function' cppcheck warning
    • Workaround 'pointer used before comparison to null' code defect (pthread)
    • Workaround 'possible null pointer dereference' cppcheck warnings
    • Workaround 'potential multiplication overflow' code defect in de_win (cord)
    • Workaround 'redundant assignment of *result to itself' cppcheck warning
    • Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
    • Workaround 'same expression on both sides of ==' cppcheck style warning
    • Workaround 'same expression on both sides of OR' cppcheck style warning
    • Workaround 'struct member is never used' cppcheck style warnings
    • Workaround 'tainted int used as loop bound' static analysis tool warning
    • Workaround 'Uninitialized variable' cppcheck errors
    • Workaround 'unused variable' cppcheck style warnings
    • Workaround 'va_list used before va_start' cppcheck error in cord
    • Workaround 'value of macro unknown' cppcheck info messages
    • Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
    • Workaround 'value of SIGBUS unknown' cppcheck info messages
    • Workaround 'value of WINAPI unknown' cppcheck info messages
    • Workaround 'variable hides enumerator with same name' cppcheck warnings
    • Workaround 'variable reassigned before old value used' cppcheck warnings
    • Workaround 'waiting while holding lock' code defect in stop_world (Unix)
    • Workaround false 'uninitialized var use' code defect (initsecondarythread) Also, includes 7.4.6 changes

    Build status

    Travis CI build AppVeyor CI build Coveralls status (code coverage)

    Distribution Tarball

    gc-7.6.2.tar.gz (see the Assets above)

    Source code(tar.gz)
    Source code(zip)
    gc-7.6.2.tar.gz(1.06 MB)
  • v7.4.8(Dec 22, 2017)

    Note

    This release is not recommended for the downstream package maintainers (because of libgc version-info incompatible change).

    Changes

    • Eliminate 'this statement may fall through' GCC warnings
    • Eliminate 'value exceeds maximum object size' GCC warning in huge_test
    • Fix data race in make_descriptor when setting explicit_typing_initialized
    • Fix marking of disclaim-reachable objects in the incremental mode
    • Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG Also, includes 7.2i changes

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.4.8.tar.gz (see the Assets above)

    Source code(tar.gz)
    Source code(zip)
    gc-7.4.8.tar.gz(1.04 MB)
  • v7.2i(Dec 21, 2017)

    Note

    This release is not recommended for the downstream package maintainers (because of libgc version-info incompatible change).

    Changes

    • Avoid data race in finalized_count (gctest)
    • Fix assertion violation about disabled cancel in try_to_collect_inner
    • Fix data race in a list referenced by A.aa (gctest)
    • Fix data race in do_local_mark when comparing active_count to helper_count
    • Fix data race in GC_init_explicit_typing
    • Fix data race in last_stop_count access (suspend_handler_inner)
    • Fix data race in mark_thread when updating mark_no
    • Fix data race when getting object size in explicitly-typed allocators
    • Fix lack of barriers to synchronize memory for suspend_handler
    • Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
    • Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.2i.tar.gz (see the Assets above; includes a copy of libatomic_ops-7.2i)

    Source code(tar.gz)
    Source code(zip)
    gc-7.2i.tar.gz(1.28 MB)
  • v7.4.6(Oct 26, 2017)

    Note

    This release is not recommended for the downstream package maintainers (because of libgc version-info incompatible change).

    Changes

    • Add configure --enable-gcov option (enable code coverage analysis)
    • Add configure check whether to define NO_GETCONTEXT
    • Adjust GC_memalign comment
    • Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
    • Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
    • Avoid busy waiting in mark_thread while GC_parallel is false
    • Better document minimum value of size argument for typed allocations
    • Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
    • Consistently use 'msec' instead of 'ms' in comments in pthread_support
    • Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
    • Do not produce .tar.bz2 distribution file (configure)
    • Do not require libatomic_ops for single-threaded builds (configure)
    • Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
    • Document GWW_VDB in gcdescr.html
    • Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
    • Eliminate 'conditional expression is always true' code defect in GC_init
    • Eliminate 'FP divide-by-zero' static analyzer warning
    • Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
    • Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
    • Eliminate 'ISO C forbids object to function pointer conversion' warning
    • Eliminate 'locally defined symbol imported' MS linker warnings (cord)
    • Eliminate 'null dereference' code defect warning in register_finalizer
    • Eliminate 'possible loss of data' compiler warnings (MS VC)
    • Eliminate 'printf format specifier mismatch' compiler warning (tools)
    • Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
    • Eliminate 'value stored is never read' warning of Clang static analyzer
    • Eliminate duplicate log messages in GC_mark_from
    • Eliminate most of collisions in GC_threads on Linux/x64
    • Ensure GC initialized when atfork_prepare is called by client
    • Fix 'arg parameter might be clobbered by setjmp' compiler warning
    • Fix 'bogus LR' detection in FindTopOfStack (Darwin)
    • Fix 'execvp argument incompatible pointer type' compiler warning (tools)
    • Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
    • Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
    • Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
    • Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
    • Fix 'ISO C90 forbids mixed declarations and code' compiler warning
    • Fix 'missing libc-version.h' build error (uClibc/x86[_64])
    • Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
    • Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
    • Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
    • Fix (adjust) GC_scratch_alloc actual argument type
    • Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
    • Fix finalize.c compilation in 'strict ANSI' mode
    • Fix GC shared library tests failure related to dl_iterate_phdr (musl)
    • Fix gc.h compliance to strict ANSI (pthreads)
    • Fix GC_bytes_allocd incrementation in case of allocation failure
    • Fix GC_jmp_buf multiple definition
    • Fix GC_noop6 definition to avoid its calls to be optimized away
    • Fix gctest failure if PARALLEL_MARK (musl)
    • Fix gctest thread stack overflow (musl-gcc)
    • Fix initsecondarythread_test runtime failure if GC compiled w/o threads
    • Fix lack of 2 trailing zeros in _MSC_VER numbers
    • Fix local variable declarations in disclaim_bench
    • Fix missing #error pragma
    • Fix missing .exe for disclaim test filenames in Makefile (MinGW)
    • Fix missing atomic/[un]collectable/realloc_count increments in gctest
    • Fix missing new-line and redundant trailing dot in WARN messages
    • Fix missing new-line at format strings end in subthread_create test
    • Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
    • Fix potential overflow in decrement when computing GC_markers_m1
    • Fix printf format specifiers in extra files (cppcheck warnings)
    • Fix pthread_start compilation if single-obj-compilation (Linux)
    • Fix register_finalizer call in disclaim_bench for GC_DEBUG
    • Fix static assertion violation in LONG_MULT for 64-bit targets
    • Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
    • Fix thread id leaks in subthread_create and threadkey_test
    • Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
    • Fix tools/setjmp_t to prevent nested_sp inlining
    • Fix typo in CHECK_GCLIB_VERSION name (test)
    • Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
    • Fix unchecked fork() result in gctest (Unix, Cygwin)
    • Improve detection of internal libatomic_ops (configure)
    • Move libraries version info to the beginning of Makefile.am
    • Prevent abort in register_data_segments for Symbian
    • Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
    • Refine Makefile.direct comment about multi-threaded GC build
    • Refine README about library source downloading
    • Refine should_invoke_finalizers documentation
    • Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
    • Remove non-existent configure option in simple_example.html
    • Replace C++ style comments to C ones, remove commented out code (extra)
    • Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
    • Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
    • Suppress 'tainted string passed to vulnerable operation' false defects
    • Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
    • Update bdwgc mailing list online archive link in documentation
    • Update shared libraries version info to differentiate against v7.2
    • Use AC_DEFINE for defining NO_GETCONTEXT in configure
    • Workaround 'index out of bounds' UBSan false warning in push_marked
    • Workaround 'mmap() resource handle leak' static analyzer warning
    • Workaround 'redundant assignment of *result to itself' cppcheck warning
    • Workaround 'resource leak' error reported by cppcheck (tools, test) Also, includes 7.2h changes

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.4.6.tar.gz (see below)

    Source code(tar.gz)
    Source code(zip)
    gc-7.4.6.tar.gz(1.04 MB)
  • v7.2h(Oct 12, 2017)

    Note

    This release is not recommended for the downstream package maintainers (because of libgc version-info incompatible change).

    Changes

    • Add gctest as a test (CMake)
    • Change no-argument functions declaration style to ANSI C (extra files)
    • Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
    • Ensure oom_fn callback executed on out-of-memory in calloc
    • Fix '~' operator application to unsigned values shorter than word
    • Fix 'context local variable might be clobbered by setjmp' compiler warning
    • Fix 'doc' files installation folder
    • Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
    • Fix ALL_INTERIOR_POINTERS name in comments and documentation
    • Fix AO_SRC_DIR target name in NT_*_MAKEFILE
    • Fix assertion in GC_mark_from for non-heap regions
    • Fix assertion in GC_steal_mark_stack for non-heap regions
    • Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
    • Fix assertion violation in GC_wait_builder called from start_mark_threads
    • Fix assertion violation in mark_local checking GC_mark_stack_top
    • Fix bm_huge initialization for 64-bit targets (gctest)
    • Fix broken external links in documentation
    • Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
    • Fix calloc_explicitly_typed in case of lb*n overflow
    • Fix CMake warning about CMP0054 by unquoting instances of HOST
    • Fix conditional expression in pos_fetch, next non-macro definitions (cord)
    • Fix configure --disable-munmap handling
    • Fix CORD_substr_closure for the case when CORD_from_fn returns C string
    • Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
    • Fix double multiplication of lb by n in calloc_explicitly_typed
    • Fix enable_parallel_mark condition in CMake script
    • Fix external libatomic_ops pkg-config-based detection
    • Fix gc_allocator.h file name in new_gc_alloc.h comment
    • Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
    • Fix gc_cleanup destructor for non-heap objects (gc_cpp)
    • Fix GC_collect_or_expand to prevent allocation size value wrap-around
    • Fix GC_incremental declaration/definition type mismatch
    • Fix GC_mark_stack_top assertion violation properly in mark_local
    • Fix GC_requested_heapsize increment in GC_init
    • Fix GC_SIZE_MAX definition (Linux/musl-gcc)
    • Fix GCJ support in CMake build script
    • Fix gctest crash if configure --enable-handle-fork on Darwin
    • Fix header filename in gcconfig.h comment
    • Fix integer shift undefined behavior in GC_init_explicit_typing
    • Fix leak_test crash in print_callers if free() is redirected
    • Fix Makefile.direct recursive invocation
    • Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
    • Fix missing win32_threads.c compilation for Cygwin (CMake)
    • Fix MS VC warning about compiling unused checksums and thread_local_alloc
    • Fix name typos in GC_FAST_MALLOC_GRANS comment
    • Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
    • Fix OSF1 host pattern in CMakeLists.txt
    • Fix PCR-Makefile by removing compilation of a missing file
    • Fix potential data race in GC_SysVGetDataStart (SPARC)
    • Fix potential integer overflow in GC_find_limit_* functions
    • Fix push_complex_descriptor to avoid unlimited global mark stack growth
    • Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
    • Fix Solaris/sparc detection in case of strict C compliance is enforced
    • Fix STACKBOTTOM for Solaris 11/x86
    • Fix storage class of local variable in register_dynamic_libraries (Irix)
    • Fix tools/setjmp_t hang (OS X)
    • Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
    • Fix undefined HEAP_START in register_dynamic_libraries
    • Fix various typos in comments, documentation and printed messages
    • Handle load_segs overflow in register_dynlib_callback gracefully
    • Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
    • Replace (fix) 'objs' acronym in comments with 'objects' word
    • Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
    • Update documentation about bugs reporting and new releases notification
    • Update Download information in GC overview document
    • Update shared libraries version info (v7.2)
    • Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
    • Workaround missing getcontext() in Docker osrf/ubuntu_32bit

    Build status

    Travis CI build AppVeyor CI build

    Distribution Tarball

    gc-7.2h.tar.gz (see below; includes a copy of libatomic_ops-7.2h)

    Source code(tar.gz)
    Source code(zip)
    gc-7.2h.tar.gz(1.28 MB)
  • gc7_6_0(May 16, 2017)

    Changes

    • ABORT_ARGn log details at INFO level (Android)
    • Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
    • Add API function to calculate total memory in use by all GC blocks
    • Add API function to set/modify GC log file descriptor (Unix)
    • Add alloc_size attribute to GC_generic_malloc
    • Add alt-stack registration support
    • Add assertion for GC_new_kind boolean arguments
    • Add assertion on lock status to GC_alloc_large and its callers
    • Add build scripts for VC 9 (Win32/64)
    • Add build system plumbing for building with -Werror
    • Add incremental GC support for Darwin/arm64
    • Add profiling callback events to indicate start/end of reclaim phase
    • Add support for enumerating the reachable objects in the heap
    • Add toggle-ref support (following Mono GC API)
    • Added instructions to README.md for building from git
    • Adjust code indentation of malloc/calloc/str[n]dup
    • Allow fork() automatic handling on Android with API level 21+
    • Allow specific TLS attributes for GC_thread_key
    • Allow thread local allocations from within pthread TLS destructors
    • Allow to force GC_dump_regularly set on at compilation
    • Altera NIOS2 support
    • Change 'cord' no-argument functions declaration style to ANSI C
    • Check DATASTART is less than DATAEND even assertions off
    • Check for execinfo.h by configure
    • Code refactoring of GC_push_finalizer/thread/typed_structures
    • Code refactoring regarding 'data start' definition for FreeBSD
    • Consistently set type of DATASTART/END to ptr_t (code refactoring)
    • Consistently use int[] type for '_end' symbol (code refactoring)
    • Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
    • Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
    • Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
    • Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
    • Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
    • Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
    • Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
    • Document GC_register_my_thread returned value
    • Dump the block information in CSV format
    • Eliminate redundant *flh check for null in GC_allocobj
    • Enable atomic-uncollectable in operator new in gc_cpp.h
    • Enable build with musl libc
    • Enable gc.h inclusion by client without implicit include windows.h (Win32)
    • Enable huge_test for Win64 (and LLP64 target)
    • Enable thread-local storage for Android Clang
    • Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
    • Export GC_push_all_eager, GC_push_finalizer_structures
    • Fix 'arg parameter might be clobbered by setjmp' compiler warning
    • Fix assertion in GC_mark_from for non-heap regions
    • Fix compilation for Android clang/arm with bfd linker
    • Fix integer shift undefined behavior in GC_init_explicit_typing
    • Fix missing new-line and redundant trailing dot in WARN messages
    • Fix STACKBOTTOM for Solaris 11/x86
    • Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
    • Fix unchecked fork() result in gctest (Unix, Cygwin)
    • Fix user-defined signals drop by marker threads
    • Fix various typos in comments and documentation
    • FreeBSD/arm support improvement
    • GC_make_descriptor code refactoring (eliminate two local variables)
    • GC_malloc[_atomic] global and thread-local generalization with kind
    • GC_malloc_[atomic_]uncollectable generalization
    • GC_scratch_alloc code refactoring (and WARN message improvement)
    • Group all compact fields of GC_arrays to fit in single page
    • Handle load_segs overflow in register_dynlib_callback gracefully
    • Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
    • Implement event callbacks for profiling (following Mono GC API)
    • Implement the finalization extension API
    • Implement thread suspend/resume API (Linux threads only)
    • Improve documentation for disappearing links in gc.h
    • Make heap growth more conservative after GC_gcollect_and_unmap call
    • Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
    • Move MessageBox invocation code from GC_abort to a separate routine (Win32)
    • NaCl/arm initial support; NaCl runtime fixes for other CPUs
    • New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
    • New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
    • New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
    • Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
    • Re-implement GC_finalized_malloc using GC_malloc_kind
    • Refactoring of android_thread_kill/pthread_kill calls
    • Refactoring of GC_Xobjfreelist (use single array to keep free lists)
    • Refactoring of thread-local *_freelists (use single array of free lists)
    • Refine description in README how to build from source repository
    • Refine GC_free_space_divisor comment regarding its initial value
    • Reformat code of gc_cpp.cc/h
    • Remove 'opp' local variable in GC_malloc_X
    • Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
    • Remove code commented out by 'ifdef UNDEFINED'
    • Remove hb_large_block field (use 1 extra bit of hb_flags instead)
    • Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
    • Remove redundant casts in GC_generic_or_special_malloc and similar
    • Remove unsupported FreeBSD/ia64 case from gcconfig.h file
    • Remove unused GC_gcjdebugobjfreelist
    • Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
    • Replace non-API occurrences of GC_word to word (code refactoring)
    • Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
    • Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
    • Standalone profiling callback for threads suspend/resume
    • Support (add machine description for) TILE-Gx and TILEPro targets
    • Support build for Android 64-bit (arm64, mips64, x86_64)
    • Support FreeBSD/aarch64, FreeBSD/mips
    • Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
    • Support MinGW build in scripts
    • Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
    • Use magic header on objects to improve disclaim_test
    • Workaround 'sa_sigaction member missing' compiler error (Android/x32)
    • Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
    • Workaround a bug in winpthreads causing parallel marks deadlock (MinGW) Also, includes 7.4.4 changes

    Distribution Tarball

    gc-7.6.0.tar.gz

    Backup of BDWGC mailing lists

    This is not related to this release actually, just a convenient place to keep the archives of the BDWGC announcements and technical discussions (Dec 2002 - Apr 2017):

    Source code(tar.gz)
    Source code(zip)
  • gc7_4_4(May 16, 2017)

    Changes

    • Allow GC_FAST_MALLOC_GRANS() multiple use in a function
    • Also enable the TSX workaround for i386 (Linux)
    • Avoid unstructured procfs on Solaris
    • Change cord/de main() declaration style from K-R to ANSI C
    • Change no-argument functions declaration style to ANSI C (cord)
    • Do not include sigcontext.h and asm/sigcontext.h
    • Eliminate 'divide by zero' compiler warning in cordtest
    • Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
    • Eliminate warnings detected by Cppcheck in cord de[_win]
    • Fix 'comparison of non-null parameter is always false' warning (Clang)
    • Fix 'CORD_iter5 unused result' code defect in cordxtra
    • Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
    • Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
    • Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
    • Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
    • Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
    • Fix 'statement unreachable' compiler warning in GC_mark_from
    • Fix 'statement unreachable' compiler warning in memalign
    • Fix 'unused label' compiler warning in cord/de
    • Fix 'value truncated' compiler warning in CORD_cat (MS VC)
    • Fix 'variable unused' warning in GC_save_callers
    • Fix 'visibility attribute not supported' GCC warning (IBM AIX)
    • Fix CMake warning about CMP0054 by unquoting instances of HOST
    • Fix Cygwin64 build
    • Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
    • Fix Makefile.direct for Cygwin
    • Fix alloc_size availability detection (Clang)
    • Fix abort message in GC_move_long_link
    • Fix and code refactoring of lock elision workaround (Linux/x64)
    • Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
    • Fix data race in GC_init_explicit_typing
    • Fix gc.mak regarding msvc_dbg and test (MSVC)
    • Fix missing error handling of pthread_attr_init/getstacksize
    • Fix missing error handling of pthreads_mutex_init and cond_wait
    • Fix missing numeric casts in cord
    • Fix potential left shift overflows in finalize.c (64-bit targets)
    • Fix pthreads-win32 name in comments and documentation
    • Fix setup_mark_lock missing prototype
    • Fix unchecked fcntl() result
    • Fix unchecked pointer dereference in check_ints (gctest)
    • Fix unchecked pthread_join() result in threadkey_test
    • Fix unchecked sigdelset() result in pthread_support
    • Fix undefined PTRFREE/NORMAL in gc_inline.h
    • Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
    • Relax mark_mutex attribute needed to disable elision (Linux/x64)
    • Remove (deprecate) TODO file
    • Remove code duplication in GC_realloc
    • Remove duplicate new-line in OUT_OF_MEMORY message (cord)
    • Remove references to missing linux_threads.c from documentation
    • Revert "Move asm machine-dependent files to 'src' folder" (partly)
    • Support Android API level 21
    • Update compiler options in gc.mak (Win32)
    • Use mmap instead of sbrk (Hurd)
    • Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
    • Workaround 'identical expr on both sides of bitwise op' warning
    • Workaround Linux NTPL lock elision bug
    • Workaround false warning about unreachable code path
    • Workaround invalid '_end' symbol on Android clang 3.5+ Also, includes 7.2g changes

    Distribution Tarball

    gc-7.4.4.tar.gz

    Source code(tar.gz)
    Source code(zip)
A Tiny Garbage Collector for C

Tiny Garbage Collector About tgc is a tiny garbage collector for C written in ~500 lines of code and based on the Cello Garbage Collector. #include "t

Daniel Holden 679 May 15, 2022
A easy to use multithreading thread pool library for C. It is a handy stream like job scheduler with an automatic garbage collector. This is a multithreaded job scheduler for non I/O bound computation.

A easy to use multithreading thread pool library for C. It is a handy stream-like job scheduler with an automatic garbage collector for non I/O bound computation.

Hyoung Min Suh 11 Mar 6, 2021
A Tiny Garbage Collector for C

tgc is a tiny garbage collector for C written in ~500 lines of code and based on the Cello Garbage Collector.

Daniel Holden 678 May 9, 2022
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.2k May 13, 2022
Simple conservative GC using mimalloc

migc Small and simple library that implements conservative GC using mimalloc API. Features Small and tiny. libmigc.so is just 20KB when linked with mi

playX 21 Aug 20, 2021
Efficient and Conservative Fluids Using Bidirectional Mapping

Efficient and Conservative Fluids with Bidirectional Mapping Ziyin Qu* Xinxin Zhang*(*joint first authors) Ming Gao Chenfanfu Jiang Baoquan Chen ACM T

Ziyin Qu 329 Feb 11, 2022