ivmai / bdwgc

The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)
https://www.hboehm.info/gc/
Other
2.97k stars 406 forks source link

Assertion violation about computed heap block address in GC_next_block #660

Open ivmai opened 1 month ago

ivmai commented 1 month ago

Source: master (57ccbcc8a) Build: https://app.travis-ci.com/github/ivmai/bdwgc/jobs/625772331 Host: Ubuntu/ppc64le Config: CFLAGS_EXTRA="-O3 -D _FORTIFY_SOURCE=2 -D DONT_PROTECT_PTRFREE -D FORCE_MPROTECT_BEFORE_MADVISE -D GC_UNMAPPED_REGIONS_SOFT_LIMIT=120" CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus --enable-static"

Output (disclaimtest):

Assertion failure: headers.c:378

Asserion violation happens at: https://github.com/ivmai/bdwgc/commit/c29365bddcf578a5bdd323bef837f9587f86d22d#diff-95225c42602c1f888b9599f55503cded07e197d7f37596ac84fe622ce85e8373R378

                if (allow_free || !HBLK_IS_FREE(hhdr)) {
                    GC_ASSERT(HBLK_ADDR(bi, j) == ADDR(hhdr -> hb_block));
                    return hhdr -> hb_block;

Relates to #627 (commit c29365bdd)

ivmai commented 1 week ago

Source: master (7c3ba8a) Build: https://app.travis-ci.com/github/ivmai/bdwgc/jobs/626753216 Host: ppc64le Compiler: clang Config: CFLAGS_EXTRA="-O3 -D _FORTIFY_SOURCE=2 -D DONT_PROTECT_PTRFREE -D FORCE_MPROTECT_BEFORE_MADVISE -D GC_UNMAPPED_REGIONS_SOFT_LIMIT=120" CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus --enable-static" GCTEST_WITH_MPROTECT_VDB=true Output (gctest):

Supported VDBs: manual soft mprotect
Switched to incremental mode
Emulating dirty bits with mprotect/signals
Assertion failure: headers.c:396
assertion failure
Assertion failure: headers.c:396
assertion failure
Assertion failure: headers.c:396
assertion failure
Assertion failure: headers.c:396
assertion failure
GC Warning: GC incremental mode is turned off to prevent hitting VM maps limit
GC Warning: GC incremental mode is turned off to prevent hitting VM maps limit
Child process failed, pid= 9915, status= 0x86
Test failed