summaryrefslogtreecommitdiff
path: root/tests/tests.am
Commit message (Collapse)AuthorAgeFilesLines
* Remove EXPORTED_FUNCTIONS linker flag for gctest (Emscripten)Bruce Mitchener2023-03-031-3/+0
| | | | | | | | | | | | | | | | Issue #532 (bdwgc). When mmap was used, there was apparently a need to export memalign and memset from the WebAssembly code to JS for the mmap emulation code to use. The mmap code path is no longer used with the Emscripten support, so this export is no longer needed. The explicit export of _main is not required; according to the Emscripten code: by default if this setting is not specified on the command line the _main function will be implicitly exported. * tests/tests.am [EMSCRIPTEN] (gctest_html_LDFLAGS): Remove.
* Fix typo in comment related to Emscripten linker bug memalign/memsetIvan Maidanski2022-11-231-2/+2
| | | | | | | | (fix of commit 1431bda1a) * tests/tests.am [EMSCRIPTEN]: Fix a typo ("_memalign and _memset") in comment (i.e. mention also _memset instead of mentioning _memalign twice).
* Remove extra space after comma in license termsIvan Maidanski2022-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (reformatting) * CMakeLists.txt: Remove an extra space after comma in license header comment. * Makefile.am: Likewise. * allchblk.c: Likewise. * alloc.c: Likewise. * backgraph.c: Likewise. * blacklst.c: Likewise. * checksums.c: Likewise. * configure.ac: Likewise. * cord/cordbscs.c: Likewise. * cord/cordprnt.c: Likewise. * cord/cordxtra.c: Likewise. * cord/tests/cordtest.c: Likewise. * cord/tests/de.c: Likewise. * cord/tests/de_cmds.h: Likewise. * cord/tests/de_win.c: Likewise. * cord/tests/de_win.h: Likewise. * cord/tests/de_win.rc: Likewise. * darwin_stop_world.c: Likewise. * dbg_mlc.c: Likewise. * dyn_load.c: Likewise. * extra/gc.c: Likewise. * extra/msvc_dbg.c: Likewise. * extra/pcr_interface.c: Likewise. * extra/real_malloc.c: Likewise. * finalize.c: Likewise. * fnlz_mlc.c: Likewise. * gc_badalc.cc: Likewise. * gc_cpp.cc: Likewise. * gc_dlopen.c: Likewise. * gcj_mlc.c: Likewise. * headers.c: Likewise. * include/gc/cord.h: Likewise. * include/gc/cord_pos.h: Likewise. * include/gc/ec.h: Likewise. * include/gc/gc.h: Likewise. * include/gc/gc_backptr.h: Likewise. * include/gc/gc_config_macros.h: Likewise. * include/gc/gc_disclaim.h: Likewise. * include/gc/gc_gcj.h: Likewise. * include/gc/gc_inline.h: Likewise. * include/gc/gc_mark.h: Likewise. * include/gc/gc_pthread_redirects.h: Likewise. * include/gc/gc_tiny_fl.h: Likewise. * include/gc/gc_typed.h: Likewise. * include/gc/gc_version.h: Likewise. * include/gc/javaxfc.h: Likewise. * include/gc/leak_detector.h: Likewise. * include/include.am: Likewise. * include/private/darwin_semaphore.h: Likewise. * include/private/darwin_stop_world.h: Likewise. * include/private/dbg_mlc.h: Likewise. * include/private/gc_alloc_ptrs.h: Likewise. * include/private/gc_atomic_ops.h: Likewise. * include/private/gc_hdrs.h: Likewise. * include/private/gc_locks.h: Likewise. * include/private/gc_pmark.h: Likewise. * include/private/gc_priv.h: Likewise. * include/private/gcconfig.h: Likewise. * include/private/pthread_stop_world.h: Likewise. * include/private/pthread_support.h: Likewise. * include/private/specific.h: Likewise. * include/private/thread_local_alloc.h: Likewise. * m4/gc_set_version.m4: Likewise. * mach_dep.c: Likewise. * malloc.c: Likewise. * mallocx.c: Likewise. * mark.c: Likewise. * mark_rts.c: Likewise. * misc.c: Likewise. * new_hblk.c: Likewise. * obj_map.c: Likewise. * os_dep.c: Likewise. * pthread_start.c: Likewise. * pthread_stop_world.c: Likewise. * pthread_support.c: Likewise. * ptr_chck.c: Likewise. * reclaim.c: Likewise. * specific.c: Likewise. * tests/atomicops.c: Likewise. * tests/cpp.cc: Likewise. * tests/disclaim.c: Likewise. * tests/disclaim_bench.c: Likewise. * tests/gctest.c: Likewise. * tests/tests.am: Likewise. * tests/weakmap.c: Likewise. * thread_local_alloc.c: Likewise. * tools/setjmp_t.c: Likewise. * tools/threadlibs.c: Likewise. * typd_mlc.c: Likewise. * win32_threads.c: Likewise. * LICENSE: Remove an extra space after comma in license terms.
* Name all tests consistentlyIvan Maidanski2022-02-071-74/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (refactoring) In brief, the tests naming as follows: all test executable files end with "test" (not "_test"); all test source files do not have "test" suffix (except for gctest); test.c is named now as gctest.c. * CMakeLists.txt: Rename leak_test.c to leak.c; rename huge_test.c to huge.c; rename leak_test.c to leak.c; rename realloc_test.c to realloc.c; rename smash_test.c to smash.c; rename staticrootslib.c to staticroots_lib.c; rename trace_test.c to trace.c; rename thread_leak_test.c to threadleak.c; rename threadkey_test to threadkey_test; rename threadkey_test.c to threadkey.c; rename subthreadcreate_test to subthreadcreatetest; rename subthread_create.c to subthreadcreate.c; rename initsecondarythread_test to initfromthreadtest; rename initsecondarythread.c to initfromthread.c; rename disclaim_test to disclaimtest; rename disclaim_test.c to disclaim.c; rename disclaim_weakmap_test to weakmaptest; rename disclaim_weakmap_test.c to weakmap.c. * tests/tests.am: Likewise. * CMakeLists.txt: Rename test.c to gctest.c; rename test_cpp to cpptest; rename test_cpp.cc to cpp.cc. * Makefile.direct: Likewise. * NT_MAKEFILE: Likewise. * README.md (Installation and Portability): Likewise. * WCC_MAKEFILE: Likewise. * digimars.mak: Likewise. * doc/README.Mac: Likewise. * tests/tests.am: Likewise. * CMakeLists.txt: rename test_atomic_ops.c to atomicops.c; rename test_atomic_ops to atomicopstest. * configure.ac [$with_libatomic_ops=check]: Likewise. * ChangeLog (8.3.0): Rename threadkey_test to threadkeytest; rename test_atomic_ops to atomicopstest; rename test_cpp to cpptest. * Makefile.direct: Rename test.o to gctest.o. * NT_MAKEFILE: Rename test_cpp.exe to cpptest.exe; rename test.obj to gctest.obj. * WCC_MAKEFILE: Likewise. * digimars.mak: Likewise. * doc/README.win64: Likewise. * configure.ac: Rename test_cpp to cpptest in comment. * doc/leak.md: Rename leak_test.c to leak.c. * tests/test_atomic_ops.c: Rename to atomicops.c; remove test name in "skipped" message. * tests/test_cpp.cc: Rename to cpp.cc; rename test_cpp to cpptest. * tests/disclaim_test.c: Rename to disclaim.c. * tests/test.c: Rename to gctest.c. * tests/huge_test.c: Rename to huge.c. * tests/initsecondarythread.c: Rename to initfromthread.c. * tests/leak_test.c: Rename to leak.c. * tests/realloc_test.c: Rename to realloc.c. * tests/smash_test.c: Rename to smash.c. * tests/staticrootstest.c: Rename to staticroots.c. * tests/staticrootslib.c: Rename to staticroots_lib.c. * tests/subthread_create.c: Rename to subthreadcreate.c; remove test name in printed messages. * tests/threadkey_test.c: Rename to threadkey.c; remove test name in "skipped" message. * tests/thread_leak_test.c: Rename to threadleak.c. * tests/trace_test.c: Rename to trace.c. * tests/disclaim_weakmap_test.c: Rename to weakmap.c; rename disclaim_test.c to disclaim.c in comment.
* Pass ATOMIC_OPS_LIBS to tests using AO primitives directly (Automake)Ivan Maidanski2021-11-271-4/+14
| | | | | | | | | | | | | | | | | Link the tests that use AO primitives directly with libatomic_ops if shared build and external libatomic_ops is used. Also, do not link test_atomic_ops with libgc. * tests/tests.am (test_ldadd): Update comment. * tests/tests.am [THREADS && ENABLE_SHARED] (gctest_LDADD, subthreadcreate_test_LDADD): Insert $(ATOMIC_OPS_LIBS) before $(THREADDLLIBS). * tests/tests.am [ENABLE_DISCLAIM && THREADS && ENABLE_SHARED] (disclaim_weakmap_test_LDADD): Likewise. * tests/tests.am [THREADS] (test_atomic_ops_LDADD): Remove comment; replace $(test_ldadd) with $(nodist_libgc_la_OBJECTS) $(EXTRA_TEST_LIBS) $(ATOMIC_OPS_LIBS).
* Emscripten single-threaded support (detect stack base, push registers)Nguyen Thai Ngoc Duy2021-06-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #354 (bdwgc). This adds a bit more in os_dep.c in order to scan the stack and registers, which is possible if we enable ASYNCIFY (note, this adds quite some overhead). gctest almost passes with this, except for the test code that involves a_get(). * configure.ac (emscripten): Define (based __EMSCRIPTEN__ macro presence). * configure.ac [emscripten] (gc_cflags): Append ASYNCIFY[_STACK_SIZE] (to set stack size to 128 KB). * configure.ac [emscripten] (EMSCRIPTEN): Define AM variable. * configure.ac [emscripten] (THREADS): Set to "no" by default. * doc/README.emscripten: New file. * include/private/gcconfig.h [I386 && __EMSCRIPTEN__] (STACK_NOT_SCANNED): Remove it, along with the comment. * include/private/gcconfig.h [I386 && __EMSCRIPTEN__] (USE_MMAP_ANON, STACK_GROWS_DOWN): Define macro. * mach_dep.c [!SN_TARGET_ORBIS && !SN_TARGET_PSP2 && !HAVE_PUSH_REGS && __EMSCRIPTEN__] (GC_with_callee_saves_pushed): Do nothing before fn call. * os_dep.c [__EMSCRIPTEN__]: Include emscripten.h. * os_dep.c [__EMSCRIPTEN__] (emscripten_stack_base): New static variable. * os_dep.c [__EMSCRIPTEN__] (scan_stack_cb): New static function. * os_dep.c [!THREADS && __EMSCRIPTEN__] (scan_regs_cb): Likewise. * os_dep.c [__EMSCRIPTEN__] (GC_get_main_stack_base): Implement. * os_dep.c [!THREADS && __EMSCRIPTEN__] (GC_default_push_other_roots): Likewise. * os_dep.c [__EMSCRIPTEN__] (GET_MAIN_STACKBASE_SPECIAL): Define macro. * os_dep.c [USE_MUNMAP && !USE_WINALLOC && !SN_TARGET_PS3 && __EMSCRIPTEN__]: Do not call mmap or mprotect. * tests/test.c [__EMSCRIPTEN__] (reverse_test_inner): Do not call check_ints(a_get(),1,49); add FIXME. * tests/tests.am [EMSCRIPTEN] (check_PROGRAMS): Add gctest.html. * tests/tests.am [EMSCRIPTEN] (gctest_html_SOURCES, gctest_html_LDADD, gctest_html_LDFLAGS): Define variable.
* Move GC_throw_bad_alloc definition to new C++ fileIvan Maidanski2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #268 (bdgwc). * CMakeLists.txt [enable_cplusplus] (gccpp): Add gc_badalc.cc library source file. * Makefile.am [CPLUSPLUS] (libgccpp_la_SOURCES): Likewise. * Makefile.am (EXTRA_DIST): Add gc_badalc.cpp. * Makefile.direct (SRCS): Add gc_badalc.cc. * Makefile.direct (gc_badalc.o): New target. * NT_MAKEFILE (gc_badalc.obj): Likewise. * WCC_MAKEFILE (gc_badalc.obj): Likewise. * digimars.mak (gc_badalc.obj): Likewise. * build/s60v3/libgc.mmp (SOURCE): Mention gc_badalc.cpp (commented out). * Makefile.direct (c++): Add dependency on gc_badalc.o; pass gc_badalc.o to ru tool. * NT_MAKEFILE (gccpp.lib): Add dependency on gc_badalc.obj; pass gc_badalc.obj to lib or link tool. * WCC_MAKEFILE (gccpp.lib, gccpp.dll): Likewise. * digimars.mak (OBJS): Add gc_badalc.obj. * doc/README.Mac (Files to build the GC libraries): Add gc_badalc.cc. * doc/gcinterface.md (C++ Interface): Mention gc_badalc.cc file. * gc_badalc.cc: New file. * gc_badalc.cpp: Likewise. * gc_cpp.cc (GC_throw_bad_alloc): Move to gc_badalc.cc. * gc_cpp.cc (GC_ALLOCATOR_THROW_OR_ABORT): Add comment; do not define unless GC_NO_INLINE_STD_NEW, or not _MSC_VER and not __DMC__. * tests/tests.am [CPLUSPLUS && AVOID_CPP_LIB] (test_cpp_LDADD): Add gc_badalc.o.
* Fix 'duplicate symbol' error for tests using multiple static libs (OS X)Ivan Maidanski2019-02-271-3/+12
| | | | | | | | | | | | | | | | | | | | Issue #263 (bdwgc). If configured with --enable-static, libtool passes libgc.a to gcc twice (with a relative path and with an absolute one) when linking tests that depend on libcord.a, libgccpp.a or libstaticrootslib_test.a which, in turn, depends on libgc.a. Double specification of libgc.a seems to confuse ld tool of MacOS 10.14. The workaround is to omit libgc.la in *_LDADD specification of the mentioned tests when the shared libraries are not requested, at least. * configure.ac (ENABLE_SHARED): New AM_CONDITIONAL. * cord/cord.am (cordtest_LDADD): Do not add libgc.la unless ENABLE_SHARED; add comment. * tests/tests.am (staticrootstest_LDADD): Likewise. * tests/tests.am [CPLUSPLUS && !AVOID_CPP_LIB] (test_cpp_LDADD): Likewise.
* Fix tests linkage with internal atomic_ops.oIvan Maidanski2018-11-151-1/+2
| | | | * tests/tests.am (test_ldadd): Add $(nodist_libgc_la_OBJECTS).
* Enable disclaim_weakmap_test for the single-threaded environmentIvan Maidanski2018-10-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fix of commit 0cc2c0e7e) Issue #239 (bdwgc). Also, do some code refactoring and reformatting of disclaim_weakmap_test.c. * tests/disclaim_weakmap_test.c: Reformat code. * tests/disclaim_weakmap_test.c: Do not include stdarg.h, dbg_mlc.h, gc.h. * tests/disclaim_weakmap_test.c (THREAD_CNT): Rename to NTHREADS. * tests/disclaim_weakmap_test.c: Include errno.h, pthread.h, gc_atomic_ops.h only if GC_PTHREADS. * tests/disclaim_weakmap_test.c (NTHREADS): Set to 1 unless GC_PTHREADS. * tests/disclaim_weakmap_test.c [LINT2] (rand): Redefine to (int)GC_random() (to workaround a code defect reported by Coverity Scan). * tests/disclaim_weakmap_test.c (dief): Remove. * tests/disclaim_weakmap_test.c (FINALIZER_CLOSURE_FLAG, INVALIDATE_FLAG): New macro (used by weakmap_add, weakmap_disclaim). * tests/disclaim_weakmap_test.c (out_of_memory): Replace with CHECK_OOM(p). * tests/disclaim_weakmap_test.c (stat_added, stat_found, stat_removed, stat_skip_marked): Change type from volatile AO_t to unsigned (because it is accessed while holding the lock). * tests/disclaim_weakmap_test.c (struct weakmap): Add weakobj_kind field. * tests/disclaim_weakmap_test.c (weakmap_lock, weakmap_trylock, weakmap_unlock): No-op unless GC_PTHREADS. * tests/disclaim_weakmap_test.c (weakmap_add): Call GC_end_stubborn_change(). * tests/disclaim_weakmap_test.c (weakmap_add, weakmap_disclaim, weakmap_new): Call GC_PTR_STORE_AND_DIRTY(). * tests/disclaim_weakmap_test.c (weakmap_new): Call pthread_mutex_init() only if GC_PTHREADS. * tests/disclaim_weakmap_test.c (weakmap_destroy): New function (which calls pthread_mutex_destroy() if GC_PTHREADS). * tests/disclaim_weakmap_test.c (_weakobj_free_list, _weakobj_kind): Change global variable to local one declared in main(). * tests/disclaim_weakmap_test.c [TEST_MANUAL_VDB] (main): Call GC_set_manual_vdb_allowed(1). * tests/disclaim_weakmap_test.c [!NO_INCREMENTAL] (main): Call GC_enable_incremental(). * tests/disclaim_weakmap_test.c (main): Call GC_init_finalized_malloc() instead of multiple GC_register_displacement() calls; call weakmap_destroy(). * tests/disclaim_weakmap_test.c [!GC_PTHREADS] (main): Call test() once. * tests/tests.am (TESTS, check_PROGRAMS): Add disclaim_weakmap_test even if no THREADS. * tests/tests.am (disclaim_weakmap_test_SOURCES, disclaim_weakmap_test_LDADD): Define even if no THREADS.
* Add test using disclaim notifiers to implement a weak mapPetter Urkedal2018-10-191-0/+8
| | | | | | | | | | | | Issue #239 (bdwgc). disclaim_weakmap_test is added. * tests/disclaim_weakmap_test.c: New file. * tests/tests.am [THREADS] (TESTS, check_PROGRAMS): Add disclaim_weakmap_test. * tests/tests.am [THREADS] (disclaim_weakmap_test_SOURCES, disclaim_weakmap_test_LDADD): Define.
* Add test_atomic_ops to perform minimal testing of used atomic primitivesIvan Maidanski2017-06-141-0/+7
| | | | | | | | | | | | | | The main purpose of test_atomic_ops is to be able to check whether it is safe to use compiler atomic intrinsics (enabled by defining GC_BUILTIN_ATOMIC macro). * tests/test_atomic_ops.c: New file. * tests/tests.am [THREADS] (TESTS, check_PROGRAMS): Add test_atomic_ops. * tests/tests.am [THREADS] (test_atomic_ops_SOURCES, test_atomic_ops_LDADD): New variable. * tests/tests.am (check-without-test-driver): Run test_atomic_ops (if available).
* Fix 'overriding commands for target check-without-...' Makefile warningsIvan Maidanski2017-03-031-0/+1
| | | | | | | | | | | (fix commit 8f20303) Makefile.am includes cord.am and tests.am, so check-without-test-driver should be defined only at one place. * cord/cord.am (check-without-test-driver): Remove. * tests/tests.am (check-without-test-driver): Add ./cordtest$(EXEEXT) execution.
* Add Makefile target to run all tests without test-driverIvan Maidanski2017-03-021-0/+20
| | | | | | | | | | This could be used to catch errors reported by MemorySanitizer (the traditional "make check" shows the tests with MSan errors as skipped, so it does not lead to a non-zero exit code of make itself). * cord/cord.am (check-without-test-driver): New phony target (to compile, link and execute the tests not using test-driver). * tests/tests.am (check-without-test-driver): Likewise.
* Fix missing .exe for disclaim test filenames in Makefile (MinGW)Ivan Maidanski2017-03-021-2/+6
| | | | | | | | | (fix commit 6c1a924) Also add 4 blank lines to improve tests.am readability. * tests/tests.am [ENABLE_DISCLAIM] (TESTS): Add $(EXEEXT) suffix to disclaim_test, disclaim_bench.
* Do not specify version info for test libraries (Automake)Ivan Maidanski2017-02-161-4/+2
| | | | | * tests/tests.am (libstaticrootslib_test_la_LDFLAGS, libstaticrootslib2_test_la_LDFLAGS): Remove -version-info option.
* Rename subthread_create to subthreadcreate_test (Makefile)Ivan Maidanski2013-09-021-4/+4
| | | | | | | * tests/tests.am (TESTS, check_PROGRAMS, subthreadcreate_SOURCES, subthreadcreate_test_LDADD): Rename "subthread_create" to "subthreadcreate_test" (except for .c file). * .gitignore: Likewise.
* tests: Append _test suffix to 'initsecondarythread' binary file namesIvan Maidanski2013-09-021-4/+4
| | | | | | | * tests/tests.am (TESTS, check_PROGRAMS, initsecondarythread_SOURCES, initsecondarythread_LDADD): Rename initsecondarythread to initsecondarythread_test (except for .c file). * .gitignore: Likewise.
* Adjust build scripts to enable additional test library in staticrootstestIvan Maidanski2013-05-061-2/+9
| | | | | | | | | | | | | | (The 2nd test library contains global data too but has no GC_INIT call.) * tests/tests.am (staticrootstest_CFLAGS, libstaticrootslib2_test_la_CFLAGS): New definition (to test with libsrl_getpelem2() enabled). * tests/tests.am (staticrootstest_LDADD, check_LTLIBRARIES): Add libstaticrootslib2_test.la. * tests/tests.am (libstaticrootslib2_test_la_SOURCES, libstaticrootslib2_test_la_LIBADD, libstaticrootslib2_test_la_LDFLAGS): New definition (similar to that of libstaticrootslib_test_la_X).
* Enable staticrootstest for the case of GC shared library buildIvan Maidanski2013-05-041-6/+7
| | | | | | | | | | | | | | | | | | | | * tests/staticrootslib.c (GC_TEST_EXPORT_API): New macro (defined to set GCC default visibility attribute if GC_VISIBILITY_HIDDEN_SET unless Win32). * tests/staticrootslib.c (root): Remove unused global variable. * tests/staticrootslib.c (libsrl_mktree, libsrl_init): Decorate with GC_TEST_EXPORT_API. * tests/staticrootstest.c (GC_VISIBILITY_HIDDEN_SET): Do not check (do not skip the test). * tests/staticrootstest.c (GC_TEST_IMPORT_API): New macro. * tests/staticrootstest.c (root): Explicitly specify zero initializer. * tests/staticrootstest.c (libsrl_mktree, libsrl_init): Decorate with GC_TEST_IMPORT_API. * tests/staticrootstest.c (mktree, main): Remove commented out code. * tests/staticrootstest.c (main): Avoid code duplication. * tests/tests.am (staticrootstest_LDADD, check_LTLIBRARIES, libstaticrootslib_la): Rename libstaticrootslib to libstaticrootslib_test.
* Fix make disclaim_test to link with new GNU ld linking rulesIvan Maidanski2013-02-281-0/+4
| | | | | * tests/tests.am (disclaim_test_LDADD): Link to pthreads (or appropriate threading libraries) as needed.
* Fix tests makefile to link with new GNU ld linking rulesAndy Wingo2013-02-281-4/+7
| | | | | | | | * tests/tests.am (gctest_LDADD, threadleaktest_LDADD, threadkey_test_LDADD, subthread_create_LDADD, initsecondarythread_LDADD): Link to pthreads (or appropriate threading libraries) as needed; fixes failure to link with new GNU ld linking rules.
* Fix configure enabling 'make check' with C++ support for Cygwin/MinGWIvan Maidanski2012-03-061-2/+2
| | | | | | * configure.ac (CXXLIBS): New variable; set it to "-lsupc++" for Cygwin and MinGW if enable_cplusplus and the library is available. * tests/tests.am (test_cpp_LDADD): Use "CXXLIBS" variable.
* ENABLE_DISCLAIM: Make stylistic fixes in many places and add many FIXME.Ivan Maidanski2011-09-301-1/+0
|
* Add disclaim callbacks for efficient finalization.Petter Urkedal2011-09-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Importing gc-20070403-disclaim-1.0.patch. * configure.ac: Add --disable-disclaim option and set ENABLE_DISCLAIM macro and conditional accordingly. * include/include.am, Makefile.am Add sources disclaim.c and include/gc_disclaim.h. * Makefile.direct: Ditto and define ENABLE_DISCLAIM. * include/private/gc_priv.h (obj_kind): Add ok_mark_unconditionally, ok_disclaim_proc and ok_disclaim_cd. * misc.c (GC_new_kind_inner): Initialize them. * include/private/gc_priv.h (hblkhdr): Add HAS_DISCLAIM and MARK_UNCONDITIONALLY flags. * allchblk.c (setup_header): Set HAS_DISCLAIM and MARK_UNCONDITIONALLY flags as indicated by the object kind. * reclaim.c: Main adjustments to support the disclaim callbacks. * mark.c (GC_push_unconditionally, GC_push_next_marked_uncollecable): Unconditionally mark from objects in blocks flagged MARK_UNCONDITIONALLY. This preserves links reachable from the finalizer when using the the finalized object kind. * disclaim.c: Add file with support functions for disclaim callbacks and implementation of the "finalized" object kind. * include/gc_disclaim.h: Add file providing the corresponding API. * include/private/thread_local_alloc.h (thread_local_freelists): Add finalized_freelists. * thread_local_alloc.c: Initialize them. * tests/tests.am, tests/disclaim_test.c, tests/disclaim_bench.c: Add disclaim-related tests.
* Add test case to expose a bug with thread creation.Petter Urkedal2011-09-191-0/+5
|
* Remove resolved FIXME in tests.am script.Ivan Maidanski2011-08-311-8/+0
| | | | | | | (The stated FIXME no longer in force.) * tests/tests.am: Remove ancient FIXME about trace_test that it does not work on MacOS X.
* 2011-07-26 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-0/+5
| | | | | | | | * tests/realloc_test.c: New file. * tests/tests.am (TESTS, check_PROGRAMS): Add realloc_test. * .cvsignore: Add realloc_test. * configure: Regenerate. * Makefile.in: Ditto.
* 2011-05-11 Ivan Maidanski <ivmai@mail.ru> (mostly really Ludovic Courtes)ivmai2011-07-261-0/+5
| | | | | | | | | * tests/threadkey_test.c: New file. * .cvsignore (threadkey_test): Add. * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'. * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD): New variable. * Makefile.in: Regenerate.
* 2011-04-18 Ivan Maidanski <ivmai@mail.ru> (really Ludovic Courtes)ivmai2011-07-261-0/+5
| | | | | | | | | * tests/tests.am (TESTS, check_PROGRAMS): Add 'initsecondarythread'. * tests/tests.am (initsecondarythread_SOURCES, initsecondarythread_LDADD): New variable. * Makefile.in: Regenerate. * configure: Ditto.
* 2010-03-23 Ivan Maidanski <ivmai@mail.ru> (really Dave Korn)ivmai2011-07-261-3/+11
| | | | | | | | | | | | * Makefile.am (check_LTLIBRARIES): Initialise to empty. * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest. * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD, libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD, libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES): Define. * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la. * .cvsignore: Ignore libstaticrootslib.la. * Makefile.in: Regenerate.
* 2009-09-26 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)ivmai2011-07-261-4/+6
| | | | | | | | | | * Makefile.am: Don't add libtool.m4 to EXTRA_DIST. * acinclude.m4: Place GC_SET_VERSION in []. * README.QUICK: Update information for Makefile. * Makefile.am: Replace dist_pkgconfig_DATA with pkgconfig_DATA for bdw-gc.pc. * configure.ac: Enable tracetest. * tests/tests.am: Ditto.
* 2008-03-10 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-1/+6
| | | | | | | | * allchblk.c (GC_allochblk): Check for overflow during size rounding. * tests/huge_test.c: New. * Makefile.direct, tests/tests.am: Add huge_test.c * Makefile.in: Regenerate.
* 2008-02-15 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-0/+4
| | | | | | | | | | | | | | | * windows-untested/gc.def: Remove CreateThread line. * windows-untested/README: New file. * win32_threads.c (GC_use_DllMain): Force collector initialization. (GC_init_parallel): Reformat comment. * include/gc.h (GC_use_DllMain): Clarify usage rules in comment. * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code. * include/gc_cpp.h: Add matching placement delete overloads everywhere. * include/private/gc_locks.h (NO_THREAD): Add cast. * include/private/gcconfig.h: Add test for __HP_aCC. * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX. * Makefile.in, configure: Regenerate.
* 2007-08-03 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-0/+5
| | | | | | | | | | | | | | * Makefile.direct: Remove comment fragment. * tests/tests.am: Add smashtest. * Makefile.in: Regenerate. * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc. * configure: Regenerate. * pthread_support.c: Fix comment spelling. * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with GC_LINUX_THREADS and REDIRECT_MALLOC. * tests/smash_test.c: Initial check-in. * obj_map.c: Print log entry to correct file. * include/private/thread_local_alloc.h: Add TlsAlloc error check.
* 2007-05-23 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-4/+1
| | | | | | | | | | | * Makefile.am: Move includes to bottom. Add better library dependencies. Increment library version. Remove "SUBDIRS += .". * cord/cord.am, tests/tests.am: Add better library dependencies. Remove now unnecessary dependencies. * Makefile.in: Regenerate. * include/gc.h (GC_begin_thread_ex, GC_endthreadex, GC_ExitThread): Move to define on all Windows platforms. (_beginthread): define to generate error if used.
* 2006-03-28 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-1/+1
| | | | * tests/test.am: Change THREADLIBS to THREADDLLIBS.
* 2006-03-09 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-6/+6
| | | | | | | | | | | | | | | | | Merge various gc6.7 changes (see doc/README.changes for contributors): * configure.ac, pthread_stop_world.c, pthread_support.c, threadlibs.c, include/gc_config_macros.h, include/gc_pthread_redirects.h, include/leak_detector.h, include/private/gcconfig.h, include/private/thread_local_alloc.h: Add NetBSD threads support. * dbg_mlc.c, malloc.c, include/gc.h: add GC_debug_str_dup, GC_str_dup. * os_dep.c (GC_init_win32), dyn_load.c (win32 GC_register_dynamic_libraries): accept MEM_PRIVATE for Windows 98 etc. * doc/gcinterface.html: Add warnings about thread locals and in-flight exceptions. * tests/tests.am: Add EXE extensions. * Makefile.in, configure: rebuild
* gc7.0alpha3 tarball importgc7_0alpha3Ivan Maidanski2011-07-261-0/+60