1 2== [8.0.4] 2019-03-02 == 3 4* Avoid a full GC when growing finalizer tables if in incremental mode 5* Avoid potential race in hb_sz access between realloc and reclaim_block 6* Avoid test.o rebuild on tests folder timestamp change (Makefile.direct) 7* Avoid unexpected heap growth in gctest caused by GC_disable 8* Ensure result of every variant of MS_TIME_DIFF has unsigned long type 9* Fix 'duplicate symbol' error for tests using multiple static libs (OS X) 10* Fix 'undefined reference to __data_start' linker error (Android/aarch64) 11* Fix 'unexpected mark stack overflow' abort in push_all_stack 12* Fix 'wrong __data_start/_end pair' error on Android 13* Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec 14* Fix GetThreadContext stale register values use if WoW64 (Win32) 15* Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME 16* Fix thread_info() count argument value (OS X) 17* Support de_win.c compilation by Makefile.direct (cord/de) 18 19 20== [8.0.2] 2018-12-23 == 21 22* Abort with appropriate message if executable pages cannot be allocated 23* Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE 24* Add paths to filenames mentioned in the copyright section in README 25* Add test using disclaim notifiers to implement a weak map 26* Adjust #error messages format 27* Allow to force executable pages allocation in gctest 28* Avoid potential 'macro redefinition' errors for config.h macros 29* Call real pthread_sigmask instead of its wrapper in start_mark_threads 30* Check result of pthread_mutex_unlock in specific.c 31* Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets 32* Default to non-executable memory allocation across all make scripts 33* Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts 34* Do not prevent GC from looking at environment variables (BCC_MAKEFILE) 35* Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest 36* Do not use spin locks if AO test-and-set is emulated (pthreads) 37* Document HANDLE_FORK macro optional usage in Makefile.direct 38* Document assertion in the setters that used to return old value 39* Eliminate 'assigned value never used' compiler warning in test_cpp WinMain 40* Eliminate 'casting signed to bigger unsigned int' CSA warning 41* Eliminate 'different const qualifiers' MS VC warnings in cordbscs 42* Eliminate 'function is never used' cppcheck warning for calloc/realloc 43* Eliminate 'non-virtual destructor for class with inheritors' CSA warning 44* Eliminate 'pointer targets differ in signedness' compiler warning (Win32) 45* Eliminate 'struct member is never used' cppcheck warnings in os_dep 46* Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep 47* Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg 48* Eliminate redundant check in backwards_height 49* Fix 'USE_MUNMAP macro redefinition' error for NaCl 50* Fix 'collecting from unknown thread' abort in leak-finding mode for Win32 51* Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled 52* Fix 'too wide non-owner permissions are set for resource' code defect 53* Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE 54* Fix GC_register_disclaim_proc for leak-finding mode 55* Fix a deadlock in write_fault_handler if AO_or is emulated 56* Fix comment typo in CMakeLists.txt 57* Fix concurrent bitmap update in GC_dirty 58* Fix deadlocks in write and suspend handlers if AO test-and-set is emulated 59* Fix executable memory allocation in GC_unix_get_mem 60* Fix hbp overflow in GC_install_counts 61* Fix linkage with a system libatomic_ops shared library 62* Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED 63* Fix marking of finalizer closure object 64* Fix marks and hb_n_marks consistency when disclaim returns true 65* Fix memory allocation on GCF (Linux/x64) 66* Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW) 67* Fix test_cpp assertion violation in find-leak mode 68* Fix tests linkage with internal atomic_ops.o 69* Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test 70* Guard against potential buffer overflow in CORD_next and CORD_pos_fetch 71* New macro to suppress printing of leaked objects 72* Pass -Wall -Wextra -Wpedantic to g++ if supported (configure) 73* Prefix internal durango_get_mem symbol with 'GC_' 74* Prevent double inclusion of javaxfc.h and private/specific.h 75* Print relevant message in tests not appropriate for leak detection mode 76* Reduce scope of local variables in GC_remove_all_threads_but_me 77* Refine HIDE_POINTER documentation for the case of the leak-finding mode 78* Refine documentation in gc_disclaim.h 79* Remove extra USE_MMAP definition for Interix 80* Remove redundant header double-inclusion checks in the private headers 81* Remove strlen calls with a constant string argument in msvc_dbg 82* Specify register_disclaim_proc and finalized_malloc argument as non-null 83* Support UWP/arm64 target 84* Test marking of finalizer closure object in disclaim_test 85* Turn off leak detection mode explicitly in cord/de 86* Turn off parallel marker, thread-local allocation if used AO ops emulated 87* Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles 88* Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct 89* Update NO_EXECUTE_PERMISSION documentation 90* Update documentation about arm64 ABI in gcconfig.h 91* Use AO_or in async_set_pht_entry_from_index if available 92* Use GC_WORD_MAX macro across all C source files 93* Use macro to operate on a flag residing in GC_stop_count 94* Use standalone private macro to guard against ptr_t redefinition 95* Workaround '#error' cppcheck messages in backgraph and private headers 96* Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some 97* Workaround 'GC_dump function is never used' cppcheck warning 98* Workaround 'local address assignment to a global variable' CSA warning 99* Workaround 'local variable end shadows outer symbol' cppcheck warnings 100* Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning 101* Workaround 'nonlocal var will use ptr to local var' cppcheck false positive 102* Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg 103* Workaround 'potential non-terminated string' false positive in cordbscs 104* Workaround 'value of _MAX_PATH is unknown' cppcheck warning 105* Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC 106 107 108== [8.0.0] 2018-09-05 == 109 110* Accept Android platform by both CMake and configure 111* Access finalize_now atomically to avoid TSan warning without no-sanitize 112* Acknowledge thread restart from suspend_handler (NetBSD) 113* Add a sanity check that load_acquire and store_release are available 114* Add AO primitives implementation to GC based on C11 atomic intrinsic 115* Add assertion for suspend_ack_sem in start_world 116* Add assertion to allocobj that live unmarked object cannot be reclaimed 117* Add assertions about held lock when accessing all_bottom_indices 118* Add assertions to ensure ADD_CALL_CHAIN is called holding the lock 119* Add assertions to finalize and threads support for MANUAL_VDB needs 120* Add basic calculation of the total full-collection time 121* Add check that gc_cpp operator delete is called (test_cpp) 122* Add debug logging to new_thread about GC_threads hash table collisions 123* Add GC prefix to _MSVC_DBG_H macro 124* Add initial RISC-V support 125* Add Makefile target to run all tests without test-driver 126* Add test_atomic_ops to perform minimal testing of used atomic primitives 127* Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC) 128* Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h 129* Allocate non-executable memory by default (CMake) 130* Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H) 131* Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics 132* Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values 133* Allow disabling of dynamic loading in CMake script and configure 134* Allow disabling of main static data registration in CMake and configure 135* Allow disabling of threads discovery in CMake script and configure 136* Allow gc_assertions enabling in CMake script 137* Allow gc_debug, redirect_malloc, large_config options in CMake script 138* Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition 139* Allow mmap enabling in CMake script and configure 140* Allow passing -D DEFAULT_VDB to CFLAGS 141* Allow subthreadcreate_test to be compiled with zero NTHREADS 142* Allow to turn on spin locking even if thread-local allocations are used 143* Always include gc_atomic_ops.h unless threads are disabled 144* Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1 145* Avoid duplication of code handling pthreads case in configure 146* Avoid potential data race during apply_to_each_object(reset_back_edge) 147* Avoid potential data race during GC_dump execution 148* Avoid potential race between malloc_kind and mark_thread_local_fls_for 149* Avoid potential race between realloc and clear_hdr_marks/reclaim_generic 150* Avoid potential race in print_static_roots called by dyld_image_add/remove 151* Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking 152* Avoid potential race when accessing size_map table 153* Avoid potential race when storing oh_back_ptr during parallel marking 154* Avoid SIGSEGV during GC_INIT on some Android devices 155* Build only shared libraries by default (configure) 156* Change pointer arguments of push_all[_eager]/conditional API to void* type 157* Change type of hb_sz field (of hblkhdr) from size_t to word 158* Check consistency of descr, adjust, clear arguments of GC_new_kind 159* Check that GC_WIN32_PTHREADS is not specified for Cygwin 160* Check thread_local is initialized before accessing thread_key 161* Collapse multiple BCOPY_EXISTS macro definitions 162* Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE 163* Collapse multiple page_was_dirty, remove_protection, read_dirty definitions 164* Compile checksums.c only if --enable-checksums is given (configure) 165* Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h 166* Convert .html files to Markdown format 167* Convert code of .c files to valid C++ code 168* Decide between memory unmapping and mprotect-based dirty bits at runtime 169* Declare t local variable in the block where the variable is used 170* Define ABORT() using _CrtDbgBreak (if available) on Windows host 171* Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version 172* Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING 173* Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h 174* Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC) 175* Define GC_THREADS instead of GC_x_THREADS in Makefiles 176* Define macro to specify the environment file name extension (Win32/WinCE) 177* Define static resend_lost_signals(), restart_all() in pthread_stop_world 178* Detect sigsetjmp() availability by configure 179* Determine whether to use compiler TLS for kFreeBSD at compile time 180* Do not call BCOPY and BZERO if size is zero 181* Do not call sem_getvalue in stop_world if one thread exists 182* Do not call set_handle_fork(1) in gctest if pthread_atfork not supported 183* Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile 184* Do not declare dl_iterate_phdr as weak for kFreeBSD 185* Do not include windows.h when compiling gc_cpp.cc 186* Do not install gc_allocator.h, gc_disclaim.h unless the features enabled 187* Do not merge dynamic root with the existing static one in add_roots_inner 188* Do not print n_rescuing_pages value if incremental collections disabled 189* Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64 190* Do not rebuild_root_index unless remove_root_at_pos is called 191* Do not specify version info for test libraries (Automake) 192* Do not use alternate thread library on Solaris 193* Do not use asm in GC_pause 194* Do not use PKG_CHECK_MODULES in configure 195* Do not use system clock consistently if NO_CLOCK 196* Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl 197* Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file) 198* Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten) 199* Eliminate 'comparison is always false' code defect in get_maps 200* Eliminate 'GC_DEBUG redefined' compiler warning in smashtest 201* Eliminate 'potential unsafe sign check of a bitwise operation' code defect 202* Enable alternative finalization interface (DISCLAIM) in all makefiles 203* Enable compilation for Cygwin with MPROTECT_VDB 204* Enable handle-fork and memory unmapping by default 205* Enable mprotect-based incremental GC for Win64 (GCC) 206* Expose API to control rate and max prior attempts of collect_a_little 207* Expose API to control the minimum bytes allocated before a GC occurs 208* Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h 209* Fix 'doc' files installation folder 210* Fix build of cord tests as C++ files (Makefile.direct) 211* Fix comment typos in backgraph.c, de.c, gcconfig.h 212* Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW) 213* Fix start_world not resuming all threads on Darwin 214* Fix test_cpp failure in case GC_DEBUG is defined 215* Group common defines for POSIX platforms in configure and CMake scripts 216* Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined 217* Handle pthread restart signals loss if retry_signals 218* Hide value stored to thread-specific entries for a test purpose 219* Implement FindTopOfStack(0) for ARM and AArch64 (Darwin) 220* Implement memory unmapping for Sony PS/3 221* Imply configure --single-obj-compilation if --disable-static 222* Include malloc.c in extra/gc.c after include gc_inline.h 223* Increase MAX_HEAP_SECTS (10 times) for large-config 224* Initial single-threaded support of Interix subsystem 225* Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One 226* Initial support of TIZEN platform 227* Install gc.3 man page instead of copying gc.man to doc folder (configure) 228* Make extend_size_map() static (code refactoring) 229* Make subthreadcreate test compilable even without libatomic_ops 230* Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible 231* Move de_win compiled resource files to cord/tests 232* Move pcr_interface.c, real_malloc.c to 'extra' folder 233* New API function (GC_dump_named) to produce named dumps 234* New API function (GC_is_incremental_mode) 235* New API function (get_expl_freed_bytes_since_gc) 236* New API function (get_size_map_at) to get content of size_map table 237* New API to stop and start the GC world externally 238* New API to turn on manual VDB at runtime 239* New field (expl_freed_bytes_since_gc) in public prof_stats_s 240* New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections 241* New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation 242* Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct 243* Print time passed since GC initialization in GC_dump 244* Public API (GC_deinit) to allow Win32 critical sections deletion 245* Reduce probability of collision in threads hashtable for 64-bit targets 246* Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3 247* Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h 248* Reformat code and comments in gc_allocator.h 249* Remove 'dist' target from Makefile.direct 250* Remove a redundant check of __cplusplus in Symbian-specific .cpp files 251* Remove Android-specific code in gcconfig.h for M68K 252* Remove C++ WeakPointer and CleanUp API which lacks implementation 253* Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure) 254* Remove done_init static variable from fnlz_mlc.c 255* Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm 256* Remove duplicated sample code in leak.md 257* Remove EMX_MAKEFILE (add EMX support to Makefile.direct) 258* Remove GC code fragment (which already merged) from README.Mac 259* Remove GC_GNU_THREADS macro (HURD) 260* Remove GENERAL_MALLOC internal macro 261* Remove HIGH_BIT macro duplicating SIGNB 262* Remove lint-specific code 263* Remove Makefile KandRtest target (that supported K&R C compiler) 264* Remove MIN_WORDS macro from gc_priv.h 265* Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ) 266* Remove name of optional arguments of operator new and new[] in gc_cpp.h 267* Remove notes that K&R C compiler is unsupported 268* Remove PUSH_CONTENTS_HDR multi-line macro 269* Remove redundant check that clear_fl_marks argument is non-null 270* Remove redundant THREADS macro checks in alloc.c and gc_priv.h 271* Remove stubborn objects allocation code completely, remove stubborn.c 272* Remove unnecessary argument casts in add_roots_inner calls 273* Remove unnecessary type casts in n_set_marks 274* Remove unused USE_GENERIC macro definition and description 275* Remove version info in 'de' cord test application 276* Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests 277* Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0 278* Replace some FIXME items with TODO ones 279* Run command passed to if_not_there directly from Makefile.direct 280* Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG 281* Skip grungy_pages update when mark state invalid to speedup read_dirty 282* Skip typed_test in gctest if NO_TYPED_TEST macro is defined 283* Support configure --disable-thread-local-alloc option (similar for CMake) 284* Support enable_checksums option in CMake script 285* Support Haiku multi-threaded build by CMake 286* Support threads for DragonFly in configure 287* Turn on 'atomic uncollectable' functionality by default (CMake) 288* Turn on GC assertions in NT_MAKEFILE for debug builds 289* Turn on gcj, disclaim and java finalization by default (CMake) 290* Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB 291* Turn on incremental mode in cordtest and cord/de 292* Turn on incremental mode in disclaim_test, test_cpp and staticroots test 293* Turn on parallel marker by default for all multi-threaded builds 294* Update GC compilation and usage notes for Win32 295* Update shared libraries version info to differentiate against v7.6 296* Update top_index entry pointer only when the entry is constructed fully 297* Use __builtin_expect in SIZET_SAT_ADD macro 298* Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+) 299* Use __int64 instead of 'long long' in LONG_MULT if appropriate 300* Use __thread keyword for Android NDK r12b+ Clang (arm) 301* Use atomic allocation for leafs in reverse_test (gctest) 302* Use atomic load/store for the concurrently accessed variables in GC_lock 303* Use C11 static_assert if available 304* Use compiler atomic intrinsics by default if available (configure) 305* Use EXPECT FALSE for mark_from code documented as executed rarely 306* Use heap-allocated memory for local mark stack of non-marker thread 307* Use HOST_ANDROID define instead of PLATFORM_ANDROID 308* Use include gc.h with the angle brackets in the man page synopsis 309* Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD) 310* Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate 311* Use noexcept specifier in gc_allocator and gc_cpp if C++11 312* Use same macro (NTHREADS) across all tests to specify number of threads 313* Use sigsetjmp() in setjmp_t tool if available 314* Use thread-local allocations for all multi-threaded builds 315* Use THREAD_EQUAL consistently to compare pthread_t values 316* Workaround 'bad pointer arithmetic' false waring in check_annotated_obj 317* Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8 318* Workaround Thread Sanitizer (TSan) false positive warnings 319 320 321== [7.6.12] 2019-03-01 == 322 323* Eliminate 'assigned value never used' compiler warning in test_cpp WinMain 324* Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled 325* Fix 'undefined reference to __data_start' linker error (Android/aarch64) 326* Fix 'unexpected mark stack overflow' abort in push_all_stack 327* Fix 'wrong __data_start/_end pair' error on Android 328* Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec 329* Fix GetThreadContext stale register values use if WoW64 (Win32) 330* Fix executable memory allocation in GC_unix_get_mem 331* Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME 332* Fix thread_info() count argument value (OS X) 333* Update NO_EXECUTE_PERMISSION documentation 334 335 336== [7.6.10] 2018-12-13 == 337 338* Add paths to filenames mentioned in the copyright section in README 339* Call real pthread_sigmask instead of its wrapper in start_mark_threads 340* Eliminate 'casting signed to bigger unsigned int' CSA warning 341* Eliminate 'non-virtual destructor for class with inheritors' CSA warning 342* Fix 'collecting from unknown thread' abort in leak-finding mode for Win32 343* Fix 'too wide non-owner permissions are set for resource' code defect 344* Fix 'undefined reference to GC_incremental' linker error in pthread_start 345* Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE 346* Fix GC_register_disclaim_proc for leak-finding mode 347* Fix a deadlock in write_fault_handler if AO_or is emulated 348* Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h 349* Fix concurrent bitmap update in GC_dirty 350* Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW) 351* Fix hbp overflow in GC_install_counts 352* Fix linkage with a system libatomic_ops shared library 353* Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED 354* Fix marking of finalizer closure object 355* Fix marks and hb_n_marks consistency when disclaim returns true 356* Fix memory allocation on GCF (Linux/x64) 357* Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW) 358* Fix start_world not resuming all threads on Darwin 359* Fix test_cpp assertion violation in find-leak mode 360* Fix tests linkage with internal atomic_ops.o 361* Fix unneeded end_stubborn_change in disclaim_test 362* Guard against potential buffer overflow in CORD_next and CORD_pos_fetch 363* New macro to suppress printing of leaked objects 364* Prevent double inclusion of javaxfc.h and private/specific.h 365* Reduce scope of local variables in GC_remove_all_threads_but_me 366* Refine HIDE_POINTER documentation for the case of the leak-finding mode 367* Refine documentation in gc_disclaim.h 368* Test marking of finalizer closure object in disclaim_test 369* Update documentation about arm64 ABI in gcconfig.h 370* Use AO_or in async_set_pht_entry_from_index if available 371* Use include gc.h with the angle brackets in the man page synopsis 372 373 374== [7.6.8] 2018-08-12 == 375 376* Add cpu, make_as_lib, nothreads options to NT_MAKEFILE 377* Add NetBSD/aarch64 and initial RISC-V support 378* Adjust formatting of configure help messages and config.h comments 379* Avoid multiple 'getcontext failed' warnings if getcontext is broken 380* Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean) 381* Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE 382* Do not call GC_dirty_inner unless GC_incremental 383* Do not use NULL in gc_inline.h 384* Eliminate 'cast between incompatible function types' compiler warning 385* Eliminate 'comparing signed and unsigned values' compiler warnings (bcc) 386* Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc 387* Eliminate 'declaration of var hides global declaration' compiler warning 388* Eliminate 'language extension used' Clang warning in gc.h 389* Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning 390* Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack 391* Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join 392* Eliminate 'switch statement contains no case label' compiler warning 393* Eliminate 'variable might be uninitialized' warning in win32_start_inner 394* Eliminate duplicate clear_mark_bit call when removing disappearing link 395* Fast fail on invalid CPU parameter passed to NT_MAKEFILE 396* Fix 'collecting from unknown thread' abort in leak-finding mode 397* Fix 'pointer arithmetic with NULL' code defect in print_callers 398* Fix Borland version in documentation to match that in BCC_MAKEFILE 399* Fix comment about inv_sz computation in setup_header 400* Fix comments style in configure.ac and Makefile.am 401* Fix compilation by digimars.mak (DMC) 402* Fix compilation by WCC makefile 403* Fix compilation of darwin_stop_world for iOS 8+ 404* Fix cords for MANUAL_VDB 405* Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE 406* Fix GC_is_valid_displacement and GC_is_visible for non-small objects 407* Fix gctest in leak-finding mode 408* Fix infinite restarting of mark_some when a static root disappeared (Linux) 409* Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ 410* Fix mark stack overflow checking in push_selected 411* Fix missing GC_dirty calls for GC-allocated objects used internally 412* Fix missing GC_dirty invocation from debug_end_stubborn_change 413* Fix MSWIN32 macro redefinition (WCC) 414* Fix multi-threaded gctest for the case of NTHREADS is set to zero 415* Fix new and delete operators definition for DigitalMars compiler 416* Fix NT_MAKEFILE for VS 2017 417* Fix potential null dereference in GC_CONS 418* Fix register_dynamic_libraries on Windows 10 419* Fix result computation in n_set_marks 420* Fix return type in GC_set_warn_proc API documentation 421* Fix tests for GC compiled with MANUAL_VDB 422* Fix the build for Emscripten 423* Fix typo in comment for CORD_ec_flush_buf prototype 424* Fix typos in ChangeLog and generic_malloc 425* Fix UNTESTED for multi-threaded API functions in gctest 426* Fix VirtualQuery call in case of malloc failure (Win32) 427* Install gc.3 man page instead of copying gc.man to doc folder (configure) 428* Keep pointer to the start of previous entry in remove_specific_after_fork 429* Move de_win compiled resource files to cord/tests 430* Never return null by C++ GC allocators and gc_cpp operator new 431* Perform thread_suspend in loop as it may be interrupted (Darwin) 432* Really abort if failed to read /proc for library registration (Linux) 433* Remove code duplication in gcj_malloc and malloc_explicitly_typed 434* Remove duplicate local variable in reclaim_block 435* Remove information how to send bugs from README.cords file 436* Remove libatomic_ops license information 437* Remove unused USE_GENERIC macro definition and description 438* Suppress 'functions containing switch are not expanded inline' bcc warning 439* Suppress 'non-member operator new/delete may not be inline' VC++ warning 440* Turn on incremental collection in gctest also if MANUAL_VDB 441* Update copyright information in alloc.c, gc.c/h and the documentation 442* Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal 443* Update NT_MAKEFILE usage information in README files for Win32 and Win64 444* Workaround 'class C does not have a copy constructor' cppcheck warning 445* Workaround 'function nested_sp is never used' cppcheck style warning 446* Workaround 'opposite expression on both sides of &' cppcheck style warning 447* Workaround 'template-id not supported in this context' compiler error (WCC) 448 449 450== [7.6.6] 2018-04-20 == 451 452* Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD 453* Eliminate 'boolean result used in bitwise operation' cppcheck warning 454* Eliminate 'there is pointer arithmetic with NULL' cppcheck warning 455* Explicitly unblock GC signals on GC initialization 456* Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers 457* Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC) 458* Fix arguments delimiter in pcr_interface.c (PCR) 459* Fix assertion violation in DllMain of win32_threads 460* Fix comment for debug_generic_malloc_inner[_ignore_off_page] 461* Fix data race during apply_to_each_object(reset_back_edge) 462* Fix dbg_mlc.c/o file name in documentation 463* Fix gctest with musl libc on s390x 464* Fix include gc_gcj.h in thread_local_alloc.c 465* Fix man section number (3) 466* Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h 467* Fix missing new-line in ABORT_ARG<n> definition 468* Fix missing SIGBUS handler setup for kFreeBSD 469* Fix null dereference in print_callers on backtrace_symbols failure 470* Fix null pointer dereference in get_private_path_and_zero_file (Symbian) 471* Fix the collector hang when it is configured with --enable-gc-debug 472* Fix thread_suspend fail for threads registered from key destructor (OS X) 473* Fix type of local variables receiving result of PHT_HASH 474* Fix typo in AIX macro name 475* Fix typo in comment in specific.h 476* Fix unbounded heap growth in case of intensive disappearing links usage 477* Remove API symbols renaming in WCC_MAKEFILE 478* Support Haiku/amd64 and Haiku/x86 hosts 479* Support threads for DragonFly in configure 480* Workaround 'address of auto-variable returned' cppcheck error 481* Workaround gctest hang on kFreeBSD (if thread-local allocations are on) 482 483 484== [7.6.4] 2018-01-26 == 485 486* Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1 487* Change compiler invocation example in gc.man to use dynamic libgc 488* Delete dont_ar_* build intermediate files on make clean (Makefile.direct) 489* Do not declare dl_iterate_phdr as weak for DragonFly 490* Fix 'cords' parallel build in Makefile.direct 491* Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2 492* Fix error code in abort message if sem_wait failed in start_world (NetBSD) 493* Fix GC allocation mutex in child after a fork 494* Fix global operator delete definition for C++14 in gc_cpp 495* Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old 496* Fix libgc version which was changed in linkage breaking way 497* Fix missing EOLn output in threadlibs tool 498* Fix threadlibs tool to output '-lpthread' for DragonFly 499* Prevent DATASTART redefinition for NaCl 500* Remove obsolete advice about linking with _DYNAMIC=0 (Linux) 501 502 503== [7.6.2] 2017-12-23 == 504 505* Add assertion that no hb_n_marks underflow occurs 506* Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest) 507* Add minimal testing of GC_set_bit (gctest) 508* Add more cases to huge_test to cover sizes close to word-type maximum 509* Add testing of new[]/delete[] (test_cpp) 510* Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used 511* Adjust code indentation of calloc_explicitly_typed 512* Align local_mark_stack in help_marker explicitly 513* Allow custom TRACE_ENTRIES value 514* Allow gctest and thread_leak_test with zero NTHREADS 515* Avoid data race in finalized_count (gctest) 516* Code refactoring of divide-by-HBLKSIZE occurrences 517* Code refactoring of huge_test 518* Code refactoring of tests/subthread_create regarding AO add primitive 519* Compile thread_local_alloc only if multi-threaded build (Makefile.am) 520* Delete preprocessor output on make clean (Makefile.direct) 521* Disable implicit multi-threaded mode for Win32 to avoid LOCK crash 522* Do not disable parallel mark for WRAP_MARK_SOME 523* Do not enable mprotect-based incremental mode if unmapping is on (gctest) 524* Do not install documentation if configure --disable-docs (new option) 525* Do not use tkill (Android) 526* Document base and size of objects allocated by finalized_malloc 527* Document configure 'syntax error' issue in README 528* Eliminate 'address of local variable returned' static analyzer warning 529* Eliminate 'array vs singleton' code defect in typed_test (gctest) 530* Eliminate 'assigned value never used' CSA warning in min_bytes_allocd 531* Eliminate 'boolean result used in bitwise op' cppcheck false warning 532* Eliminate 'C-style pointer casting' cppcheck style warnings in test 533* Eliminate 'checking if unsigned variable is <0' cppcheck style warning 534* Eliminate 'class member var with name also defined in parent' warning 535* Eliminate 'comparison is always false' static analyzer warning in finalize 536* Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load) 537* Eliminate 'condition is always true' cppcheck style warning 538* Eliminate 'constructor with 1 argument is not explicit' cppcheck warning 539* Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest) 540* Eliminate 'dereference of null' CSA false warning in array_mark_proc 541* Eliminate 'function result not used' code defect in GC_mark_local 542* Eliminate 'GC_collecting is set but never used' code defect (Win32) 543* Eliminate 'GC_record_fault is never used' cppcheck style warning 544* Eliminate 'integer shift by a negative amount' code defect in finalize 545* Eliminate 'label not used' cppcheck false warnings in GC_mark_X 546* Eliminate 'memory leak' code defect for scratch-allocated memory 547* Eliminate 'memory leak' code defect in remove_specific 548* Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC) 549* Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX) 550* Eliminate 'possible integer underflow' code defect (cord-de) 551* Eliminate 'potential overflow' static analyzer warning in test 552* Eliminate 'printf format specifies type void*' GCC pedantic warnings 553* Eliminate 'scope of variable can be reduced' cppcheck warnings 554* Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp) 555* Eliminate 'this statement may fall through' GCC warnings 556* Eliminate 'unnecessary comparison of static strings' cppcheck warning 557* Eliminate 'unsafe vsprintf is deprecated' compiler warning 558* Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC) 559* Eliminate 'unused variable' compiler warning in remove_all_threads_but_me 560* Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord) 561* Eliminate 'value exceeds maximum object size' GCC warning in huge_test 562* Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message 563* Eliminate 'value of DATASTART2 unknown' cppcheck info messages 564* Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages 565* Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages 566* Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages 567* Eliminate 'write to memory that was const-qualified' code analyzer warning 568* Eliminate all 'scope of variable can be reduced' cppcheck style warnings 569* Eliminate CSA warning about incorrect cast applied to HBLK_OBJS 570* Eliminate CSA warning about narrowing cast in CleanUp of test_cpp 571* Eliminate CSA warning of non-virtual destructor in test_cpp base class 572* Eliminate CSA warning of staticroot that can be a local variable (tests) 573* Eliminate CSA warning of unmodified non-const static var (disclaim_test) 574* Eliminate redundant local variable in register_finalizer 575* Eliminate TSan (Thread Sanitizer) warnings in gctest 576* Eliminate UBSan warning of overflow during descr subtraction in mark_from 577* Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main() 578* Eliminate unsigned fl_builder_count underflow in mark_thread 579* Enable GC_is_tmp_root for all platforms 580* Execute more single-threaded GC tests by CMake 581* Expand tabs to spaces in de_win.rc (tests) 582* Export GC_dump_finalization/regions() 583* Export GC_is_tmp_root() and GC_print_trace[_inner]() 584* Export GC_print_free_list() 585* Fix '32-bit value shift followed by expansion to 64-bit' code defect 586* Fix 'GC_written_pages never read' code defect (GWW_VDB) 587* Fix 'label cannot be reached' static analyzer warning in disclaim_test 588* Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl) 589* Fix 'syntax error' reported by cppcheck for mach_dep 590* Fix 'unknown type name GC_INNER' compilation error (FreeBSD) 591* Fix 'variable assigned a value that is never used' cppcheck style warnings 592* Fix 'void pointers in calculations: behavior undefined' cppcheck warning 593* Fix assertion violation about disabled cancel in try_to_collect_inner 594* Fix atomic_ops build in Makefile.direct for Solaris 595* Fix Clang static analyzer warning about not found gc_priv.h in extra files 596* Fix compilation error in get_main_stack_base (Emscripten) 597* Fix compilation for winpthreads if HANDLE_FORK 598* Fix compilation if configured with --enable-werror on OS X 599* Fix cord/de build in Makefile.direct (Linux) 600* Fix data race in a list referenced by A.aa (gctest) 601* Fix data race in collectable_count (gctest) 602* Fix data race in do_local_mark when comparing active_count to helper_count 603* Fix data race in GC_suspend/resume_thread 604* Fix data race in last_stop_count access (suspend_handler_inner) 605* Fix data race in make_descriptor when setting explicit_typing_initialized 606* Fix data race in mark_thread when updating mark_no 607* Fix data race when getting object size in explicitly-typed allocators 608* Fix deadlock in GC_suspend_thread 609* Fix gctest failure for Darwin if CPPCHECK is defined 610* Fix lack of barriers to synchronize memory for suspend_handler 611* Fix marking of disclaim-reachable objects in the incremental mode 612* Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest) 613* Fix missing started_thread_while_stopped call from mark_some if GCC/Clang 614* Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK 615* Fix page calculation in checksums 616* Fix parallel build in Makefile.direct 617* Fix test_cpp and c++ parallel build in Makefile.direct 618* Fix typo in comment of GC_mark_some 619* Fix typos in cdescr.html and README.sgi 620* Make GC_INIT optional for clients even if thread-local allocations enabled 621* Match uclinux pattern in configure 622* Move conditional GC_need_to_lock setting to gc_locks.h (refactoring) 623* Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct 624* New API function (GC_is_init_called) to check if BDWGC is initialized 625* New target (check-cpp) in Makefile.direct 626* Prevent abort in register_data_segments for Symbian and Emscripten 627* Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection 628* Print realloc_count value in gctest 629* Put invariant name in quotes to make mark_state comments clearer 630* Refine configure messages when checking for compiler option support 631* Remove extraneous semicolons after AC_MSG_WARN (configure) 632* Remove page_was_dirty and remove_protection duplicate definitions 633* Remove unnecessary type casts of printf arguments to unsigned long 634* Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro) 635* Rename 'test' to 'check' target in Makefile.direct 636* Replace deprecated rewind to fseek in cordxtra 637* Report gcc/clang pedantic warnings (configure) 638* Skip thread suspend/resume API testing for Tru64 (OSF1) 639* Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang) 640* Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD 641* Suppress 'tainted string passed to vulnerable operation' false defects 642* Suppress 'taking address of label non-standard' GCC/Clang pedantic warning 643* Test GC initialization from non-main thread on FreeBSD and NetBSD 644* Test GCJ object creation with length-based descriptor (gctest) 645* Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG 646* Update README regarding make cords with Makefile.direct 647* Update README to use autogen.sh on build from the source repository 648* Update shared libraries version info to differentiate against v7.4 649* Use mprotect instead of mmap in GC_unmap() on Cygwin 650* Use same style of include gc.h in documentation 651* Workaround '!GC_page_size is always false' cppcheck style warning 652* Workaround '#error' cppcheck error messages 653* Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings 654* Workaround 'array compared to 0', 'untrusted loop bound' false defects 655* Workaround 'bad address arithmetic' static analysis tool false positive 656* Workaround 'checking if unsigned value is negative' cppcheck warning 657* Workaround 'checking unsigned value is negative' code defect in mark_from 658* Workaround 'comparison of identical expressions' false code defects 659* Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings 660* Workaround 'condition is always false' cppcheck warning in get_next_stack 661* Workaround 'condition is always true' cppcheck style warnings in GC_init 662* Workaround 'function is never used' cppcheck style warnings 663* Workaround 'insecure libc pseudo-random number generator used' code defect 664* Workaround 'int shift by negative amount' false code defect in finalize 665* Workaround 'local variable size too big' static analyzer warning 666* Workaround 'memory leak: result' cppcheck false error (POSIX) 667* Workaround 'null pointer dereference' false positive in push_next_marked 668* Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX) 669* Workaround 'obsolescent usleep called' cppcheck warning (POSIX) 670* Workaround 'obsolete function alloca() called' cppcheck warnings 671* Workaround 'passing untyped NULL to variadic function' cppcheck warning 672* Workaround 'pointer used before comparison to null' code defect (pthread) 673* Workaround 'possible null pointer dereference' cppcheck warnings 674* Workaround 'potential multiplication overflow' code defect in de_win (cord) 675* Workaround 'redundant assignment of *result to itself' cppcheck warning 676* Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init 677* Workaround 'same expression on both sides of ==' cppcheck style warning 678* Workaround 'same expression on both sides of OR' cppcheck style warning 679* Workaround 'struct member is never used' cppcheck style warnings 680* Workaround 'tainted int used as loop bound' static analysis tool warning 681* Workaround 'Uninitialized variable' cppcheck errors 682* Workaround 'unused variable' cppcheck style warnings 683* Workaround 'va_list used before va_start' cppcheck error in cord 684* Workaround 'value of macro unknown' cppcheck info messages 685* Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages 686* Workaround 'value of SIGBUS unknown' cppcheck info messages 687* Workaround 'value of WINAPI unknown' cppcheck info messages 688* Workaround 'variable hides enumerator with same name' cppcheck warnings 689* Workaround 'variable reassigned before old value used' cppcheck warnings 690* Workaround 'waiting while holding lock' code defect in stop_world (Unix) 691* Workaround false 'uninitialized var use' code defect (initsecondarythread) 692 693Also, includes 7.4.6 changes 694 695 696== [7.6.0] 2016-08-02 == 697 698* ABORT_ARGn log details at INFO level (Android) 699* Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC) 700* Add API function to calculate total memory in use by all GC blocks 701* Add API function to set/modify GC log file descriptor (Unix) 702* Add alloc_size attribute to GC_generic_malloc 703* Add alt-stack registration support 704* Add assertion for GC_new_kind boolean arguments 705* Add assertion on lock status to GC_alloc_large and its callers 706* Add build scripts for VC 9 (Win32/64) 707* Add build system plumbing for building with -Werror 708* Add incremental GC support for Darwin/arm64 709* Add profiling callback events to indicate start/end of reclaim phase 710* Add support for enumerating the reachable objects in the heap 711* Add toggle-ref support (following Mono GC API) 712* Added instructions to README.md for building from git 713* Adjust code indentation of malloc/calloc/str[n]dup 714* Allow fork() automatic handling on Android with API level 21+ 715* Allow specific TLS attributes for GC_thread_key 716* Allow thread local allocations from within pthread TLS destructors 717* Allow to force GC_dump_regularly set on at compilation 718* Altera NIOS2 support 719* Change 'cord' no-argument functions declaration style to ANSI C 720* Check DATASTART is less than DATAEND even assertions off 721* Check for execinfo.h by configure 722* Code refactoring of GC_push_finalizer/thread/typed_structures 723* Code refactoring regarding 'data start' definition for FreeBSD 724* Consistently set type of DATASTART/END to ptr_t (code refactoring) 725* Consistently use int[] type for '_end' symbol (code refactoring) 726* Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM 727* Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl 728* Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring) 729* Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size 730* Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android 731* Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH 732* Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used 733* Document GC_register_my_thread returned value 734* Dump the block information in CSV format 735* Eliminate redundant *flh check for null in GC_allocobj 736* Enable atomic-uncollectable in operator new in gc_cpp.h 737* Enable build with musl libc 738* Enable gc.h inclusion by client without implicit include windows.h (Win32) 739* Enable huge_test for Win64 (and LLP64 target) 740* Enable thread-local storage for Android Clang 741* Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed 742* Export GC_push_all_eager, GC_push_finalizer_structures 743* Fix 'arg parameter might be clobbered by setjmp' compiler warning 744* Fix assertion in GC_mark_from for non-heap regions 745* Fix compilation for Android clang/arm with bfd linker 746* Fix integer shift undefined behavior in GC_init_explicit_typing 747* Fix missing new-line and redundant trailing dot in WARN messages 748* Fix STACKBOTTOM for Solaris 11/x86 749* Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS 750* Fix unchecked fork() result in gctest (Unix, Cygwin) 751* Fix user-defined signals drop by marker threads 752* Fix various typos in comments and documentation 753* FreeBSD/arm support improvement 754* GC_make_descriptor code refactoring (eliminate two local variables) 755* GC_malloc[_atomic] global and thread-local generalization with kind 756* GC_malloc_[atomic_]uncollectable generalization 757* GC_scratch_alloc code refactoring (and WARN message improvement) 758* Group all compact fields of GC_arrays to fit in single page 759* Handle load_segs overflow in register_dynlib_callback gracefully 760* Harmonize OSX/iOS configuration; enable compiling for iPhone simulator 761* Implement event callbacks for profiling (following Mono GC API) 762* Implement the finalization extension API 763* Implement thread suspend/resume API (Linux threads only) 764* Improve documentation for disappearing links in gc.h 765* Make heap growth more conservative after GC_gcollect_and_unmap call 766* Mark fo_head, finalize_now with a single GC_push_all call (refactoring) 767* Move MessageBox invocation code from GC_abort to a separate routine (Win32) 768* NaCl/arm initial support; NaCl runtime fixes for other CPUs 769* New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly 770* New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test 771* New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection 772* Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc) 773* Re-implement GC_finalized_malloc using GC_malloc_kind 774* Refactoring of android_thread_kill/pthread_kill calls 775* Refactoring of GC_Xobjfreelist (use single array to keep free lists) 776* Refactoring of thread-local *_freelists (use single array of free lists) 777* Refine description in README how to build from source repository 778* Refine GC_free_space_divisor comment regarding its initial value 779* Reformat code of gc_cpp.cc/h 780* Remove 'opp' local variable in GC_malloc_X 781* Remove 'sig' argument of GC_suspend_handler_inner (code refactoring) 782* Remove code commented out by 'ifdef UNDEFINED' 783* Remove hb_large_block field (use 1 extra bit of hb_flags instead) 784* Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64 785* Remove redundant casts in GC_generic_or_special_malloc and similar 786* Remove unsupported FreeBSD/ia64 case from gcconfig.h file 787* Remove unused GC_gcjdebugobjfreelist 788* Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE 789* Replace non-API occurrences of GC_word to word (code refactoring) 790* Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2) 791* Show WoW64 warning message if running 32-bit on Win64 (enabled by macro) 792* Standalone profiling callback for threads suspend/resume 793* Support (add machine description for) TILE-Gx and TILEPro targets 794* Support build for Android 64-bit (arm64, mips64, x86_64) 795* Support FreeBSD/aarch64, FreeBSD/mips 796* Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin) 797* Support MinGW build in scripts 798* Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e 799* Use magic header on objects to improve disclaim_test 800* Workaround 'sa_sigaction member missing' compiler error (Android/x32) 801* Workaround 'unresolved __tls_get_addr' error for Android NDK Clang 802* Workaround a bug in winpthreads causing parallel marks deadlock (MinGW) 803 804Also, includes 7.4.4 changes 805 806 807== [7.4.18] 2019-03-01 == 808 809* Fix 'wrong __data_start/_end pair' error on Android 810* Fix thread_info() count argument value (OS X) 811 812Also, includes 7.2n changes 813 814 815== [7.4.16] 2018-12-13 == 816 817* Fix 'collecting from unknown thread' abort in leak-finding mode for Win32 818* Fix 'undefined reference to GC_incremental' linker error in pthread_start 819* Fix GC_register_disclaim_proc for leak-finding mode 820* Fix concurrent bitmap update in GC_dirty 821* Fix marking of finalizer closure object 822* Fix marks and hb_n_marks consistency when disclaim returns true 823* Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW) 824* Refine documentation in gc_disclaim.h 825 826Also, includes 7.2m changes 827 828 829== [7.4.14] 2018-08-11 == 830 831* Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean) 832* Do not call GC_dirty_inner unless GC_incremental 833* Eliminate 'cast between incompatible function types' compiler warning 834* Eliminate 'comparing signed and unsigned values' compiler warnings (bcc) 835* Eliminate 'language extension used' Clang warning in gc.h 836* Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning 837* Eliminate 'switch statement contains no case label' compiler warning 838* Eliminate 'variable might be uninitialized' warning in win32_start_inner 839* Eliminate duplicate clear_mark_bit call when removing disappearing link 840* Fix 'collecting from unknown thread' abort in leak-finding mode 841* Fix compilation by digimars.mak (DMC) and by WCC makefile 842* Fix cords for MANUAL_VDB 843* Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE 844* Fix gctest in leak-finding mode 845* Fix missing GC_dirty calls for GC-allocated objects used internally 846* Fix missing GC_dirty invocation from debug_end_stubborn_change 847* Fix multi-threaded gctest for the case of NTHREADS is set to zero 848* Fix typos in ChangeLog and generic_malloc 849* Keep pointer to the start of previous entry in remove_specific_after_fork 850* New API function (GC_is_init_called) to check if BDWGC is initialized 851* Remove code duplication in gcj_malloc and malloc_explicitly_typed 852* Remove duplicate local variable in reclaim_block 853* Remove libatomic_ops license information from README 854* Workaround 'dynamic exception specifications deprecated in C++11' warning 855 856Also, includes 7.2l changes 857 858 859== [7.4.12] 2018-04-19 == 860 861* Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD 862* Fix comment for debug_generic_malloc_inner[_ignore_off_page] 863* Fix gctest with musl libc on s390x 864* Fix missing new-line in ABORT_ARG<n> definition 865* Fix null pointer dereference in get_private_path_and_zero_file (Symbian) 866* Fix type of local variables receiving result of PHT_HASH 867* Remove API symbols renaming in WCC_MAKEFILE 868 869Also, includes 7.2k changes 870 871 872== [7.4.10] 2018-01-22 == 873 874* Fix error code in abort message if sem_wait failed in start_world (NetBSD) 875Also, includes 7.2j changes 876 877 878== [7.4.8] 2017-12-22 == 879 880* Eliminate 'this statement may fall through' GCC warnings 881* Eliminate 'value exceeds maximum object size' GCC warning in huge_test 882* Fix data race in make_descriptor when setting explicit_typing_initialized 883* Fix marking of disclaim-reachable objects in the incremental mode 884* Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG 885Also, includes 7.2i changes 886 887 888== [7.4.6] 2017-10-26 == 889 890* Add configure --enable-gcov option (enable code coverage analysis) 891* Add configure check whether to define NO_GETCONTEXT 892* Adjust GC_memalign comment 893* Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl) 894* Allow PKG_CHECK_MODULES in configure.ac to be commented out easily 895* Avoid busy waiting in mark_thread while GC_parallel is false 896* Better document minimum value of size argument for typed allocations 897* Change type of THREAD_TABLE_INDEX result to int in win32_threads.c 898* Consistently use 'msec' instead of 'ms' in comments in pthread_support 899* Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra) 900* Do not produce .tar.bz2 distribution file (configure) 901* Do not require libatomic_ops for single-threaded builds (configure) 902* Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used 903* Document GWW_VDB in gcdescr.html 904* Eliminate 'cast to void* from int' compiler warnings (Darwin/x64) 905* Eliminate 'conditional expression is always true' code defect in GC_init 906* Eliminate 'FP divide-by-zero' static analyzer warning 907* Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86) 908* Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning 909* Eliminate 'ISO C forbids object to function pointer conversion' warning 910* Eliminate 'locally defined symbol imported' MS linker warnings (cord) 911* Eliminate 'null dereference' code defect warning in register_finalizer 912* Eliminate 'possible loss of data' compiler warnings (MS VC) 913* Eliminate 'printf format specifier mismatch' compiler warning (tools) 914* Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC) 915* Eliminate 'value stored is never read' warning of Clang static analyzer 916* Eliminate duplicate log messages in GC_mark_from 917* Eliminate most of collisions in GC_threads on Linux/x64 918* Ensure GC initialized when atfork_prepare is called by client 919* Fix 'arg parameter might be clobbered by setjmp' compiler warning 920* Fix 'bogus LR' detection in FindTopOfStack (Darwin) 921* Fix 'execvp argument incompatible pointer type' compiler warning (tools) 922* Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC) 923* Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit) 924* Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack 925* Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings 926* Fix 'ISO C90 forbids mixed declarations and code' compiler warning 927* Fix 'missing libc-version.h' build error (uClibc/x86[_64]) 928* Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin) 929* Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap 930* Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86) 931* Fix (adjust) GC_scratch_alloc actual argument type 932* Fix deadlock in GC_help_marker caused by use of mark_cv of parent process 933* Fix finalize.c compilation in 'strict ANSI' mode 934* Fix GC shared library tests failure related to dl_iterate_phdr (musl) 935* Fix gc.h compliance to strict ANSI (pthreads) 936* Fix GC_bytes_allocd incrementation in case of allocation failure 937* Fix GC_jmp_buf multiple definition 938* Fix GC_noop6 definition to avoid its calls to be optimized away 939* Fix gctest failure if PARALLEL_MARK (musl) 940* Fix gctest thread stack overflow (musl-gcc) 941* Fix initsecondarythread_test runtime failure if GC compiled w/o threads 942* Fix lack of 2 trailing zeros in _MSC_VER numbers 943* Fix local variable declarations in disclaim_bench 944* Fix missing #error pragma 945* Fix missing .exe for disclaim test filenames in Makefile (MinGW) 946* Fix missing atomic/[un]collectable/realloc_count increments in gctest 947* Fix missing new-line and redundant trailing dot in WARN messages 948* Fix missing new-line at format strings end in subthread_create test 949* Fix mixed include of GC public header and gc_priv.h in disclaim bench/test 950* Fix potential overflow in decrement when computing GC_markers_m1 951* Fix printf format specifiers in extra files (cppcheck warnings) 952* Fix pthread_start compilation if single-obj-compilation (Linux) 953* Fix register_finalizer call in disclaim_bench for GC_DEBUG 954* Fix static assertion violation in LONG_MULT for 64-bit targets 955* Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS 956* Fix thread id leaks in subthread_create and threadkey_test 957* Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied 958* Fix tools/setjmp_t to prevent nested_sp inlining 959* Fix typo in CHECK_GCLIB_VERSION name (test) 960* Fix typos in comments/documentation (ews4800, extend_size_map, push_roots) 961* Fix unchecked fork() result in gctest (Unix, Cygwin) 962* Improve detection of internal libatomic_ops (configure) 963* Move libraries version info to the beginning of Makefile.am 964* Prevent abort in register_data_segments for Symbian 965* Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc) 966* Refine Makefile.direct comment about multi-threaded GC build 967* Refine README about library source downloading 968* Refine should_invoke_finalizers documentation 969* Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target 970* Remove non-existent configure option in simple_example.html 971* Replace C++ style comments to C ones, remove commented out code (extra) 972* Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure) 973* Support CFLAGS_EXTRA when checking for inline and dladdr (configure) 974* Suppress 'tainted string passed to vulnerable operation' false defects 975* Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE) 976* Update bdwgc mailing list online archive link in documentation 977* Update shared libraries version info to differentiate against v7.2 978* Use AC_DEFINE for defining NO_GETCONTEXT in configure 979* Workaround 'index out of bounds' UBSan false warning in push_marked 980* Workaround 'mmap() resource handle leak' static analyzer warning 981* Workaround 'redundant assignment of *result to itself' cppcheck warning 982* Workaround 'resource leak' error reported by cppcheck (tools, test) 983Also, includes 7.2h changes 984 985 986== [7.4.4] 2016-05-25 == 987 988* Allow GC_FAST_MALLOC_GRANS() multiple use in a function 989* Also enable the TSX workaround for i386 (Linux) 990* Avoid unstructured procfs on Solaris 991* Change cord/de main() declaration style from K-R to ANSI C 992* Change no-argument functions declaration style to ANSI C (cord) 993* Do not include sigcontext.h and asm/sigcontext.h 994* Eliminate 'divide by zero' compiler warning in cordtest 995* Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32) 996* Eliminate warnings detected by Cppcheck in cord de[_win] 997* Fix 'comparison of non-null parameter is always false' warning (Clang) 998* Fix 'CORD_iter5 unused result' code defect in cordxtra 999* Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning 1000* Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode) 1001* Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map 1002* Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map 1003* Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize 1004* Fix 'statement unreachable' compiler warning in GC_mark_from 1005* Fix 'statement unreachable' compiler warning in memalign 1006* Fix 'unused label' compiler warning in cord/de 1007* Fix 'value truncated' compiler warning in CORD_cat (MS VC) 1008* Fix 'variable unused' warning in GC_save_callers 1009* Fix 'visibility attribute not supported' GCC warning (IBM AIX) 1010* Fix CMake warning about CMP0054 by unquoting instances of HOST 1011* Fix Cygwin64 build 1012* Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL 1013* Fix Makefile.direct for Cygwin 1014* Fix __alloc_size__ availability detection (Clang) 1015* Fix abort message in GC_move_long_link 1016* Fix and code refactoring of lock elision workaround (Linux/x64) 1017* Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID 1018* Fix data race in GC_init_explicit_typing 1019* Fix gc.mak regarding msvc_dbg and test (MSVC) 1020* Fix missing error handling of pthread_attr_init/getstacksize 1021* Fix missing error handling of pthreads_mutex_init and cond_wait 1022* Fix missing numeric casts in cord 1023* Fix potential left shift overflows in finalize.c (64-bit targets) 1024* Fix pthreads-win32 name in comments and documentation 1025* Fix setup_mark_lock missing prototype 1026* Fix unchecked fcntl() result 1027* Fix unchecked pointer dereference in check_ints (gctest) 1028* Fix unchecked pthread_join() result in threadkey_test 1029* Fix unchecked sigdelset() result in pthread_support 1030* Fix undefined PTRFREE/NORMAL in gc_inline.h 1031* Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header 1032* Relax mark_mutex attribute needed to disable elision (Linux/x64) 1033* Remove (deprecate) TODO file 1034* Remove code duplication in GC_realloc 1035* Remove duplicate new-line in OUT_OF_MEMORY message (cord) 1036* Remove references to missing linux_threads.c from documentation 1037* Revert "Move asm machine-dependent files to 'src' folder" (partly) 1038* Support Android API level 21 1039* Update compiler options in gc.mak (Win32) 1040* Use mmap instead of sbrk (Hurd) 1041* Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS 1042* Workaround 'identical expr on both sides of bitwise op' warning 1043* Workaround Linux NTPL lock elision bug 1044* Workaround false warning about unreachable code path 1045* Workaround invalid '_end' symbol on Android clang 3.5+ 1046Also, includes 7.2g changes 1047 1048 1049== [7.4.2] 2014-06-03 == 1050 1051* Add config option to use STGRTMIN-based signals for thread suspend/resume 1052* Allow parallel mark to be enabled on powerpc-linux systems 1053* Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer) 1054* Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc 1055* Fix 'attribute declaration must precede definition' warning (clang-3.1) 1056* Fix (enable) Cygwin-64 build 1057* Fix GC_finalized_malloc failure on disclaim_test 1058* Fix GC_sig_suspend initialization when non-constant SIGRTMIN used 1059* Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC 1060* Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32) 1061* Fix data roots registration for Android/x86 and NDK ARM 'gold' linker 1062* Fix find stackbottom on BlueGene P/Q systems 1063* Fix machdep .lo files path in configure (SPARC, IA-64) 1064* Fix ok_init assignment (missing cast) in GC_new_kind_inner 1065* Fix typos in names in AUTHORS and ChangeLog files 1066* Remove barrett_diagram file duplicated by tree.html 1067* Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram 1068* Restore contribution information for ancient releases in ChangeLog 1069Also, includes 7.2f changes 1070 1071 1072== [7.4.0] 2013-11-17 == 1073 1074* Add 'bytes reclaimed' counters to public GC_prof_stats_s 1075* Add AArch64 (64-bit ARM) target support 1076* Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality 1077* Add GC_get_prof_stats[_unsafe]() to GC public API 1078* Add GC_push_all/conditional() to GC public API 1079* Add assertion on number_of_objs to GC_extend_size_map 1080* Add assertion to GC_enable() ensuring no counter underflow 1081* Add assertion to LOCK definition that lock is not already held 1082* Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR 1083* Add double-lock assertion to GC_acquire_mark_lock 1084* Add manual POSIX fork handling support (Android) 1085* Add note about 'pkg-config' solving problem with autoconf 2.68 or older 1086* Add public GC_set/get_abort_func to replace default GC_on_abort 1087* Add public GC_start_mark_threads() to allow parallel marker in fork child 1088* Add public setter and getter for GC_push_other_roots 1089* Add support of Android logger 1090* Add tests for GC_register/move/unregister_long_link 1091* Add thread suspend/resume signals public setters (POSIX threads) 1092* Added long weakref support 1093* Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h 1094* Adjust README.md title and references to doc .html files in it 1095* Adjust build scripts to enable additional test library in staticrootstest 1096* Adjust logged messages in start_mark_threads and GC_thr_init 1097* Adjust printf format specifiers in GC_print_trace 1098* Allow not to rely on __data_start value (Linux) 1099* Allow pthread_kill error code logging in GC_suspend/resume (debugging) 1100* Allow to compile GC_inner_start_routine aside from extra/gc.c 1101* Allow to omit libc atexit() call 1102* Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target 1103* Better document GC_warn_proc in gc.h 1104* Call GC_on_abort (with NULL argument) on exit(1) 1105* Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats 1106* Change policy regarding version numbers ("micro" part instead of "alpha") 1107* Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style 1108* Check GC_base result in GC_print_all_smashed_proc 1109* Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads) 1110* Check traceable_allocator.allocate result before dereference in test_cpp 1111* Code refactoring of GC_x_printf (move shared code to macro) 1112* Convert readme to markdown 1113* Default to use libc_stack_end in single-threaded GC on glibc targets 1114* Define GC_VSNPRINTF internal macro in misc.c (code refactoring) 1115* Define functions in darwin_semaphore.h as inline instead of static 1116* Define old_bus_handler static variable only if used (Unix) 1117* Detect dladdr() presence by configure 1118* Disable find-leak GC_gcollect on GC abnormal EXIT 1119* Do not define _setjmp/_longjmp macros in mach_dep.c 1120* Do not duplicate android_log_write output to GC log file (Android) 1121* Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux) 1122* Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled 1123* Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified 1124* Elaborate comment on dependencies in autogen.sh 1125* Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots 1126* Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang) 1127* Eliminate 'uninitialized variable use' warning in test_printf (cord) 1128* Eliminate 'unused result' compiler warning in main() of test_cpp 1129* Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads) 1130* Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX) 1131* Eliminate Clang warning for GC_pthread_exit attribute 1132* Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth 1133* Eliminate GCC warning in GC_get_main_stack_base (OpenBSD) 1134* Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app 1135* Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion 1136* Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux) 1137* Eliminate warning and simplify expression in GC_init_explicit_typing 1138* Enable 'force GC at every GC_malloc' debug-related functionality 1139* Enable on-demand debug logging in GC_FindTopOfStack (Darwin) 1140* Enable prefetch operations by default (GCC 3.0+) 1141* Enable staticrootstest for the case of GC shared library build 1142* Enable thread-local allocation support for Clang on Cygwin 1143* Explicitly specify that Darwin, Linux and Solaris platforms have dladdr 1144* Fix ABORT definition for mingw32ce (WinCE) 1145* Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1 1146* Fix GC_CreateThread and GC_beginthreadex definition for Cygwin 1147* Fix GC_INIT_CONF_ROOTS in gc.h for Android 1148* Fix GC_INLINE definition to comply with ISO C90 standard (GCC) 1149* Fix GC_remove_all_threads_but_me for Android (fork support) 1150* Fix debug_register_displacement calls from GC_debug_generic_malloc_inner 1151* Fix dyn_load.c compilation for Android 4.3 1152* Fix make disclaim_test to link with new GNU ld linking rules 1153* Improve GC error printing atomicity in GC_debug_X and GC_print_obj 1154* Improve GC output atomicity in GC_print_obj, GC_print_all_errors 1155* Improve debug-only messages of add/remove_roots and init_linux_data_start 1156* Improve fork test logging in gctest 1157* Improve logged messages about heap size and usage 1158* Improve logging for Android differentiating messages by log level 1159* Improve staticrootstest (add global data to library, add lib w/o GC_INIT) 1160* Improve staticrootstest checks (tests) 1161* Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H 1162* Include proper header file in 'tools' for configuration macros 1163* Include pthread_np.h from pthread_stop_world.c on OpenBSD 1164* Log error messages to stderr instead of stdout in tests 1165* Make GC_generic_malloc_ignore_off_page() public 1166* Make GC_mark_lock_holder variable static 1167* Make GC_print_trace always thread-safe and remove 'lock' argument 1168* Mark GC_started_thread_while_stopped() as GC_INNER 1169* Minimize code duplication in GC_mark_and_push 1170* Move 'include setjmp.h' from mach_dep.c to gc_priv.h 1171* Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD) 1172* Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD 1173* Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer 1174* Port BDWGC to Android/x86 1175* Postpone the suspend signal in GC_dirty_init only if used to stop world 1176* Prepend '#' symbol to GC number in logged messages 1177* Prevent POSIX fork if mprotect_thread is started (Darwin) 1178* Prevent abort on GC_err/warn_printf write failure 1179* Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac 1180* Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined 1181* Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC) 1182* Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h 1183* Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android) 1184* Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h 1185* Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD 1186* Remove DebugBreak on WriteFile failure (Win32) 1187* Remove GC_BUILD definition from build scripts 1188* Remove abort on open log failure from GC_write (Win32) 1189* Remove configure.ac outdated revision number 1190* Remove nested EXPECT in GC_core_finalized_malloc 1191* Remove nested always-false ifdef for HPUX and FREEBSD 1192* Remove redundant GC_err_printf before abort 1193* Remove unused UTHREAD_SP_OFFSET macro (OpenBSD) 1194* Rename subthread_create to subthreadcreate_test (Makefile) 1195* Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages 1196* Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn() 1197* Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF 1198* Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world 1199* Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free 1200* Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF 1201* Replace sprintf with defensive snprintf 1202* Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning) 1203* Simplify LOCK/UNLOCK macro definition for static code analysis tools 1204* Specify GC_malloc result is unused in some tests 1205* Specify GC_pthread_join result is unused in threadkey_test 1206* Specify LT_INIT in configure.ac 1207* Start of port to QNX 1208* Support rthreads introduced in OpenBSD 5.2+ 1209* Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC 1210* Tag GC malloc routines with alloc_size attribute for Clang 3.2+ 1211* Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code 1212* Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING 1213* Turn on world-stop delay logging at debug level by default for Android 1214* Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF 1215* Use GC_log_printf for logging instead of GC_[err_]printf 1216* Use compiler TLS for Android NDK gcc/arm 1217* Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning) 1218* Use pthread API to operate thread-local data on Linux if no compiler TLS 1219* Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h 1220* Workaround 'unresolved __tls_get_addr' error for Android NDK Clang 1221Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes 1222 1223 1224== [7.3alpha2] 2012-05-11 == 1225 1226* Add 'const' qualifier to pointer argument of some API functions 1227* Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32) 1228* Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API 1229* Add GC_is_heap_ptr, GC_move_disappearing_link to GC API 1230* Add SHORT_DBG_HDRS macro template to configure 1231* Add Symbian port to mainline (porting done by Djamel Magri) 1232* Add TODO file 1233* Add assertion ensuring proper alignment of 'pushed' GC symbols 1234* Add assertion in GC_getspecific on qtid 1235* Add assertion to GC_incremental_protection_needs, refine documentation 1236* Add assertion to check GC_large_free_bytes by GC_finish_collection 1237* Add configure option to compile all library .c files into single gc.o 1238* Add cordtest to make check 1239* Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM) 1240* Add finalization.html to 'doc' folder 1241* Add javaxfc.h to the installation set of GC header files (configure) 1242* Add on-heap-resize event notification to API 1243* Adjust GC_log_printf format specifiers (regarding signed/unsigned long) 1244* Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given 1245* Allow GC_exclude_static_roots() region start to be unaligned 1246* Allow Win32 DllMain chaining on the client side 1247* Allow to exclude finalization support by GC_NO_FINALIZATION macro 1248* Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin 1249* Avoid unnecessary GC_find_limit invocation if GC_no_dls 1250* Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest 1251* Cast pointers to word (instead of unsigned long) in specific.h 1252* Changed the order in autogen.sh so ltmain exists in time for automake 1253* Declare privately and use handy GC_base_C() for constant object pointers 1254* Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW) 1255* Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off 1256* Do not compile backgraph.c unless configure '--enable-gc-debug' 1257* Do not compile pthread_stop_world.c for Cygwin/Darwin (configure) 1258* Do not install ancient new_gc_alloc.h broken for modern STL (configure) 1259* Enable GC_MIN_MARKERS to set minimal number of pthread-based markers 1260* Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure 1261* Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32) 1262* Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation) 1263* Extend thread-related debug messages 1264* Fix 'configure --enable-cplusplus' for Cygwin/MinGW 1265* Fix DATASTART (and other minor improvements) for NaCl target 1266* Fix GC_setspecific to prevent garbage collection inside 1267* Fix compiler warning in cordtest 1268* Fix minor warnings reported by GCC with '-pedantic' option 1269* Fix static data roots registration on Android (if GC is shared) 1270* Implement GC_get_stack_base for Darwin for single-threaded mode 1271* Improve GC_allochblk algorithm of block splitting when unmapping enabled 1272* Improve GC_collect_or_expand algorithm for many finalizers registered case 1273* In tests, print a message in case a test is a no-op 1274* Instruct configure to hide internal libgc.so symbols if supported by GCC 1275* Log amount of unmapped memory (if enabled) on marking-for-collection 1276* Make __data_start a weak symbol to allow loading modules on mips 1277* Move "cord" library tests to "cord/tests" folder 1278* Move asm machine-dependent files to "src" folder 1279* Move build tools sources to "tools" folder 1280* Move cord_pos.h to public headers folder 1281* Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin) 1282* Optimize some functions by moving pthread_self calls out of LOCK section 1283* Place only major per-release changes description to ChangeLog (this file) 1284* Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin) 1285* Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default 1286* Remove all auto-generated files from the repo 1287* Remove binary icon file for de_win 1288* Remove cordtest from "cord" library 1289* Remove duplicate MacOS_Test_config.h file 1290* Remove gc_amiga_redirects.h (included internally) from public headers 1291* Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure) 1292* Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX 1293* Remove unsupported MMAP_STACKS (specific to Solaris threads) 1294* Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros 1295* Replace ARGSUSED comment-based annotation with GCC 'unused' attribute 1296* Replace GC_ms_entry declaration with opaque definition for public API 1297* Replace long GC_markers global variable with int GC_markers_m1 1298* Replace pointer relational comparisons with non-pointer ones 1299* Replace printf PRIxMAX specifier with '%p' for thread id debug output 1300* Require autoconf 2.61 instead of v2.64 1301* Simplify autogen.sh (use autoreconf) 1302* Split GC_abort with GC_on_abort and abort() invoked from ABORT 1303* Support GC_ATTR_MALLOC for MS VisualStudio 1304* Tag auxiliary malloc-like API functions with 'malloc' attribute 1305* Tag deprecated variables in GC API 1306* Tag must-be-non-null arguments of GC API functions 1307* Turn on "extra" GCC warnings 1308* Turn on unused-parameter checking for GCC 1309* Update AUTHORS file 1310* Use EXPECT for checking various 'initialized' boolean variables 1311* Use USE_COMPILER_TLS on Cygwin 1312* Use pthread_key for thread-local storage on FreeBSD 1313* Use union of AO_t and word to favor strict-aliasing compiler optimization 1314Also, includes 7.2 changes 1315 1316 1317== [7.2n] 2019-03-01 == 1318 1319* Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled 1320* Fix 'unexpected mark stack overflow' abort in push_all_stack 1321* Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec 1322* Fix GetThreadContext stale register values use if WoW64 (Win32) 1323* Fix executable memory allocation in GC_unix_get_mem 1324* Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME 1325 1326 1327== [7.2m] 2018-12-11 == 1328 1329* Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h 1330* Fix hbp overflow in GC_install_counts 1331* Fix start_world not resuming all threads on Darwin 1332* Guard against potential buffer overflow in CORD_next and CORD_pos_fetch 1333 1334 1335== [7.2l] 2018-08-10 == 1336 1337* Fix 'pointer arithmetic with NULL' code defect in print_callers 1338* Fix Borland version in documentation to match that in BCC_MAKEFILE 1339* Fix comment about inv_sz computation in setup_header 1340* Fix comments style in configure.ac and Makefile.am 1341* Fix GC_is_valid_displacement and GC_is_visible for non-small objects 1342* Fix global operator delete definition for C++14 in gc_cpp 1343* Fix infinite restarting of mark_some when a static root disappeared (Linux) 1344* Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ 1345* Fix mark stack overflow checking in push_selected 1346* Fix MSWIN32 macro redefinition (WCC) 1347* Fix potential null dereference in GC_CONS 1348* Fix register_dynamic_libraries on Windows 10 1349* Fix result computation in n_set_marks 1350* Fix return type in GC_set_warn_proc API documentation 1351* Fix typo in comment for CORD_ec_flush_buf prototype 1352* Fix typos in ChangeLog 1353* Fix VirtualQuery call in case of malloc failure (Win32) 1354* Install gc.3 man page instead of copying gc.man to doc folder (configure) 1355* Perform thread_suspend in loop as it may be interrupted (Darwin) 1356* Workaround 'template-id not supported in this context' compiler error (WCC) 1357 1358 1359== [7.2k] 2018-04-19 == 1360 1361* Fix arguments delimiter in pcr_interface.c (PCR) 1362* Fix assertion violation in DllMain of win32_threads 1363* Fix data race during apply_to_each_object(reset_back_edge) 1364* Fix dbg_mlc.c/o file name in documentation 1365* Fix include gc_gcj.h in thread_local_alloc.c 1366* Fix man section number (3) 1367* Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h 1368* Fix missing SIGBUS handler setup for kFreeBSD 1369* Fix null dereference in print_callers on backtrace_symbols failure 1370* Fix the collector hang when it is configured with --enable-gc-debug 1371* Fix thread_suspend fail for threads registered from key destructor (OS X) 1372* Fix typo in AIX macro name 1373* Fix typo in comment in specific.h 1374 1375 1376== [7.2j] 2018-01-21 == 1377 1378* Fix GC allocation mutex in child after a fork 1379* Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old 1380* Fix libgc version which was changed in linkage breaking way 1381* Fix missing EOLn output in threadlibs tool 1382 1383 1384== [7.2i] 2017-12-21 == 1385 1386* Avoid data race in finalized_count (gctest) 1387* Fix assertion violation about disabled cancel in try_to_collect_inner 1388* Fix data race in a list referenced by A.aa (gctest) 1389* Fix data race in do_local_mark when comparing active_count to helper_count 1390* Fix data race in GC_init_explicit_typing 1391* Fix data race in last_stop_count access (suspend_handler_inner) 1392* Fix data race in mark_thread when updating mark_no 1393* Fix data race when getting object size in explicitly-typed allocators 1394* Fix lack of barriers to synchronize memory for suspend_handler 1395* Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi 1396* Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64) 1397 1398 1399== [7.2h] 2017-10-12 == 1400 1401* Add gctest as a test (CMake) 1402* Change no-argument functions declaration style to ANSI C (extra files) 1403* Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH 1404* Ensure oom_fn callback executed on out-of-memory in calloc 1405* Fix '~' operator application to unsigned values shorter than word 1406* Fix 'context local variable might be clobbered by setjmp' compiler warning 1407* Fix 'doc' files installation folder 1408* Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX 1409* Fix ALL_INTERIOR_POINTERS name in comments and documentation 1410* Fix AO_SRC_DIR target name in NT_*_MAKEFILE 1411* Fix assertion in GC_mark_from for non-heap regions 1412* Fix assertion in GC_steal_mark_stack for non-heap regions 1413* Fix assertion violation in GC_repeat_read if --enable-redirect-malloc 1414* Fix assertion violation in GC_wait_builder called from start_mark_threads 1415* Fix assertion violation in mark_local checking GC_mark_stack_top 1416* Fix assertion violation in return_single_freelist in child process 1417* Fix bm_huge initialization for 64-bit targets (gctest) 1418* Fix broken external links in documentation 1419* Fix bytes count passed to add_to_our_memory in backgraph new_back_edges 1420* Fix calloc_explicitly_typed in case of lb*n overflow 1421* Fix CMake warning about CMP0054 by unquoting instances of HOST 1422* Fix conditional expression in pos_fetch, next non-macro definitions (cord) 1423* Fix configure --disable-munmap handling 1424* Fix CORD_substr_closure for the case when CORD_from_fn returns C string 1425* Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux) 1426* Fix double lock in pthread_detach (Cygwin, winpthreads) 1427* Fix double multiplication of lb by n in calloc_explicitly_typed 1428* Fix enable_parallel_mark condition in CMake script 1429* Fix external libatomic_ops pkg-config-based detection 1430* Fix gc_allocator.h file name in new_gc_alloc.h comment 1431* Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation 1432* Fix gc_cleanup destructor for non-heap objects (gc_cpp) 1433* Fix GC_collect_or_expand to prevent allocation size value wrap-around 1434* Fix GC_incremental declaration/definition type mismatch 1435* Fix GC_mark_stack_top assertion violation properly in mark_local 1436* Fix GC_remove_specific invocation from remove_all_threads_but_me 1437* Fix GC_requested_heapsize increment in GC_init 1438* Fix GC_setspecific to prevent garbage collection inside 1439* Fix GC_SIZE_MAX definition (Linux/musl-gcc) 1440* Fix GCJ support in CMake build script 1441* Fix gctest crash if configure --enable-handle-fork on Darwin 1442* Fix get_maps on proc maps file asynchronous growth 1443* Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ 1444* Fix header filename in gcconfig.h comment 1445* Fix infinite mark_some calls after memory mapping disappeared (Glibc) 1446* Fix integer shift undefined behavior in GC_init_explicit_typing 1447* Fix leak_test crash in print_callers if free() is redirected 1448* Fix Makefile.direct recursive invocation 1449* Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427) 1450* Fix missing win32_threads.c compilation for Cygwin (CMake) 1451* Fix MS VC warning about compiling unused checksums and thread_local_alloc 1452* Fix name typos in GC_FAST_MALLOC_GRANS comment 1453* Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END 1454* Fix OSF1 host pattern in CMakeLists.txt 1455* Fix PCR-Makefile by removing compilation of a missing file 1456* Fix potential data race in GC_SysVGetDataStart (SPARC) 1457* Fix potential integer overflow in GC_find_limit_* functions 1458* Fix printf arguments type in print_callers 1459* Fix pthread_detach for threads not yet registered (Cygwin, winpthreads) 1460* Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads) 1461* Fix pthread_join when thread is registered in thread key destructor 1462* Fix push_complex_descriptor to avoid unlimited global mark stack growth 1463* Fix removal of dead threads in a child process 1464* Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode 1465* Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME 1466* Fix Solaris/sparc detection in case of strict C compliance is enforced 1467* Fix STACKBOTTOM for Solaris 11/x86 1468* Fix storage class of local variable in register_dynamic_libraries (Irix) 1469* Fix tools/setjmp_t hang (OS X) 1470* Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit) 1471* Fix undefined HEAP_START in register_dynamic_libraries 1472* Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32 1473* Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h 1474* Fix various typos in comments, documentation and printed messages 1475* Handle load_segs overflow in register_dynlib_callback gracefully 1476* Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac 1477* Replace (fix) 'objs' acronym in comments with 'objects' word 1478* Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from" 1479* Update documentation about bugs reporting and new releases notification 1480* Update Download information in GC overview document 1481* Update shared libraries version info (v7.2) 1482* Workaround a bug in winpthreads causing parallel marks deadlock (MinGW) 1483* Workaround missing getcontext() in Docker osrf/ubuntu_32bit 1484 1485 1486== [7.2g] 2016-05-23 == 1487 1488* Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC) 1489* Fix 'implicit declaration of function' compiler warnings in cord/de 1490* Fix CFLAGS in configure regarding -O flag passing to SunCC compiler 1491* Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD) 1492* Fix GC initialization in cord de_win for Cygwin 1493* Fix GC_get_stack_base if called before GC_init (Win32) 1494* Fix OSX issue with pthread_attr_setstacksize failure 1495* Fix Unicode Win32 API calls in cord de_win 1496* Fix USE_COMPILER_TLS macro duplicate description in README 1497* Fix cord de_win WndProc prototype parameters for 64-bit (Win64) 1498* Fix file descriptor resource leak in GC_register_data_segments (OS/2) 1499* Fix filename printing in cordtest 1500* Fix missing cord_pos.h, ec.h among installed headers (Automake) 1501* Fix missing GC_get_stack_base for Amiga 1502* Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake) 1503* Fix mistyped ARM_THREAD_STATE macro (Darwin/arm) 1504* Fix null-pointer dereferences on out-of-memory in cord and tests 1505* Fix potential multiplication overflow in check_heap_stats (gctest) 1506* Fix race (and potential deadlock) at marker threads initialization 1507* Fix signedness of char values passed to isspace, iscntrl, isxdigit 1508* Fix typo (items numbering) in GC_finalize_all documentation 1509* Fix typos in ERROR_FL, GC_malloc_uncollectable comments 1510* Fix typos in gc_priv.h, in README for ews4800 1511* Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC) 1512* Fix various spelling errors 1513* Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX 1514* Regenerate configure files using official libtool release (v2.4.2) 1515* Remove documentation about obsolete GC_REDIRECT_TO_LOCAL 1516* Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from 1517* windows-untested: Fix paths to msvc_dbg.c/h 1518 1519 1520== [7.2f] 2014-06-03 == 1521 1522* Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2 1523* Fix 'source file in a subdirectory' Automake warnings 1524* Fix ABORT message in GC_restart_handler 1525* Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD 1526* Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES 1527* Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap 1528* Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure 1529* Fix GET_MEM argument rounding in GC_scratch_alloc and similar 1530* Fix PARALLEL_MARK for Windows 7+ 1531* Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc 1532* Fix crash when using GC_malloc_many() as first allocation call 1533* Fix mark stack excessive growth during parallel mark 1534* Fix or remove broken URLs in documentation 1535* Fix out-of-memory case in new_back_edges, push_in_progress (backgraph) 1536* Fix typo in GC_collect_or_expand comment 1537* Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes 1538* Regenerate configure files by automake 1.14.1, libtool 2.4.2.418 1539* Update emails/links due to project site and ML transition 1540 1541 1542== [7.2e] 2013-11-10 == 1543 1544* Add weak attribute to avoid __data_start undefined messages (s390x) 1545* Add weak stubs for pthread_cancel API 1546* Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads) 1547* Append _test suffix to 'initsecondarythread' binary file names 1548* Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure 1549* Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads) 1550* Fix GC_CreateThread 'dwStackSize' argument type for Win64 1551* Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32) 1552* Fix GC_clear_stack by declaring 'dummy' local array as volatile 1553* Fix GC_get_stack_base assembly code (Cygwin/Clang) 1554* Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations 1555* Fix GC_marker_Id elements initialization (WinCE) 1556* Fix GC_print_trace missing unlock 1557* Fix GC_unix_mmap_get_mem for open of /dev/zero failure 1558* Fix GC_win32_free_heap compilation error for Cygwin 1559* Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC 1560* Fix Win32 GC_write preventing potential infinite recursion at abort 1561* Fix assertion violation in GC_mark_from prefetch loop 1562* Fix collection of objects referenced only from GC_mark_stack_X variables 1563* Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32) 1564* Fix heap sections overflow for Win32/Cygwin with enabled parallel marker 1565* Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj 1566* Fix missing tabs in SMakefile.amiga file 1567* Fix null-pointer dereference in CORD_substr_closure 1568* Fix old_segv/bus_act variables initialization for FreeBSD 1569* Fix potential double fclose in test_extras (cordtest) 1570* Fix pthread_attr_t resource leak in pthread_create 1571* Fix race in GC_print_all_errors regarding GC_leaked 1572* Fix sizeof in GC_push_thread_structures 1573* Fix stackbottom/stack_end assignment in GC_call_with_gc_active 1574* Fix tests makefile to link with new GNU ld linking rules 1575* Fix typos in comments and documentation 1576* Fix unportable '==' test operators in configure 1577* Fix vsprintf_args cleanup in CORD_vsprintf 1578* Merge FreeBSD New ports collection for boehm-gc v7.2d 1579* Replace GC_DBG_RA with GC_DBG_EXTRAS macro 1580* Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file 1581* Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86) 1582 1583 1584== [7.2d] 2012-08-09 == 1585 1586* Fix GC_call_with_stack_base to prevent its tail-call optimization 1587* Fix all address-of-dummy operations by using GC_approx_sp() instead 1588* Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD 1589* Fix test_cpp (ensure the collector recognizes pointers to interiors) 1590* Fix thread-related tests for pthreads-w32 1591* test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW) 1592 1593 1594== [7.2c] 2012-06-11 == 1595 1596* Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory 1597* Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release 1598* Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV 1599* Fix visibility of GC_clear/set_mark_bit (unhide symbols) 1600* Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols 1601 1602 1603== [7.2b] 2012-05-23 == 1604 1605* Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only) 1606 1607 1608== [7.2] 2012-05-11 == 1609 1610* Abort in GC_thr_init on pthread_atfork failure (POSIX threads) 1611* Add GC_WIN32_PTHREADS target in configure 1612* Add GC_is_disabled new function to GC API 1613* Add info that getcontext() resets FPE mask no longer on Linux/x86_64 1614* Add public GC_set_handle_fork to control forked child handling support 1615* Add realloc_test.c test 1616* Add support for Hexagon target 1617* Add thread-safe GC_get_heap_usage_safe to GC API 1618* Change GC_check_fl_marks prototype and implementation 1619* Check pthread_create/join result in test 1620* Define GC_DLL (in configure) if building only dynamic libraries 1621* Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set 1622* Disable incremental mode on Darwin if fork handling requested 1623* Enable parallel marker in configure for Solaris 1624* Fix "comparison of signed and unsigned values" compiler warnings 1625* Fix 'volatile' keyword placement in GC_SysVGetDataStart 1626* Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target 1627* Fix GC_READ_ENV_FILE code for Cygwin 1628* Fix GC_add_roots_inner for Mac OS X (align segment start) 1629* Fix GC_check_fl_marks regarding concurrent access 1630* Fix GC_finalizer_nested size to workaround alignment problem in Watcom 1631* Fix GC_find_limit_with_bound to always reset fault handler on return 1632* Fix GC_init static assertion for clang/x64 (Darwin) 1633* Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection 1634* Fix GC_push_all/selected boundaries check 1635* Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32) 1636* Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage 1637* Fix GC_restart_handler to preserve errno if needed 1638* Fix GC_root_size update in GC_add_roots_inner (Win32) 1639* Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32) 1640* Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init) 1641* Fix calloc, GC_generic_malloc to check for allocation size overflows 1642* Fix compiler warning in GC_dyld_image_add/remove (Darwin) 1643* Fix configure --enable-cplusplus make install 1644* Fix configure to disable GCC aliasing optimization unless forced to 1645* Fix duplicate definitions in gcconfig.h for NetBSD 1646* Fix fork() support on Cygwin and Darwin targets 1647* Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS 1648* Fix gc_cpp.cc for Cygwin (remove duplicate function definition) 1649* Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android 1650* Fix gcconfig.h to handle mips64-linux target 1651* Fix gctest (for Win32) to avoid GC_print_stats internal variable usage 1652* Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6 1653* Fix tests to check GC_malloc result for NULL (out-of-memory) 1654* Fix thread model in configure for MinGW ("win32" instead of "posix") 1655* Fix various warnings reported by LINT-like tools 1656* Fix visibility of some GC internal symbols used by GNU GCJ currently 1657* Port some thread tests to Win32 1658* Refine API GC setters and getter comments regarding locking 1659* Refine GC_stackbottom description in gc.h 1660* Remove duplicate calls in GC_register_dynamic_libraries 1661* Remove locking in API GC_get_bytes_since_gc and friends 1662* Remove newly-added GC_get_heap_size/free_bytes_inner from API 1663* Remove some local variables that are unused 1664* Support multi-threading for RTEMS target 1665* Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning 1666* Use pkg-config to pick up libatomic_ops, etc 1667* Workaround some Linux/arm kernels bug to get correct GC_nprocs value 1668 1669 1670== [7.2alpha6] 2011-06-14 == 1671 1672* configure_atomic_ops.sh: Remove. 1673* Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh. 1674* Makefile.am (EXTRA_DIST): Add autogen.sh. 1675 1676* NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp 1677filename passed. 1678* NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file 1679extension. 1680* NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise. 1681* NT_MAKEFILE (.cpp.obj): Likewise. 1682 1683* alloc.c (GC_add_current_malloc_heap, GC_build_back_graph, 1684GC_traverse_back_graph): Move prototype to gc_priv.h. 1685* checksums.c (GC_page_was_ever_dirty): Likewise. 1686* dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise. 1687* dyn_load.c (GC_parse_map_entry, GC_get_maps, 1688GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base, 1689GC_get_next_stack): Likewise. 1690* finalize.c (GC_reset_finalizer_nested, 1691GC_check_finalizer_nested): Likewise. 1692* gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise. 1693* malloc.c (GC_extend_size_map, GC_text_mapping): Likewise. 1694* mark_rts.c (GC_mark_thread_local_free_lists): Likewise. 1695* misc.c (GC_register_main_static_data, GC_init_win32, 1696GC_setpagesize, GC_init_linux_data_start, 1697GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf, 1698GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner, 1699GC_bl_init_no_interiors): Likewise. 1700* os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks): 1701Likewise. 1702* reclaim.c (GC_check_leaked): Likewise. 1703* win32_threads.c (GC_gww_dirty_init): Likewise. 1704* darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop, 1705GC_mprotect_resume): Move prototype to darwin_stop_world.h. 1706* pthread_support.c (GC_FindTopOfStack): Likewise. 1707* dyn_load.c (GC_cond_add_roots): Merge adjacent definitions. 1708* mark.c (GC_page_was_ever_dirty): Remove (as already declared). 1709* mark_rts.c (GC_roots_present): Change return type to void 1710pointer (to match the prototype); return NULL instead of FALSE. 1711* mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result. 1712* os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h. 1713* os_dep.c (GC_write_fault_handler): Make STATIC. 1714* os_dep.c (GC_set_write_fault_handler): New function (only if 1715GC_WIN32_THREADS). 1716* pthread_start.c (GC_start_rtn_prepare_thread, 1717GC_thread_exit_proc): Move prototype to pthread_support.h. 1718* pthread_support.c (GC_nacl_initialize_gc_thread, 1719GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals): 1720Likewise. 1721* pthread_support.c (GC_stop_init): Move prototype to 1722pthread_stop_world.h. 1723* win32_threads.c (GC_write_fault_handler): Remove prototype. 1724* win32_threads.c (GC_register_my_thread_inner): Call 1725GC_set_write_fault_handler instead of SetUnhandledExceptionFilter 1726(only if MPROTECT_VDB). 1727* doc/README.win32: Add information about DMC. 1728* include/private/gc_priv.h (GC_set_write_fault_handler): New 1729prototype (only if GC_WIN32_THREADS and MPROTECT_VDB). 1730 1731* misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF. 1732 1733* win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED() 1734instead of FINISHED macro. 1735* tests/test.c (check_heap_stats): Round up max_heap_sz value for 1736Win32 (same as for USE_MMAP). 1737 1738* tests/test.c (check_heap_stats): Adjust printf format specifier 1739for max_heap_sz; cast max_heap_sz accordingly. 1740 1741* doc/README.solaris2: Add note. 1742 1743* configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for 1744Solaris/x86 2.10+. 1745 1746* tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if 1747defined; explicitly define for some targets. 1748 1749* mark.c (GC_dirty): Add prototype (only if MANUAL_VDB). 1750* stubborn.c (GC_dirty): Likewise. 1751* include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB, 1752PROC_VDB): Undefine if MANUAL_VDB. 1753* include/private/gcconfig.h (DEFAULT_VDB): Don't define if 1754MANUAL_VDB. 1755* os_dep.c (async_set_pht_entry_from_index): Define for 1756MANUAL_VDB. 1757* os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if 1758success; if ioctl() failed then just print warning instead of 1759aborting. 1760 1761* include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld) 1762for line number printing. 1763 1764* os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS 1765(for PROC_VDB only); print errors via GC_err_printf; rename "ps" 1766and "np" local variables to npages and pagesize, respectively; 1767remove "current_addr" local variable. 1768 1769* os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base 1770for BeOS and OS/2; define HAVE_GET_STACK_BASE. 1771* os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific 1772GC_get_main_stack_base implementation is defined. 1773* os_dep.c (GC_get_main_stack_base): Define that based on 1774GC_get_stack_base() in a single place (only if 1775GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base() 1776result. 1777 1778* mark.c (GC_push_selected): Remove "push_fn" argument (use 1779GC_push_all directly); update the documentation. 1780* mark.c (GC_push_conditional): Simplify the code (for better 1781readability). 1782 1783* mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for 1784boolean local variables. 1785* doc/README.macros (GC_PREFER_MPROTECT_VDB): Update. 1786* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty, 1787GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single 1788place. 1789* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute 1790PHT_HASH(h) only once (store result to a local variable). 1791 1792* doc/README.solaris2: Update. 1793 1794* include/private/gcconfig.h (end, InitStackBottom): Declare 1795extern variable for RTEMS. 1796* include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM): 1797Update (for RTEMS). 1798* include/private/gcconfig.h (DATAEND): Fix a typo in the macro 1799name (for RTEMS). 1800* tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER): 1801Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS). 1802 1803* include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in 1804single-threaded environment. 1805 1806* include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB. 1807* tests/test.c (NUMBER_ROUND_UP): New macro. 1808* tests/test.c (check_heap_stats): Round up total expected heap 1809size to the nearest 4 MiB bound. 1810* tests/test.c (check_heap_stats): Print the current and expected 1811heap sizes in case of failure. 1812 1813* checksums.c (GC_check_blocks, GC_check_dirty): Do log printing 1814only if GC_print_stats; print errors using GC_err_printf. 1815* checksums.c (GC_check_blocks): Join adjacent printf() calls into 1816a single one. 1817 1818* pthread_support.c (pthread_join): Add assertion (check thread is 1819finished). 1820* pthread_support.c (GC_register_my_thread): Don't detach the 1821thread if invoked from the thread destructor. 1822* win32_threads.c (GC_register_my_thread): Likewise. 1823* win32_threads.c (GC_unregister_my_thread): Don't delete the 1824thread (just set FINISHED) if the thread is not detached (only if 1825GC_PTHREADS); add assertion (check the thread is not finished). 1826* tests/threadkey_test.c (main): Join some created threads. 1827 1828* pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local 1829variable to "t". 1830* win32_threads.c (GC_delete_gc_thread): Likewise. 1831* pthread_support.c (pthread_join, pthread_detach, 1832pthread_cancel): Rename "thread_gc_id" local variable to "t". 1833* win32_threads.c (GC_pthread_detach): Likewise. 1834* win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local 1835variable. 1836* win32_threads.c (GC_pthread_join): Rename "joinee" local 1837variable to "t". 1838 1839* pthread_stop_world.c (pthread_sigmask): Undefine even if not 1840DEBUG_THREADS. 1841* pthread_stop_world.c (GC_unblock_gc_signals): New function (only 1842if GC_EXPLICIT_SIGNALS_UNBLOCK). 1843* pthread_support.c (GC_unblock_gc_signals): New prototype. 1844* pthread_support.c (GC_register_my_thread_inner, 1845GC_register_my_thread): Call GC_unblock_gc_signals (only if 1846GC_EXPLICIT_SIGNALS_UNBLOCK); add comment. 1847* include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New 1848macro. 1849 1850* pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy", 1851"sig" local variables; rename my_thread local variable to "self". 1852 1853* tests/threadkey_test.c (LIMIT): Use smaller value (don't create 1854more than 30 in parallel by default). 1855 1856* tests/threadkey_test.c (key_once, main): Work around for Solaris 1857PTHREAD_ONCE_INIT. 1858* tests/threadkey_test.c (LIMIT): Use smaller value for Solaris. 1859 1860* dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local 1861variable. 1862* pthread_support.c (GC_unregister_my_thread_inner): Revert back 1863GC_remove_specific invocation; add a comment. 1864* include/private/thread_local_alloc.h (GC_remove_specific): 1865Revert back. 1866* specific.c (slow_getspecific): Cast qtid to AO_t. 1867* include/private/specific.h (key_create, setspecific, 1868remove_specific): Remove "extern" keyword. 1869* include/private/specific.h (getspecific): Change type of "qtid" 1870local variable to unsigned long. 1871 1872* pthread_support.c (GC_check_tls): Fix "#endif" comment. 1873* include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment. 1874* include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC): 1875Remove redundant test of the macro. 1876 1877* backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro. 1878* os_dep.c (GC_set_and_save_fault_handler): Recognize 1879SIGACTION_FLAGS_NODEFER_HACK macro. 1880* pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK 1881macro. 1882* pthread_support.c (GC_acquire_mark_lock): Remove commented out 1883code. 1884* include/private/gc_priv.h (SUNOS5SIGS): Don't include 1885sys/siginfo.h on Linux. 1886* include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro 1887recognized, force PREFETCH_FOR_WRITE to be defined on x86. 1888* include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New 1889macro recognized (for HP/UX). 1890 1891* os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for 1892GWW_VDB). 1893* os_dep.c (GC_dirty_init): Use memset() for GC_written_pages 1894resetting (for PROC_VDB). 1895 1896* tests/threadkey_test.c: New file. 1897* tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'. 1898* tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD): 1899New variable. 1900 1901* pthread_support.c (GC_unregister_my_thread_inner): Don't call 1902GC_remove_specific. 1903* include/private/thread_local_alloc.h (GC_remove_specific): 1904Remove (since it is empty for all targets). 1905* pthread_support.c (GC_record_stack_base): New inline function. 1906* win32_threads.c (GC_record_stack_base): Likewise. 1907* pthread_support.c (GC_register_my_thread_inner): Invoke 1908GC_record_stack_base. 1909* win32_threads.c (GC_register_my_thread_inner): Likewise. 1910* pthread_support.c (GC_register_my_thread): If thread is FINISHED 1911then call GC_record_stack_base, clear FINISHED, initialize 1912thread-local list and return success. 1913* win32_threads.c (GC_register_my_thread): Likewise. 1914* include/gc.h (GC_register_my_thread): Update documentation. 1915* include/private/thread_local_alloc.h (GC_thread_key): Likewise. 1916 1917* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join 1918adjacent "#ifdef". 1919* thread_local_alloc.c (GC_malloc_atomic): Call 1920GC_core_malloc_atomic (instead of GC_core_malloc). 1921 1922* pthread_start.c (GC_start_rtn_prepare_thread): Change return 1923type to GC_thread. 1924* pthread_start.c (GC_inner_start_routine): Pass the current 1925thread descriptor to pthread_cleanup_push (same as in 1926win32_threads.c). 1927* pthread_stop_world.c (GC_push_all_stacks): Rename "me" local 1928variable to "self". 1929* win32_threads.c (GC_push_all_stacks): Likewise. 1930* pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename 1931"my_thread" local variable to "self". 1932* pthread_support.c (GC_unregister_my_thread_inner): New static 1933function. 1934* pthread_support.c (GC_unregister_my_thread, 1935GC_thread_exit_proc): Use GC_unregister_my_thread_inner. 1936* win32_threads.c (GC_register_my_thread, GC_unregister_my_thread, 1937GC_do_blocking_inner): Rename "t" local variable to "thread_id". 1938* win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename 1939"id" local variable to "thread_id". 1940 1941* pthread_support.c (GC_unregister_my_thread): Call pthread_self 1942only once. 1943* win32_threads.c (GC_pthread_start_inner): Likewise. 1944* pthread_support.c (GC_unregister_my_thread): Add debug output. 1945* win32_threads.c (GC_unregister_my_thread): Likewise. 1946* pthread_support.c (GC_register_my_thread, 1947GC_start_rtn_prepare_thread): Rename "my_pthread" local variable 1948to "self". 1949 1950* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define 1951unconditionally (do not test GC_I_HIDE_POINTERS); update the 1952comment. 1953* include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to 1954GC_HIDE/REVEAL_POINTER, respectively. 1955* include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define. 1956* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise. 1957 1958* include/gc.h (GC_register_my_thread): Refine the comment. 1959 1960* include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing 1961parentheses. 1962* include/gc_typed.h (GC_get_bit, GC_set_bit, 1963GC_CALLOC_EXPLICITLY_TYPED): Likewise. 1964 1965* include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'. 1966 1967* include/private/gcconfig.h (NO_GETCONTEXT): Do not use 1968getcontext(2) on m68k because it is not implemented there. 1969 1970* alloc.c (GC_clear_a_few_frames): Use BZERO(). 1971* mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise. 1972* reclaim.c (GC_start_reclaim): Likewise. 1973* blacklst.c (total_stack_black_listed): Remove "len" local 1974variable. 1975* dbg_mlc.c (GC_generate_random_valid_address): Replace "for" 1976statement with "do-while" one. 1977* dyn_load.c (GC_register_dynamic_libraries, 1978GC_register_dynlib_callback): Remove redundant parentheses. 1979 1980* cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress 1981"unused result" compiler warning for fread(). 1982 1983* os_dep.c (GC_write_fault_handler): Break when in_allocd_block 1984is set to true. 1985 1986* dbg_mlc.c (GC_has_other_debug_info): Change return type to int; 1987return -1 if the object has (or had) debugging info but was 1988marked deallocated. 1989* include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise. 1990* dbg_mlc.c (GC_has_other_debug_info): Update documentation; 1991remove "ohdr" local variable. 1992* dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has 1993probably been deallocated. 1994* dbg_mlc.c (GC_debug_free): Don't actually free the object even 1995in the leak-finding mode if GC_findleak_delay_free. 1996* dbg_mlc.c (GC_check_leaked): New function (only unless 1997SHORT_DBG_HDRS). 1998* doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document. 1999* doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise. 2000* include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C 2001on 64-bit architectures. 2002* include/private/dbg_mlc.h (NOT_MARKED): Remove redundant 2003parentheses. 2004* include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to 2005GC_has_other_debug_info change). 2006* include/private/gc_priv.h (GC_findleak_delay_free): New global 2007variable declaration (unless SHORT_DBG_HDRS). 2008* misc.c (GC_findleak_delay_free): New global variable; recognize 2009GC_FINDLEAK_DELAY_FREE. 2010* misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment 2011variable (unless SHORT_DBG_HDRS). 2012* reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS). 2013* reclaim.c (GC_add_leaked): Don't add the object to leaked list 2014if marked as deallocated. 2015 2016* dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the 2017comment. 2018* dbg_mlc.c (GC_FREED_MEM_MARKER): New macro. 2019* dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER. 2020* dbg_mlc.c (GC_smashed): Refine documentation. 2021* mark.c (GC_push_selected): Change dirty_fn return type to 2022GC_bool. 2023* os_dep.c (GC_page_was_ever_dirty): Make GC_INNER. 2024* reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind" 2025local variable. 2026* reclaim.c (GC_reclaim_block): Pass true constant to 2027GC_reclaim_small_nonempty_block (instead of report_if_found). 2028* doc/README.autoconf: Update; fix a typo. 2029* include/private/gcconfig.h (GC_WORD_C): New macro. 2030 2031* dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum". 2032* dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the 2033comment. 2034* dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg" 2035argument. 2036* dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass 2037message to GC_print_smashed_obj. 2038* dbg_mlc.c (GC_debug_free): Call GC_size once. 2039* dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if 2040allocation succeeded; remove unnecessary check for object is 2041smashed (since this is done in GC_debug_free); remove "clobbered" 2042local variable. 2043 2044* dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info): 2045Rename "integer" argument to "linenum"; change the type of the 2046argument to int. 2047* gcj_mlc.c (GC_store_debug_info): Likewise. 2048* dbg_mlc.c (GET_OH_LINENUM): New macro. 2049* dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use 2050GET_OH_LINENUM; adjust print format specifier. 2051* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, 2052GC_debug_malloc_atomic_ignore_off_page, 2053GC_debug_generic_malloc_inner, 2054GC_debug_generic_malloc_inner_ignore_off_page, 2055GC_debug_malloc_stubborn, GC_debug_malloc_atomic, 2056GC_debug_malloc_uncollectable, 2057GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of 2058"i". 2059* gcj_mlc.c (GC_debug_gcj_malloc): Likewise. 2060 2061* os_dep.c (GC_linux_stack_base): Rename to 2062GC_linux_main_stack_base. 2063* os_dep.c (GC_freebsd_stack_base): Rename to 2064GC_freebsd_main_stack_base; adjust error message. 2065* pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED 2066as an argument for sem_init(). 2067* pthread_support.c (pthread_create): Likewise. 2068* pthread_support.c (pthread_create): Abort in case sem_init() 2069fails. 2070* include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define. 2071* tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT 2072from main() if it should be done from the primordial thread only. 2073 2074* alloc.c: Don't include sys/types.h for ArmCC. 2075* dyn_load.c: Likewise. 2076* os_dep.c: Likewise. 2077* mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for 2078ArmCC. 2079* mark.c (GC_noop): Define specially for ArmCC. 2080* include/private/gc_priv.h (GC_noop): Likewise. 2081* misc.c (GC_init): Don't test pointers comparison for ArmCC. 2082* misc.c: Don't include unistd.h for ArmCC. 2083* os_dep.c (pages_executable): Rename to GC_pages_executable; 2084make STATIC. 2085* os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC. 2086* ptr_chck.c (GC_is_visible): Explicitly cast 2087(GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress 2088a compiler warning). 2089* include/private/gcconfig.h: Recognize __arm. 2090* include/private/gcconfig.h (HBLKPTR): Define for ArmCC. 2091* include/private/gcconfig.h (HBLKPTR): Add parentheses for 2092"bytes" argument. 2093 2094* pthread_support.c (GC_get_nprocs): Don't define for Android. 2095* pthread_support.c (GC_dummy_thread_local): Don't test 2096GC_LINUX_THREADS. 2097* include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR): 2098Define for Android. 2099 2100* mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h. 2101* os_dep.c (GC_write_fault_handler): Don't include ucontext.h if 2102NO_GETCONTEXT. 2103* include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf 2104call for Android. 2105 2106* include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE): 2107Define before including windows.h. 2108* include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE): 2109Likewise. 2110* include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN, 2111NOSERVICE): Likewise. 2112* include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point 2113arithmetics; add a comment. 2114 2115* mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES. 2116* extra/setjmp_t.c (main): Don't test USE_MARK_BITS. 2117* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise. 2118* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove 2119"mark_byte" local variable. 2120* include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment 2121about that AO_or() is not used by GC unless USE_MARK_BITS 2122explicitly set. 2123* include/private/gc_priv.h (OR_WORD): Likewise. 2124* include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';', 2125add parentheses. 2126* include/private/gc_priv.h (ONES): Define before use by 2127MAKE_COOLER. 2128* include/private/gc_priv.h (MARK_BITS_SZ): Define where used. 2129* include/private/gc_priv.h (OR_WORD): Don't define if 2130USE_MARK_BYTES. 2131* include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate 2132definition; simplify expression. 2133 2134* os_dep.c (GC_get_maps): Always close the file. 2135* pthread_support.c (GC_get_nprocs): Likewise. 2136* os_dep.c (READ): Define similarly across the file (without 2137parameters). 2138* pthread_support.c (GC_get_nprocs): Use signed int type for "i" 2139and "len" local variables (since read() may return -1). 2140* include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix 2141double underscore; add "volatile" for asm. 2142* include/private/gc_pmark.h (LONG_MULT): Add missing 2143parentheses. 2144* include/private/gc_priv.h (OR_WORD): Likewise. 2145* include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets 2146and ';' symbol. 2147 2148* os_dep.c (GC_get_stack_base): Implement for Android (same as 2149for Linux). 2150* pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if 2151failed to open "stat" file (not to issue a warning twice); update 2152the comment. 2153* pthread_support.c (GC_thr_init): Call sysconf() on Android to 2154get the number of CPUs. 2155 2156* include/private/gc_priv.h (_GNU_SOURCE): Revert one of the 2157recent patches regarding this macro as the macro should be set 2158(to 1) before including any other system header. 2159 2160* doc/README.environment (GC_INITIAL_HEAP_SIZE, 2161GC_MAXIMUM_HEAP_SIZE): Update. 2162 2163* misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in 2164heap size specifier; return 0 if not a valid one. 2165* include/gc_cpp.h: Explicitly define inline one-argument delete 2166operator for Cygwin (as a workaround). 2167* tests/test_cpp.cc (main): Suppress compiler warnings about 2168"assigned value is unused". 2169 2170* misc.c (GC_parse_mem_size_arg): New function. 2171* misc.c (GC_init): Use GC_parse_mem_size_arg(). 2172* pthread_stop_world.c (tkill): Declare for Android. 2173 2174* include/private/gc_priv.h (_GNU_SOURCE): Include features.h 2175first (except for NaCl) and then define the macro to 1 if not yet. 2176 2177* tests/tests.am (TESTS, check_PROGRAMS): Add 2178'initsecondarythread'. 2179* tests/tests.am (initsecondarythread_SOURCES, 2180initsecondarythread_LDADD): New variable. 2181 2182* dbg_mlc.c (GC_store_debug_info_inner): Always define; add 2183"const" to its string argument. 2184* dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner. 2185* dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of 2186smashed or previously deallocated found. 2187* dbg_mlc.c (GC_check_heap_block): Replace while loop with a for 2188one. 2189* reclaim.c (GC_reclaim_check): Likewise. 2190* dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word. 2191* os_dep.c (GC_get_stack_base): Don't initialize 2192stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus 2193calling GC_INIT() from a non-primordial thread is possible now). 2194* reclaim.c (GC_add_leaked): Turn into an inline one. 2195* reclaim.c (GC_reclaim_small_nonempty_block): 2196Change report_if_found type from int/word to boolean. 2197* include/private/gc_priv.h (GC_start_reclaim): Likewise. 2198* include/private/gc_priv.h (set_mark_bit_from_hdr, 2199clear_mark_bit_from_hdr): Place closing parenthesis properly. 2200 2201* os_dep.c (GC_get_main_stack_base): Try to use 2202pthread_attr_getstack first for Linux if THREADS. 2203* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text 2204alignment. 2205 2206* dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message 2207typo. 2208* dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size). 2209* dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in 2210case of NULL argument). 2211* dbg_mlc.c (GC_free): In case of NULL argument, just return 2212(without any warning printed); eliminate "uncollectable" local 2213variable. 2214 2215* configure.ac (THREADDLLIBS): Use alternate thread library on 2216Solaris 8. 2217* configure.ac (need_atomic_ops_asm): Set to true only for SPARC 2218Solaris. 2219* configure.ac: Don't use libdl on mips-sgi-irix6. 2220 2221* mach_dep.c (NO_GETCONTEXT); Define for RTEMS. 2222* mach_dep.c (GC_with_callee_saves_pushed): Don't call 2223__builtin_unwind_init() for RTEMS; use setjmp() without the 2224leading underscore (for RTEMS). 2225* tests/test.c (BIG): Use smaller value for RTEMS. 2226* tests/test.c (main): Customize for RTEMS. 2227 2228* configure.host: Remove doubled words in comments. 2229* os_dep.c: Likewise. 2230* doc/README: Likewise. 2231* extra/setjmp_t.c: Likewise. 2232* tests/huge_test.c: Likewise. 2233* extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the 2234K&R-style function definition with the ANSI C one. 2235* extra/setjmp_t.c (nested_sp): Implement in the same way as 2236GC_approx_sp. 2237 2238* dyn_load.c (GC_dyld_sections): Add more sections. 2239* dyn_load.c (GC_dyld_add_sect_fmts): New static variable. 2240* dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro. 2241* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve 2242logging; add support for on-demand sections. 2243 2244* gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless 2245GC_ASSERTIONS. 2246* include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't 2247declare (as external) unless GC_ASSERTIONS. 2248* os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for 2249Cygwin; add FIXME. 2250* include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS. 2251* include/private/gcconfig.h: Add "#error" for every "-->" mark. 2252* include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into 2253an expression. 2254* include/private/pthread_support.h (SUSPENDED_EXT): Add new flag 2255(which existed previously as SUSPENDED and still exists in GCJ). 2256* include/private/pthread_support.h (DISABLED_GC): Change the 2257value (as it is already used by SUSPENDED_EXT). 2258 2259* tests/test.c (reverse_test): Modify count (BIG) for 2260ppc64-darwin. 2261 2262* reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK 2263macro and environment variable; abort if any error has been 2264printed provided the environment variable (or macro) is set. 2265* doc/README.environment (GC_ABORT_ON_LEAK): Document. 2266* doc/README.macros (GC_ABORT_ON_LEAK): Likewise. 2267 2268* os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define 2269for RTEMS. 2270* include/private/gcconfig.h (RTEMS): Add support for. 2271* include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS. 2272 2273* mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since 2274it is used internally in some places). 2275 2276* dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant 2277declaration. 2278* dbg_mlc.c (GC_debug_malloc_replacement, 2279GC_debug_realloc_replacement): Rename RA to GC_DBG_RA. 2280* malloc.c (GC_debug_malloc_replacement): Likewise. 2281* mallocx.c (GC_debug_realloc_replacement): Likewise. 2282* dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h. 2283* malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c. 2284* malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant 2285includes of string.h. 2286* mallocx.c: Include string.h (for GC_strdup). 2287* include/private/dbg_mlc.h (GC_store_debug_info): Move declaration 2288to dbg_mlc.c. 2289* include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove 2290redundant trailing ';'. 2291* include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise. 2292* include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{' 2293properly. 2294* include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c, 2295malloc.c, mallocx.c. 2296 2297* alloc.c (GC_check_heap, GC_print_all_smashed): Move the 2298definition from misc.c. 2299* dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as 2300public. 2301* include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare. 2302* include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public 2303macro. 2304* dbg_mlc.c (MAX_SMASHED): Don't define if already set. 2305* reclaim.c (MAX_LEAKED): Likewise. 2306* dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent 2307access to the global array. 2308* reclaim.c (GC_add_leaked): Likewise. 2309* misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT 2310(new macro) is defined. 2311* doc/README.macros (GC_PRINT_BACK_HEIGHT): Document. 2312* misc.c (GC_dump_regularly, GC_init): Replace 0/1 for 2313GC_dump_regularly and GC_print_back_height variables with 2314FALSE/TRUE. 2315* reclaim.c (GC_print_all_errors): Refine the comment. 2316 2317* tests/test.c (reverse_test_inner): Undo one of the previous 2318patches which shifts "c" and "d" pointers only if 2319ALL_INTERIOR_POINTERS (since interior pointers are always 2320recognized in stacks). 2321 2322* misc.c (GC_stdout, GC_stderr): Move the definition to the place 2323where GC_log is defined (Unix only). 2324* misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment 2325variable and the similar macro; redirect GC_stdout and GC_stderr 2326to GC_log if "GC_LOG_FILE" environment variable is set unless 2327prohibited by GC_ONLY_LOG_TO_FILE (Unix only). 2328* doc/README.environment (GC_ONLY_LOG_TO_FILE): Document. 2329* doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise. 2330 2331* misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32 2332only). 2333* misc.c (GC_write): Add for MacOS (and OS/2); change WRITE() 2334accordingly. 2335* misc.c (GC_printf): Check GC_quiet before va_start(). 2336 2337* allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf 2338inside "if (GC_print_stats)" branch. 2339* alloc.c (GC_collect_or_expand): Likewise. 2340* dyn_load.c (GC_register_dynamic_libraries): Likewise. 2341* headers.c (GC_scratch_alloc): Likewise. 2342* os_dep.c (GC_get_maps, GC_remap, PROTECT, 2343GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise. 2344* alloc.c (min_bytes_allocd): Use GC_log_printf instead of 2345GC_printf for DEBUG_THREADS output. 2346* darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list, 2347GC_stop_world, GC_thread_resume, GC_start_world): Likewise. 2348* pthread_start.c (GC_inner_start_routine): Likewise. 2349* pthread_stop_world.c (GC_suspend_handler, GC_restart_handler, 2350GC_push_all_stacks, GC_suspend_all, GC_stop_world, 2351GC_start_world): Likewise. 2352* pthread_support.c (GC_mark_thread, GC_get_nprocs, 2353GC_start_rtn_prepare_thread, pthread_create): Likewise. 2354* checksums.c (GC_update_check_page): Use GC_printf() instead of 2355GC_err_printf() for error printing. 2356* checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf 2357instead of GC_printf for logging purposes. 2358* dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of 2359external variable outside from GC_register_dynamic_libraries. 2360* dyn_load.c (GC_register_dynamic_libraries): Don't use 2361sys_errlist value if errno equals to sys_nerr. 2362* dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf 2363instead of GC_printf for DL_VERBOSE output. 2364* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove, 2365GC_init_dyld): Use GC_log_printf instead of GC_printf for 2366DARWIN_DEBUG output. 2367* os_dep.c (catch_exception_raise): Use GC_log_printf 2368instead of GC_printf for DEBUG_EXCEPTION_HANDLING output. 2369* reclaim.c (GC_print_free_list): Move "n" increment out of 2370GC_printf() call. 2371 2372* win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS, 2373DEBUG_WIN32_THREADS): Remove. 2374* win32_threads.c (GC_register_my_thread_inner, 2375GC_win32_start_inner): Use GC_log_printf instead of GC_printf 2376inside "if (GC_print_stats)" branch. 2377* win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if 2378GC_PTHREADS). 2379* win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID, 2380GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL 2381macro. 2382* win32_threads.c (GC_push_stack_for, GC_mark_thread, 2383GC_CreateThread, GC_beginthreadex, GC_pthread_join, 2384GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc, 2385GC_mark_thread_local_free_lists): Use GC_log_printf instead of 2386GC_printf for DEBUG_THREADS output. 2387* win32_threads.c (GC_win32_start_inner, GC_CreateThread, 2388GC_beginthreadex, GC_pthread_join, GC_pthread_create, 2389GC_pthread_start_inner, GC_thread_exit_proc): Cast 2390GetCurrentThreadId result to long; don't cast value of pthread_t 2391type to int; adjust printf format specifiers. 2392* doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete 2393information. 2394 2395* tests/test.c (cons, small_cons, gcj_cons, check_ints, 2396check_uncollectable_ints, print_int_list, check_marks_int_list, 2397fork_a_thread, finalizer, mktree, chktree, alloc8bytes, 2398alloc_small, tree_test, typed_test, check_heap_stats, WinMain, 2399test, main): Remove unnecessary casts of GC_printf calls to void. 2400 2401* allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across 2402BDWGC) printed message (adjust letters case, terminating dot and 2403new line symbols). 2404* alloc.c (GC_check_fl_marks): Likewise. 2405* backgraph.c (new_back_edges): Likewise. 2406* checksums.c (GC_check_dirty): Likewise. 2407* darwin_stop_world.c (GC_push_all_stacks, 2408GC_suspend_thread_list): Likewise. 2409* dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc, 2410store_old): Likewise. 2411* dyn_load.c (GC_register_dynamic_libraries): Likewise. 2412* mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all, 2413GC_push_selected, GC_push_next_marked_dirty): Likewise. 2414* mark_rts.c (GC_exclude_static_roots_inner): Likewise. 2415* os_dep.c (GC_remap, GC_default_push_other_roots, 2416GC_push_thread_structures, GC_dirty_init, GC_read_dirty, 2417catch_exception_raise_state, catch_exception_raise_state_identity, 2418GC_mprotect_thread_notify, GC_mprotect_thread, 2419catch_exception_raise): Likewise. 2420* pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks, 2421GC_stop_world, GC_stop_init): Likewise. 2422* pthread_support.c (GC_thr_init, GC_register_my_thread_inner, 2423GC_start_routine): Likewise. 2424* win32_threads.c (GC_register_my_thread_inner, 2425GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join, 2426GC_pthread_start_inner): Likewise. 2427* alloc.c (GC_expand_hp_inner): Realign the code. 2428* mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark): 2429Likewise. 2430* misc.c (GC_init): Likewise. 2431* os_dep.c (GC_dirty_init, GC_read_dirty): Likewise. 2432* include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise. 2433* tests/test.c (run_one_test): Likewise. 2434* misc.c (GC_err_puts): Document. 2435* misc.c (GC_err_write): Remove. 2436* os_dep.c (dump_maps): Likewise. 2437* include/private/gc_priv.h (GC_err_write): Likewise. 2438* os_dep.c (GC_print_address_map): Call GC_err_puts() instead of 2439dump_maps() and GC_err_write(). 2440* os_dep.c (GC_read_dirty): Remove redundant brackets. 2441 2442* tests/test.c (reverse_test_inner): Test interior pointer 2443recognition only if ALL_INTERIOR_POINTERS. 2444* tests/test.c (run_one_test): Replace GC_all_interior_pointers 2445with GC_get_all_interior_pointers(); simplify the expression. 2446* tests/test.c (check_heap_stats): Replace GC_bytes_allocd and 2447GC_bytes_allocd_before_gc with GC_get_total_bytes(). 2448* tests/test.c (main): Replace GC_gc_no with GC_get_gc_no(). 2449 2450* dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability 2451warning if the argument is NULL and GC is in leaks detection mode. 2452* dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public 2453function definition. 2454* malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise. 2455* mallocx.c (GC_posix_memalign): Likewise. 2456* malloc.c (strdup): Fix string size value; rename "len" to "lb". 2457* mallocx.c: Include errno.h unless WinCE (otherwise include 2458windows.h for Win32 error constants). 2459* win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before 2460windows.h inclusion. 2461* misc.c (GC_init): Register at-exit callback if GC_find_leak 2462(even if GC_FIND_LEAK macro is unset). 2463* pthread_stop_world.c (NACL_STORE_REGS, 2464__nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread): 2465Use BCOPY() instead of memcpy(). 2466* pthread_support.c (GC_init_real_syms): Likewise. 2467* doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP): 2468Document new macro. 2469* doc/README.macros (REDIRECT_MALLOC): Update documentation. 2470* include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup): 2471New API function prototype. 2472* include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to 2473GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT. 2474* include/gc.h (GC_STRDUP): Remove redundant parentheses. 2475* include/leak_detector.h (realloc, strdup): Likewise. 2476* include/gc.h (GC_STRNDUP): New API macro. 2477* include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN, 2478GC_NEW_UNCOLLECTABLE): Add missing parentheses. 2479* include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function 2480prototype (only if GC_REQUIRE_WCSDUP). 2481* include/gc.h (GC_WCSDUP): New API macro (only if 2482GC_REQUIRE_WCSDUP). 2483* include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless 2484GC_DONT_INCLUDE_STDLIB). 2485* include/leak_detector.h (malloc, calloc, free, realloc): 2486Undefine symbol before its redefinition. 2487* include/leak_detector.h (strndup, memalign, posix_memalign): 2488Redefine to the corresponding GC function. 2489* include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only 2490if GC_REQUIRE_WCSDUP). 2491* include/leak_detector.h (CHECK_LEAKS): Add comment; don't define 2492the macro if already defined. 2493 2494* misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32 2495when doing code static analysis (to inform the tool that the 2496function is a no-return one). 2497* os_dep.c (GC_linux_stack_base): Remove a duplicate validation 2498of the length of "stat" file; use signed int type for "i", 2499"buf_offset" and "len" local variables (since read() may 2500return -1). 2501 2502* blacklst.c (GC_bl_init_no_interiors): New function (the code 2503moved from GC_bl_init). 2504* blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless 2505GC_all_interior_pointers mode; remove unnecessarily parameter cast 2506for GC_scratch_alloc call. 2507* include/private/gc_priv.h (GC_bl_init): Move the function 2508declaration to misc.c file. 2509* misc.c (GC_bl_init_no_interiors): Add a prototype. 2510* misc.c (GC_set_all_interior_pointers): Allow values other than 0 2511and 1; allow altering GC_set_all_interior_pointers value even 2512after GC initialization. 2513* obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and 2514GC_modws_valid_offsets if GC_all_interior_pointers is off. 2515* misc.c (GC_init): Don't call GC_initialize_offsets() unless 2516GC_all_interior_pointers mode. 2517 2518* alloc.c (GC_finish_collection): Remove redundant brackets; 2519adjust code indentation. 2520* blacklst.c (GC_add_to_black_list_normal): Simplify expression 2521(to improve code readability). 2522* blacklst.c (GC_is_black_listed): Join nested "if" (into a single 2523conditional expression); initialize "nblocks" just before the loop 2524beginning. 2525* misc.c (GC_init): Don't compute initial_heap_sz if GC is already 2526initialized. 2527* include/private/gc_priv.h (GC_initialize_offsets): Move the 2528function declaration to misc.c file. 2529* obj_map.c (GC_initialize_offsets): Remove offsets_initialized 2530static variable since the function is called only once. 2531* tests/middle.c (main): Use setter for GC_all_interior_pointers; 2532adjust printf format specifier (and cast the value passed to). 2533 2534* doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the 2535documentation. 2536* include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG 2537if LARGE_CONFIG is defined. 2538* include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise. 2539 2540* alloc.c (GC_finish_collection): Replace "#else #ifdef" with 2541"#elif". 2542* include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES, 2543MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise. 2544* alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize 2545overflow even if not LARGE_CONFIG. 2546* dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if 2547SMALL_CONFIG. 2548* finalize.c (GC_print_finalization_stats): Fix "#endif" comment. 2549* doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS, 2550GC_FULL_FREQUENCY): Refine the documentation. 2551 2552* extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for 2553GC_word). 2554* extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define 2555as word. 2556 2557* dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj, 2558GC_print_smashed_obj, GC_debug_free_inner): Add a code for a 2559LINT-like tool to instruct it that the function is invoked only 2560with valid parameters (otherwise a SEGV is ok); recognize LINT2 2561new macro. 2562* misc.c (GC_abort): Instruct a LINT-like tool that the function 2563never returns in fact. 2564* os_dep.c (GC_linux_stack_base): Check for read buffer overflow; 2565close the file immediately after read; use STRTOULL() instead of 2566decoding the address number manually. 2567* include/private/gc_priv.h (EXPECT): Don't specify outcome for a 2568LINT-like tool. 2569* include/private/gc_priv.h (GC_all_interior_pointers): Instruct a 2570LINT-like tool that the value is restricted to zero and one only 2571(required since the variable is global and its value is used as a 2572part of array index expression is some places). 2573 2574* dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns 2575NULL. 2576* dbg_mlc.c (GC_debug_register_finalizer, 2577GC_debug_register_finalizer_no_order, 2578GC_debug_register_finalizer_unreachable, 2579GC_debug_register_finalizer_ignore_self): Handle out of memory 2580case properly (similar to GC_register_finalizer_inner). 2581* headers.c (GC_install_header): Handle the case when alloc_hdr() 2582returns NULL. 2583* os_dep.c (GC_get_maps_len): Defend against missing "maps" file. 2584* pthread_support.c (GC_mark_thread): Place a dummy return 2585statement (which uses "id" argument) before the actual use of "id" 2586as an array index (to suppress a warning produced by some static 2587code analysis tools). 2588* win32_threads.c (GC_mark_thread): Likewise. 2589* pthread_support.c (GC_thr_init): Abort (with the appropriate 2590message) if out of memory. 2591 2592* finalize.c (GC_register_finalizer_inner): Fix a typo in a 2593comment. 2594*include/private/gcconfig.h (STACKBOTTOM): Likewise. 2595* gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in 2596EXPECT (the 2nd argument). 2597* malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free): 2598Likewise. 2599* mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise. 2600* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise. 2601* include/private/gc_hdrs.h (HC_GET_HDR): Likewise. 2602* include/private/gc_priv.h (SMALL_OBJ): Likewise. 2603* include/private/specific.h (getspecific): Likewise. 2604* pthread_support.c (LOCK_STATS): Add a comment. 2605 2606* include/gc_pthread_redirects.h (GC_NO_DLOPEN, 2607GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST, 2608GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the 2609definition to gc_config_macros. 2610 2611* pthread_support.c (pthread_cancel, GC_pthread_cancel_t, 2612GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and 2613GC_PTHREAD_EXIT_ATTRIBUTE). 2614* include/gc_pthread_redirects.h (GC_pthread_cancel, 2615pthread_cancel): Likewise. 2616* pthread_support.c (GC_pthread_create, GC_pthread_sigmask, 2617GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign 2618code. 2619* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): 2620Define as empty for NaCl. 2621* include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro 2622defined. 2623 2624* dyn_load.c (GC_init_dyld): Do not invoke 2625_dyld_bind_fully_image_containing_address() if GC_no_dls (as it is 2626not required to register the main data segment in that case). 2627* include/gc.h (GC_no_dls): Adjust the comment. 2628 2629* dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test 2630GC_NO_DLOPEN. 2631* gc_dlopen.c: Likewise. 2632* include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise. 2633* gc_dlopen.c: Don't include dlfcn.h (as it is included in 2634gc_pthread_redirects.h). 2635* pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t, 2636GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of 2637GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL). 2638* include/gc_pthread_redirects.h (GC_pthread_sigmask, 2639pthread_sigmask): Likewise. 2640* win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test 2641GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS). 2642* pthread_support.c (pthread_create, GC_pthread_create_t, 2643GC_pthread_create): Rename GC_PTHREAD_CONST to 2644GC_PTHREAD_CREATE_CONST. 2645* win32_threads.c (GC_pthread_create): Likewise. 2646* include/gc_pthread_redirects.h: Likewise. 2647* include/gc_pthread_redirects.h (GC_NO_DLOPEN, 2648GC_NO_PTHREAD_SIGMASK): New macro defined. 2649* include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to 2650empty for NaCl. 2651* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do 2652not define for Android (as CANCEL_SAFE is not defined). 2653 2654* include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR, 2655GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move 2656definition to gc_config_macros.h file. 2657* include/gc_config_macros.h: Check the file is included from gc.h 2658file. 2659* include/gc_version.h: Likewise. 2660 2661* gc_dlopen.c: Empty unit for NaCl. 2662* os_dep.c: Include fcntl.h for NaCl. 2663* os_dep.c (GC_get_main_stack_base): Ignore 2664USE_GET_STACKBASE_FOR_MAIN macro for NaCl. 2665* os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl. 2666* os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl. 2667* pthread_start.c (GC_inner_start_routine): Don't invoke 2668pthread_cleanup_push/pop for NaCl. 2669* pthread_stop_world.c (GC_nacl_num_gc_threads, 2670GC_nacl_thread_idx, GC_nacl_park_threads_now, 2671GC_nacl_thread_parker, GC_nacl_gc_thread_self, 2672GC_nacl_thread_parked, GC_nacl_thread_used, 2673GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New 2674variable (fo NaCl only). 2675* pthread_stop_world.c (GC_remove_allowed_signals, 2676suspend_handler_mask, GC_stop_count, GC_world_is_stopped, 2677GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem, 2678GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler, 2679GC_restart_handler): Don't define for NaCl. 2680* pthread_support.c (GC_get_nprocs): Likewise. 2681* include/private/gc_priv.h (SIG_SUSPEND): Likewise. 2682* include/private/gcconfig.h (LINUX): Likewise. 2683* pthread_stop_world.c (GC_push_all_stacks): Push register storage 2684for NaCl. 2685* pthread_stop_world.c (GC_suspend_all, GC_stop_world, 2686GC_start_world): Implement for NaCl. 2687* pthread_stop_world.c (GC_stop_world): Don't define unused "i" 2688local variable for OpenBSD (and NaCl). 2689* pthread_stop_world.c (NACL_STORE_REGS): New macro definition for 2690NaCl. 2691* pthread_stop_world.c (nacl_pre_syscall_hook, 2692__nacl_suspend_thread_if_needed, nacl_post_syscall_hook, 2693GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New 2694function (for NaCl only). 2695* pthread_stop_world.c (GC_stop_init): Empty for NaCl. 2696* pthread_support.c (pthread_cancel, pthread_sigmask): Don't 2697redirect for NaCl. 2698* include/gc_pthread_redirects.h (pthread_cancel, 2699pthread_sigmask): Likewise. 2700* pthread_support.c (GC_nacl_initialize_gc_thread, 2701GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only). 2702* pthread_support.c (GC_new_thread, GC_delete_thread): Initialize 2703and shutdown thread for NaCl. 2704* pthread_support.c (GC_thr_init): Call sysconf for NaCl. 2705* pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc 2706for NaCl. 2707* include/gc.h: Don't include features.h for NaCl. 2708* include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro. 2709* include/gc_pthread_redirects.h (GC_pthread_create): Use 2710GC_PTHREAD_CONST instead of const. 2711* win32_threads.c (GC_pthread_create): Likewise. 2712* pthread_support.c (GC_pthread_create_t, GC_pthread_create, 2713pthread_create): Likewise. 2714* include/private/gcconfig.h (NACL): Recognize NaCl. 2715* include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl. 2716* include/private/pthread_stop_world.h (thread_stop_info): Add 2717reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for 2718NaCl only). 2719* include/private/pthread_support.h (GC_nacl_gc_thread_self): 2720Declare internal variable (for NaCl only). 2721 2722* mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT 2723macro. 2724 2725* mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile" 2726keywords with double underscore. 2727* os_dep.c (catch_exception_raise, catch_exception_raise_state, 2728catch_exception_raise_state_identity): Add GC_API_OSCALL to 2729function definition. 2730* os_dep.c (catch_exception_raise_state, 2731catch_exception_raise_state_identity): Move definition to be 2732before GC_ports. 2733* os_dep.c (catch_exception_raise): Declare to have the symbol 2734defined before GC_ports. 2735* os_dep.c (GC_ports): Store references to catch_exception_raise, 2736catch_exception_raise_state, catch_exception_raise_state_identity 2737(to prevent stripping these symbols as dead). 2738* os_dep.c (catch_exception_raise, catch_exception_raise_state, 2739catch_exception_raise_state_identity): Mark these symbols as 2740"referenced dynamically" via an assembler directive (unless 2741NO_DESC_CATCH_EXCEPTION_RAISE). 2742* include/private/gc_priv.h (GC_API_OSCALL): New macro (defined 2743similar to GC_API but as if GC_DLL is always defined). 2744 2745* os_dep.c: Don't include signal.h for GC_write_fault_handler on 2746Win32. 2747* os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on 2748FreeBSD. 2749* os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define 2750SEGV_ACCERR for older FreeBSD releases). 2751 2752* dyn_load.c (GC_register_map_entries, 2753GC_register_dynamic_libraries_dl_iterate_phdr): Calculate 2754DATASTART only once if DATASTART_IS_FUNC. 2755* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): 2756Calculate DATAEND only once if DATAEND_IS_FUNC. 2757* dyn_load.c: Add comment to some endif; realign some code. 2758* dyn_load.c (GC_init_dyld): Don't use 2759_dyld_bind_fully_image_containing_address if 2760NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME. 2761* include/private/gcconfig.h (GC_data_start, GC_find_limit): 2762Declare if used by DATASTART/DATAEND, respectively. 2763* include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC): 2764Define if DATASTART/DATAEND is a function, respectively. 2765* include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK, 2766NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include 2767unistd.h. 2768 2769* os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT): 2770Reorder to remove redundant ifdef for Win32. 2771* os_dep.c: Add comment to some endif. 2772* os_dep.c: Include pthread.h (for Linux even if single-threaded) 2773if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin. 2774* os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited 2775for some reason). 2776* os_dep.c (GC_get_main_stack_base): Allow 2777USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add 2778assertion for the returned result. 2779* os_dep.c (GC_get_stack_base): Define for Darwin if 2780multi-threaded. 2781* os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD). 2782* os_dep.c (ID_STOP, ID_RESUME): Define only if threads. 2783* os_dep.c (catch_exception_raise): Remove redundant parentheses; 2784refine the documentation. 2785 2786* NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as 2787well. 2788* NT_STATIC_THREADS_MAKEFILE: Likewise. 2789* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine. 2790* include/gc.h (GC_INIT): Document. 2791* include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION, 2792GC_GETSECTBYNAME): Define depending only on the word size (i.e., 2793define these macros also for ARM). 2794* tests/test.c (check_heap_stats): Print main thread stack bottom 2795as well (only if verbose mode is on). 2796 2797* mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code 2798introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG 2799and X86_64). 2800 2801* darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix 2802"volatile" keyword with double underscore. 2803* mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and 2804include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS). 2805* mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception 2806mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG. 2807* include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define 2808for Linux/amd64 (since its GLibc getcontext currently has the bug). 2809 2810* allchblk.c (GC_use_entire_heap): Change type to int (as declared 2811in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP 2812macro. 2813* misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to 2814alter the default value of GC_use_entire_heap. 2815* doc/README.environment (GC_USE_ENTIRE_HEAP): Document. 2816* doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise. 2817 2818* include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause 2819MPROTECT_VDB undefining. 2820 2821* include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in 2822the comment. 2823 2824* include/private/gc_priv.h (_GC_arrays): Move the conditional 2825macro definitions (shortcuts for GC_arrays members) into the 2826structure body. 2827 2828* darwin_stop_world.c (GC_mach_handler_thread, 2829GC_use_mach_handler_thread, 2830GC_darwin_register_mach_handler_thread): Define only if 2831MPROTECT_VDB. 2832* darwin_stop_world.c (GC_suspend_thread_list): Use 2833GC_mach_handler_thread and GC_use_mach_handler_thread only if 2834MPROTECT_VDB. 2835* darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count 2836only if defined (i.e. unless GC_NO_THREADS_DISCOVERY). 2837* misc.c (GC_init): Fix comment for GWW_VDB. 2838* os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT, 2839DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros. 2840* os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE, 2841DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR. 2842* pthread_support.c (GC_thr_init): Define "dummy" local variable 2843only unless GC_DARWIN_THREADS. 2844* include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin 2845even in the single-threaded mode; define for iPhone/iPad. 2846* include/private/gcconfig.h (IA64): Remove unnecessary "ifdef" 2847around "undef". 2848* include/private/gcconfig.h (HEURISTIC1): Remove unused for 2849Cygwin. 2850* include/private/gcconfig.h (STACKBOTTOM): Use fixed address for 2851Darwin/arm (instead of HEURISTIC1). 2852 2853* misc.c (GC_write): Replace multiple "ifdef/endif" with "elif" 2854(for ECOS and NOSYS). 2855* os_dep.c (GC_get_main_stack_base): Likewise. 2856* os_dep.c (GC_get_main_stack_base): Check 2857USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one; 2858remove "dummy" variable (use result one instead). 2859* doc/README.macros (SN_TARGET_PS3): Document. 2860* extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl") 2861for Android. 2862* include/private/pthread_support.h: Fix comment for "endif". 2863 2864* misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3. 2865* misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3. 2866* os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3. 2867* os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3. 2868* os_dep.c (GC_default_push_other_roots, 2869GC_push_thread_structures): Define for SN_TARGET_PS3. 2870* include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define 2871for SN_TARGET_PS3. 2872* include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro 2873(Sony PS/3 target). 2874* include/private/gcconfig.h (THREADS): Define unconditionally if 2875SN_TARGET_PS3. 2876* include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3. 2877 2878* alloc.c (GC_collect_or_expand): Replace NIL with NULL in message. 2879* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, 2880GC_debug_malloc_atomic_ignore_off_page, 2881GC_debug_generic_malloc_inner, 2882GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn, 2883GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, 2884GC_debug_malloc_atomic_uncollectable): Likewise. 2885* gcj_mlc.c (GC_debug_gcj_malloc): Likewise. 2886* dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a 2887comment. 2888* dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise. 2889* mark_rts.c (GC_roots_present): Likewise. 2890* doc/README: Likewise. 2891* include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise. 2892* include/private/gc_priv.h (_GC_arrays): Likewise. 2893 2894* configure.ac: Use AC_CHECK_LIB() to check for pthread instead of 2895just blindly linking to -lpthread, as Android includes pthread 2896support within libc and does not provide a separate libpthread. 2897* dyn_load.c (GC_register_dynamic_libraries): Skip current link map 2898entry if l_addr is NULL (Android/bionic only). 2899* pthread_stop_world.c (android_thread_kill): New internal function 2900(Android only). 2901* pthread_stop_world.c (GC_suspend_all, GC_start_world): Call 2902android_thread_kill (based on tkill) instead of pthread_kill on 2903Android (since pthread_kill cannot be used safely on the platform). 2904* pthread_support.c (GC_new_thread): Store thread Id (obtained from 2905gettid) for use by android_thread_kill (Android only). 2906* include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id 2907structure member (Android only). 2908* include/private/gcconfig.h: Recognize __x86_64 macro as a synonym 2909of __x86_64__ (Darwin); define __environ macro (Android on M68K). 2910 2911* allchblk.c (GC_freehblk): Print extended error message (done via 2912GC_printf() before aborting with a short message) only if 2913GC_print_stats. 2914* dyn_load.c (GC_register_dynamic_libraries): Likewise. 2915* os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap, 2916PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise. 2917* pthread_stop_world.c (GC_start_world): Likewise. 2918* win32_threads.c (GC_register_my_thread_inner): Likewise. 2919* os_dep.c (GC_get_main_stack_base, GC_register_data_segments, 2920GC_dirty_init): Remove redundant print of an error message before 2921aborting with the same message. 2922* os_dep.c (GC_register_data_segments): Remove format specifier 2923from the string passed to GC_err_puts(); use ABORT instead of EXIT 2924(if invalid executable type). 2925* os_dep.c (GC_remap): Adjust printf format specifier (for long 2926type). 2927* os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected 2928(for SIGSEGV/BUS) only if GC_print_stats. 2929* os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf 2930calls. 2931 2932* tests/test.c (main): Print the relevant message if GWW_VDB. 2933* include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32 2934on x64 if compiled by GCC. 2935 2936* tests/staticrootstest.c: Include string.h for memset() prototype. 2937* tests/thread_leak_test.c (main): Fix printf() format specifiers. 2938 2939* CMakeLists.txt: Check enable_parallel_mark on Darwin. 2940* configure.ac: Likewise. 2941* darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS, 2942DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and 2943GC_DISCOVER_TASK_THREADS, respectively. 2944* os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise. 2945* pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise. 2946* darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define 2947(and remove FIXME). 2948* darwin_stop_world.c (GC_use_threads_discovery): Add GC_API; 2949comment; remove FIXME. 2950* win32_threads.c (GC_NO_DLLMAIN): Rename to 2951GC_NO_THREADS_DISCOVERY. 2952* tests/test.c (GC_NO_DLLMAIN): Likewise. 2953* doc/README.macros (GC_NO_DLLMAIN): Likewise. 2954* doc/README.win32 (GC_NO_DLLMAIN): Likewise. 2955* doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment. 2956* win32_threads.c (GC_win32_dll_threads): Define as macro to true 2957if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY); 2958update the comment. 2959* win32_threads.c (GC_use_DllMain): Rename to 2960GC_use_threads_discovery; do not set GC_win32_dll_threads if 2961GC_DISCOVER_TASK_THREADS. 2962* win32_threads.c (GC_started_thread_while_stopped, 2963GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread, 2964GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions 2965which use GC_win32_dll_threads to minimize the possibility of 2966an "unreachable code" compiler warning when GC_win32_dll_threads 2967is defined as a macro. 2968* win32_threads.c (GC_unregister_my_thread): Don't call 2969GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC 2970(since can't happen); use "t" local variable only if not 2971GC_win32_dll_threads. 2972* doc/README.macros (GC_DISCOVER_TASK_THREADS): Document. 2973* include/gc.h (GC_use_DllMain): Rename to 2974GC_use_threads_discovery but keep old name as a macro definition. 2975* include/gc.h (GC_use_threads_discovery): Declare also for 2976Darwin; update the comment. 2977* tests/test.c (main): Call GC_use_threads_discovery for Darwin 2978(to test the mode if possible). 2979 2980* darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS, 2981DARWIN_QUERY_TASK_THREADS): New macro recognized. 2982* darwin_stop_world.c (GC_query_task_threads): add STATIC; 2983initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS 2984or DARWIN_QUERY_TASK_THREADS; remove FIXME. 2985* darwin_stop_world.c (GC_use_threads_discovery): New function 2986(for setting GC_query_task_threads value). 2987* darwin_stop_world.c (GC_mach_handler_thread, 2988GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS, 2989GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list, 2990GC_darwin_register_mach_handler_thread): Define only if not 2991DARWIN_SUSPEND_GC_THREADS. 2992* darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude 2993the code for GC_query_task_threads case from compilation unless 2994DARWIN_SUSPEND_GC_THREADS. 2995* os_dep.c (GC_darwin_register_mach_handler_thread): Declared only 2996if Darwin threads and not DARWIN_SUSPEND_GC_THREADS. 2997* os_dep.c (GC_mprotect_thread): Call 2998GC_darwin_register_mach_handler_thread only if THREADS and not 2999DARWIN_SUSPEND_GC_THREADS. 3000* pthread_support.c (marker_mach_threads): Don't define if 3001DARWIN_SUSPEND_GC_THREADS. 3002* pthread_support.c (GC_mark_thread): Don't fill in 3003marker_mach_threads if DARWIN_SUSPEND_GC_THREADS. 3004* include/private/gc_locks.h (GC_need_to_lock): Always declare for 3005THREADS case. 3006 3007* darwin_stop_world.c (GC_query_task_threads): Don't define to 3008false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize 3009the variable to false (for now). 3010* darwin_stop_world.c (GC_push_all_stacks): Call task_threads() 3011only if not DARWIN_DONT_PARSE_STACK. 3012* darwin_stop_world.c (GC_stop_world, GC_start_world): Use the 3013approach based on task_threads() only if GC_query_task_threads 3014else use GC_threads table. 3015 3016* darwin_stop_world.c (GC_mach_threads): Remove static qualifier. 3017* darwin_stop_world.c (GC_stop_init): Remove (as we do not need to 3018really clear GC_mach_threads[]). 3019* darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count 3020(instead of calling GC_stop_init). 3021* include/private/pthread_support.h (GC_stop_init): Remove proto. 3022* pthread_support.c (GC_stop_init): Add proto (unless Darwin). 3023* pthread_support.c (GC_thr_init): Don't call GC_stop_init() if 3024GC_DARWIN_THREADS. 3025 3026* darwin_stop_world.c (GC_stack_range_for): New static function 3027(move the code from GC_push_all_stacks). 3028* darwin_stop_world.c (GC_push_all_stacks): Call 3029GC_stack_range_for(); rename kern_return local variable to 3030kern_result. 3031* darwin_stop_world.c (GC_is_mach_marker): Change argument type 3032from mach_port_t to thread_act_t. 3033* pthread_support.c (GC_is_mach_marker): Likewise. 3034 3035* darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local 3036variable initialization (always call current_task()). 3037* pthread_support.c (GC_thr_init, GC_register_my_thread_inner): 3038Don't set thread's stop_info.stack_ptr value for Darwin. 3039* include/private/darwin_stop_world.h (thread_stop_info): Update 3040the comment for stack_ptr. 3041 3042* darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local 3043variables to "kern_return" and "my_thread" ones, respectively; 3044call mach_port_deallocate() unconditionally. 3045* darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self 3046if DEBUG_THREADS. 3047 3048* darwin_stop_world.c (GC_mach_thread): Move from 3049darwin_stop_world.h. 3050* include/private/darwin_stop_world.h (GC_mach_thread): Remove. 3051* win32_threads.c (GC_start_world): Define "thread_id" local 3052variable only if GC_ASSERTIONS; decide whether to resume a thread 3053based on its "suspended" field value; assert that suspended thread 3054stack_base is non-zero and the thread is not our one. 3055 3056* darwin_stop_world.c (GC_thread_resume): New inline function 3057(move code from GC_thread_resume). 3058* darwin_stop_world.c (GC_start_world): Check result of 3059task_threads(); call GC_thread_resume(). 3060* os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define 3061only if not CYGWIN32. 3062* os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only 3063if not CYGWIN32. 3064 3065* darwin_stop_world.c (FindTopOfStack): Change return type to 3066ptr_t (from long); make GC_INNER; add GC_ prefix. 3067* darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked 3068local variable (initialized from the corresponding GC_thread 3069field unless GC_query_task_threads); add assertion that our 3070thread is not blocked; prefix FindTopOfStack with GC_ and remove 3071no longer needed cast to ptr_t of the result; handle thread 3072blocked case (and remove FIXME); use GC_push_all_stack_sections 3073unless GC_query_task_threads (and remove FIXME). 3074* pthread_support.c (GC_FindTopOfStack): Declare (if needed). 3075* pthread_support.c (GC_do_blocking_inner): Call 3076GC_save_regs_in_stack (if needed) before acquiring the lock. 3077* win32_threads.c (GC_do_blocking_inner): Likewise. 3078* pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack 3079field of GC_thread (Darwin only). 3080* include/private/pthread_support.h (GC_thread): Add topOfStack 3081field for Darwin (unless DARWIN_DONT_PARSE_STACK). 3082 3083* finalize.c (GC_check_finalizer_nested): Change return type to 3084char pointer (instead of int pointer); use explicit cast for 3085GC_finalizer_nested assignment. 3086* pthread_support.c (GC_check_finalizer_nested): Likewise. 3087* win32_threads.c (GC_check_finalizer_nested): Likewise. 3088* finalize.c (GC_finalizer_nested): Change type to unsigned char. 3089* finalize.c (GC_notify_or_invoke_finalizers): Change type of 3090"pnested" local variable to char pointer. 3091* pthread_support.c (GC_do_blocking_inner, 3092GC_call_with_gc_active): Use explicit cast for "thread_blocked" 3093field assignment. 3094* win32_threads.c (GC_lookup_pthread): Use explicit cast for 3095"suspended" field assignment. 3096* win32_threads.c (GC_Thread_Rep): Use short type for 3097finalizer_skipped; use char type for finalizer_nested and flags 3098fields and reorder some fields (to minimize GC_Thread_Rep 3099structure size). 3100* include/private/pthread_support.h (GC_Thread_Rep): Likewise. 3101* win32_threads.c (GC_Thread_Rep): Use char type for suspended 3102field (instead of GC_bool). 3103* include/private/pthread_support.h (GC_Thread_Rep): Use char type 3104for thread_blocked field (instead of short). 3105 3106* darwin_stop_world.c (GC_query_task_threads): New variable (or 3107macro). 3108* darwin_stop_world.c (GC_push_all_stacks): Use 3109GC_query_task_threads (to choose between algorithms based on 3110kernel task_threads and based on GC_threads table); update FIXME; 3111remove commented out GC_push_one statements. 3112* pthread_support.c (GC_thr_init, GC_do_blocking_inner, 3113GC_call_with_gc_active, GC_register_my_thread_inner): Initialize 3114stack_ptr field for all platforms. 3115* pthread_support.c (GC_call_with_gc_active): Initialize 3116saved_stack_ptr field for all platforms. 3117* include/private/darwin_stop_world.h (thread_stop_info): Add 3118stack_ptr field; change type of already_suspended from int to 3119GC_bool. 3120 3121* darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro. 3122* darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use 3123GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ. 3124* darwin_stop_world.c (GC_mach_threads): Add FIXME. 3125* darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list, 3126GC_stop_world): Use FALSE and TRUE for already_suspended field and 3127"changed", "found" variables. 3128* darwin_stop_world.c (GC_is_mach_marker): New prototype (only if 3129PARALLEL_MARK). 3130* darwin_stop_world.c (GC_suspend_thread_list): Change return type 3131to GC_bool; change type of "changed", "found" to GC_bool; make 3132"my_thread" as an argument (instead of acquiring/deallocating it 3133locally); do not add my_thread, GC_mach_handler_thread and marker 3134threads to GC_mach_threads table; check for overflow of 3135GC_mach_threads table; increase GC_mach_threads_count if "found" 3136is true and info.suspend_count is non-zero. 3137* darwin_stop_world.c (GC_suspend_thread_list, GC_start_world): 3138Adjust "thread" format specifiers for GC_printf(); search thread 3139in "old_list" starting from the previous found one. 3140* darwin_stop_world.c (GC_stop_world): Rename "changes" to 3141"changed" local variable; remove "result" variable; adjust 3142GC_printf debugging message. 3143* darwin_stop_world.c (GC_start_world): Do not check for 3144my_thread and GC_use_mach_handler_thread (since they are not added 3145to GC_mach_threads table); call thread_info() only if 3146DEBUG_THREADS or GC_ASSERTIONS. 3147* pthread_support.c (marker_mach_threads): New static variable (if 3148Darwin). 3149* pthread_support.c (GC_is_mach_marker): New function (if Darwin). 3150* pthread_support.c (GC_mark_thread): Fill in marker_mach_threads 3151table (if Darwin). 3152 3153* alloc.c (GC_parallel): Define only if THREADS. 3154* misc.c (GC_get_parallel): Likewise. 3155* include/gc.h (GC_parallel, GC_get_parallel, 3156GC_get_suspend_signal, GC_allow_register_threads, 3157GC_register_my_thread, GC_unregister_my_thread): Define only if 3158GC_THREADS. 3159* include/gc.h (GC_get_heap_size): Fix a typo in a comment. 3160 3161* configure.ac: Use `AC_C_INLINE'. 3162* include/private/gc_priv.h (GC_INLINE): Use "inline" keyword 3163(determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined. 3164 3165* dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for 3166FreeBSD). 3167* dyn_load.c (GC_register_main_static_data): Move the definition 3168above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD 3169case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG. 3170* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test 3171GC_register_main_static_data() result (instead of direct testing 3172of dl_iterate_phdr (to prevent a compiler warning). 3173* os_dep.c (CODE_OK): Test si_code also for the value of 2 3174(FreeBSD case; required for FreeBSD v7+). 3175* os_dep.c (CODE_OK): Properly use parentheses (HPUX case). 3176* include/private/gcconfig.h (DATASTART): Cast etext argument in 3177GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD 3178case). 3179 3180* include/private/specific.h (quick_thread_id): Define thru 3181GC_approx_sp(); define as a macro. 3182* include/private/specific.h (getspecific): Use GC_INLINE instead 3183of __inline__ (to work around Sun CC which does not recognize 3184inline keyword surrounded with underscores). 3185 3186* darwin_stop_world.c (FindTopOfStack): Simplify condition 3187expressions. 3188* darwin_stop_world.c (GC_push_all_stacks): Merge two variants 3189of this function (DARWIN_DONT_PARSE_STACK). 3190* darwin_stop_world.c (GC_push_all_stacks): Add a check for our 3191thread is found (same as in pthread_stop_world.c). 3192* darwin_stop_world.c (GC_push_all_stacks): Print the number of 3193scanned threads if verbose (same as in pthread_stop_world.c). 3194 3195* darwin_stop_world.c (GC_push_all_stacks): Reset 3196thread_state_count value before every thread_get_state call; 3197refine the comment for thread_state_count. 3198* darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip, 3199rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp 3200register pushing. 3201* darwin_stop_world.c (GC_push_all_stacks): Set outCount to 3202GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX). 3203* darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN 3204for i386. 3205 3206* doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo. 3207* darwin_stop_world.c (GC_use_mach_handler_thread): Change type 3208to GC_bool. 3209* darwin_stop_world.c (GC_suspend_thread_list, GC_start_world): 3210Simplify the expressions involving GC_use_mach_handler_thread. 3211* darwin_stop_world.c (GC_darwin_register_mach_handler_thread): 3212Initialize GC_use_mach_handler_thread to TRUE (instead of 1). 3213 3214* include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen, 3215pthread_sigmask, dlopen): Don't define for Win32 pthreads (and 3216don't include signal.h and dlfcn.h). 3217 3218* dyn_load.c (GC_register_dynlib_callback): Add FIXME. 3219 3220* include/private/gcconfig.h: Add support for FreeBSD on ppc64. 3221 3222* os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to 3223VM_PROT_EXECUTE. 3224 3225* os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless 3226pages_executable is on. 3227* os_dep.c (os2_alloc): Add FIXME (for recursion). 3228* os_dep.c (UNPROTECT): Abort with a more informative message if 3229pages_executable is on ("mprotect" case). 3230* os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if 3231pages_executable is on (Darwin case). 3232* pthread_support.c (GC_init_real_syms): Abort with an informative 3233message if libgc is linked after libpthread. 3234 3235* dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer 3236for 64-bit targets. 3237* pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE 3238macro. 3239* pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS() 3240since REAL(pthread_create) is used. 3241* pthread_support.c (PTHREAD_CREATE): Remove unused. 3242 3243* extra/threadlibs.c (main): Remove --wrap for "read" (since not 3244wrapped anymore). 3245* doc/README.linux (GC_USE_LD_WRAP): Likewise. 3246* os_dep.c (__wrap_read): Likewise. 3247 3248* include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the 3249beginning of the file. 3250* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New 3251macro (defined only for Linux and Solaris). 3252* include/gc_pthread_redirects.h (GC_pthread_cancel, 3253GC_pthread_exit): Declare new API function (only if 3254GC_PTHREAD_EXIT_ATTRIBUTE). 3255* include/gc_pthread_redirects.h (pthread_cancel, pthread_exit): 3256Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE). 3257* include/private/pthread_support.h (DISABLED_GC): New macro. 3258* pthread_support.c (pthread_cancel, pthread_exit): Restore 3259original definition or declare "real" function (if needed and 3260GC_PTHREAD_EXIT_ATTRIBUTE). 3261* pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t): 3262Declare new types if needed. 3263* pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New 3264function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE). 3265* pthread_support.c (GC_init_real_syms): Initialize pointers to 3266the "real" pthread_cancel and pthread_exit (only if 3267GC_PTHREAD_EXIT_ATTRIBUTE). 3268* pthread_support.c (GC_unregister_my_thread): Enable collections 3269if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE). 3270* pthread_support.c (pthread_cancel, pthread_exit): New wrapped 3271function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined). 3272* pthread_support.c (GC_start_routine): Refine the comment. 3273* extra/threadlibs.c (main): Adjust --wrap (add "read", 3274"pthread_exit", "pthread_cancel" but remove "sleep"). 3275* doc/README.linux (GC_USE_LD_WRAP): Likewise. 3276 3277* include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the 3278macro definition. 3279* include/gc.h (GC_reachable_here): Likewise. 3280* include/gc.h (GC_reachable_here): Prefix and postfix "volatile" 3281with double '_'. 3282 3283* pthread_start.c: New file. 3284* CMakeLists.txt (SRC): Add pthread_start.c. 3285* Makefile.am (libgc_la_SOURCES): Likewise. 3286* Makefile.direct (CSRCS): Likewise. 3287* Makefile.direct (OBJS): Add pthread_start.obj. 3288* extra/gc.c: Add a comment; include pthread_start.c. 3289* pthread_support.c (start_info): Move the struct definition down 3290closer to its usage. 3291* pthread_support.c (GC_thread_exit_proc): Replace STATIC with 3292GC_INNER. 3293* pthread_support.c (GC_inner_start_routine): Move to the 3294definition to pthread_start.c; leave only the prototype; remove 3295STATIC. 3296* pthread_support.c (GC_start_rtn_prepare_thread): New function 3297(contains parts of the original GC_inner_start_routine). 3298 3299* configure.ac (NO_EXECUTE_PERMISSION): Add comment. 3300* doc/README.macros (NO_EXECUTE_PERMISSION): Update the 3301documentation. 3302* include/gc.h (GC_set_pages_executable, GC_get_pages_executable): 3303New API function declaration. 3304* os_dep.c (OPT_PROT_EXEC): Remove (superseded by 3305pages_executable). 3306* os_dep.c (pages_executable): New static variable. 3307* os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by 3308GC_get_pages_executable only). 3309* os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT): 3310Replace OPT_PROT_EXEC with pages_executable. 3311* os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem, 3312GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE. 3313* os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT, 3314UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on. 3315* os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New 3316API function definition. 3317 3318* tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for 331964-bit CPUs (to prevent "Unexpected heap growth" failure on Win64, 3320at least). 3321 3322* tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for 332332-bit CPUs (to prevent "Unexpected heap growth" failure). 3324 3325* gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP. 3326* pthread_support.c (pthread_create, pthread_join, pthread_detach, 3327pthread_sigmask): Likewise. 3328* gc_dlopen.c (dlopen): Remove cast (redundant since the prototype 3329is added). 3330* gc_dlopen.c (GC_dlopen): Fix return type. 3331* pthread_support.c (GC_init_real_syms): Don't define 3332LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and 3333libpthread_name if RTLD_NEXT. 3334 3335* gc_dlopen.c (disable_gc_for_dlopen): Update the comment. 3336* gc_dlopen.c (dlopen): Likewise. 3337* include/gc.h (GC_enable_incremental): Refine the comment. 3338* include/gc.h (DECLSPEC_NORETURN): Define macro as empty if 3339missing (only for Win32). 3340* include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN. 3341* win32_threads.c (GC_ExitThread): Likewise. 3342* include/gc.h (GC_endthreadex): Add a comment. 3343 3344* include/cord.h: Fix typos. 3345 3346* Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and 3347"tests/CMakeLists.txt". 3348* doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake". 3349 3350* mach_dep.c (NO_GETCONTEXT): Also define if AVR32. 3351* include/private/gcconfig.h (AVR32): New macro (also define the 3352supplementary macros for the target). 3353* include/private/thread_local_alloc (USE_COMPILER_TLS): Don't 3354define for AVR32. 3355 3356* tests/leak_test.c (main): Explicitly define as returning int 3357(to prevent a spurious test failure on some Linux/alpha targets). 3358* tests/thread_leak_test.c (main): Likewise. 3359* tests/thread_leak_test.c: Initialize GC_find_leak in the main 3360thread (before GC_INIT) only. 3361* tests/leak_test.c (main): Use GC_set_find_leak() instead of 3362accessing GC_find_leak directly. 3363* tests/thread_leak_test.c (main): Likewise. 3364 3365* include/gc.h (GC_find_leak, GC_finalize_on_demand, 3366GC_java_finalization, GC_dont_expand, GC_no_dls, 3367GC_dont_precollect): Simplify the comment (remove the information 3368about data races since the value is boolean). 3369 3370* os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New 3371Solaris-specific implementation (based on thr_stksegment). 3372* os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static 3373variable used by the Solaris-specific GC_get_stack_base(). 3374 3375* pthread_support.c (GC_mark_thread_local_free_lists, 3376GC_check_tls): Mark (and check) only for live threads (in case of 3377GC_destroy_thread_local() is called already but GC_delete_thread() 3378is not yet). 3379* win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls): 3380Likewise. 3381 3382* NT_MAKEFILE: Remove the comment about DLL and Win32S. 3383* NT_STATIC_THREADS_MAKEFILE: Likewise. 3384* NT_X64_STATIC_THREADS_MAKEFILE: Likewise. 3385* NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc 3386properly on VS 2005+). 3387* NT_MAKEFILE: Update GC log file name in comments. 3388* NT_STATIC_THREADS_MAKEFILE: Likewise. 3389* NT_X64_STATIC_THREADS_MAKEFILE: Likewise. 3390* NT_X64_THREADS_MAKEFILE: Likewise. 3391* doc/README.win32: Likewise. 3392* NT_MAKEFILE: Remove ":full" for "-debug" option (since no 3393longer supported by VS). 3394* NT_STATIC_THREADS_MAKEFILE: Likewise. 3395* NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp. 3396* NT_STATIC_THREADS_MAKEFILE: Likewise. 3397* NT_X64_STATIC_THREADS_MAKEFILE: Likewise. 3398* NT_X64_THREADS_MAKEFILE: Likewise. 3399* NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option. 3400* NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe. 3401* NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the 3402default stack size limit). 3403* NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll". 3404* win32_threads.c (GC_get_next_stack): Always define (since it is 3405also used for Cygwin now). 3406 3407* alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to 3408be just before GC_clear_marks() call. 3409* include/gc_mark.h (GC_start_callback_proc): Refine the comment. 3410 3411* Makefile.am (check_LTLIBRARIES): Initialize to empty. 3412* tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest. 3413* tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD, 3414libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD, 3415libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES): 3416Define. 3417* tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la. 3418 3419* tests/staticrootstest.c: New file. 3420* tests/staticrootslib.c: Likewise. 3421 3422* dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for 3423Cygwin as well as other win32 targets. 3424* dyn_load.c (GC_wnt): Define to constant true. 3425* dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as 3426well as other win32 targets. 3427* mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index): 3428Don't define for Cygwin, as on other win32. 3429* mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on 3430Cygwin as for other win32 targets. 3431* mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as 3432other win32. 3433* mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on 3434other win32. 3435* mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't 3436declare on Cygwin as on other win32. 3437* mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when 3438!NO_DEBUGGING, as on other win32 targets. 3439* mark_rts.c (GC_cond_register_dynamic_libraries): Handle on 3440Cygwin as for other win32 targets. 3441* os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32. 3442* os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as 3443other win32. 3444* os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32. 3445* os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other 3446Win32, but call GC_unix_get_mem instead of GlobalAlloc. 3447* os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty). 3448* ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin 3449as on other win32 platforms. 3450* win32_threads.c (GC_get_next_stack): Define on Cygwin as well as 3451for dynamic loading targets. 3452* include/private/gc_priv.h (GC_INNER): Don't try to use 3453visibility on Cygwin which does not support it. 3454* include/private/gc_priv.h (struct roots): Don't declare r_next 3455member on Cygwin as on other windows hosts. 3456* include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define 3457likewise. 3458* include/private/gc_priv.h (struct _GC_arrays): Do declare 3459_heap_bases[] member and don't declare _root_index likewise. 3460* include/private/gc_priv.h (GC_heap_bases): Do define likewise. 3461* include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare 3462likewise. 3463* include/private/gc_priv.h (GC_sysinfo): Do declare extern 3464likewise. 3465* include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do 3466prototype on Cygwin as other win32 platforms. 3467 3468* os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and 3469pthread_attr_getstack() instead of GC_get_stack_base() (and check 3470returned stackaddr for NULL); output a warning on failure. 3471 3472* alloc.c (GC_start_call_back): Replace the definition type to 3473GC_start_callback_proc. 3474* alloc.c (GC_set_start_callback, GC_get_start_callback): New 3475setter/getter function. 3476* alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc() 3477unconditionally (because GC_try_to_collect_inner always does full 3478GC). 3479* include/gc_mark.h (GC_start_callback_proc): New type. 3480* include/gc_mark.h (GC_set_start_callback, 3481GC_get_start_callback): New API function declaration. 3482 3483* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document. 3484* os_dep.c (GC_get_main_stack_base): Recognize 3485USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM) 3486and use GC_get_stack_base() in this case. 3487 3488* os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since 3489GC_find_limit_with_bound() should be called with the lock held). 3490* backgraph.c (FOR_EACH_PRED): Fix a typo. 3491 3492* alloc.c (GC_set_stop_func, GC_get_stop_func): Add 3493DCL_LOCK_STATE. 3494* finalize.c (GC_notify_or_invoke_finalizers): Likewise. 3495* gc_dlopen.c (disable_gc_for_dlopen): Likewise. 3496* gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise. 3497* mark.c (GC_print_trace): Likewise. 3498* misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable, 3499GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc, 3500GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier, 3501GC_get_finalizer_notifier): Likewise. 3502* os_dep.c (GC_get_stack_base, GC_print_callers): Likewise. 3503* pthread_support.c (GC_is_thread_tsd_valid, 3504GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner, 3505GC_call_with_gc_active, GC_unregister_my_thread, pthread_join, 3506pthread_detach, GC_register_my_thread, GC_inner_start_routine, 3507pthread_create): Likewise. 3508* reclaim.c (GC_print_all_errors): Likewise. 3509* win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread, 3510GC_unregister_my_thread, GC_do_blocking_inner, 3511GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join, 3512GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach, 3513GC_init_parallel): Likewise. 3514 3515* doc/README.darwin: Update. 3516 3517* CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it 3518usable on Mac OS X). 3519* doc/README.cmake: Update. 3520 3521* CMakeLists.txt: New file (adding CMake support). 3522* tests/CMakeLists.txt: Likewise. 3523* doc/README.cmake: Likewise. 3524 3525* configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE... 3526macros. 3527* include/private/gc_priv.h (THREAD_FLD): Recognize 3528__DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros. 3529 3530* pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for 3531OpenBSD. 3532* pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and 3533OpenBSD. 3534* pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin, 3535NetBSD and OpenBSD. 3536 3537* mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even 3538if THREADS is undefined. 3539* include/gc.h (GC_malloc_many): Update the comment. 3540 3541* include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero 3542(formerly known as Borland) C++ compiler v6.21+. 3543* include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient 3544VC++ compilers. 3545 3546* win32_threads.c (GC_register_my_thread_inner, 3547GC_pthread_start_inner): Undo the previous commit changes for 3548the thread flags and DETACHED state (since the state is only 3549tested in GC_thread_exit_proc). 3550 3551* include/gc.h (GC_unregister_my_thread): Fix a typo; update the 3552comment. 3553* pthread_support.c (GC_delete_thread): Allow to delete the main 3554thread (don't call GC_INTERNAL_FREE for it); update the comment. 3555* win32_threads.c (GC_delete_thread): Likewise. 3556* pthread_support.c (GC_unregister_my_thread): Add an assertion 3557for FINISHED flag is unset. 3558* tests/test.c (check_heap_stats): Test the main thread 3559unregistering (only if THREADS). 3560* win32_threads.c (GC_register_my_thread_inner): Set flags to 3561DETACHED (only if GC_PTHREADS). 3562* win32_threads.c (GC_unregister_my_thread): Add FIXME (for 3563GC_wait_for_gc_completion). 3564* win32_threads.c (GC_pthread_start_inner): Clear flags detached 3565state if needed; set pthread_id and flags while holding the lock. 3566 3567* include/private/gc_priv.h (SIG_SUSPEND): Don't define for 3568OpenBSD and Darwin. 3569 3570* include/gc.h: Recognize _M_X64 (as an alias for _AMD64_). 3571 3572* test.c (main, WinMain): Consistently don't invoke 3573GC_enable_incremental() if MAKE_BACKGRAPH is defined, but 3574do invoke it even if parallel marking is enabled. 3575 3576* tests/test.c (reverse_test): Comment out a check for MSWIN32 3577(when determining BIG value) assuming outdated win32S. 3578* tests/test.c (reverse_test): Rename to reverse_test_inner; 3579change the declaration (to be of GC_fn_type); call itself thru 3580GC_call_with_gc_active() if the argument is zero. 3581* tests/test.c (reverse_test): New function added calling 3582reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and 3583GC_call_with_gc_active). 3584 3585* doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID): 3586Document. 3587* dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID. 3588* dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if 3589PLATFORM_ANDROID. 3590* include/private/gcconfig.h (LINUX): Define also if 3591PLATFORM_ANDROID (for the windows-based toolkit). 3592* include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly 3593define for Android/x86 platform. 3594* include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize 3595new macro (undefine DYNAMIC_LOADING in this case). 3596* include/private/gcconfig.h (CANCEL_SAFE): Don't define if 3597PLATFORM_ANDROID. 3598* include/private/gcconfig.h (IF_CANCEL): Fix definition for the 3599explicitly defined CANCEL_SAFE. 3600 3601* allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection() 3602if GC_DISABLE_INCREMENTAL. 3603* reclaim.c (GC_reclaim_generic): Likewise. 3604* checksums.c (GC_page_was_ever_dirty): Add prototype. 3605* include/private/gc_locks.h (GC_mark_lock_holder): Don't declare 3606unless PARALLEL_MARK. 3607* include/private/gc_priv.h (GC_dirty_maintained, 3608GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't 3609declare if GC_DISABLE_INCREMENTAL. 3610* include/private/gc_priv.h (GC_print_finalization_stats): Don't 3611declare if SMALL_CONFIG. 3612* include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if 3613GC_DISABLE_INCREMENTAL (since nothing to check). 3614* include/private/gcconfig.h (DEFAULT_VDB): Don't define if 3615GC_DISABLE_INCREMENTAL. 3616* os_dep.c (GC_dirty_maintained): Likewise. 3617* mark.c (GC_initiate_gc): Don't call GC_read_dirty() if 3618GC_DISABLE_INCREMENTAL. 3619* os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty): 3620Uncomment; define only if CHECKSUMS. 3621 3622* darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call 3623GC_push_all_stack() instead of GC_push_all_stack_frames()). 3624* include/private/gc_priv.h (GC_push_all_stack_frames, 3625GC_push_all_register_frames): Rename to 3626GC_push_all_stack_sections and GC_push_all_register_sections, 3627respectively. 3628* mark_rts.c (GC_push_all_stack_frames, 3629GC_push_all_register_frames, GC_push_all_stack_part_eager_frames, 3630GC_push_current_stack): Likewise. 3631* pthread_stop_world.c (GC_push_all_stacks): Likewise. 3632* win32_threads.c (GC_push_stack_for): Likewise. 3633* misc.c (GC_call_with_gc_active): Rename "frame" local variable 3634to "stacksect". 3635* pthread_support.c (GC_call_with_gc_active): Likewise. 3636* win32_threads.c (GC_call_with_gc_active): Likewise. 3637* pthread_support.c (GC_call_with_gc_active): Update FIXME for 3638Darwin. 3639* win32_threads.c (GC_Thread_Rep): Update the comment for 3640traced_stack_sect. 3641 3642* darwin_stop_world.c (GC_push_all_stacks): Rename 3643activation_frame to traced_stack_sect. 3644* include/private/gc_priv.h (GC_push_all_stack_frames, 3645GC_push_all_register_frames): Likewise. 3646* include/private/pthread_support.h (GC_Thread_Rep): Likewise. 3647* mark_rts.c (GC_push_all_register_frames, 3648GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames, 3649GC_push_current_stack): Likewise. 3650* pthread_stop_world.c (GC_push_all_stacks): Likewise. 3651* pthread_support.c (GC_call_with_gc_active): Likewise. 3652* win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active, 3653GC_push_stack_for): Likewise. 3654* include/private/gc_priv.h (GC_activation_frame_s): Rename to 3655GC_traced_stack_sect_s. 3656* include/private/gc_priv.h (GC_activation_frame): Rename to 3657GC_traced_stack_sect. 3658* misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise. 3659* doc/README.macros (UNICODE): Document. 3660 3661* doc/README.macros (GC_READ_ENV_FILE): Document (new macro). 3662* include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE; 3663declare and use GC_envfile_getenv(). 3664* misc.c (GC_envfile_content, GC_envfile_length): New static 3665variable (only if GC_READ_ENV_FILE). 3666* misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init). 3667* misc.c (GC_envfile_init, GC_envfile_getenv): New function (only 3668if GC_READ_ENV_FILE). 3669* misc.c (GC_init): Call GC_envfile_init() (before using GETENV) 3670if GC_READ_ENV_FILE. 3671* misc.c (GC_init): Move GC_setpagesize() and GC_init_win32() 3672calls to be just before GC_envfile_init() one (since the latter 3673uses GET_MEM). 3674* misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for 3675WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE). 3676* mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n' 3677from the ABORT message. 3678* misc.c (GC_init): Likewise. 3679* os_dep.c (GC_get_main_stack_base, GC_register_data_segments): 3680Likewise. 3681* pthread_stop_world.c (GC_push_all_stacks): Likewise. 3682* pthread_support.c (GC_init_real_syms, start_mark_threads): 3683Likewise. 3684 3685* win32_threads.c (GC_get_next_stack): Don't define for Cygwin 3686(since unused for now). 3687 3688* dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless 3689GC_register_main_static_data() is defined. 3690* dyn_load.c (GC_register_dynamic_libraries): Define only if used 3691(if DYNAMIC_LOADING or PCR or Win32/CE). 3692* dyn_load.c (GC_register_main_static_data): Define the default 3693one only if DYNAMIC_LOADING. 3694* include/private/gc_priv.h (GC_register_dynamic_libraries): 3695Declare only if used (to prevent compiler warning). 3696 3697* mark_rts.c (GC_approx_sp): Add a comment (for GCC). 3698 3699 3700== [7.2alpha4] 2009-12-01 == 3701 3702* configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value. 3703 3704* include/gc.h (GC_get_suspend_signal): New function declaration. 3705* misc.c (GC_get_suspend_signal): New API function (only if 3706THREADS). 3707 3708* alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by 3709two if GC_incremental (instead of TRUE_INCREMENTAL). 3710 3711* sparc_mach_dep.S (GC_push_regs): Remove the reference. 3712 3713* os_dep.c (SIZE_T, PULONG_PTR): Remove. 3714* os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC 3715"word"); add the comment. 3716* os_dep.c (GetWriteWatch_type, detect_GetWriteWatch, 3717GC_gww_read_dirty): Prefix ULONG_PTR with "GC_". 3718 3719* win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two 3720const value (for speed). 3721* win32_threads.c (THREAD_TABLE_INDEX): New macro. 3722* win32_threads.c (GC_new_thread, GC_lookup_thread_inner, 3723GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use 3724THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ. 3725* win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX. 3726 3727* win32_threads.c (THREAD_TABLE_SZ): Make the const value prime. 3728 3729* backgraph.c: Remove apostrophe char from "#error". 3730 3731* doc/README.macros (GC_DISABLE_INCREMENTAL): Document. 3732* include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize 3733new macro; implicitly define it if SMALL_CONFIG. 3734* alloc.c (GC_incremental, GC_timeout_stop_func): Check for 3735GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG. 3736* include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL, 3737GC_push_conditional): Likewise. 3738* mark.c (GC_push_next_marked_dirty, GC_push_selected, 3739GC_push_conditional, GC_block_was_dirty): Likewise. 3740* misc.c (GC_enable_incremental): Likewise. 3741* misc.c (GC_init): Likewise. 3742 3743* dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef. 3744* misc.c (WIN32_LEAN_AND_MEAN): Likewise. 3745* os_dep.c (WIN32_LEAN_AND_MEAN): Likewise. 3746* allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't) 3747in a comment. 3748* backgraph.c: Likewise. 3749* dyn_load.c (GC_register_dynamic_libraries): Likewise. 3750* extra/threadlibs.c (main): Likewise. 3751* pthread_support.c (pthread_join): Likewise. 3752* tests/test.c (main): Likewise. 3753 3754* mach_dep.c (GC_push_regs): Remove STATIC (just to catch 3755a duplicate symbol definition linker error). 3756* misc.c (GC_clear_stack_inner): Likewise. 3757* sparc_mach_dep.S (GC_push_regs): Comment out the reference. 3758 3759* include/private/gc_priv.h (GC_write_disabled): New variable 3760declaration (only if GC_ASSERTIONS and Win32 threads). 3761* misc.c (GC_write): Add assertion for GC_write_disabled value is 3762not on (only if THREADS). 3763* win32_threads.c (GC_write_disabled): New variable (only if 3764GC_ASSERTIONS and not Cygwin). 3765* win32_threads.c (GC_stop_world): Set and clear GC_write_disabled 3766(while holding GC_write_cs). 3767 3768* win32_threads.c (GC_please_stop): If DllMain-based thread 3769registration is not compiled in then define GC_please_stop as 3770a non-volatile variable for assertion only. 3771* win32_threads.c (GC_stop_world): Set and clear only if defined. 3772* win32_threads.c (GC_stop_world): Add the comment for GC_printf() 3773usage (while holding GC_write_cs). 3774* win32_threads.c (GC_delete_gc_thread): Likewise. 3775* os_dep.c (GC_remove_protection): Likewise. 3776 3777* pthread_support.c (GC_inner_start_routine): Join 3 sequential 3778GC_printf() calls into a single one (for DEBUG_THREADS). 3779 3780* include/private/gc_priv.h (GC_total_stacksize): New variable 3781declaration (only if THREADS). 3782* alloc.c (GC_total_stacksize): New variable (only if THREADS). 3783* alloc.c (min_bytes_allocd): Calculate stack_size using 3784GC_stackbottom only in the single-threaded case; otherwise use 3785GC_total_stacksize; print GC_total_stacksize value if 3786DEBUG_THREADS. 3787* darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type 3788specifier for lo/hi values (instead of "%lx"). 3789* darwin_stop_world.c (GC_push_all_stacks): Use 3790GC_push_all_stack_frames() instead of GC_push_all_stack(). 3791* darwin_stop_world.c (GC_push_all_stacks): Recalculate 3792GC_total_stacksize value. 3793* pthread_stop_world.c (GC_push_all_stacks): Likewise. 3794* win32_threads.c (GC_push_all_stacks): Likewise. 3795* win32_threads.c (GC_push_stack_for): Pass "me" argument; return 3796stack size; don't check for non-zero value of thread->stack_base. 3797* win32_threads.c (GC_push_all_stacks): Don't call 3798GC_push_stack_for() and don't check for "t->id == me" if 3799thread->stack_base is zero. 3800 3801* dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier 3802with "0x". 3803* os_dep.c (PROTECT): Likewise. 3804* win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to 3805int (to match printf type specifier). 3806 3807* tests/test.c (check_heap_stats): Take into account the unmapped 3808memory size when checking for "Unexpected heap growth"; remove 3809FIXME. 3810 3811* alloc.c: Revert last change. 3812 3813* include/private/gcconfig.h (STACKBOTTOM): Add a presence check 3814for eCos/NOSYS. 3815* misc.c (GC_write): Comment out _Jv_diag_write() call (since no 3816longer defined in GCJ). 3817 3818* os_dep.c (brk): Rename to ecos_gc_brk. 3819 3820* alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute 3821stack_size even if THREADS. 3822* doc/README.macros (DEBUG_THREADS): Document. 3823* pthread_support.c (DEBUG_THREADS): Remove the commented out 3824definition. 3825* win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate 3826definition. 3827* win32_threads.c: Include errno.h (except for WinCE). 3828* win32_threads.c (GC_win32_start_inner): Copy "start" and "param" 3829to local variables, and free "arg" parameter before "start" 3830invocation. 3831* win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error 3832(instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)). 3833* win32_threads.c (GC_beginthreadex): Return 0 on error (instead 3834of -1). 3835 3836* darwin_stop_world.c (GC_darwin_register_mach_handler_thread): 3837Use GC_INNER for the function definition. 3838* include/private/darwin_stop_world.h 3839(GC_darwin_register_mach_handler_thread): Remove the prototype. 3840* os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER 3841for the function prototype. 3842* include/private/gc_priv.h (NDEBUG): Explicitly define if 3843NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers 3844inclusion). 3845 3846* include/private/gcconfig.h: Move DebugBreak() workaround (for 3847x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion). 3848 3849* allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk, 3850GC_freehblk): Use GC_INNER for the function definition. 3851* alloc.c (GC_never_stop_func, GC_should_collect, 3852GC_try_to_collect_inner, GC_collect_a_little_inner, 3853GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap, 3854GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise. 3855* backgraph.c (GC_build_back_graph, GC_traverse_back_graph): 3856Likewise. 3857* blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init, 3858GC_promote_black_lists, GC_unpromote_black_lists, 3859GC_add_to_black_list_normal, GC_add_to_black_list_stack, 3860GC_is_black_listed): Likewise. 3861* darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks, 3862GC_stop_init, GC_stop_world, GC_start_world): Likewise. 3863* dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer, 3864GC_marked_for_finalization, GC_generate_random_backtrace_no_gc, 3865GC_store_debug_info, GC_start_debugging, 3866GC_debug_generic_malloc_inner, 3867GC_debug_generic_malloc_inner_ignore_off_page, 3868GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise. 3869* dyn_load.c (GC_register_dynamic_libraries, 3870GC_register_main_static_data, GC_init_dyld): Likewise. 3871* finalize.c (GC_push_finalizer_structures, GC_finalize, 3872GC_notify_or_invoke_finalizers, GC_print_finalization_stats): 3873Likewise. 3874* gcj_mlc.c (GC_core_gcj_malloc): Likewise. 3875* headers.c (GC_find_header, GC_header_cache_miss, 3876GC_scratch_alloc, GC_init_headers, GC_install_header, 3877GC_install_counts, GC_remove_header, GC_remove_counts, 3878GC_next_used_block, GC_prev_block): Likewise. 3879* mach_dep.c (GC_with_callee_saves_pushed): Likewise. 3880* malloc.c (GC_collect_or_expand, GC_alloc_large, 3881GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page, 3882GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise. 3883* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise. 3884* mark.c (GC_collection_in_progress, GC_clear_hdr_marks, 3885GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit, 3886GC_clear_marks, GC_initiate_gc, GC_mark_some, 3887GC_mark_stack_empty, GC_invalidate_mark_state, 3888GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker, 3889GC_mark_init, GC_push_all, GC_push_conditional, 3890GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack): 3891Likewise. 3892* mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp, 3893GC_exclude_static_roots_inner, GC_push_all_register_frames, 3894GC_push_all_stack_frames, GC_cond_register_dynamic_libraries, 3895GC_push_roots): Likewise. 3896* misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write): 3897Likewise. 3898* new_hblk.c (GC_build_fl, GC_new_hblk): Likewise. 3899* obj_map.c (GC_register_displacement_inner, GC_add_map_entry, 3900GC_initialize_offsets): Likewise. 3901* os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping, 3902GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize, 3903GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler, 3904GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32, 3905GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap, 3906GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init, 3907GC_dirty_init, GC_read_dirty, GC_page_was_dirty, 3908GC_page_was_ever_dirty, GC_remove_protection, 3909GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume, 3910GC_save_callers, GC_print_callers): Likewise. 3911* pthread_stop_world.c (GC_push_all_stacks, GC_stop_world, 3912GC_start_world, GC_stop_init): Likewise. 3913* pthread_support.c (GC_mark_thread_local_free_lists, 3914GC_lookup_thread, GC_reset_finalizer_nested, 3915GC_check_finalizer_nested, GC_segment_is_thread_stack, 3916GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel, 3917GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock, 3918GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder, 3919GC_wait_marker, GC_notify_all_marker): Likewise. 3920* reclaim.c (GC_print_all_errors, GC_block_empty, 3921GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim, 3922GC_reclaim_all): Likewise. 3923* thread_local_alloc.c (GC_init_thread_local, 3924GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise. 3925* win32_threads.c (GC_reset_finalizer_nested, 3926GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world, 3927GC_start_world, GC_push_all_stacks, GC_get_next_stack, 3928GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim, 3929GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker, 3930GC_thr_init, GC_init_parallel, GC_lock, 3931GC_mark_thread_local_free_lists): Likewise. 3932* alloc.c (GC_add_current_malloc_heap, GC_build_back_graph, 3933GC_traverse_back_graph): Use GC_INNER for the function prototype. 3934* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume): 3935Likewise. 3936* dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise. 3937* dyn_load.c (GC_parse_map_entry, GC_get_maps, 3938GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base, 3939GC_get_next_stack): Likewise. 3940* finalize.c (GC_reset_finalizer_nested, 3941GC_check_finalizer_nested): Likewise. 3942* gcj_mlc.c (GC_start_debugging): Likewise. 3943* include/private/dbg_mlc.h (GC_save_callers, GC_print_callers, 3944GC_has_other_debug_info, GC_store_debug_info): Likewise. 3945* include/private/gc_hdrs.h (GC_header_cache_miss): Likewise. 3946* include/private/gc_locks.h (GC_lock): Likewise. 3947* include/private/gc_pmark.h (GC_signal_mark_stack_overflow, 3948GC_mark_from): Likewise. 3949* include/private/pthread_support.h (GC_lookup_thread, 3950GC_stop_init): Likewise. 3951* include/private/thread_local_alloc.h (GC_init_thread_local, 3952GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise. 3953* malloc.c (GC_extend_size_map, GC_text_mapping): Likewise. 3954* mark.c (GC_page_was_ever_dirty): Likewise. 3955* mark_rts.c (GC_mark_thread_local_free_lists): Likewise. 3956* misc.c (GC_register_main_static_data, GC_init_win32, 3957GC_setpagesize, GC_init_linux_data_start, 3958GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf, 3959GC_do_blocking_inner): Likewise. 3960* os_dep.c (GC_greatest_stack_base_below): Likewise. 3961* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init): 3962Likewise. 3963* include/private/gc_priv.h: Likewise. 3964* include/private/gc_priv.h (GC_INNER): Update the comment. 3965* doc/README.macros (GC_DLL): Update. 3966 3967* alloc.c (GC_collection_in_progress): Move the prototype to 3968gc_priv.h. 3969* gc_dlopen.c (GC_collection_in_progress): Likewise. 3970* pthread_support.c (GC_collection_in_progress): Likewise. 3971* misc.c (GC_init_parallel): Likewise. 3972* pthread_support.c (GC_init_parallel): Likewise. 3973* win32_threads.c (GC_init_parallel): Likewise. 3974* darwin_stop_world.c (GC_thr_init): Likewise. 3975* misc.c (GC_thr_init): Likewise. 3976* pthread_stop_world.c (GC_thr_init): Likewise. 3977* pthread_support.c (GC_thr_init): Likewise. 3978* blacklst.c (GC_clear_bl, GC_copy_bl, 3979GC_number_stack_black_listed): Make STATIC. 3980* dbg_mlc.c (GC_print_obj, GC_make_closure, 3981GC_debug_invoke_finalizer): Likewise. 3982* malloc.c (GC_alloc_large_and_clear): Likewise. 3983* mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2, 3984GC_push_marked4, GC_push_marked, GC_push_next_marked, 3985GC_push_next_marked_dirty, GC_push_next_marked_uncollectable): 3986Likewise. 3987* misc.c (GC_clear_stack_inner): Likewise. 3988* os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise. 3989* darwin_stop_world.c (FindTopOfStack): Make static; define only 3990if not DARWIN_DONT_PARSE_STACK. 3991* dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL. 3992* dyn_load.c (GC_repeat_read): Remove unused prototype. 3993* include/private/gc_pmark.h (GC_find_start): Likewise. 3994* misc.c (GC_read, GC_register_finalizer_no_order): Likewise. 3995* dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if 3996THREADS). 3997* dyn_load.c (GC_register_main_static_data): Define only if 3998DYNAMIC_LOADING. 3999* finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail 4000"return" statement. 4001* gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies 4002GC_PTHREADS). 4003* include/gc.h: Fix a typo. 4004* include/gc_inline.h (GC_ASSERT): Define (if not defined) since 4005the header is public. 4006* include/gc_inline.h (GC_generic_malloc_many): New public 4007function declaration. 4008* mallocx.c (GC_generic_malloc_many): Make public. 4009* include/private/gc_priv.h (GC_INNER): Use visibility attribute 4010(if available). 4011* include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER. 4012* include/private/gc_priv.h: Include atomic_ops.h if THREADS and 4013MPROTECT_VDB. 4014* os_dep.c: Don't include atomic_ops.h 4015* win32_threads.c: Likewise. 4016* include/private/gc_priv.h (GC_push_selected, GC_push_regs, 4017GC_push_marked, GC_number_stack_black_listed, 4018GC_alloc_large_and_clear, GC_reclaim_or_delete_all, 4019GC_generic_malloc_many, GC_make_closure, 4020GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty): 4021Remove the prototype. 4022* mark.c (GC_page_was_ever_dirty): Add prototype (only if 4023PROC_VDB). 4024* include/private/gc_priv.h (GC_push_next_marked_dirty, 4025GC_push_next_marked, GC_push_next_marked_uncollectable): Move 4026the prototype to mark.c. 4027* include/private/gc_priv.h (GC_is_static_root): Declare only if 4028not THREADS. 4029* include/private/gc_priv.h (GC_free_inner): Declare only if 4030THREADS. 4031* include/private/gc_priv.h (GC_debug_free_inner): Declare only if 4032THREADS and DBG_HDRS_ALL. 4033* include/private/gc_priv.h (GC_markers): Declare GC_markers only 4034if PARALLEL_MARK. 4035* include/private/gc_priv.h (GC_register_main_static_data): Move 4036the prototype to misc.c. 4037* mach_dep.c (GC_push_regs): Make STATIC; define only along with 4038HAVE_PUSH_REGS definition. 4039* mach_dep.c (GC_clear_stack_inner): Replace K&R-style function 4040definition with the ANSI C one. 4041* mark.c (GC_started_thread_while_stopped): Declared only if not 4042GNU C. 4043* win32_threads.c (GC_started_thread_while_stopped): Don't define 4044if GNU C. 4045* mark.c (GC_mark_from): Avoid unbalanced brackets in 4046#if-#else-#endif blocks. 4047* mark_rts.c (GC_is_static_root): Define only if not THREADS. 4048* os_dep.c (GC_get_stack_base): Make public (for OpenBSD). 4049* os_dep.c (GC_page_was_ever_dirty): Comment out the function 4050except for PROC_VDB. 4051* tests/test.c (main): Don't reference GC_print_obj, 4052GC_make_closure, GC_debug_invoke_finalizer, 4053GC_page_was_ever_dirty, GC_is_fresh (in GC_noop). 4054* thread_local_alloc.c: Don't include "gc_inline.h". 4055* win32_threads.c (GC_write_fault_handler): Declare only if 4056MPROTECT_VDB. 4057 4058* allchblk.c (DEBUG): Remove macro (since unused). 4059* allchblk.c: Include private/gc_priv.h before other includes and 4060definitions. 4061* alloc.c: Likewise. 4062* gc_dlopen.c: Likewise. 4063* headers.c: Likewise. 4064* mallocx.c: Likewise. 4065* mark_rts.c: Likewise. 4066* new_hblk.c: Likewise. 4067* reclaim.c: Likewise. 4068* mark.c: Include private/gc_pmark.h before other includes. 4069* misc.c: Likewise. 4070* dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h. 4071* pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise. 4072* pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since 4073already defined in gc_config_macros.h). 4074* dyn_load.c (GC_init_dyld): Remove parameter cast for 4075_dyld_register_func_for_add_image() and 4076_dyld_register_func_for_remove_image(); add the comment about 4077possible warnings; add FIXME for the deprecated 4078_dyld_bind_fully_image_containing_address(). 4079* include/private/gc_priv.h: Include gc.h before the standard 4080headers inclusion. 4081* tests/test.c: Likewise. 4082* include/private/gcconfig.h (DebugBreak): Update the comment. 4083* typd_mlc.c (ED_INITIAL_SIZE): Remove ';'. 4084 4085* configure.ac (openbsd): Define GC_OPENBSD_THREADS. 4086* configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS). 4087* configure.ac: Add sparc-openbsd case. 4088* doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS): 4089Document. 4090* tests/test.c (main): Handle OpenBSD case. 4091* include/private/pthread_stop_world.h: Likewise. 4092* extra/threadlibs.c (main): Replace K&R-style function definition 4093with the ANSI C one. 4094* extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case. 4095* dyn_load.c (OPENBSD): Recognize (similar to NETBSD). 4096* include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize; 4097define it for OpenBSD. 4098* include/gc_pthread_redirects.h (GC_pthread_sigmask, 4099pthread_sigmask): Don't declare and redefine for OpenBSD. 4100* include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386, 4101amd64, powerpc). 4102* mach_dep.c (NO_GETCONTEXT): Likewise. 4103* include/private/pthread_stop_world.h (thread_stop_info): Don't 4104define last_stop_count field if OpenBSD. 4105* misc.c (GC_init_dyld): Add declaration (if NetBSD). 4106* misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD. 4107* os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD. 4108* os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable 4109(only if OpenBSD). 4110* os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd, 4111GC_skip_hole_openbsd): New static function (only if OpenBSD). 4112* os_dep.c (GC_get_stack_base, GC_get_main_stack_base, 4113GC_register_data_segments): Define specially for OpenBSD case. 4114* os_dep.c (GC_fault_handler_lock): Initialize to 4115AO_TS_INITIALIZER (instead of 0). 4116* pthread_support.c (GC_allocate_lock): Likewise. 4117* pthread_stop_world.c (NSIG, GC_print_sig_mask, 4118GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count, 4119GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART, 4120GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler, 4121GC_restart_handler): Don't define and use if OpenBSD. 4122* pthread_stop_world.c (GC_suspend_all, GC_stop_world, 4123GC_start_world): Handle OpenBSD case. 4124* pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD. 4125* pthread_support.c (pthread_sigmask): Don't undefine the macro and 4126don't define the wrapper function if OpenBSD. 4127* pthread_support.c (GC_thr_init): Handle OpenBSD case. 4128 4129* dyn_load.c: Move the inclusion of private/gc_priv.h below 4130definition of a feature macro (_GNU_SOURCE). 4131 4132* include/gc.h (REVEAL_POINTER): Remove redundant parentheses. 4133* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros 4134(only if GC_I_HIDE_POINTERS). 4135* backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_". 4136* dbg_mlc.c (GC_get_back_ptr_info): Likewise. 4137* finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize, 4138GC_enqueue_all_finalizers): Likewise. 4139* backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_". 4140* finalize.c (GC_general_register_disappearing_link, 4141GC_unregister_disappearing_link, GC_register_finalizer_inner, 4142GC_finalize): Likewise. 4143* include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise. 4144* include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead 4145of I_HIDE_POINTERS. 4146* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise. 4147* include/gc.h (_GC_H): Strip leading underscore. 4148* include/gc_backptr.h (_GC_H): Likewise. 4149* include/gc_gcj.h (_GC_H): Likewise. 4150* include/gc_mark.h (_GC_H): Likewise. 4151* include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise. 4152* include/javaxfc.h (_GC_H): Likewise. 4153* include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise. 4154* include/private/dbg_mlc.h (_GC_H): Likewise. 4155* include/private/gc_priv.h (_GC_H): Likewise. 4156 4157* gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>. 4158 4159* include/private/gc_priv.h (GC_INNER): New macro (for GC-scope 4160variable definitions). 4161* include/private/gc_priv.h (GC_EXTERN): Update the comment. 4162* allchblk.c (GC_unmap_threshold): Define as GC_INNER. 4163* alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects, 4164GC_n_memory, GC_fail_count): Likewise. 4165* blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise. 4166* gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise. 4167* mach_dep.c (GC_save_regs_ret_val): Likewise. 4168* mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds, 4169GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size, 4170GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small, 4171GC_mark_no, GC_markers): Likewise. 4172* mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise. 4173* misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap, 4174GC_print_all_smashed, GC_print_back_height, GC_dump_regularly, 4175GC_backtraces, GC_force_unmap_on_gcollect, 4176GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs, 4177GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise. 4178* os_dep.c (GC_page_size, GC_dont_query_stack_min, 4179GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots, 4180GC_dirty_maintained, GC_fault_handler_lock): Likewise. 4181* pthread_support.c (GC_allocate_ml, GC_lock_holder, 4182GC_need_to_lock, GC_thr_initialized, GC_threads, 4183GC_in_thread_creation, GC_collecting, GC_allocate_lock, 4184GC_mark_lock_holder): Likewise. 4185* reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors): 4186Likewise. 4187* win32_threads.c (GC_allocate_ml, GC_lock_holder, 4188GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise. 4189* extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC. 4190* mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}. 4191 4192* include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist, 4193GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS 4194case (since they are not defined inside GC at present). 4195* include/private/gc_priv.h (GC_objects_are_marked): Remove the 4196declaration (since made static). 4197* mark.c (GC_objects_are_marked): Define as STATIC. 4198* win32_threads.c (GC_thr_initialized, GC_in_thread_creation): 4199Likewise. 4200* mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used 4201to initialize GC_n_kinds). 4202* win32_threads.c (start_mark_threads): Adjust the comment. 4203 4204* alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static 4205function. 4206* backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise. 4207* mark_rts.c (add_roots_to_index): Likewise. 4208 4209* extra/gc.c: New file. 4210* Makefile.am (EXTRA_DIST): Add "extra/gc.c". 4211 4212* misc.c (GC_log): Remove the declaration; move the definition (to 4213the place where it is used); make STATIC. 4214* misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf() 4215to print open log failure. 4216* misc.c (GC_write): Don't abort on open log failure if the GC is 4217compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE). 4218 4219* include/private/gcconfig.h (USE_MMAP): Guard with ifndef. 4220 4221* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move 4222the variable declaration to gc_priv.h. 4223* alloc.c (GC_bytes_found, GC_unmap_threshold, 4224GC_force_unmap_on_gcollect): Likewise. 4225* dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise. 4226* finalize.c (GC_fail_count): Likewise. 4227* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder, 4228GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise. 4229* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size, 4230GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack, 4231GC_mark_stack_too_small, GC_mark_state): Likewise. 4232* include/private/pthread_support.h (GC_threads, 4233GC_thr_initialized, GC_in_thread_creation): Likewise. 4234* mallocx.c (GC_bytes_found): Likewise. 4235* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise. 4236* misc.c (GC_unmap_threshold): Likewise. 4237* os_dep.c (GC_unmap_threshold): Likewise. 4238* pthread_support.c (GC_markers): Likewise. 4239* thread_local_alloc.c (GC_gcjobjfreelist, 4240GC_gcj_malloc_initialized, GC_gcj_kind): Likewise. 4241* win32_threads.c (GC_fault_handler_lock, GC_write_cs, 4242GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise. 4243* include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as 4244a tag for now); defined after "gcconfig.h" inclusion. 4245* include/private/gc_priv.h: Use GC_EXTERN instead of "extern" 4246keyword for most global variables. 4247* alloc.c (GC_copyright): Add the comment about the symbol 4248visibility. 4249* finalize.c (GC_fo_entries): Likewise. 4250* include/private/gc_priv.h (GC_print_stats): Likewise. 4251* misc.c (GC_quiet): Likewise. 4252* mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable 4253STATIC. 4254* pthread_support.c (GC_threads): Add explicit zero initializer 4255(to make the variable definition differ from the declaration). 4256 4257* backgraph.c (GC_quiet): Remove the declaration (not needed 4258anymore since gc_priv.h is always included). 4259* checksums.c (GC_quiet): Likewise. 4260* gcj_mlc.c (GC_quiet): Likewise. 4261* headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the 4262comment. 4263* include/private/gc_hdrs.h (GC_hdr_cache_hits, 4264GC_hdr_cache_misses): Likewise. 4265* mark.c (GC_first_nonempty): Make the volatile variable STATIC. 4266* pthread_stop_world.c (GC_stop_count, GC_world_is_stopped): 4267Likewise. 4268* win32_threads.c (GC_please_stop, GC_max_thread_index, 4269GC_mark_mutex_waitcnt): Likewise. 4270 4271* pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and 4272'D') in the name. 4273 4274* gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen 4275redirection is turned off; turn it on later when dlopen real 4276symbol is no longer needed (according to the comment and the same 4277as in dyn_load.c). 4278* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and 4279REAL_DLFUNC, respectively (to have unique names since the 4280definitions may differ from that of the similar ones in 4281pthread_support.c). 4282* mark.c (source): Undefine the macro when no longer needed. 4283* os_dep.c (handler): Rename the type to GC_fault_handler_t (to 4284have the unique name across the project). 4285* os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the 4286comment. 4287* pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise. 4288* os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no 4289longer needed. 4290 4291* pthread_stop_world.c (pthread_sigmask): Undefine before using 4292in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment. 4293* win32_threads.c (dlopen, _beginthread): Don't undefine (since 4294neither redirected nor used here). 4295* win32_threads.c (GC_Thread_Rep): Rename "table_management" to 4296"tm" for short; remove "tm_" prefix. 4297* win32_threads.c (in_use, next): Don't define the macros; use 4298tm.in_use and tm.next fields, respectively (to ease debugging). 4299* win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have 4300unique name across the project). 4301 4302* include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h 4303inclusion. 4304* include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is 4305not included yet. 4306* finalize.c (I_HIDE_POINTERS): Don't define. 4307* include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise. 4308* misc.c (I_HIDE_POINTERS): Likewise. 4309* include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER, 4310GC_hidden_pointer): Don't define if HIDE_POINTER is undefined. 4311* include/private/gc_pmark.h: Remove the comment about gc_priv.h 4312inclusion order. 4313 4314* dyn_load.c: Include gc_priv.h before using configuration 4315information (MACOS). 4316* dyn_load.c (GC_must_restore_redefined_dlopen): Rename to 4317GC_MUST_RESTORE_REDEFINED_DLOPEN. 4318 4319* backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis 4320properly. 4321* darwin_stop_world.c: Replace "if DEBUG_THREADS" with 4322"ifdef DEBUG_THREADS". 4323* pthread_stop_world.c: Likewise. 4324* pthread_support.c: Likewise. 4325* include/gc_inline.h: Guard with GC_INLINE_H. 4326 4327* alloc.c (GC_copyright): Define as const. 4328* alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC" 4329(since the name starts with "GC_" prefix). 4330* dbg_mlc.c (GC_describe_type_fns): Likewise. 4331* dyn_load.c (GC_FirstDLOpenedLinkMap, 4332GC_register_dynlib_callback, GC_dyld_sections, 4333GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove): 4334Likewise. 4335* malloc.c (GC_libpthread_start, GC_libpthread_end, 4336GC_libld_start, GC_libld_end): Likewise. 4337* mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index): 4338Likewise. 4339* os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty, 4340GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify, 4341GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus, 4342GC_forward_exception): Likewise. 4343* pthread_support.c (GC_syms_initialized): Likewise. 4344* typd_mlc.c (GC_push_typed_structures_proc): Likewise. 4345* win32_threads.c (GC_win32_dll_threads, 4346GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min, 4347GC_waitForSingleObjectInfinite): Likewise. 4348* darwin_stop_world.c (GC_use_mach_handler_thread, 4349GC_use_mach_handler_thread, GC_mach_threads_count): Replace 4350"static" with "STATIC" and add zero initializer. 4351* os_dep.c (GC_task_self, GC_ports, GC_mprotect_state, 4352GC_sigbus_count): Likewise. 4353* headers.c (free_hdr): Replace "static" with GC_INLINE. 4354* misc.c (GC_tmp): Rename static variable to fwrite_gc_res. 4355* os_dep.c (memory): Rename static variable to ecos_gc_memory. 4356* os_dep.c (async_set_pht_entry_from_index): Make static (for 4357MPROTECT_VDB case). 4358* pthread_support.c (GC_real_pthread_create, 4359GC_real_pthread_sigmask, GC_real_pthread_join, 4360GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro 4361for static GC_real_XXX symbols. 4362* win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix. 4363 4364* alloc.c (GC_finish_collection): Replace getenv() with GETENV(). 4365* dyn_load.c (GC_init_dyld): Likewise. 4366* os_dep.c (GC_print_callers): Likewise. 4367* dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name() 4368result (since it's always of "struct mach_header" type). 4369* dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and 4370GC_dyld_image_remove (to always have the first argument of 4371"struct mach_header" pointer type). 4372 4373* configure.ac: Add threads support for OpenBSD case (threads may 4374not work correctly for it). 4375 4376* acinclude.m4: Rename to m4/gc_set_version.m4. 4377* m4/libtool.m4: Delete the file. 4378* m4/lt~obsolete.m4: Likewise. 4379* m4/ltoptions.m4: Likewise. 4380* m4/ltsugar.m4: Likewise. 4381* m4/ltversion.m4: Likewise. 4382 4383* include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for 4384x86mingw32ce toolchain to workaround the incorrect DebugBreak() 4385declaration in winbase.h (the workaround would turn into a no-op 4386when DebugBreak() will be defined as a macro in the toolchain). 4387 4388* include/private/gcconfig.h: Recognize __i386__ if WinCE (for 4389x86mingw32ce toolchain). 4390* include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC 4391toolchain (or if already defined). 4392* include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always 4393defined for WinCE or if NO_GETENV is defined). 4394* misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of 4395NO_GETENV one. 4396 4397* configure.ac: Add AC_CONFIG_MACRO_DIR([m4]). 4398* Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4". 4399* libtool.m4: Remove. 4400* m4/libtool.m4: New file (generated). 4401* m4/lt~obsolete.m4: Likewise. 4402* m4/ltoptions.m4: Likewise. 4403* m4/ltsugar.m4: Likewise. 4404* m4/ltversion.m4: Likewise. 4405 4406* include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro; 4407prefix GC_CreateThread and GC_ExitThread with '_' if defined. 4408* doc/README.macros (GC_UNDERSCORE_STDCALL): Document. 4409 4410* alloc.c (GC_collect_or_expand): Add "retry" argument; add the 4411comments; don't use "default" stop_func on a retry if 4412GC_dont_expand. 4413* alloc.c (GC_allocobj): Pass "retry" argument to 4414GC_collect_or_expand(). 4415* malloc.c (GC_alloc_large): Likewise. 4416* include/private/gc_priv.h (GC_collect_or_expand): Move the 4417declaration to malloc.c; add "retry" argument. 4418 4419* alloc.c (GC_start_call_back): Move the variable definition from 4420misc.c. 4421* include/private/gc_priv.h (GC_start_call_back): Remove the 4422declaration. 4423* alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0. 4424* alloc.c (GC_try_to_collect_inner): Also call stop_func at the 4425beginning of the function. 4426* include/gc.h (GC_try_to_collect): Refine the comment about 4427stop_func. 4428 4429* alloc.c (GC_default_stop_func, GC_try_to_collect_general, 4430GC_gcollect): Add the comment. 4431* alloc.c (GC_try_to_collect_general): Move the assertion on 4432stop_func != 0 to GC_try_to_collect(). 4433* alloc.c (GC_try_to_collect_general): If stop_func == 0 then use 4434GC_default_stop_func instead (holding the lock). 4435* alloc.c (GC_gcollect): Pass 0 as stop_func instead of 4436GC_default_stop_func (to prevent data races). 4437 4438* Makefile.direct: Move "define arguments" documentation to 4439doc/README.macros; add reference to doc/README.macros. 4440* Makefile.dj: Change the documentation reference to 4441doc/README.macros. 4442* README.QUICK: Likewise. 4443* configure.ac: Likewise. 4444* allchblk.c: Remove unnecessary "-D" from the comment. 4445* doc/README.macros: Likewise. 4446* README.environment: Likewise. 4447* include/gc.h: Likewise. 4448* include/gc_inline.h: Likewise. 4449* include/private/gcconfig.h: Likewise. 4450* README.QUICK: Fix a typo. 4451 4452* misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for 4453CreateFile(); don't immediately flush every write if very verbose. 4454 4455* doc/README.win32: Replace ".exe.log" to ".gc.log". 4456* doc/README.win64: Likewise. 4457* doc/README.win64: Fix a typo. 4458* misc.c (GC_CreateLogFile): Strip executable file extension for 4459the log file; use ".gc.log" extension (instead of ".log"). 4460 4461* include/gc_config_macros.h: Avoid the redefinition of 4462GC_xxx_THREADS macros. 4463 4464* alloc.c (GC_try_to_collect_general): Change the type of "result" 4465local variable to GC_bool. 4466 4467* include/gc_config_macros.h: Use old behavior for FreeBSD and 4468NetBSD platform detection code (check that other GC_xxx_THREADS 4469are undefined); add FIXME. 4470 4471* include/gc_config_macros.h: Rearrange the platform detection 4472code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define 4473GC_THREADS first if GC_XXX_THREADS already set; define proper 4474GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single 4475place; define _REENTRANT if posix threads except for Win32). 4476 4477* alloc.c (GC_try_to_collect_general): New function (move the code 4478from GC_try_to_collect, pass force_unmap argument). 4479* alloc.c (GC_try_to_collect, GC_gcollect): Call 4480GC_try_to_collect_general(). 4481* alloc.c (GC_gcollect_and_unmap): New public function. 4482* include/gc.h (GC_gcollect_and_unmap): New function declaration. 4483* tests/test.c (window_proc): Call GC_gcollect_and_unmap() on 4484WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect() 4485and GC_gcollect()). 4486 4487* include/gc.h (GC_allow_register_threads, GC_register_my_thread, 4488GC_unregister_my_thread, GC_malloc_many): Refine the comment. 4489* include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally 4490(that is, don't depend on GC_THREADS macro). 4491* include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along 4492with a check for GC_PTHREADS (since the former implies the 4493latter). 4494 4495* include/gc.h (GC_SOLARIS_THREADS): Don't check for. 4496* include/gc.h (GC_MIN, GC_MAX): Don't define. 4497* mallocx.c (GC_malloc_many): Add comment to #endif. 4498 4499* configure.ac: Drop the subdir-objects Automake option, since 4500it's incompatible with picking source files from libatomic_ops. 4501 4502* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add 4503"extern" keyword to a global variable declaration (some compilers 4504require it). 4505* alloc.c (GC_bytes_found, GC_unmap_threshold, 4506GC_force_unmap_on_gcollect): Likewise. 4507* dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise. 4508* finalize.c (GC_fail_count): Likewise. 4509* include/private/gc_hdrs.h (GC_hdr_cache_hits, 4510GC_hdr_cache_misses): Likewise. 4511* mallocx.c (GC_bytes_found): Likewise. 4512* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise. 4513* misc.c (GC_unmap_threshold): Likewise. 4514* os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise. 4515* pthread_support.c (GC_markers): Likewise. 4516* thread_local_alloc.c (GC_gcjobjfreelist, 4517GC_gcj_malloc_initialized, GC_gcj_kind): Likewise. 4518* win32_threads.c (GC_fault_handler_lock, GC_write_cs, 4519GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise. 4520 4521* tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to 4522suppress misleading GC "Out of Memory!" warning printed on every 4523GC_MALLOC(LONG_MAX) call. 4524* tests/huge_test.c: Include "gc.h" instead of <gc.h>. 4525* tests/huge_test.c (main): Replace K&R-style function definition 4526with the ANSI C one. 4527 4528* dyn_load.c (GC_register_dynamic_libraries): Always use 4529lpMaximumApplicationAddress value for WinCE (even for old 4530versions). 4531* os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h. 4532* os_dep.c (GC_dont_query_stack_min): New global variable (only if 4533WinCE and THREADS). 4534* os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress 4535for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set 4536GC_dont_query_stack_min for older WinCE (prior to version 5). 4537* win32_threads.c (GC_dont_query_stack_min): Declare. 4538* win32_threads.c (GC_get_stack_min): Rename the macro to 4539GC_wince_evaluate_stack_min for WinCE; update the comment. 4540* win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use 4541GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for 4542WinCE and don't update thread's last_stack_min value (only if 4543GC_dont_query_stack_min). 4544* win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if 4545GC_dont_query_stack_min (since the evaluated stack_min value may 4546be incorrect if the stack is bigger than 64 KiB). 4547 4548* gc_dlopen.c (GC_dlopen): Add function redirector (only if 4549GC_USE_LD_WRAP). 4550* include/gc.h: Include "gc_pthread_redirects.h" even if 4551GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. 4552* include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't 4553define and check for (since included only from gc.h). 4554* include/gc_pthread_redirects.h: Declare "GC_" symbols even if 4555GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. 4556* include/gc_pthread_redirects.h: Include signal.h only to get 4557sigset_t definition. 4558 4559* Makefile.direct: Document GC_REGISTER_MEM_PRIVATE. 4560* mark_rts.c (GC_is_tmp_root): Define also for WinCE unless 4561NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE). 4562* os_dep.c (GC_sysinfo): Remove explicit global variable 4563initialization to "{0}" (revert back the previous change) since it 4564might produce a warning. 4565 4566* allchblk.c (GC_large_alloc_warn_interval): Move declaration from 4567gc_priv.h. 4568* allchblk.c (GC_large_alloc_warn_suppressed): Move definition 4569from misc.c; define as STATIC. 4570* include/private/gc_priv.h (GC_large_alloc_warn_interval, 4571GC_large_alloc_warn_suppressed): Remove declaration. 4572* alloc.c (GC_bytes_found): Add "defined in" comment. 4573* mallocx.c (GC_bytes_found): Likewise. 4574* misc.c (GC_unmap_threshold): Likewise. 4575* os_dep.c (GC_old_allocator): Likewise. 4576* pthread_support.c (GC_markers): Likewise. 4577* thread_local_alloc.c (GC_gcjobjfreelist, 4578GC_gcj_malloc_initialized, GC_gcj_kind): Likewise. 4579* win32_threads.c (GC_markers): Likewise. 4580* alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to 4581be distinctive from a variable declaration). 4582* backgraph.c (GC_max_height, GC_deepest_obj): Likewise. 4583* blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl, 4584GC_old_stack_bl, GC_incomplete_stack_bl): Likewise. 4585* checksums.c (GC_faulted, GC_n_dirty_errors, 4586GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean, 4587GC_n_dirty, GC_bytes_in_used_blocks): Likewise. 4588* dbg_mlc.c (GC_smashed): Likewise. 4589* finalize.c (GC_old_dl_entries): Likewise. 4590* gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist, 4591GC_gcjdebugobjfreelist): Likewise. 4592* mach_dep.c (GC_save_regs_ret_val): Likewise. 4593* mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit, 4594GC_mark_stack_top): Likewise. 4595* misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset): 4596Likewise. 4597* os_dep.c (GC_data_start, GC_page_size, GC_sysinfo, 4598GC_old_segv_handler, GC_old_bus_handler, 4599GC_old_bus_handler_used_si, GC_old_segv_handler_used_si, 4600GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise. 4601* pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise. 4602* reclaim.c (GC_leaked): Likewise. 4603* typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors, 4604GC_typed_mark_proc_index, GC_array_mark_proc_index, 4605GC_eobjfreelist, GC_arobjfreelist): Likewise. 4606* win32_threads.c (GC_pthread_map_cache, GC_marker_cv, 4607GC_marker_Id): Likewise. 4608* dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC. 4609* gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise. 4610* os_dep.c (GC_vd_base): Likewise. 4611* pthread_support.c (GC_mark_threads): Likewise. 4612* reclaim.c (GC_leaked): Likewise. 4613* typd_mlc.c (GC_bm_table): Likewise. 4614* mark_rts.c (GC_save_regs_ret_val): Change declaration type to 4615that of definition; add "defined in" comment. 4616* mark_rts.c (GC_push_current_stack): Remove unnecessary cast for 4617GC_save_regs_ret_val. 4618* misc.c (GC_check_heap, GC_print_all_smashed, 4619GC_start_call_back): Remove unnecessary cast (of 0). 4620* misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro. 4621* misc.c (GC_large_alloc_warn_interval): Initialize to 4622GC_LARGE_ALLOC_WARN_INTERVAL value. 4623* misc.c (GC_tmp): Change to "static". 4624* os_dep.c (GC_mprotect_state): Define as static. 4625* pthread_support.c (dummy_thread_local): Prefix with "GC_". 4626* win32_threads.c (WinMain): Remove FIXME for WinCE. 4627 4628* os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages. 4629 4630* configure.ac: Rewrite the tests for external or internal 4631libatomic_ops. 4632* configure.ac: In particular, drop the symbolic links. Add option 4633--with-libatomic-ops for forced selection. 4634* Makefile.am: Adjust the path of source files from libatomic_ops 4635to not use the links. 4636* Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will 4637be empty if we use the bundled AO sources. 4638 4639* Makefile.am: Strip version suffix for libatomic_ops directory. 4640* build_atomic_ops.sh: Likewise. 4641* build_atomic_ops.sh.cygwin: Likewise. 4642* configure_atomic_ops.sh: Likewise. 4643* Makefile.direct: Remove AO_VERSION definition; strip version 4644suffix for libatomic_ops directory. 4645* NT_STATIC_THREADS_MAKEFILE: Likewise. 4646* NT_X64_STATIC_THREADS_MAKEFILE: Likewise. 4647* NT_X64_THREADS_MAKEFILE: Likewise. 4648* gc.mak: Likewise. 4649 4650* libatomic_ops: Rename from "libatomic_ops-1.2". 4651 4652* alloc.c (GC_version): Add "const" keyword. 4653* alloc.c (GC_get_version): New public function. 4654* include/gc.h (GC_get_version): New function declaration; update 4655the comment for the GC version. 4656 4657* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder, 4658GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern" 4659(for the global variable declaration) again. 4660* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size, 4661GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack, 4662GC_mark_stack_too_small, GC_mark_state): Likewise. 4663* include/private/gcconfig.h (GC_register_stackbottom): Likewise. 4664* include/private/pthread_support.h (GC_threads, 4665GC_thr_initialized, GC_in_thread_creation): Likewise. 4666* include/private/gc_priv.h: Likewise. 4667 4668* real_malloc.c: Include private/config.h if HAVE_CONFIG_H. 4669 4670* allchblk.c (GC_hblkfreelist): Define as STATIC. 4671* blacklst.c (GC_total_stack_black_listed): Likewise. 4672* include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark, 4673GC_total_stack_black_listed, GC_push_stubborn_structures): Remove 4674declaration. 4675* mark_rts.c (GC_stopped_mark): Add declaration (only if 4676THREAD_LOCAL_ALLOC). 4677* allchblk.c (GC_fail_count): Move the declaration out of 4678GC_allochblk_nth(); remove "extern". 4679* alloc.c (IF_THREADS): Remove unused macro. 4680* alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC. 4681* alloc.c (GC_stopped_mark): Set GC_world_stopped value only if 4682THREAD_LOCAL_ALLOC. 4683* alloc.c (GC_bytes_found, GC_collection_in_progress, 4684GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect): 4685Remove K&R-style "extern" for the declaration. 4686* dbg_mlc.c (GC_free_inner): Likewise. 4687* dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base, 4688GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise. 4689* finalize.c (GC_fail_count): Likewise. 4690* include/private/gc_hdrs.h (GC_hdr_cache_hits, 4691GC_hdr_cache_misses): Likewise. 4692* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder, 4693GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock): 4694Likewise. 4695* include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs, 4696GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top, 4697GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise. 4698* include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds, 4699GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory, 4700GC_page_size, GC_sysinfo, GC_black_list_spacing, 4701GC_objects_are_marked, GC_incremental, GC_dirty_maintained, 4702GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval, 4703GC_large_alloc_warn_suppressed, GC_blocked_sp, 4704GC_activation_frame, GC_push_other_roots, 4705GC_push_finalizer_structures, GC_push_thread_structures, 4706GC_push_typed_structures, GC_start_call_back, GC_is_initialized, 4707GC_check_heap, GC_print_all_smashed, GC_print_all_errors, 4708GC_print_heap_obj, GC_have_errors, GC_print_stats, 4709GC_dump_regularly, GC_backtraces, GC_print_back_height, 4710GC_debug_generic_malloc_inner, 4711GC_debug_generic_malloc_inner_ignore_off_page, 4712GC_fl_builder_count, GC_mark_no, GC_help_marker, 4713GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise. 4714* include/private/gcconfig.h (GC_SysVGetDataStart, 4715GC_FreeBSDGetDataStart, GC_register_stackbottom, 4716GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise. 4717* include/private/pthread_support.h (GC_threads, 4718GC_thr_initialized, GC_in_thread_creation): Likewise. 4719* malloc.c (GC_text_mapping): Likewise. 4720* mallocx.c (GC_bytes_found): Likewise. 4721* mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise. 4722* mark_rts.c (GC_save_regs_ret_val): Likewise. 4723* misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32, 4724GC_setpagesize, GC_init_linux_data_start, 4725GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise. 4726* os_dep.c (GC_unmap_threshold, GC_push_all_stacks, 4727GC_darwin_register_mach_handler_thread): Likewise. 4728* pthread_support.c (GC_markers, GC_collection_in_progress): 4729Likewise. 4730* tests/test.c (GC_amiga_free_all_mem): Likewise. 4731* thread_local_alloc.c (GC_gcjobjfreelist, 4732GC_gcj_malloc_initialized, GC_gcj_kind): Likewise. 4733* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init, 4734GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise. 4735* misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld): 4736Move the declaration out of GC_init(); remove "extern". 4737* os_dep.c (GC_abort): Add the comment; add workaround to suppress 4738compiler "unreachable code" warnings for ABORT callers (where 4739ABORT is followed by a dummy return statement). 4740* os_dep.c (GC_old_allocator): Move the declaration out of 4741GC_default_push_other_roots(); remove "extern". 4742* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume): 4743Move the declaration out of GC_stop_world() and GC_start_world() 4744(only if MPROTECT_VDB); remove "extern". 4745 4746* win32_threads.c (GC_get_stack_min, GC_push_stack_for, 4747GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for 4748WinCE emulation and for custom WinCE 6 devices); add the comment. 4749* win32_threads.c (GC_get_stack_min): Cast pointer to word instead 4750of DWORD. 4751* win32_threads.c (GC_get_next_stack): Don't use and maintain the 4752latest known stack_min value for WinCE (if GC_get_stack_min is 4753defined as a macro); update the comments. 4754* win32_threads.c (GC_wnt): Don't declare for WinCE. 4755 4756* Makefile.direct: Document EMPTY_GETENV_RESULTS. 4757* gcj_mlc.c (GC_clear_stack): Remove declaration. 4758* malloc.c (GC_clear_stack): Likewise. 4759* mallocx.c (GC_clear_stack): Likewise. 4760* typd_mlc.c (GC_clear_stack): Likewise. 4761* gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to 4762GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively; 4763remove "lb" unnecessary cast to word. 4764* include/private/gc_priv.h (GC_clear_stack): Add declaration. 4765* include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP): 4766Move common declaration from typd_mlc.c and malloc.c; remove 4767unnecessary result and "lb" parameter casts. 4768* include/private/thread_local_alloc.h: Guard against duplicate 4769header file inclusion. 4770* os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for 4771the case when USE_MMAP is not defined. 4772* pthread_support.c (GC_is_thread_tsd_valid): New internal 4773function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the 4774code from thread-local GC_malloc(); add FIXME for the condition. 4775* win32_threads.c (GC_is_thread_tsd_valid): Likewise. 4776* thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to 4777match that of its definition). 4778* thread_local_alloc.c (GC_destroy_thread_local): Add a cast for 4779GC_gcjobjfreelist. 4780* thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner): 4781Remove unused declaration; don't include pthread.h. 4782* thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration 4783(only if GC_ASSERTIONS). 4784* thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid() 4785instead of GC_lookup_thread(). 4786* win32_threads.c (GC_lookup_thread_inner): Define as STATIC. 4787* win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have 4788id different from that in os_dep.c). 4789 4790* allchblk.c (GC_enough_large_bytes_left): Replace "inline static" 4791with GC_INLINE. 4792* include/private/gc_priv.h (fixed_getenv): Likewise. 4793* alloc.c (GC_max, GC_min): Replace "static INLINE" with 4794GC_INLINE. 4795* mark_rts.c (rt_hash): Likewise. 4796* win32_threads.c (GC_get_max_thread_index): Likewise. 4797* include/private/gc_priv.h (INLINE): Prefix with "GC_"; include 4798"static"; define for Sun CC; define for VC++ (and other 4799compilers). 4800* pthread_support.c: Don't define __inline__ for non-GNU compilers 4801(not needed anymore). 4802 4803* NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak). 4804* Makefile.in: Remove reference to NT_THREADS_MAKEFILE. 4805* Makefile.am: Likewise. 4806* Makefile.dj: Likewise. 4807* Makefile.direct: Likewise. 4808* doc/README.win32: Add reference to gc.mak. 4809* NT_X64_THREADS_MAKEFILE: Likewise. 4810 4811* Makefile.direct: Remove references to acinclude.m4, libtool.m4. 4812 4813* autogen.sh: Update. 4814 4815* Makefile.am: Don't add libtool.m4 to EXTRA_DIST. 4816* acinclude.m4: Fix underquoting of GC_SET_VERSION. 4817* README.QUICK: Update information for Makefile. 4818* Makefile.am: Do not distribute the substituted bdw-gc.pc. 4819* configure.ac: Add AM conditional analog to KEEP_BACK_PTRS. 4820* tests/tests.am: Use it here to conditionally enable tracetest 4821when possible. 4822 4823* dyn_load.c (GC_wnt): Update the comment. 4824* dyn_load.c (GC_register_dynamic_libraries): Add the comment for 4825_WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new 4826macro); call GC_is_heap_base() only if check for Type succeeded. 4827 4828* mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING; 4829update the comment. 4830* include/private/gc_priv.h (GC_is_tmp_root): Remove declaration. 4831 4832* include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros. 4833* include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL, 4834ASSERT_CANCEL_DISABLED): New macros. 4835* alloc.c (GC_maybe_gc): Assert cancellation disabled. 4836(GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand): 4837Disable cancellation. 4838(GC_add_to_our_memory): Check for overflow. 4839* misc.c (GC_cancel_disable_count): declare. 4840(GC_init, GC_write): Disable cancellation. 4841(GC_init): Remove redundant GC_is_initialized test. 4842* os_dep.c (GC_repeat_read): Assert cancellation disabled. 4843(GC_get_stack_base): Disable cancellation. 4844* pthread_stop_world.c (GC_suspend_handler_inner): Disable 4845cancellation. 4846* pthread_support.c (GC_mark_thread): Permanently disable 4847cancellation. 4848(GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker): 4849Assert cancellation disabled. 4850(fork handling): Disable cancellation, fix comment. 4851(GC_pthread_create): Disable cancellation. 4852(GC_unregister_my_thread): Disable cancellation. 4853* Makefile.direct: Document NO_CANCEL_SAFE. 4854 4855* Makefile: Remove outdated file (Makefile.direct should be used 4856instead). 4857 4858* include/gc.h (GC_use_DllMain): Refine the comment. 4859 4860* configure.ac: Add documentation to AC_DEFINE for GC_THREADS and 4861EMPTY_GETENV_RESULTS. 4862* configure.ac: Fix a typo. 4863* Makefile.am: Likewise. 4864 4865* checksums.c (GC_checksum, GC_update_check_page): Remove 4866"register" keyword in local variable declarations (for the code 4867used only for debugging or which is not time-critical). 4868* dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info, 4869GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj, 4870GC_print_smashed_obj, GC_debug_end_stubborn_change, 4871GC_debug_invoke_finalizer): Likewise. 4872* dyn_load.c (GC_register_dynamic_libraries): Likewise. 4873* mallocx.c (GC_realloc): Likewise. 4874* mark_rts.c (GC_print_static_roots, GC_is_static_root, 4875GC_clear_roots): Likewise. 4876* misc.c (GC_write): Likewise. 4877* os_dep.c (GC_print_callers): Likewise. 4878* dyn_load.c (GC_register_dynamic_libraries): Rename "i" local 4879variable to "j" for the nested loop (just not to hide the similar 4880variable in the outer one). 4881* mark_rts.c (GC_print_static_roots): Output an error message 4882using GC_err_printf() (instead of GC_printf()). 4883 4884* configure.ac: Move include flag from ${INCLUDE} ... 4885* Makefile.am: ... to AM_CPPFLAGS and also add the build directory. 4886* configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]). 4887* configure.ac: Add documentation to all AC_DEFINE either directly 4888or using AH_TEMPLATE. 4889 4890* win32_threads.c (GC_waitForSingleObjectInfinite): New static 4891function (only if GC_WINMAIN_REDIRECT). 4892* win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite() 4893thru GC_do_blocking() instead of calling WaitForSingleObject() 4894directly. 4895 4896* pthread_support.c (start_mark_threads): Refine printed message. 4897* win32_threads.c (GC_thr_init): Likewise. 4898 4899* Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for. 4900* Makefile.direct (NO_GETENV): Update the comment. 4901* include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro. 4902* include/gc.h (GC_WinMain): Remove declaration. 4903* include/gc.h (WinMain): Define (as GC_WinMain) if and only if 4904GC_WINMAIN_REDIRECT. 4905* tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of 4906WinCE target unless GC_WINMAIN_REDIRECT is defined. 4907* tests/test.c (WINMAIN_LPTSTR): New macro. 4908* tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR 4909and GC_WINMAIN_WINCE_LPTSTR. 4910* win32_threads.c (start_mark_threads): Add the comment for 4911MARK_THREAD_STACK_SIZE. 4912* win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro. 4913* win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New 4914macro (only if GC_WINMAIN_REDIRECT). 4915* win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT. 4916* win32_threads.c (GC_WinMain): Add prototype (only if 4917GC_WINMAIN_REDIRECT). 4918* win32_threads.c (main_thread_args, WinMain): Rename 4919GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR. 4920* win32_threads.c (WinMain): Call GC_INIT() instead of GC_init(); 4921use WINMAIN_THREAD_STACK_SIZE. 4922* win32_threads.c (WinMain): Call GC_deinit() and 4923DeleteCriticalSection() only if WinCE; add FIXME. 4924 4925* os_dep.c (GC_get_main_stack_base): add assertion for mem_base 4926value returned by GC_get_stack_base(). 4927 4928* Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT): 4929Add the comment for. 4930* alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect): 4931Declare external variable (only if USE_MUNMAP). 4932* alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold 4933value to 1 if GC_force_unmap_on_gcollect and restore it before 4934unlocking (only if USE_MUNMAP). 4935* doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add 4936information for. 4937* include/gc.h (GC_set_force_unmap_on_gcollect, 4938GC_get_force_unmap_on_gcollect): New public function prototype. 4939* include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is 4940recognized. 4941* misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise. 4942* include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New 4943internal macro (used by GC_INIT only). 4944* misc.c (GC_force_unmap_on_gcollect): New global variable. 4945* misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT" 4946environment variable (and set GC_force_unmap_on_gcollect). 4947* misc.c (GC_set_force_unmap_on_gcollect, 4948GC_get_force_unmap_on_gcollect): New public function. 4949* tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect 4950to force the mode on if WM_HIBERNATE; restore the mode after 4951GC_gcollect(). 4952 4953* Makefile.direct (LARGE_CONFIG): Update information. 4954* include/gc.h (GC_stop_func): Refine the comment. 4955 4956* configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for 4957Win32 (workaround for Wine bug). 4958 4959* allchblk.c (GC_freehblk): Adjust local variables indentation. 4960* mallocx.c (GC_generic_malloc_many): Likewise. 4961* typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page, 4962GC_calloc_explicitly_typed): Likewise. 4963* typd_mlc.c (GC_make_array_descriptor): Remove unnecessary 4964brackets. 4965 4966* configure.ac: Replace GC_WIN32_THREADS with GC_THREADS. 4967* configure.ac: Process enable_parallel_mark option for Cygwin and 4968Win32; define THREAD_LOCAL_ALLOC for Win32. 4969 4970* include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if 4971PARALLEL_MARK (required for VC++ x86). 4972 4973* dbg_mlc.c (GC_generate_random_backtrace): Call 4974GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect(); 4975if GC is disabled then print error message and return. 4976* include/gc.h (GC_try_to_collect): Refine the comment. 4977* include/private/gc_priv.h (GC_never_stop_func): Fix return type; 4978refine the comment. 4979 4980* add_gc_prefix.c: Move the file to the new "extra" directory. 4981* AmigaOS.c: Likewise. 4982* gcname.c: Likewise. 4983* if_mach.c: Likewise. 4984* if_not_there.c: Likewise. 4985* MacOS.c: Likewise. 4986* msvc_dbg.c: Likewise. 4987* setjmp_t.c: Likewise. 4988* threadlibs.c: Likewise. 4989* EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory. 4990* Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c, 4991if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c 4992with "extra" directory. 4993* Makefile.am: Likewise. 4994* Makefile.direct: Likewise. 4995* Makefile.dj: Likewise. 4996* Makefile.in: Likewise. 4997* NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory. 4998* NT_STATIC_THREADS_MAKEFILE: Likewise. 4999* NT_X64_STATIC_THREADS_MAKEFILE: Likewise. 5000* NT_X64_THREADS_MAKEFILE: Likewise. 5001* NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory. 5002* gc.mak: Likewise. 5003* PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra" 5004directory. 5005* SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra" 5006directory. 5007* doc/simple_example.html: Update for threadlibs.c. 5008* os_dep.c: Prepend included AmigaOS.c with "extra" directory. 5009 5010* include/gc.h (GC_do_blocking, GC_call_with_gc_active): New 5011function prototype. 5012* include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the 5013single-threaded case) with an assertion check for the state to be 5014not a "do-blocking" one. 5015* include/private/gc_priv.h (blocking_data): Move the structure 5016definition from pthread_support.c; change "fn" return type to void 5017pointer. 5018* include/private/gc_priv.h (GC_activation_frame_s): New structure 5019type. 5020* include/private/gc_priv.h (GC_push_all_stack_frames): New 5021function declaration (only if THREADS). 5022* include/private/gc_priv.h (GC_world_stopped): Don't declare 5023unless THREADS. 5024* include/private/gc_priv.h (GC_blocked_sp, 5025GC_activation_frame_s): New declaration (only if not THREADS). 5026* include/private/gc_priv.h (GC_push_all_register_frames): New 5027function declaration (only for IA-64). 5028* include/private/gc_priv.h (NURSERY, GC_push_proc): Remove 5029obsolete (unused) symbols. 5030* include/private/gc_priv.h (GC_push_all_stack_partially_eager): 5031Remove declaration (since it is static now). 5032* mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c 5033(for code locality) and make STATIC. 5034* mark_rts.c (GC_push_all_register_frames): New function (only for 5035IA-64). 5036* mark_rts.c (GC_push_all_stack_frames): New function (only if 5037THREADS). 5038* mark_rts.c (GC_add_trace_entry): New function prototype (used by 5039GC_push_all_stack_partially_eager(), only if TRACE_BUF). 5040* mark_rts.c (GC_push_all_stack_part_eager_frames): New function. 5041* mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a 5042function body (only for IA-64). 5043* mark_rts.c (GC_push_current_stack): Call 5044GC_push_all_stack_part_eager_frames() instead of 5045GC_push_all_stack_partially_eager(). 5046* mark_rts.c (GC_push_current_stack): Call 5047GC_push_all_register_frames() instead of GC_push_all_eager() for 5048IA-64 backing store. 5049* misc.c (GC_do_blocking_inner): Declare function (if THREADS 5050only). 5051* misc.c (GC_blocked_sp, GC_blocked_register_sp, 5052GC_activation_frame): New global variables (only if not THREADS). 5053* misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API 5054function (only if not THREADS). 5055* misc.c (GC_do_blocking): Move the function from 5056pthread_support.c. 5057* include/private/pthread_support.h (GC_Thread_Rep): Add 5058"activation_frame" field. 5059* pthread_stop_world.c (GC_push_all_stacks): Call 5060GC_push_all_stack_frames() and GC_push_all_register_frames instead 5061of GC_push_all_stack() and/or GC_push_all_eager(); don't check for 5062STACK_GROWS_UP here. 5063* pthread_support.c (GC_do_blocking_inner): Remove "static"; store 5064"fn" result back to "client_data" field. 5065* pthread_support.c (GC_call_with_gc_active): New API function. 5066* win32_threads.c (GC_call_with_gc_active): Likewise. 5067* win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and 5068"activation_frame" fields. 5069* win32_threads.c (GC_new_thread): Add assertion checking for 5070thread_blocked_sp is NULL. 5071* win32_threads.c (GC_do_blocking_inner): New function. 5072* win32_threads.c (GC_stop_world): Don't suspend a thread if its 5073thread_blocked_sp is non-NULL. 5074* win32_threads.c (GC_push_stack_for): Use thread 5075"activation_frame" (if non-NULL); use "thread_blocked_sp" if 5076non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the 5077thread before modifying its last_stack_min; call 5078GC_push_all_stack_frames() instead of GC_push_all_stack(); update 5079the comments. 5080 5081* alloc.c (GC_default_stop_func): New static variable (initialized 5082to GC_never_stop_func). 5083* alloc.c (GC_set_stop_func, GC_get_stop_func): New function. 5084* alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func 5085(instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK), 5086else call GC_default_stop_func() before getting "current_time". 5087* alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for 5088FIXME comment). 5089* alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for 5090replacing GC_never_stop_func with GC_default_stop_func (if 5091possible). 5092* alloc.c (GC_gcollect): Use GC_default_stop_func. 5093* alloc.c (GC_collect_or_expand): Use GC_default_stop_func 5094(instead of GC_never_stop_func) unless it is trigged due to out of 5095memory; don't increment GC_fail_count and don't output warning 5096(before trying to collect again) in case the collection has been 5097interrupted (by GC_default_stop_func) and the heap expansion has 5098failed too. 5099* include/gc.h (GC_set_stop_func, GC_get_stop_func): New function 5100prototypes. 5101 5102* os_dep.c (GC_get_stack_base): Add FIXME; add assertion for 5103GC_get_writable_length() result. 5104 5105* configure.ac: Don't use -lpthread -ldl for Cygwin. 5106 5107* NT_THREADS_MAKEFILE: Make it back equal to gc.mak. 5108 5109* include/private/gcconfig.h (GWW_VDB): Undefine if 5110USE_GLOBAL_ALLOC (since incompatible). 5111* os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB 5112is defined. 5113* os_dep.c (GC_unmap_threshold): Declare (for use in 5114GC_init_win32) if USE_MUNMAP. 5115* os_dep.c (GC_init_win32): Turn off memory unmapping if 5116GlobalAlloc() is used. 5117* os_dep.c (GC_win32_get_mem): Define and use new 5118VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless 5119MPROTECT_VDB is in use. 5120 5121* Makefile: Replace "version.h" with "include/gc_version.h". 5122* include/gc_version.h: Likewise. 5123 5124* alloc.c (GC_collect_or_expand): Output heap size in WARN() 5125(before returning FALSE) for convenience. 5126 5127* allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format 5128string. 5129* pthread_support.c (start_mark_threads, GC_thr_init): Likewise. 5130* win32_threads.c (GC_delete_thread): Likewise. 5131* include/private/gc_priv.h (GC_PRIdPTR): New macro. 5132* pthread_stop_world.c (GC_suspend_handler_inner): Remove 5133unnecessary cast for WARN argument. 5134* pthread_support.c (start_mark_threads): if pthread_create() 5135failed then don't try to create other marker threads and (after 5136printing a warning) adjust GC_markers and GC_parallel values; log 5137GC_markers value (possibly adjusted) after that. 5138 5139* win32_threads.c (start_mark_threads): if pthread_create() is 5140failed then don't try to create other marker threads and (after 5141printing a warning) adjust GC_markers and GC_parallel values. 5142* win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move 5143the definition upper (to be visible in start_mark_threads()). 5144* win32_threads.c (start_mark_threads): if CreateThread() or 5145_beginthreadex() is failed then don't try to create other marker 5146threads and (after printing a warning) adjust GC_markers, 5147GC_parallel values, and destroy the event objects (either only 5148some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if 5149not a single thread is created). 5150* win32_threads.c (GC_thr_init): Log GC_markers value (possibly 5151adjusted) after start_mark_threads() call. 5152 5153* Makefile.am: Back remove "GC_" prefix for PTHREADS, 5154DARWIN_THREADS, WIN32_THREADS (for configure.ac). 5155 5156* include/private/gc_priv.h: Change include of config.h to 5157private/config.h. 5158* include/private/gc_pmark.h: Likewise. 5159* gc_cpp.cc: Likewise. 5160* tests/test.c: Likewise. 5161* tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H); 5162undefine GC_BUILD. 5163 5164* finalize.c (GC_general_register_disappearing_link): Return 5165GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2, 5166respectively). 5167* include/gc.h (GC_NO_MEMORY): New macro (defined as 2). 5168* include/gc.h (GC_register_disappearing_link, 5169GC_general_register_disappearing_link): Update the comment. 5170* typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro. 5171* finalize.c (GC_general_register_disappearing_link, 5172GC_register_finalizer_inner): Recalculate the hash table index 5173after GC_oom_fn succeeded (since the table may grow while not 5174holding the lock) and check again that the entry is still not in 5175the table (free the unused entry otherwise unless DBG_HDRS_ALL). 5176* finalize.c (GC_register_finalizer_inner): Initialize "hhdr" 5177local variable (to prevent a compiler warning). 5178* finalize.c (GC_register_finalizer_inner): Don't modify the data 5179pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed 5180(due to out of memory). 5181 5182* alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to 5183suppress compiler "variable might be uninitialized" warnings. 5184 5185* Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for. 5186* win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for 5187WinCE. 5188* win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to 5189HANDLE thru word type (to avoid a compiler warning) for WinCE. 5190* win32_threads.c (GC_marker_cv, GC_marker_Id): New static array 5191(only if DONT_USE_SIGNALANDWAIT). 5192* win32_threads.c (start_mark_threads): Initialize GC_marker_Id 5193and GC_marker_cv for each helper thread (only if 5194DONT_USE_SIGNALANDWAIT). 5195* win32_threads.c (GC_mark_mutex_state): New static variable (only 5196if DONT_USE_SIGNALANDWAIT). 5197* win32_threads.c (GC_mark_mutex_waitcnt, 5198signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT. 5199* win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock): 5200Use InterlockedExchange() over GC_mark_mutex_state (instead of 5201AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT. 5202* win32_threads.c (GC_wait_marker, GC_notify_all_marker): 5203Implement wait/broadcast primitives using Win32 multiple events 5204(one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of 5205using Win32 SignalObjectAndWait). 5206* win32_threads.c (GC_thr_init): Don't declare hK32 local 5207variable, don't check for GC_wnt, and don't initialize 5208signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT. 5209 5210* alloc.c (GC_finish_collection): Call GC_print_finalization_stats 5211if GC_print_stats (after getting "done_time"). 5212* finalize.c (GC_old_dl_entries): New static variable (only if not 5213SMALL_CONFIG). 5214* finalize.c (GC_finalize): Save current GC_dl_entries value (only 5215if not SMALL_CONFIG). 5216* finalize.c (GC_print_finalization_stats): Define if and only if 5217not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf() 5218instead of GC_printf(); use "%lu" (instead of "%u") print format 5219specifier; use unsigned long type for "ready" counter (for LP64 5220targets). 5221* misc.c (GC_dump): No longer call GC_print_finalization_stats() 5222here (since it is called from GC_finish_collection()). 5223* misc.c (STACKBASE): Remove unused macro undef (for NOSYS and 5224ECOS). 5225 5226* alloc.c (GC_expand_hp): Replace GC_init_inner() call with 5227GC_init() one. 5228* malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise. 5229* mallocx.c (GC_generic_malloc_many): Likewise. 5230* misc.c (GC_enable_incremental): Likewise. 5231* alloc.c (GC_expand_hp): Update the comment. 5232* mark.c (GC_obj_kinds): Likewise. 5233* win32_threads.c (GC_allow_register_threads): Likewise. 5234* private/gc_priv.h (GC_init_inner): Remove function declaration. 5235* misc.c (GC_init_inner): Replace with public GC_init(). 5236 5237* gcj_mlc.c (GC_gcj_fake_mark_proc): New static function. 5238* gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply 5239GC_gcj_fake_mark_proc (aborting with the appropriate message) 5240instead. 5241 5242* os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due 5243to out of memory) then don't increment GC_n_heap_bases and don't 5244call VirtualAlloc() again (with MEM_COMMIT). 5245* os_dep.c (GC_remap): Abort with a more informatory message if 5246VirtualAlloc() fails due to out of memory; update FIXME. 5247 5248* Makefile: Fix typo for msvc_dbg.c. 5249* Makefile.direct: Likewise. 5250* Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with 5251"GC_". 5252* Makefile.dj: Don't reference remove files (nursery.c, 5253gc_nursery.h, gc_copy_descr.h). 5254* NT_MAKEFILE: Don't define __STDC__ macro (no longer used). 5255* NT_STATIC_THREADS_MAKEFILE: Likewise. 5256* NT_THREADS_MAKEFILE: Likewise. 5257* NT_X64_STATIC_THREADS_MAKEFILE: Likewise. 5258* NT_X64_THREADS_MAKEFILE: Likewise. 5259* gc.mak: Likewise. 5260* NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always 5261defined in the source files). 5262* NT_THREADS_MAKEFILE: Likewise. 5263* NT_X64_THREADS_MAKEFILE: Likewise. 5264* gc.mak: Likewise. 5265* NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL. 5266* NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with 5267GC_THREADS. 5268* NT_THREADS_MAKEFILE: Likewise. 5269* NT_X64_STATIC_THREADS_MAKEFILE: Likewise. 5270* NT_X64_THREADS_MAKEFILE: Likewise. 5271* gc.mak: Likewise. 5272* NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the 5273compiler warnings. 5274* NT_STATIC_THREADS_MAKEFILE: Likewise. 5275* NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE 5276before "$*.C" (and "$*.CPP"). 5277* NT_X64_THREADS_MAKEFILE: Likewise. 5278 5279* doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS. 5280* doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS. 5281* doc/README.win64: Add info about mingw-w64; add note for VC++ 5282warnings suppression. 5283 5284* os_dep.c (GC_forward_exception): Fix logic in several places. 5285(OSX-specific) 5286 5287* include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef. 5288 5289* Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS 5290from Makefile. 5291* Makefile: Remove the information about "define arguments" (which 5292is incomplete and outdated compared to that in Makefile.direct); 5293add help reference to Makefile.direct. 5294* Makefile.dj: Likewise. 5295 5296* alloc.c (world_stopped_total_time, world_stopped_total_divisor): 5297Replace "STATIC" with "static" in the definition (since the 5298symbols aren't prefixed with "GC_"). 5299* win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min, 5300start_mark_threads, mark_mutex, builder_cv, mark_cv, 5301mark_mutex_event, signalObjectAndWait_func, main_thread_start): 5302Likewise. 5303* pthread_support.c (GC_wait_builder): Define as STATIC. 5304* win32_threads.c (GC_wait_builder): Likewise. 5305 5306* misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New 5307API function. 5308* include/gc_pmark.h (GC_get_heap_size_inner, 5309GC_get_free_bytes_inner): New function declaration. 5310 5311* include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE). 5312* include/gc_config_macros.h: Likewise. 5313* include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro. 5314* include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for 5315internal use). 5316* include/gc_config_macros.h: Always include stddef.h if GCC. 5317* include/gc_config_macros.h (GC_API): Define for CeGCC in the 5318same way as for MinGW. 5319* include/gc_config_macros.h (GC_API): Group the definition for 5320all cases together (check for GC_DLL only once). 5321* include/gc_pthread_redirects.h: Group non-Darwin code together. 5322* tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL). 5323 5324* Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO, 5325GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE, 5326GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the 5327comment for. 5328* misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new 5329macro). 5330* dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add 5331FIXME and the comment for WinCE. 5332* gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO 5333(new macro). 5334* include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++ 5335WinCE (since backtrace() is unimplemented). 5336* include/private/gc_priv.h (GC_n_heap_bases): Remove declaration 5337(since static). 5338* os_dep.c (GC_n_heap_bases): Define as STATIC; move the 5339definition to be above GC_is_heap_base(). 5340* include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM 5341(both for MinGW and CeGCC toolchains). 5342* include/private/gcconfig.h: Recognize __CEGCC__ and 5343__MINGW32CE__ (as synonyms for __WIN32_WCE). 5344* include/private/gcconfig.h: If SH4 then don't set config 5345parameters for SH. 5346* include/private/thread_local_alloc.h (GC_key_create): Don't 5347abort on failures, just return -1 in these cases (this also 5348prevents compilation error for targets where ABORT is defined 5349indirectly as an inline assembler sequence). 5350* mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for 5351the GCC-based cross-compiler. 5352* mark.c (ext_ex_regn, mark_ex_handler): Don't define unless 5353WRAP_MARK_SOME is defined; define also for WinCE case; don't 5354check for _WIN64 (since WRAP_MARK_SOME is undefined for it). 5355* mark.c (GC_mark_some): Use __try/__except also for WinCE; update 5356the comment. 5357* misc.c: Include signal.h after gc_pmark.h included; check for 5358MSWINCE instead of _WIN32_WCE. 5359* misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call. 5360* misc.c: Don't include <crtdbg.h> for WinCE targets. 5361* misc.c (GC_write): Define _MAX_PATH if undefined (workaround for 5362CeGCC toolchain). 5363* misc.c (GC_write): Use OutputDebugStringW() instead of 5364_CrtDbgReport() for WinCE targets. 5365* os_dep.c (GC_least_described_address): Define as STATIC. 5366* os_dep.c (GC_register_data_segments): Fix code indentation. 5367* os_dep.c (GC_wince_get_mem): Initialize "result" local variable 5368(to prevent a compiler warning). 5369* os_dep.c (GC_dirty_init): Add comment for WinCE target. 5370* tests/test.c: Don't include winbase.h directly if GCC for WinCE, 5371include assert.h instead. 5372* tests/test.c (tiny_reverse_test): Define and use 5373TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10); 5374useful for WinCE. 5375* win32_threads.c (GC_Thread_Rep): Don't declare "handle" field 5376for WinCE (since thread Id is used as a "real" thread handle). 5377* win32_threads.c (THREAD_HANDLE): New macro. 5378* win32_threads.c (GC_register_my_thread_inner): Don't recognize 5379DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on 5380WinCE. 5381* Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for. 5382* win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check 5383for MSWINCE. 5384* win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't 5385close thread handle on WinCE (since it's a thread Id). 5386* win32_threads.c (GC_suspend): Don't check for MSWINCE in the 5387MPROTECT-related code (for the case if MPROTECT_VDB would be 5388implemented for WinCE). 5389* win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for): 5390Use THREAD_HANDLE(t) to obtain thread handle. 5391* win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized; 5392implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include 5393pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace 5394GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the 5395parallel mark support). 5396* win32_threads.c (start_mark_threads): Use int type for "i" local 5397variable (instead of "unsigned") to prevent a compiler warning. 5398* win32_threads.c (start_mark_threads): Don't check CreateThread() 5399result for -1; call CloseHandle() for the handle created by 5400CreateThread() (on WinCE); don't use errno (since errno.h is 5401missing on some targets like WinCE) when printing warning on a 5402marker thread creation failure. 5403* win32_threads.c (signalObjectAndWait_func): Define for WinCE. 5404* win32_threads.c (GC_wait_marker): Remove unnecessary assertion 5405for non-zero signalObjectAndWait_func (to make the code compilable 5406for WinCE). 5407* win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE; 5408use GC_sysinfo to get processors count if WinCE; don't check for 5409SignalObjectAndWait() if WinCE; replace GC_PTHREADS with 5410GC_PTHREADS_PARAMARK. 5411* win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new 5412macro (useful for testing parallel marking on WinCE). 5413* win32_threads.c (GC_win32_start, main_thread_start): Define as 5414STATIC. 5415* win32_threads.c: Don't define main_thread_args, 5416main_thread_start(), WinMain() for WinCE if GC_DLL. 5417* win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro 5418(since the stack size parameter is ignored on WinCE). 5419* win32_threads.c (main_thread_start): Remove forward declaration; 5420place its definition before WinMain() one. 5421* win32_threads.c (WinMain): Abort if GC_CreateThread() or 5422WaitForSingleObject() failed (for the main thread). 5423 5424* allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of 5425a function. 5426* allchblk.c (GC_unmap_threshold): New global variable definition 5427(initialized to MUNMAP_THRESHOLD). 5428* allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of 5429MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0. 5430* doc/README.environment (GC_UNMAP_THRESHOLD): Add information. 5431* misc.c (GC_unmap_threshold): New variable declaration. 5432* misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD" 5433environment variable to set GC_unmap_threshold value (only if 5434USE_MUNMAP). 5435 5436* dbg_mlc.c (OFN_UNSET): New macro (to detect 5437GC_register_finalizer() failures). 5438* dbg_mlc.c (store_old): Add a check for register_finalizer() 5439failure caused by an out-of-memory event (leave *ofn and *ocd 5440unmodified in that case). 5441* dbg_mlc.c (GC_debug_register_finalizer, 5442GC_debug_register_finalizer_no_order, 5443GC_debug_register_finalizer_unreachable, 5444GC_debug_register_finalizer_ignore_self): Initialize my_old_fn 5445to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same 5446as in GC_register_finalizer_inner()). 5447 5448* Makefile.direct (GC_DLL): Add the comment for. 5449* doc/README.macros: Fix a typo. 5450* doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info. 5451* doc/README.macros (__STDC__): Remove info. 5452* dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address, 5453GC_generate_random_valid_address, GC_print_backtrace, 5454GC_generate_random_backtrace, GC_register_describe_type_fn): Add 5455GC_API and GC_CALL to function definition. 5456* malloc.c (GC_generic_malloc): Likewise. 5457* mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise. 5458* mark.c (GC_mark_and_push): Likewise. 5459* misc.c (GC_new_free_list_inner, GC_new_free_list, 5460GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc): 5461Likewise. 5462* include/gc_backptr.h (GC_get_back_ptr_info, 5463GC_generate_random_heap_address, GC_generate_random_valid_address, 5464GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and 5465GC_CALL to function prototype. 5466* include/gc_mark.h (GC_mark_and_push, GC_new_free_list, 5467GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner, 5468GC_new_proc, GC_new_proc_inner, GC_generic_malloc, 5469GC_register_describe_type_fn): Likewise. 5470* include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed, 5471GC_generic_malloc_words_small): Likewise. 5472* gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined). 5473* include/private/gc_pmark.h: Likewise. 5474* include/private/gc_priv.h: Likewise. 5475* tests/test.c: Likewise. 5476* gc_cpp.cc: Define GC_BUILD. 5477* include/private/gc_pmark.h: Likewise. 5478* include/private/gc_priv.h: Likewise. 5479* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro. 5480* gc_dlopen.c (dlopen): Add GC_API to the wrapper function 5481definition. 5482* pthread_support.c (GC_pthread_create, GC_pthread_sigmask, 5483GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join, 5484pthread_detach, pthread_create): Likewise. 5485* win32_threads.c (GC_pthread_join, GC_pthread_create, 5486GC_pthread_sigmask, GC_pthread_detach): Likewise. 5487* gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros. 5488* include/gc_backptr.h: Include "gc.h". 5489* include/gc_backptr.h: Use extern "C" for the exported functions. 5490* include/gc_mark.h: Likewise. 5491* include/gc_config_macros.h (GC_THREADS): Define the macro if any 5492GC_XXX_THREADS is defined. 5493* include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE): 5494Move the definitions below the place where GC_NETBSD_THREADS and 5495GC_DGUX386_THREADS are defined. 5496* include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL 5497is defined) for GCC. 5498* include/gc_config_macros.h (GC_API): Define for Cygwin (in the 5499same way as for VC++); define for GCC v4+ (other than already 5500recognized MinGW/Cygwin) as a "default" visibility attribute if 5501GC_DLL is defined. 5502* include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE): 5503New macro. 5504* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup, 5505GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign, 5506GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page, 5507GC_malloc_atomic_ignore_off_page, GC_debug_malloc, 5508GC_debug_malloc_atomic, GC_debug_strdup, 5509GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn, 5510GC_debug_malloc_ignore_off_page, 5511GC_debug_malloc_atomic_ignore_off_page, 5512GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute. 5513* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc, 5514GC_gcj_malloc_ignore_off_page): Likewise. 5515* include/gc.h (GC_malloc, GC_malloc_atomic, 5516GC_malloc_uncollectable, GC_malloc_stubborn, 5517GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page, 5518GC_malloc_atomic_ignore_off_page, GC_debug_malloc, 5519GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, 5520GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page, 5521GC_debug_malloc_atomic_ignore_off_page, 5522GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute 5523(for the first argument). 5524* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc, 5525GC_gcj_malloc_ignore_off_page): Likewise. 5526* include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc, 5527GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute 5528(for the second argument). 5529* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup, 5530GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign, 5531GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size, 5532GC_realloc, GC_expand_hp, GC_set_max_heap_size, 5533GC_exclude_static_roots, GC_add_roots, GC_remove_roots, 5534GC_register_displacement, GC_debug_register_displacement, 5535GC_try_to_collect, GC_malloc_ignore_off_page, 5536GC_malloc_atomic_ignore_off_page, GC_debug_malloc, 5537GC_debug_malloc_atomic, GC_debug_strdup, 5538GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn, 5539GC_debug_malloc_ignore_off_page, 5540GC_debug_malloc_atomic_ignore_off_page, GC_debug_free, 5541GC_debug_realloc, GC_debug_malloc_replacement, 5542GC_debug_realloc_replacement, GC_finalization_proc, 5543GC_register_finalizer, GC_debug_register_finalizer, 5544GC_register_finalizer_ignore_self, 5545GC_debug_register_finalizer_ignore_self, 5546GC_register_finalizer_no_order, 5547GC_debug_register_finalizer_no_order, 5548GC_register_finalizer_unreachable, 5549GC_debug_register_finalizer_unreachable, 5550GC_register_disappearing_link, 5551GC_general_register_disappearing_link, 5552GC_unregister_disappearing_link, GC_noop1, GC_warn_proc, 5553GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type, 5554GC_call_with_alloc_lock, GC_stack_base_func, 5555GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr, 5556GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc, 5557GC_is_valid_displacement_print_proc, GC_is_visible_print_proc, 5558GC_malloc_many, GC_CreateThread, GC_beginthreadex, 5559GC_endthreadex): Comment out (or remove if single and meaningless) 5560function argument names (to avoid identifiers out of the name 5561space). 5562* include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc, 5563GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. 5564* include/gc.h (GC_try_to_collect): Update the comment. 5565* include/gc.h (GC_size, GC_register_my_thread): Add const 5566qualifier for the argument referent. 5567* misc.c (GC_size): Likewise. 5568* pthread_support.c (GC_register_my_thread_inner, 5569GC_register_my_thread): Likewise. 5570* win32_threads.c (GC_register_my_thread_inner, 5571GC_register_my_thread): Likewise. 5572* include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use 5573(define instead of GC_INIT() for Cygwin and AIX). 5574* include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES, 5575GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN, 5576GC_INITIAL_HEAP_SIZE): Recognize new macro. 5577* include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES, 5578GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ, 5579GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN, 5580GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use. 5581* include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros. 5582* include/gc_mark.h: Prefix GC_H with '_'. 5583* include/gc_mark.h (GC_least_plausible_heap_addr, 5584GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API 5585for the public variable declaration. 5586* include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr, 5587GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise. 5588* include/gc_pthread_redirects.h (GC_pthread_create, 5589GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach): 5590Use GC_API for the wrapper prototype. 5591* include/gc_pthread_redirects.h (pthread_create, pthread_join, 5592pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally 5593before redirecting. 5594* include/new_gc_alloc.h: Replace GC_incr_mem_freed() with 5595GC_incr_bytes_freed(); remove FIXME. 5596* include/private/gc_priv.h (GC_make_closure, 5597GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private 5598function. 5599* tests/test.c (GC_print_stats): Handle GC_DLL case regardless of 5600the target. 5601 5602* finalize.c (GC_general_register_disappearing_link, 5603GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS" 5604guard for LOCK/UNLOCK(). 5605* finalize.c (GC_general_register_disappearing_link, 5606GC_register_finalizer_inner): Get GC_oom_fn value before releasing 5607the lock (to prevent data races). 5608* gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc, 5609GC_gcj_malloc_ignore_off_page): Likewise. 5610* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise. 5611* include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn() 5612instead of GC_oom_fn (to prevent data races). 5613* malloc.c (GC_generic_malloc): Likewise. 5614* mallocx.c (GC_memalign): Likewise. 5615* pthread_support.c (pthread_create): Likewise. 5616* gcj_mlc.c (maybe_finalize): Acquire the lock before setting 5617last_finalized_no value to prevent data races. 5618* include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn, 5619GC_set_find_leak, GC_set_finalize_on_demand, 5620GC_set_java_finalization, GC_set_finalizer_notifier, 5621GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes, 5622GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries, 5623GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine 5624the comment. 5625* misc.c (GC_set_oom_fn): Likewise. 5626* include/gc.h (GC_general_register_disappearing_link): Refine the 5627comment (replace "soft" word with "weak"). 5628* misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel, 5629GC_set_finalizer_notifier, GC_set_find_leak): Add the comment. 5630* misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier, 5631GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races. 5632 5633* dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include 5634"private/dbg_mlc.h" before it. 5635* malloc.c: Likewise. 5636* dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy() 5637for WinCE (since deprecated); evaluate strlen() only once; don't 5638set errno for WinCE. 5639* malloc.c (GC_strdup): Likewise. 5640* dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE. 5641* include/gc.h (GC_unregister_my_thread): Refine the comment. 5642* include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex): 5643Don't declare for WinCE. 5644* include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only). 5645* include/gc.h (GC_WinMain): Remove GC_API. 5646* include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for 5647lpCmdLine. 5648* tests/test.c (GC_WinMain): Likewise. 5649* win32_threads.c (main_thread_args, GC_WinMain): Likewise. 5650* include/gc_config_macros.h (ptrdiff_t): Guard with 5651ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro. 5652* include/private/gc_locks.h: Guard include "atomic_ops.h" with 5653ifdef GC_PTHREADS (and not GC_WIN32_THREADS). 5654* mark.c: Include "atomic_ops.h" if PARALLEL_MARK. 5655* thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT. 5656* win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB. 5657* include/private/gc_locks.h: Use include "atomic_ops.h" instead 5658of include <atomic_ops.h>. 5659* include/private/gc_priv.h: Likewise. 5660* include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock): 5661Don't export (replace GC_API to "extern"). 5662* win32_threads.c (GC_allocate_ml): Don't export. 5663* include/private/gc_priv.h (DebugBreak): Define as macro for 5664WinCE (if not UNDER_CE and DebugBreak is not defined yet). 5665* include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS 5666(since "UNALIGNED" is defined in winnt.h of WinCE). 5667* mark.c (UNALIGNED): Likewise. 5668* include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_. 5669* include/private/gcconfig.h (ALIGNMENT): Check always defined. 5670* include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE. 5671* include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC 5672for WinCE (since __declspec(thread) is unsupported). 5673* include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES): 5674Define for WinCE (if undefined). 5675* malloc.c (GC_malloc): Remove outdated comment about disabling 5676signals. 5677* misc.c: Don't include <tchar.h> (since not used anymore and may 5678break TEXT() macro defined in winnt.h). 5679* misc.c (GC_init_inner): Don't use GetModuleHandle() and 5680InitializeCriticalSectionAndSpinCount() for WinCE. 5681* misc.c (GC_init_inner): Replace GetModuleHandleA() with 5682GetModuleHandle() (and use TEXT() macro controlled by UNICODE). 5683* misc.c (LOG_FILE): Remove unused macro; don't use _T() macro. 5684* misc.c (GC_CreateLogFile): New static function (Win32/WinCE 5685only); move the code from GC_write(); replace GETENV() with 5686GetEnvironmentVariable(); replace CreateFileA() with 5687CreateFile(); use TEXT() macro (for Unicode support); replace 5688strcat() with memcpy() (since deprecated in WinCE). 5689* misc.c (GC_write): Define as STATIC. 5690* win32_threads.c (GC_attached_thread): Likewise. 5691* misc.c (GC_write): Use GC_CreateLogFile(). 5692* misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE. 5693* misc.c (GC_abort): Try to invoke MessageBoxA() dynamically 5694(Win32 only) if DONT_USE_USER32_DLL is defined. 5695* misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and 5696WinCE). 5697* misc.c (GC_abort): Use a more user-friendly abort if 5698NO_DEBUGGING (Win32 only). 5699* os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and 5700THREADS). 5701* os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle 5702(for Unicode support); check GetModuleHandle() result. 5703* tests/test.c: Don't define assert for WinCE (since may be 5704redefined by "assert.h" included from libatomic_ops). 5705* tests/test.c (FAIL): Define as ABORT for all targets (except 5706for PCR). 5707* tests/test.c (n_tests): Don't use AO_t. 5708* tests/test.c (check_heap_stats): Don't cast n_tests. 5709* tests/test.c (inc_int_counter): New function (for n_tests atomic 5710incrementation). 5711* tests/test.c (run_one_test): Test GC_memalign() for all targets. 5712* tests/test.c (run_one_test): Avoid unbalanced brackets in 5713#if-#else-#endif blocks. 5714* tests/test.c (run_one_test): Replace AO_fetch_and_add1() and 5715private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter). 5716* tests/test.c (check_heap_stats): Replace 5717"if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress 5718"unreachable code" compiler warning. 5719* tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE 5720"UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE). 5721* tests/test.c (thr_window): Replace "L" string prefix with 5722TEXT(). 5723* thread_local_alloc.c: Check THREADS is defined (to prevent other 5724compiler errors and warnings otherwise). 5725* tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for 5726GC_use_DllMain()). 5727* Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add 5728the comments for. 5729* win32_threads.c (GC_register_my_thread_inner): Recognize 5730DONT_IMPORT_GETCURTHREAD macro. 5731* win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude 5732DllMain support if needed). 5733* win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain 5734thread registration is unsupported for a given configuration. 5735* win32_threads.c (GC_use_DllMain): Update the comment; refine 5736ABORT message. 5737* win32_threads.c (GC_use_DllMain, 5738GC_started_thread_while_stopped, GC_register_my_thread_inner, 5739GC_lookup_thread_inner, GC_delete_gc_thread, 5740GC_allow_register_threads, GC_lookup_pthread, 5741GC_push_thread_structures, GC_stop_world, GC_push_all_stacks): 5742Check for GC_NO_DLLMAIN. 5743* win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread, 5744DllMain): Don't define if GC_NO_DLLMAIN. 5745* win32_threads.c (GC_stop_world): Declare "i" and "max" local 5746variables only if not GC_NO_DLLMAIN (to suppress compiler 5747warning). 5748* win32_threads.c (GC_mark_thread, start_mark_threads): Use 5749CreateThread() instead of _beginthreadex() for WinCE. 5750* win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE): 5751New macros defined (used by start_mark_threads(), WinMain()). 5752* win32_threads.c (GC_thr_init): Exclude parallel-specific code on 5753WinCE for now (since getenv(), GetProcessAffinityMask() and 5754SignalObjectAndWait() are missing on WinCE). 5755* win32_threads.c (GC_thr_init): replace GetModuleHandleA() with 5756GetModuleHandle(); replace CreateEventA() with CreateEvent(); use 5757TEXT() macro (for Unicode support). 5758 5759* include/gc.h (GC_has_static_roots_func): New typedef (user filter 5760callback). 5761* include/gc.h (GC_register_has_static_roots_callback): Use 5762GC_has_static_roots_func type. 5763* dyn_load.c (GC_has_static_roots, 5764GC_register_has_static_roots_callback): Likewise. 5765* dyn_load.c (GC_has_static_roots, 5766GC_register_has_static_roots_callback): Define on all platforms. 5767* dyn_load.c (GC_register_dynlib_callback, 5768GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style 5769functions definition with the ANSI C one. 5770* dyn_load.c (GC_register_dynlib_callback): Use new local variable 5771"callback" (initialized from GC_has_static_roots) to minimize data 5772races. 5773* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr, 5774GC_cond_add_roots): Define as STATIC. 5775* mark_rts.c (GC_remove_roots_inner): Likewise. 5776* dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for 5777sections smaller than pointer size (just to avoid acquiring the 5778lock unnecessarily). 5779* dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not 5780only for DARWIN_DEBUG). 5781* dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with 5782LOCK + GC_add_roots_inner() + UNLOCK. 5783* dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user 5784callback (if set) holding the lock; if it returns 0 then don't call 5785GC_add_roots_inner() for that region. 5786* dyn_load.c (GC_register_has_static_roots_callback): Put 5787"callback" value to GC_has_static_roots on all platforms. 5788* dyn_load.c (GC_has_static_roots): Update the comments. 5789* include/gc.h (GC_exclude_static_roots, GC_add_roots, 5790GC_remove_roots, GC_register_has_static_roots_callback): Likewise. 5791* include/private/gc_priv.h (struct roots): Likewise. 5792* include/private/gc_priv.h (GC_remove_roots_inner): Move prototype 5793to mark_rts.c and declare it as STATIC. 5794* include/private/gc_priv.h (GC_exclude_static_roots_inner): New 5795prototype. 5796* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use 5797GC_exclude_static_roots_inner() instead of GC_exclude_static_roots. 5798* misc.c (GC_init_inner): Likewise. 5799* mark_rts.c (GC_exclude_static_roots_inner): New function (move 5800all the code from GC_exclude_static_roots(); add the comment. 5801* mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner): 5802add alignment assertion for the lower bound; add assertion for the 5803lower bound to be less than the upper one. 5804* mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust 5805the upper bound (round down to be of a pointer-aligned value); 5806return in case of an empty range. 5807* mark_rts.c (GC_exclude_static_roots): Acquire the lock and call 5808GC_exclude_static_roots_inner(). 5809* mark_rts.c (GC_remove_roots): Quickly check the bounds and return 5810in case of a do-nothing case (before acquiring the lock). 5811 5812* finalize.c (GC_fail_count): New external variable declaration. 5813* finalize.c (GC_reset_finalizer_nested, 5814GC_check_finalizer_nested): New function declarations (if THREADS 5815only). 5816* finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New 5817static global variables (used internally by GC_finalize() and 5818GC_check_finalizer_nested()). 5819* finalize.c (GC_check_finalizer_nested): New static function 5820definition (only if not THREADS, used internally by 5821GC_notify_or_invoke_finalizers() to minimize the probability of 5822a deep recursion when a client finalizer tries to allocate GC 5823memory). 5824* finalize.c (GC_finalize): Reset GC_finalizer_nested value (or 5825call GC_reset_finalizer_nested()) if last heap expansion failed. 5826* finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no, 5827GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier, 5828last_finalizer_notification variables holding the lock (to avoid 5829data races). 5830* finalize.c (GC_finalizer_notifier): Add comment. 5831* finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check 5832for an empty finalization queue (only if THREADS and not 5833KEEP_BACK_PTRS/MAKE_BACK_GRAPH). 5834* finalize.c (GC_notify_or_invoke_finalizers): Call 5835GC_check_finalizer_nested() and skip GC_invoke_finalizers() call 5836if appropriate. 5837* include/private/pthread_support.h (GC_Thread_Rep): Add unsigned 5838finalizer_nested and finalizer_skipped fields (for internal use 5839by the multi-threaded GC_check_finalizer_nested()). 5840* win32_threads.c (GC_Thread_Rep): Likewise. 5841* pthread_support.c (GC_reset_finalizer_nested, 5842GC_check_finalizer_nested): New function definitions (the 5843multi-threaded variants of that in finalize.c). 5844* win32_threads.c (GC_reset_finalizer_nested, 5845GC_check_finalizer_nested): Likewise. 5846 5847* alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed 5848anymore and GCC produces a warning for it). 5849* alloc.c (GC_stopped_mark): Adjust printf argument type 5850specifier. 5851* backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for 5852the case when the configuration information comes from a config.h 5853file). 5854* checksums.c: Likewise. 5855* include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__" 5856keyword instead of "unused". 5857* include/gc_allocator.h: Fix typos in comments. 5858* thread_local_alloc.c: Likewise. 5859* include/javaxfc.h (GC_finalize_all): Update comment. 5860* include/private/gc_priv.h (GC_API_PRIV): New macro (defined as 5861GC_API and serves only as a marker for the private but exported 5862symbols used by test.c only). 5863* include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked, 5864GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with 5865GC_API_PRIV one. 5866* include/private/gc_priv.h (GC_fo_entries): Don't export it 5867outside a DLL. 5868* include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro 5869designated to check the arguments correctness of printf-like 5870functions (currently works only for GCC v3+). 5871* include/private/gc_priv.h (GC_printf, GC_err_printf, 5872GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute. 5873 5874* dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use. 5875Define for FreeBSD 7.0+. 5876 5877* mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT. 5878 5879* include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive 5880comment. 5881 5882* allchblk.c (GC_merge_unmapped): Don't assume that adjacent 5883free blocks have different mapping status. Correctly handle gap 5884between blocks. 5885(GC_split_block): Remove dead code setting hb_flags. Add comment. 5886(GC_allochblk): Split blocks also in generational-only mode. 5887* os_dep.c (GC_unmap_gap): Don't really use munmap. 5888 5889* include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for 5890not USE_MUNMAP case. 5891 5892* Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST, 5893USE_PROC_FOR_LIBRARIES): Fix typo in the comments. 5894* Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC, 5895PARALLEL_MARK, STATIC): Update the comments. 5896* include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro 5897recognized (only if MPROTECT_VDB). 5898* Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB): 5899Add the comments for. 5900* os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH" 5901environment variable (only if MPROTECT_VDB, if the variable is 5902unset when GC_PREFER_MPROTECT_VDB macro controls the strategy). 5903* doc/README.environment (GC_USE_GETWRITEWATCH): New variable. 5904* include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for 5905USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in 5906the future). 5907* misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory 5908space returned to OS (GC_unmapped_bytes). 5909* include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the 5910comments. 5911* misc.c (GC_get_unmapped_bytes): New API function. 5912* include/gc.h (GC_get_unmapped_bytes): New API prototype. 5913* os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of 5914"ifdef MSWIN32" one (for Cygwin). 5915 5916* pthread_support.c (GC_allow_register_threads): New API function. 5917* win32_threads.c (GC_allow_register_threads): Likewise. 5918* include/gc.h (GC_allow_register_threads): New API prototype. 5919* include/gc.h (GC_register_my_thread, GC_unregister_my_thread): 5920Update the comments. 5921* pthread_support.c (GC_register_my_thread): Check the collector 5922is in the multi-threaded mode. 5923* win32_threads.c (GC_register_my_thread): Likewise. 5924 5925* finalize.c (GC_finalize_all): Always call GC_invoke_finalizers 5926instead, following Ivan's original patch. 5927 5928* allchblk.c (GC_allochblk_nth): Add assertion. 5929* checksums.c: Add GC_record_fault, GC_was_faulted, 5930CC_n_faulted_dirty_errors. 5931(GC_check_dirty): Remove register declarations, print 5932dirty bit errors on faulted pages. 5933* os_dep.c (GC_write_fault_handler): Call GC_record_fault(). 5934* os_dep.c (GC_remove_protection): Compute index correctly. 5935 5936 5937== [7.2alpha2] 2009-06-12 == 5938 5939* dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf() 5940calls into a single one (for output atomicity). 5941* typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use 5942GC_finalization_failures variable; check the result of 5943GC_general_register_disappearing_link() (for lack of memory) 5944instead. 5945* finalize.c (GC_finalization_failures): Remove unused global 5946variable. 5947* finalize.c (GC_general_register_disappearing_link, 5948GC_general_register_disappearing_link): Don't update the value of 5949GC_finalization_failures (since unused). 5950* include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK, 5951GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of 5952word type now (as FIXUP_POINTER requires numeric argument). 5953* finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP 5954requires the first parameter of word type. 5955* mark.c (PUSH_GRANULE): Likewise. 5956* mark.c (GC_push_one, GC_push_all_eager): Likewise. 5957* finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or 5958GC_finalizer_notifier directly, instead 5959of GC_INVOKE_FINALIZERS() to prevent infinite looping. 5960* include/javaxfc.h: Clarify GC_finalize_all comment. 5961* gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not 5962after) for configuration information. 5963* gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment. 5964* gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local 5965variable for NULL before dereferencing it, return GC_oom_fn() in 5966this case. 5967* typd_mlc.c (GC_malloc_explicitly_typed, 5968GC_malloc_explicitly_typed_ignore_off_page): Transform the code to 5969suppress compiler warning (for uninitialized "lg" variable). 5970 5971* win32_threads.c (GC_unregister_my_thread): add false assertion 5972in unreachable code. 5973 5974* pthread_support.c (GC_inner_start_routine): Don't release the 5975GC lock between GC_register_my_thread_inner() and 5976GC_init_thread_local() calls (post the "registered" even after 5977calling GC_init_thread_local()). 5978* win32_threads.c (GC_register_my_thread, GC_unregister_my_thread): 5979Use GC_lookup_thread_inner() instead of GC_lookup_thread() and 5980acquire the GC lock only once. 5981* win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner() 5982directly instead of GC_register_my_thread() since I_HOLD_LOCK 5983and our (main) thread is not registered yet (add assertion for it). 5984* win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner() 5985directly instead of GC_lookup_thread() (since I_HOLD_LOCK). 5986* win32_threads.c (GC_lookup_thread): Remove unused function. 5987* win32_threads.c: Remove "#error GC_DLL untested with Cygwin". 5988* win32_threads.c (GC_win32_dll_threads): Define as FALSE macro 5989also if THREAD_LOCAL_ALLOC or GC_PTHREADS. 5990* win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS 5991(for Cygwin). 5992* win32_threads.c (GC_push_stack_for): Add parentheses around "&&" 5993(inside GC_ASSERT) to prevent compiler warning. 5994* win32_threads.c (GC_push_all_stacks): Remove FIXME for 5995PARALLEL_MARK. 5996* win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions 5997to a place before GC_get_next_stack(). 5998* win32_threads.c (marker_sp, marker_bsp): New static arrays (same 5999as in pthread_support.c). 6000* win32_threads.c (marker_last_stack_min): New static arrays (the 6001same semantics as for last_stack_min of GC_Thread_Rep). 6002* win32_threads.c (GC_get_next_stack): Handle marker threads. 6003* win32_threads.c (GC_mark_thread): Save the current stack pointer 6004to marker_[b]sp. 6005* win32_threads.c (start_mark_threads): Initialize 6006marker_last_stack_min elements (to "unset" value). 6007 6008* misc.c (GC_set_oom_fn, GC_set_all_interior_pointers, 6009GC_set_finalize_on_demand, GC_set_java_finalization, 6010GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq, 6011GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries, 6012GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc): 6013Change return type to void (these API functions no longer return 6014the old value). 6015* include/gc.h: Likewise. 6016* tests/test.c (main, WinMain, test): Remove explicit cast to void 6017for GC_set_warn_proc(). 6018* misc.c (GC_get_oom_fn, GC_get_all_interior_pointers, 6019GC_get_finalize_on_demand, GC_get_java_finalization, 6020GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq, 6021GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries, 6022GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New 6023API functions (to get the current value of the corresponding R/W 6024public variables). 6025* include/gc.h: Likewise. 6026* include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor): 6027Update the comment. 6028* misc.c (GC_ignore_warn_proc): New API call-back function. 6029* include/gc.h (GC_ignore_warn_proc): Likewise. 6030* misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes, 6031GC_get_non_gc_bytes): New API setter and getter functions (for the 6032public GC_find_leak and GC_non_gc_bytes variables, respectively). 6033* include/gc.h: Likewise. 6034* include/gc.h (GC_memalign): Add proto to GC API. 6035* mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition. 6036* tests/test.c (run_one_test): Test GC_memalign() on Win32 too, 6037remove GC_memalign() proto. 6038* misc.c (GC_write): Use multi-byte (A) variants of Win32 6039GetModuleFileName() and CreateFile(). 6040* tests/test.c (main): Replace K&R-style function definition with the 6041ANSI C one. 6042 6043* include/private/gcconfig.h (PLATFORM_ANDROID): New macro 6044recognized (for Linux on ARM32 without glibc). 6045* include/private/gcconfig.h (STRTOULL): Define for all targets 6046(define as "strtoul" for most targets except for LLP64/Win64). 6047* misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol() 6048(cast the result to word type) to decode values of "GC_TRACE", 6049"GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment 6050variables. 6051 6052* include/gc_allocator.h: Add gc_allocator_ignore_off_page. 6053* tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page. 6054 6055* win32_threads.c (GC_release_mark_lock): Correct misspelling of 6056AO_load in assertion. 6057 6058* win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads 6059is defined as FALSE (otherwise the size of dll_thread_table is near 6060200 KiB for 32-bit). 6061* win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC. 6062* win32_threads.c (GC_Thread_Rep): Add backing_store_end and 6063backing_store_ptr fields for IA64 support. 6064* win32_threads.c (GC_register_my_thread_inner): Set 6065backing_store_end field to reg_base value for IA64 (same as in 6066pthread_support.c). 6067* win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the 6068"right" places, remove ';'. 6069* win32_threads.c (GC_fault_handler_lock): Declare only 6070if MPROTECT_VDB (and not WinCE). 6071* win32_threads.c (GC_suspend): Acquire and release 6072GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE). 6073* win32_threads.c (GC_suspend): Define as STATIC. 6074* win32_threads.c (GC_push_stack_for): Fix WARN() format specifier 6075(should be word-compliant, "%p" is used w/o "0x"), don't cast sp. 6076* win32_threads.c (GC_push_all_stacks): Convert a group of printf() 6077calls into a single one (for output atomicity). 6078* win32_threads.c (GC_get_next_stack): Unprotect thread descriptor 6079before altering its last_stack_min ("thread" variable is added). 6080* win32_threads.c (GC_get_next_stack): Remove unnecessary checks for 6081"s" is non-NULL. 6082* win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack 6083if WinCE. 6084* win32_threads.c (GC_get_next_stack): Pass current_min value to 6085GC_get_stack_min as-is (without -1). 6086* win32_threads.c (GC_wait_marker): Remove FIXME and use "release" 6087version of AO_fetch_and_sub1(). 6088* win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int 6089to pointer (and vice versa) thru word type to suppress warnings. 6090* win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always 6091access atomically. 6092* misc.c: Change GC_THREADS tests back to THREADS. 6093 6094* allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert 6095a group of printf() calls into a single one (for output atomicity). 6096* include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq, 6097GC_set_time_limit): New prototypes. 6098* misc.c (GC_set_all_interior_pointers, GC_set_full_freq, 6099GC_set_time_limit): New public setter/getter functions. 6100* include/gc.h: Fix (and remove outdated) comments for thread-local 6101allocation. 6102* include/gc.h: Fix typos in comments. 6103* misc.c (GC_init_inner, GC_printf): Likewise. 6104* include/gc.h (GC_unregister_disappearing_link): Refine comment. 6105* include/gc.h (GC_stack_base): Recognize _M_IA64 macro. 6106* misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water, 6107GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS. 6108* misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water, 6109GC_bytes_allocd_at_reset): Define as STATIC. 6110* misc.c (GC_get_heap_size, GC_get_free_bytes, 6111GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to 6112avoid data races. 6113* misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only). 6114* misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS. 6115* misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to 6116set the default initial value of initial_heap_sz. 6117* misc.c (GC_deinit): Destroy GC_write_cs only if THREADS. 6118* misc.c (GC_init_inner): Fix WARN() format specifier (should be 6119word-compliant, "%p" is used w/o "0x"). 6120* misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET" 6121environment variable if SMALL_CONFIG. 6122* misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment 6123variable to set initial GC_full_freq value (if not SMALL_CONFIG). 6124* doc/README.environment (GC_FULL_FREQUENCY): Add information. 6125* doc/README.environment (GC_MARKERS): Refine information. 6126* misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where 6127possible. 6128* misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock). 6129* misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs. 6130* misc.c (GC_abort): Don't define if SMALL_CONFIG. 6131* misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf() 6132(to prevent possible infinite recursion). 6133 6134* finalize.c (finalization_mark_proc): Replace K&R-style declaration 6135with ANSI C one. 6136* finalize.c (GC_grow_table, GC_register_finalizer_inner, 6137GC_enqueue_all_finalizers): Remove outdated comments about disabling 6138signals. 6139* finalize.c (GC_general_register_disappearing_link): Fix assertion 6140to catch NULL "obj" value. 6141* finalize.c (GC_unregister_disappearing_link): Check "link" 6142alignment before gaining the lock. 6143* finalize.c (GC_finalize): Refine comment. 6144* finalize.c (GC_finalize): Fix WARN() format specifier (should be 6145word-compliant, "%p" is used w/o "0x"). 6146* finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before" 6147variable (to 0) to suppress compiler warning. 6148* include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h. 6149* include/gc_gcj.h: add "extern C" header and tail. 6150* include/private/gc_pmark.h: Remove GC_do_parallel_mark(), 6151GC_help_wanted, GC_helper_count, GC_active_count declarations (move 6152the comments to the place where these symbols are defined in mark.c). 6153* mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by 6154GC_mark_some_inner, if PARALLEL_MARK only). 6155* mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count, 6156GC_active_count, GC_do_parallel_mark): Define as STATIC. 6157* pthread_support.c (GC_mark_thread): Likewise. 6158* typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind, 6159GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr, 6160GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist, 6161GC_arobjfreelist): Likewise. 6162* include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT 6163for HBLKSIZE to GC_STATIC_ASSERT. 6164* mark.c (GC_noop): Define for Borland C the same as for Watcom. 6165* mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag. 6166* pthread_support.c (GC_do_blocking_inner): Likewise. 6167* mark.c (GC_mark_from): Initialize "limit" (to 0) in the default 6168switch branch to suppress compiler warning. 6169* mark.c (GC_return_mark_stack): Append new-line to printf message. 6170* mark.c: Remove unused GC_true_func(), GC_PUSH_ALL(). 6171* pthread_support.c (GC_mark_thread): Add dummy "return 0" to 6172suppress compiler warning. 6173* pthread_support.c (start_mark_threads): Move the code limiting 6174"GC_markers" value (and printing a warning) to GC_thr_init(). 6175* pthread_support.c (GC_thr_init): Silently limit "GC_markers" value 6176if based on the number of CPUs. 6177* pthread_support.c (GC_thr_init): Treat incorrect "GC_markers" 6178values as one. 6179* pthread_support.c (GC_register_my_thread_inner): Add a check for 6180"stack_end" is non-NULL (the same as in win32_threads.c). 6181* pthread_support.c (pthread_create): Call GC_oom_fn before giving up 6182with ENOMEM. 6183* thread_local_alloc.c (return_single_freelist): Convert "for" loop 6184to "while" one to suppress "possible extraneous ';'" warning. 6185 6186* darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32. 6187* include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32 6188(Darwin only). 6189* include/private/gcconfig.h: Add machine-specific part for DARWIN. 6190* include/private/gcconfig.h (ARM32): Define config parameters for 6191DARWIN (iPhone). 6192 6193* alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR, 6194GC_TIME_LIMIT): New macros (used to control the default initial 6195values of GC_full_freq variable, GC_dont_expand, 6196GC_free_space_divisor, GC_time_limit respectively). 6197* include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced 6198with GC_TIME_LIMIT in alloc.c). 6199* alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection): 6200Define as STATIC. 6201* mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise. 6202* include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection): 6203Move the prototypes to alloc.c, make STATIC. 6204* include/private/gc_priv.h (GC_push_current_stack, 6205GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes 6206(move the comments to the places where these functions are defined). 6207* mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define 6208as STATIC. 6209* alloc.c (GC_timeout_stop_func, GC_stopped_mark, 6210GC_print_heap_sects): Convert a group of printf() calls into 6211a single one (for output atomicity). 6212* mark_rts.c (GC_print_static_roots): Likewise. 6213* alloc.c (GC_stopped_mark): Output blank line (when logging) for 6214convenience to delimit collections. 6215* alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS; 6216make "frames" local variable volatile (to prevent optimization). 6217* alloc.c (GC_try_to_collect_inner, GC_stopped_mark, 6218GC_finish_collection, GC_allocobj): Remove outdated comments about 6219disabling signals. 6220* include/private/gc_priv.h (GC_register_displacement_inner, 6221GC_gcollect_inner): Likewise. 6222* alloc.c (GC_try_to_collect_inner, GC_stopped_mark, 6223GC_finish_collection): Initialize "start_time" local variable (to 0) 6224to suppress compiler warning. 6225* mark_rts.c (GC_add_roots_inner): Likewise. 6226* alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef". 6227* include/private/gc_priv.h (clock, GC_stop_world, GC_start_world, 6228GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder, 6229GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace 6230K&R-style function prototypes with ANSI C one. 6231* include/private/gc_priv.h (ABORT): Define as DebugBreak() for 6232Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()). 6233* include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused 6234macros. 6235* include/private/gc_priv.h (GC_noop): Declare for Borland C the 6236same as for Watcom. 6237* mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag. 6238 6239* dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove 6240outdated comment about disabling signals. 6241* mallocx.c (GC_malloc_uncollectable, 6242GC_malloc_atomic_uncollectable): Likewise. 6243* os_dep.c: Likewise. 6244* dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change): 6245Add ARGSUSED tag. 6246* pthread_stop_world.c (GC_suspend_handler, 6247GC_suspend_handler_inner): Likewise. 6248* dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message. 6249* dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default 6250switch branch to suppress compiler warning. 6251* dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort(). 6252* include/private/darwin_semaphore.h (sem_init): Likewise. 6253* include/javaxfc.h: Replace "GC_H" with "_GC_H". 6254* include/private/dbg_mlc.h (GC_has_other_debug_info, 6255GC_store_debug_info): Replace K&R-style function prototypes with ANSI 6256C one. 6257* include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc, 6258GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise. 6259* include/private/pthread_support.h (GC_stop_init): Likewise. 6260* include/private/gcconfig.h: Refine comment about setting 6261GC_stackbottom. 6262* include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the 6263"right" places. 6264* include/private/pthread_support.h (GC_Thread_Rep): Refine comment 6265for "stack_end" field. 6266* mallocx.c (GC_malloc_uncollectable, 6267GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk". 6268* os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting 6269GC_mem_top_down to MEM_TOP_DOWN for debug purposes). 6270* os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN() 6271format specifier (should be word-compliant, "%p" is used w/o "0x"). 6272* pthread_stop_world.c (GC_suspend_handler_inner): Likewise. 6273* os_dep.c (GC_dirty_init): Append new-line to printf messages. 6274* os_dep.c (GC_mprotect_thread): Fix GC_err_printf message. 6275* os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT. 6276* pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define 6277as STATIC. 6278* pthread_stop_world.c (GC_push_all_stacks): Add assertion for that 6279"thread_blocked" is not set for the current thread. 6280* real_malloc.c: Add "extern GC_quiet" to suppress compiler warning. 6281* reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to 6282suppress compiler warning. 6283 6284* tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef. 6285 6286* win32_threads.c: restructure parallel marking mutex initialization. 6287* win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c, 6288pthread_stop_world.c, pthread_support.c: Add runtime conditions 6289on GC_parallel were appropriate. 6290* pthread_support.c: Condition marker_bsp on ia64. 6291(GC_segment_is_thread_stack): Fix loop upper bound. 6292* reclaim.c: Limit some assertions to PARALLEL_MARK. 6293* pthread_support.c: Don't acquire mark lock for thread-local 6294allocation. 6295* include/private/gc_priv.h: Don't define parallel mark sync 6296support just for THREAD_LOCAL_ALLOC. 6297 6298* include/private/gcconfig.h: refine MINGW32 test. 6299* mark.c: Add win64/gcc tests. 6300 6301* test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test, 6302typed_test, run_one_test, check_heap_stats, main, test): Replace 6303all K&R-style function definitions with ANSI C ones. 6304* trace_test.c (main): Likewise. 6305* test.c (GC_COND_INIT): Define as GC_INIT() also in case of 6306THREAD_LOCAL_ALLOC. 6307* test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS 6308or GC_WIN32_THREADS; remove fork_a_thread() macros definition. 6309* test.c (reverse_test): Use "volatile" when clearing "b" and "c" 6310local variables (to suppress "assigned value is never used" 6311compiler warning). 6312* test.c (tree_test): Use public GC_noop1() instead of private 6313GC_noop(). 6314* test.c (typed_test): Likewise. 6315* test.c (check_heap_stats): Define and assign value to 6316"late_finalize_count" local variable only if its value is used 6317(if FINALIZE_ON_DEMAND defined). 6318* test.c (main): Remove DJGPP-specific initialization of 6319GC_stackbottom (not needed anymore, handled in gcconfig.h). 6320* trace_test.c: Guard #define GC_DEBUG with #ifndef. 6321* trace_test.c: Include "gc_backptr.h". 6322* trace_test.c (main): Call GC_INIT(). 6323* trace_test.c (main): Add "return 0" statement. 6324 6325* dyn_load.c (GC_register_dynlib_callback): Use new index j 6326instead of i in the inner loop. 6327 6328* tests/test.c: Increment n_tests with fetch_and_add when possible, 6329avoiding need to export lock. 6330 6331* include/gc_pthread_redirects.h: 6332- dlfcn.h is included for dlopen() proto before undefining 6333"dlopen" (so, it's possible now to include dlfcn.h after 6334gc.h from user code); 6335- GC_dlopen() proto is added (except for Darwin as 6336it's missing there); 6337- "dlopen" is explicitly undefined (before its redefinition). 6338* include/gc.h: 6339- "process.h" is included besides "windows.h" 6340(for _beginthreadex/_endthreadex); win32 only. 6341- GC_NO_THREAD_DECLS is moved to the right place 6342(before closing "extern C"). 6343* pthread_support.c: Fix out of memory handling for Thread_Reps. 6344* win32_threads.c: Don't include process.h on winCE, 6345improve out of memory handling for thread structures, don't 6346define GC_beginthreadex and GC_endthreadex for winCE. 6347 6348* tests/test.c: Change gcj vtable decriptor type from size_t to 6349GC_word. 6350 6351* gcj_mlc.c: Add comment. 6352* tests/test.c: Change NTEST to NTHREADS. Fork 5 threads by default. 6353Run reverse_test a second time in each thread.Add comments. 6354Don't rely on AO_fetch_and_add. 6355 6356* dyn_load.c (GC_register_dynlib_callback, 6357GC_register_dynamic_libraries_dl_iterate_phdr): Add support 6358for GNU_PT_RELRO relocations. 6359 6360* Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced 6361by GC_SOLARIS_THREADS. 6362* include/gc.h: Improve finalizer documentation. 6363* mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32. 6364* pthread_stop_world.c, Makefile.dj: Fix typos. 6365 6366* win32_threads.c (GC_new_thread): Make first_thread 6367visible to the whole file. 6368(UNPROTECT): New macro. 6369(GC_push_stack_for, GC_suspend, GC_start_world): unprotect 6370thread structures before writing. 6371(GC_suspend): Acquire GC_fault_handler_lock before suspending 6372thread. 6373* os_dep.c: export GC_fault_handler_lock. 6374(GC_remove_protection): Check if already unprotected. 6375 6376* doc/README.win32: Add OpenWatcom warning. 6377* include/private/gcconfig.h: Really check it in. 6378 6379* os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's 6380code from gcc version. 6381* os_dep.c: make gc compilable (optionally) for Cygwin with 6382GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file). 6383* os_dep.c: Make non-win32 GC_write_fault_handler STATIC. 6384* mark.c (GC_noop): fix declaration definition mismatch for DMC. 6385* include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for 6386Watcom (Win32 only). It works. 6387 6388* mach_dep.c: Don't use __builtin_unwind_init for register 6389state on PowerPC/Darwin. 6390 6391* doc/gcdescr.html: Improve description of object freelist 6392structure. 6393* include/private/gc_priv.h: Fix comment for _size_map. 6394 6395* os_dep.c (GC_linux_stack_base): Relax sanity test. 6396 6397* include/private/gc_pmark.h (PUSH_CONTENTS_HDR for 6398MARK_BIT_PER_OBJ): Add missing backslash before eoln. 6399 6400* misc.c (GC_set_warn_proc): Implicitly initialize GC on 6401non-Cygwin win32. 6402 6403* configure.ac: Enable thread-local allocation for sparc-linux. 6404 6405* alloc.c (GC_try_to_collect): Remove duplicate initialization 6406check. 6407* malloc.c (GC_generic_malloc): Remove lw to eliminate single- 6408threaded warnings. 6409* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise. 6410 6411* allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c, 6412finalize.c, include/private/gc_pmark.h, malloc.c, mark.c, 6413os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c, 6414thread_local_alloc.c. 6415* misc.c: Refine comment. 6416 6417* os_dep.c: Define GC_GWW_BUF_LEN more intelligently. Add FIXME 6418comment. 6419 6420* win32_threads.c (GC_push_stack_for): Yet another attempt 6421at the stack_min finding logic. Try to clean up the existing code 6422while minimizing VirtualQuery calls. 6423(GC_win32_start_inner): Register thread before GC_printf. 6424Produce more output with DEBUG_THREADS. 6425*include/gc.h: Update obsolete comments. 6426 6427* tests/test.c: 6428(gcj_class_struct2): Use cast instead of l suffix. 6429Cast GetLastError to int in various places. 6430Avoid unused result warning from incr/decr macros. 6431Add cast for fake_gcj_mark_proc. 6432Cast GC_gc_no to unsigned in printf. 6433 6434* include/gc.h: Fix two typos in comments. 6435 6436* finalize.c: Fix typo in comment. 6437 6438* blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj 6439with lock. 6440 6441* reclaim.c: (GC_reclaim_block): Scan even nearly full blocks 6442if we are checking for leaks. 6443 6444* win32_threads.c: Remove mark lock spinning. 6445* win32_threads.c, pthread_support.c: Update GC_unlocked_count, 6446GC_spin_count, and GC_block_count using atomic operations. 6447* tests/test.c: Declare n_tests as AO_t only if we have threads. 6448 6449* win32_threads.c: Support PARALLEL_MARK. Make printf arg 6450types agree with format specifiers. 6451Add STATIC for GC_threads. 6452* include/private/gcconfig.h: Add FIXME comment. 6453* tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with 6454AO_fetch_and_add1_full. Declare n_tests as AO_t. 6455(WinMain): Don't call GC_use_DllMain. 6456with PARALLEL_MARK or THREAD_LOCAL_ALLOC. 6457 6458* alloc.c (GC_try_to_collect_inner): Don't print redundant 6459GC_bytes_allocd and GC_gc_no. 6460(GC_stopped_mark): Print average world stop time. 6461* include/private/gc_priv.h (MS_TIME_DIFF): Add cast. 6462 6463* misc.c, doc/README.environment: Add support for 6464GC_FREE_SPACE_DIVISOR and GC-disable-incremental. 6465* include/gc.h: Make GC_set_free_space_divisor correspond to 6466(somewhat unfortunate) reality. 6467 6468(Mostly improves LLP64 support.) 6469* backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c, 6470misc.c, reclaim.c: Changed some int and long type to word or size_t 6471(and vice versa where appropriate) 6472* gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h, 6473include/private/thread_local_alloc.h, mark.c, 6474misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate 6475casts to word type when casting from int to pointer (or pointer 6476to int, or data pointer to code pointer) - just to remove the 6477corresponding compiler warning. 6478* ptr_chck.c (GC_is_visible): cast int const to word type to 6479prevent left shift overflow. 6480* os_dep.c: change the type of GC_mem_top_down global variable 6481(containing a flag) to DWORD. 6482* include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS 6483is defined on SunOS x86_64. 6484* misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround 6485for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug 6486(the compiler gets hung if invoked with -Ox -D 6487ALL_INTERIOR_POINTERS -D GC_ASSERTIONS) 6488* backgraph.c: cast GC_gc_no value to unsigned short when 6489assigned/compared to height_gc_no field of back_edges. 6490* os_dep.c (GC_remove_protection): Add ARGSUSED. 6491* win32_threads.c (GC_thread_exit_proc): Remove unused local 6492variable. 6493* mark.c (GC_check_dirty): Move declaration out of func body. 6494 6495* doc/gcinterface.html: Improve REDIRECT_MALLOC documentation. 6496* include/gc.h (GC_register_my_thread): Improve comment. 6497 6498* Makefile.direct: Add comment for -DCHECKSUMS. 6499 6500* thread_local_alloc.c, include/private/thread_local_alloc.h: 6501Fix typos in comments. 6502* finalize.c: Declare mark_procs and GC_register_finalizer_inner 6503STATIC. 6504* malloc.c (GC_free): Move size calculation below assertion. 6505 6506* win32_threads.c (GC_get_stack_min, GC_may_be_in_stack): 6507Add one entry VirtualQuery cache, I_HOLD_LOCK assertions. 6508(GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support. 6509 6510* finalize.c (GC_general_register_disappearing_link): Add 6511assertion. 6512* malloc.c (GC_generic_malloc): Round lb to granules, not words. 6513* mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to 6514granules, not words. 6515 6516* mach_dep.c (NO_GETCONTEXT): Define for sparc linux. 6517* configure.ac: Define mach_dep for sparc-linux. 6518 6519* mark_rts.c (GC_approx_sp): Use volatile to avoid common 6520warning. 6521 6522* dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument 6523order. 6524 6525* alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c, 6526include/gc.h, include/gc_config_macros.h, include/gc_cpp.h, 6527include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h, 6528include/javaxfc.h, include/private/gc_locks.h, 6529include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c, 6530misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c, 6531stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c 6532win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations. 6533* test.c: Remove some old K&R code. 6534 6535* win32_threads.c (GC_may_be_in_stack): New. (GC_Thread_Rep): 6536Add last_stack_min. (GC_push_stack_for): Use last_stack_min. 6537(GC_get_next_stack): Add limit argument, use_last_stack_min. 6538(GC_suspend): make stack_base assignment conditional. 6539* dyn_load.c (win32 GC_cod_add_roots): Pass limit to 6540GC_get_next_stack. 6541* configure_atomic_ops.sh: Remove. 6542* build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32, 6543Makefile.direct: Partially support build directories whose path 6544name contains blanks. 6545* Makefile.am: Support new files (build_atomic_ops.sh, 6546build_atomic_ops.sh.cygwin) 6547 6548* include/private/gc_locks.h, include/private/gc_pmark.h, 6549include/private/gc_priv.h, include/private/gcconfig.h, 6550mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c, 6551pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c: 6552Fix comments. 6553 6554* pthread_support.c: Comment out LOCK_STATS. 6555* include/gc.h: Fix comments. 6556 6557* misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin. 6558* include/private/gcconfig.h: Consider USE_MMAP for Cygwin. 6559* os_dep.c (GC_get_main_stack_base): Use alternate definition 6560with USE_MMAP. 6561* include/private/gc_priv.h: Sometimes define SETJMP on Cygwin. 6562 6563* doc/README: Make it clearer when Makefile.direct is assumed. 6564* cord/cord.am: install include/cord.h. 6565 6566* win32_threads.c (GC_pthread_join, GC_pthread_start_inner): 6567Remove unused variables. 6568* darwin_stop_world.c: Always declare GC_thr_init(). 6569* dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if 6570SHORT_DBG_HDRS is defined. 6571* include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel 6572mark, USE_MARK_BITS version): Refer to correct parameter name. 6573 6574* finalize.c (GC_general_register_disappearing_link): Remove 6575redundant code. 6576* gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed. 6577* os_dep.c: (GC_write_fault_handler): Remove remaining 6578references to deleted variable "code". Remove redundant 6579FREEBSD definitions. 6580* include/private/gcconfig.h (GWW_VDB): Define for X86_64 when 6581defined for X86. (STATIC): Define as "static" with NO_DEBUGGING. 6582 6583* include/private/gc_priv.h: Update MAX_HEAP_SECTS. 6584 6585* dbg_mlc.c (GC_print_smashed_obj): Increase robustness with 6586smashed string, (GC_debug_free_inner): Mark as free. 6587* mallocx.c (GC_malloc_many): Always clear new block if 6588GC_debugging_started. 6589* reclaim.c: Move GC_debugging_started from 6590GC_reclaim_small_nonempty_block() to GC_reclaim_generic(), 6591which is also called directly. 6592* doc/README: Fix spelling error. Update license summary. 6593* include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts. 6594* tests/test.c: Don't define GC_DEBUG if already defined. 6595 6596* doc/simple_example.html: update --enable-full-debug reference, 6597Make HTML formatting standards compliant. 6598* doc/debugging.html, doc/leak.html: Fix HTML formatting bugs. 6599* doc/gcinterface.html: specify encoding. 6600 6601* doc/simple_example.html: Update thread-local allocation 6602description. 6603 6604* configure.ac: Check for gc-debug earlier; replace remaining 6605full-debug tests. 6606* include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr): 6607Use signed offset type. Use ptr_t internally. 6608* doc/gcinterface.html: Update LOCAL_MALLOC description. 6609* doc/README.autoconf, doc/leak.html, doc/README.DGUX386: 6610Fix full-debug reference. 6611* include/gc.h: Rewrite GC_..._INCR and friends. 6612* tests/test.c: Minimally test GC_..._INCR and friends. 6613 6614* mark.c: (GC_push_next_marked, GC_push_next_marked_dirty, 6615GC_push_next_marked_uncollectable): Never invoke GC_push_marked 6616on free hblk. 6617* headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE. 6618(GC_header_cache_miss): Always blacklist pointers for free 6619hblks. Add assertion and comment. 6620* pthread_support.c (GC_register_my_thread): Fix #if indentation. 6621* include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested. 6622Delete it. 6623* include/private/gc_pmark.h: (PUSH_OBJ): Add assertion. 6624 6625* alloc.c, include/gc_mark.h, Makefile.direct: Improve comments. 6626 6627* configure.ac: Set win32_threads on MinGW. 6628 6629Ivan's description of the patch follows. Note that a few pieces like 6630the GC_malloc(0) patch, were not applied since an alternate had been 6631previously applied. A few differed stylistically from the rest of 6632the code (mostly casts to void * instead of target type), 6633or were classified as too minor to bother. Note that 6634all of Ivan's static declarations which did not correct outright 6635naming bugs (as a few did), where replaced by STATIC, which is 6636ignored by default. 6637 6638- minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for 6639GC_malloc(0)); 6640- addition of missing getter/setter functions for public variables 6641(may be useful if compiled as Win32 DLL); 6642- addition of missing GC_API for some exported functions; 6643- addition of missing "static" declarator for internal functions 6644and variables (where possible); 6645- replacement of all remaining K&R-style definitions with ANSI 6646C ones (__STDC__ macro is not used anymore); 6647- addition of some Win32 macro definitions (that may be missing in 6648the standard headers supplied with a compiler) for GWW_VDB mode; 6649- elimination of most compiler warnings (except for 6650"uninitialized data" warning); 6651- several typos correction; 6652- missing parenthesis addition in macros in some header files of 6653"libatomic_ops" module. 6654 6655My highlights based on reading the patch: 6656 6657* allchblk.c: Remove GC_freehblk_ptr decl. 6658Make free_list_index_of() static. 6659* include/gc.h: Use __int64 on win64, define GC_oom_func, 6660GC_finalizer_notifier_proc, GC_finalizer_notifier_proc, 6661add getter and setters: GC_get_gc_no, GC_get_parallel, 6662GC_set_oom_fn, GC_set_finalize_on_demand, 6663GC_set_java_finalization, GC_set_dont_expand, 6664GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect, 6665GC_set_finalizer_notifier. Always define GC_win32_free_heap. 6666gc_config_macros.h: Define _REENTRANT after processing 6667GC_THREADS. 6668* include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test, 6669handling of operator new[] for old Windows compilers. 6670* include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses 6671around arguments. 6672* dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs. 6673* mark.c (GC_mark_and_push_stack): Fix source argument for 6674blacklist printing. 6675* misc.c: Fix log file naming based on environment variable 6676for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor 6677just return current value with 0 argument. Add DONT_USE_USER32_DLL. 6678Add various getters and setters as in gc.h. 6679* os_dep.c: Remove no longer used GC_disable/enable_signals 6680implementations. (GC_get_stack_base): Add pthread_attr_destroy 6681call. No longer set GC_old_bus_handler in DARWIN workaround. 6682* pthread_support.c: GC_register_my_thread must also 6683call GC_init_thread_local. 6684 6685* Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT. 6686* mach_dep.c: Include signal.h. 6687* gc_priv.h: Factor out INLINE declaration. 6688 6689* include/private/gcconfig.h: Update MIPS/LINUX config. 6690* doc/gcdescr.html: Fix typo. 6691* mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext 6692for MIPS/LINUX. 6693 6694* configure.ac: SPARC fixes. 6695* thread_local_alloc.c(GC_mark_thread_local_fls_for): Include 6696size 0, except for gcj. 6697* doc/gc.man: Expand C++ cautions. 6698* include/gc_inline.h: Fix comments. 6699 6700 6701== [7.1] 2008-05-03 == 6702 6703* doc/gcinterface.html: Improve C++ interface documentation. 6704 6705* allchblk.c (GC_allochblk): Check for overflow during size 6706rounding. 6707* tests/huge_test.c: New. 6708* Makefile.direct, tests/tests.am: Add huge_test.c 6709 6710* pthread_support.c: Fix typo in comment. 6711* os_dep.c (GC_win32_get_mem): Add heap section only if 6712allocation succeeded. 6713 6714* malloc.c: (free replacement) Fix caller address space check. 6715 6716* finalize.c (GC_grow_table): Dereference table in null-check. 6717 6718* win32_threads.c (GC_delete_gc_thread, GC_delete_thread): 6719Consistently call CloseHandle. (GC_suspend): Call 6720GC_delete_gc_thread. 6721* tests/test.c: Don't reference GC_print_stats if not exported. 6722 6723* tests/test.c (run_one_test): Don't mention pthread_self(). 6724* misc.c: Declare GC_thr_init(). 6725 6726* allchblk.c (add_to_fl): disable assertions with USE_MUNMAP, 6727and refine assertions to handle huge unmergable blocks. 6728(GC_allochblk_nth): Add comment. 6729 6730* include/private/gcconfig.h: Add missing FREEBSD macro 6731consistency test. 6732 6733* allchblk.c (GC_enough_large_bytes_left): No longer take 6734parameters; return free list index bound. 6735(GC_merge_unmapped): Don't access nexthdr until after null test. 6736(Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate 6737when splitting is allowable only once here, not when considering each 6738block. (GC_allchblk_nth): Accept new may_split parameter. 6739Avoid some redundant tests for exact size matches. 6740* alloc.c (GC_should_collect): Cache min_bytes_allocd. 6741(GC_maybe_gc): Make locking assertion testable. 6742* mark_rts.c: Fix indentation. 6743* pthread_stop_world.c: Replace old GC_err_printf1 reference. 6744* tests/test.c: Remove (void) casts. Optionally print some 6745timing information. 6746 6747* windows-untested/gc.def: Remove CreateThread line. 6748* windows-untested/README: New file. 6749* win32_threads.c (GC_use_DllMain): Force collector initialization. 6750* include/gc.h (GC_use_DllMain): Clarify usage rules in comment. 6751* mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code. 6752* include/gc_cpp.h: Add matching placement delete overloads 6753everywhere. 6754* include/private/gc_locks.h (NO_THREAD): Add cast. 6755* include/private/gcconfig.h: Add test for __HP_aCC. 6756* configure.ac, tests/tests.am: Avoid libgccpp on HP/UX. 6757 6758* doc/README.win32: Fix typo. 6759* configure.ac: Fix printing of enable-shared result. 6760 6761* misc.c (GC_init_inner): Assert !GC_need_to_lock only when 6762defined. (GC_call_with_stack_base): Add GC_API. 6763* os_dep.c (GC_get_stack_base): Add GC_API. 6764* win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread): 6765Add GC_API. 6766* include/gc.h: Add GC_API annotations. 6767* include/private/gc_locks.h: Define UNCOND_LOCK etc. also for 6768PCR. 6769* include/private/gc_pmark.h: Fix comments. 6770 6771* include/private/gc_priv.h, mark_rts.c, typd_mlc.c: 6772Add GC_push_typed_structures() to push GC_ext_descriptors. 6773 6774* tests/test.c: Call GC_INIT for DARWIN; test system type using 6775gcconfig.h-defined macros. 6776 6777* allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create 6778blocks large enough that their size, when interpreted as a signed 6779value, would be negative. 6780* include/private/gc_priv.h: Comment hb_sz range limit. 6781 6782* mark.c (GC_push_next_marked): correct comment. 6783* Makefile.direct: document NO_PROC_STAT. 6784* include/private/gcconfig.h: Accommodate NO_PROC_STAT. 6785 6786 6787== [7.1alpha2] 2008-01-10 == 6788 6789* Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S 6790again. Refer to build directory as ".". 6791 6792* configure.ac: Ignore --enable-parallel-mark on Darwin for now. 6793* darwin_stop_world.c: Add FIXME comment for parallel marker. 6794 6795* include/private/gc_priv.h: Update MAX_ROOT_SETS 6796and LOG_PHT_ENTRIES to handle larger heaps. 6797 6798* include/gc.h (GC_INIT,GC_init): Update comments. 6799 6800* allchblk.c, alloc.c, include/private/gc_priv.h: 6801Track GC_bytes_dropped and use in GC triggering decisions. 6802* alloc.c (min_bytes_allocd): Weight atomic blocks less. 6803 6804* alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER 6805adjusting p. 6806 6807* Makefile.am: Add NT_X64_THREADS_MAKEFILE. 6808 6809* NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment. 6810* alloc.c: Add declaration for GC_add_current_malloc_heap. 6811* win32_threads.c (GC_beginthreadex): Clean up error 6812return code. 6813* doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct: 6814Add NT_X64_THREADS_MAKEFILE. 6815 6816* alloc.c: Define GC_version instead of in version.h. 6817* version.h: Remove. 6818* include/gc_version.h: Move most of version.h here. 6819* include/gc.h: Include gc_version.h. 6820* gcname.c, add_gc_prefix.c: include gc.h instead of version.h. 6821* Makefile.direct, Makefile.dj, Makefile.am, include/include.am: 6822Adjust for version.h rename. 6823 6824* configure.ac: Put libatomic_ops links in build directory. 6825* Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S 6826as nodist sources. 6827 6828* include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS, 6829GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS. 6830 6831* alloc.c: Deal correctly with address wrapping for 6832GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr. 6833* finalize.c, include/gc.h (GC_register_disappearing_link, 6834GC_register_finalizer_inner): Improve out-of-memory handling. 6835* include/private/gc_pmark.h: Fix comment spelling. 6836 6837* include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable 6838in other contexts. 6839 6840* include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc. 6841 6842* gc_cpp.cc: Don't include gc_cpp.h from local directory. 6843 6844* allchblk.c, configure.ac (add --enable-munmap) 6845 6846* dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro 6847GC_GETSECTBYNAME instead. 6848* include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the 6849architecture (Darwin). 6850 6851* reclaim.c (GC_bytes_found): Expand comment. 6852* thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass 6853granules, not bytes, to GC_FAST_MALLOC_GRANS. 6854* include/gc.h: Never include gc_local_alloc.h. 6855* tests/test.c: Add size zero allocation tests. 6856 6857* malloc.c: Update GC_large_allocd_bytes on explicit deallocation. 6858* allchblk.c: Sanity check GC_max_large_allocd_bytes. 6859 6860* Makefile.direct: Invoke $(MAKE) instead of make. 6861 6862* doc/scale.html: Reflect gc7 thread local allocation behavior. 6863 6864* include/extra/gc.h, include/extra/gc_cpp.h: New. 6865* include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include 6866again. 6867 6868* pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN) 6869for HURD. 6870 6871* include/private/gcconfig.h: Add Linux/mips-64 support. 6872 6873* dbg_mlc.c: Use random() on all glibc systems. 6874* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on 6875HURD. Add comment. 6876* pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate 6877systems without SA_SIGINFO. 6878 6879* include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses. 6880* tests/test.c (run_one_test): Add GC_PTR_STORE test. 6881No longer test for RS6000. 6882 6883* alloc.c, backgraph.c, headers.c, include/private/gc_priv.h: 6884Maintain GC_our_memory and GC_n_memory. 6885* dbg_mlc.c (GC_print_smashed_obj): Improve message. 6886(GC_print_all_smashed_proc): Pass client object address instead of 6887base. 6888* dyn_load.c (sort_heap_sects): New. (GC_register_map_entries): 6889Register sections that are contiguous and merged with our heap. 6890* malloc.c, os_dep.c (GC_text_mapping): Check for just base name 6891of libraries. 6892* malloc.c (calloc): Check for special callers even with 6893USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary 6894malloc/free tracing. 6895* misc.c: No longer call GC_init_lib_bounds explicitly. 6896* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always 6897initialize on demand. 6898* tests/test.c: Call GC_INIT only when required. 6899 6900* Makefile.direct: Remove comment fragment. 6901* tests/tests.am: Add smashtest. 6902* configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc. 6903* pthread_support.c: Fix comment spelling. 6904* include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with 6905GC_LINUX_THREADS and REDIRECT_MALLOC. 6906* tests/smash_test.c: Initial check-in. 6907* obj_map.c: Print log entry to correct file. 6908* include/private/thread_local_alloc.h: Add TlsAlloc error check. 6909 6910* alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap() 6911while world is still running. 6912* os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap() 6913with world stopped. 6914* include/gc.h (GC_INIT for cygwin): Always call GC_add_roots. 6915* misc.c (GC_init/GC_init_inner): Perform all work in 6916GC_init_inner. 6917* Makefile.direct: Expand -DUSE_MUNMAP comment. 6918 6919* include/gc.h: Define uintptr_t explicitly for VC++6. 6920* msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't 6921exist. 6922 6923 6924== [7.0] 2007-07-02 == 6925 6926* include/gc_config_macros.h: Also check for IA64 when setting 6927GC_HPUX_THREADS. 6928* mallocx.c: Change my_bytes_allocd to signed_word. 6929* include/gc_pthread_redirects.h: Remove obsolete Solaris threads 6930(as opposed to pthreads) support. 6931 6932* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() 6933on ARM/Linux. Check getcontext() return value. 6934 6935* backgraph.c (per_object_func): Make argument types consistent. 6936(GC_traverse_back_graph): Mark GC_deepest_obj. 6937 6938* finalize.c (GC_finalize): Change dl_size and fo_size to size_t. 6939* os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option. 6940 6941* doc/README.win32, doc/README, README.QUICK: Fix some of the worst 6942anachronisms. 6943* dyn_load.c: Partially support cygwin, but don't enable it yet. 6944 6945* Makefile.am: Use -no-undefined for libgc. 6946* Makefile.direct: Document USE_PROC_FOR_LIBRARIES. 6947* dyn_load.c (GC_register_map_entries): Rename prot_buf to prot 6948consistently. 6949* misc.c: Fix some WARN calls. Move GC_is_initialized setting and 6950GC_thr_init() call. 6951* os_dep.c: Consistently use WARN where appropriate. 6952* thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead 6953remove inappropriate pthread.h include. 6954* doc/README.linux: Remove some anachronisms. 6955 6956* alloc.c: Also use GC_check_tls on non-Linux systems. 6957* mallocx.c (GC_reclaim_generic): Remove bogus declaration. 6958* include/private/gc_priv.h (GC_reclaim_generic): Declare correctly 6959with prototype. 6960 6961* alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment. 6962(GC_print_heap_sects): Use size_t instead of unsigned long. 6963* thread_local_alloc.c (GC_lookup_thread): Define in the correct 6964context. 6965* win32_threads.c, include/gc_config_macros.h: The last of Romano 6966Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h. 6967* include/gc_inline.h: Avoid gc_priv.h dependencies. 6968* tests/test.c (check_heap_stats): Replace unsigned long with size_t. 6969 6970* NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv. 6971* mark_rts.c (GC_push_roots): Fix kind type. 6972 6973* doc/README.win64: New file. 6974* doc/doc.am, Makefile.direct: Add README.win64. 6975 6976* Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE. 6977* NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags. 6978* allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c, 6979finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c, 6980obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c, 6981win32_threads.c, cord/de_win.c, include/gc_mark.h, 6982include/private/gc_hdrs.h, include/private/gc_pmark.h, 6983include/private/gc_priv.h, tests/test_cpp.cc: 6984Replace old style function declarations. Clean up integral types. 6985Remove register declarations. The change in malloc.c and the 6986"int descr" declaration in mark.c are the most likely to have 6987been real bugs outside of win64. 6988* msvc_dbg.c: Disable on win64. 6989* win32_threads.c: Add AMD64 support. 6990* include/gc.h: no backtrace on AMD64 for now. 6991 6992* msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s. 6993 6994* include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions. 6995Don't include windows.h in an extern "C" context. 6996* include/private/gcconfig.h: Fix win64/X86_64 configuration. 6997* tests/test.c: Eliminate more old style function definitions. 6998Cleanup pointer and integer casts for win64. 6999* tests/test_cpp.cc: Don't include gc_priv.h. 7000* NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005. 7001* NT_X64_STATIC_THREADS_MAKEFILE: New. 7002 7003* win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore 7004FINISHED threads for suspension. (GC_pthread_join): Add 7005pthread_self() cast. (GC_pthread_start_inner): Execute cleanup 7006handler when popping it. 7007* include/private/gc_locks.h: Inline THREAD_EQUAL for 7008GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have 7009pthreads. 7010 7011* gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c, 7012tests/test.c: Accommodate GC_WIN32_PTHREADS. 7013* include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS. 7014* include/gc_config_macros.h: Define both PTHREADS and 7015GC_WIN32_THREADS. 7016* include/private/gc_locks.h: Nonstandard definitions of 7017NUMERIC_THREAD_ID for GC_WIN32_PTHREADS. 7018* doc/README.win32, Makefile.direct: Include documentation 7019for GC_WIN32_PTHREADS. 7020* Makefile.direct: Remove some anachronisms in the documentation. 7021 7022* Makefile.am: Move includes to bottom. Add better library 7023dependencies. Increment library version. Remove "SUBDIRS += .". 7024* cord/cord.am, tests/tests.am: Add better library dependencies. 7025Remove now unnecessary dependencies. 7026* include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread): 7027Move to define on all Windows platforms. (_beginthread): define 7028to generate error if used. 7029 7030* include/private/gc_locks.h: Format to 80 columns. 7031 7032* malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC. 7033* NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars 7034rc. 7035* misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded 7036case. 7037* win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER. 7038(GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail. 7039* include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API. 7040(GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare. 7041* tests/test.c: Add GC_reachable_here() call. 7042 7043* alloc.c (GC_try_to_collect): Call GC_init if necessary. 7044* tests/thread_leak_test.c: Don't unconditionally define 7045GC_LINUX_THREADS. 7046 7047* Makefile.am: Remove extra_ldflags_libgc definition. 7048 7049* include/private/gc_priv.h: Define AO_REQUIRE_CAS. 7050 7051* finalize.c (GC_unreachable_finalize_mark_proc): Don't return void 7052value. 7053 7054 7055== [7.0alpha9] 2007-05-15 == 7056 7057* Some gc6.9 changes. 7058* Change FindTopOfStack decl in darwin_stop_world.c. 7059* Move some static tests from misc.c to gcconfig.h. Use #error. 7060* Add GC_print_free_list() function (thanks to Bruce Hoult). 7061* Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov, 7062Barry DeFreese, and possibly other Debian maintainers). 7063* __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to 7064Peter Wang). 7065* Integrated various MacOSX patches and tried to reconcile them (thanks to 7066Allan Hsu, several contributors at Apple, and probably others). 7067* Added some casts to powerpc.h in libatomic_ops to silence warnings. 7068 7069* Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist. 7070* include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add: 7071remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now 7072unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update. 7073* pthread_stop_world.c, pthread_support.c, win32_threads.c: Use 7074NUMERIC_THREAD_ID, THREAD_EQUAL. 7075* include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove. 7076* include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on 7077ARM. 7078 7079* dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's 7080GC_debug_register_finalizer_unreachable() patch from gcc tree. 7081* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions 7082to check GC has been initialized. 7083 7084* include/gc_cpp.h: Documentation updates. 7085* include/gc_config_macros.h: Don't check for __ppc__ to set 7086DARWIN_THREADS. 7087* Makefile.am: Include configure_atomic_ops.sh in dist. 7088 7089* Makefile.am: Don't distribute copied atomic_ops files. Include 7090libatomic_ops with "make dist". 7091* configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads. 7092* win32_threads.c: Report error for Cygwin + GC_DLL. 7093 7094* Makefile.direct: Update THREAD_LOCAL_ALLOC documentation. 7095* cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove 7096MakeProcInstance anachronism. 7097* doc/README.macros: Officially remove elif prohibition. 7098Remove documentation for defunct SRC_M3 support. 7099* include/gc.h: Remove more SRC_M3 references. 7100* include/private/gcconfig.h: Remove still more SRC_M3 references. 7101GC_SOLARIS_THREADS no longer needs to be checked separately. 7102 7103* thread_local_alloc.c, include/private/thread_local_alloc.h: 7104Spell __declspec correctly. 7105* NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation. 7106 7107* doc/README.win32: Adjust GC_win32_dll_threads rules again. 7108 7109* mark.c (GC_mark_some wrapper): Restructure for readability, handle 7110GC_started_thread_while_stopped. 7111* misc.c (Win32 GC_write): Lock GC_write_cs only if needed. 7112* win32_threads.c: (client_has_run): remove, 7113GC_started_thread_while_stopped, GC_attached_thread: add. 7114(GC_push_all_stacks): Add verbose output. 7115(DllMain): Avoid initializing collector or the like. 7116Never update both thread tables. 7117* doc/README.win32: Adjust GC_win32_dll_threads rules. 7118 7119* pthread_stop_world.c (GC_push_all_stacks): Print thread count with 7120GC_PRINT_VERBOSE_STATS. 7121 7122* configure.ac: Comment out redundant 7123AC_DEFINE(NO_EXECUTE_PERMISSION). 7124* sparc_mach_dep.S: Remove single quote in comment. 7125* include/private/gcconfig.h: Fix DATAEND for NONSTOP. 7126* win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain. 7127(GC_use_DllMain): Fix assertion. 7128 7129* configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin. 7130* Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc. 7131* include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin 7132targets. Remove comments. 7133Prepare ppc64 support for Darwin. 7134 7135* darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings. 7136Make i unsigned. 7137(GC_stop_world): Likewise. Remove unused GC_thread p. 7138(GC_start_world): Likewise. 7139 7140* os_dep.c: Define GC_darwin_register_mach_handler_thread extern. 7141Remove double SIG_HNDLR_PTR definition. 7142(GC_forward_exception): Fix compiler warnings, make i unsigned. 7143Initialize thread_state to NULL. 7144(catch_exception_raise): Fix compiler warnings, make i unsigned. 7145 7146* include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant): 7147also define for X86_64. 7148* configure.ac: Move generic gnu (Hurd) case to below kfreebsd case. 7149* README.changes: Point to ChangeLog. 7150 7151* darwin_stop_world.c: Move THREAD_FLD defines to ... 7152* include/private/gc_priv.h: ... here. 7153Fix THREAD_STATE definitions for ppc64. 7154* os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member 7155access. 7156 7157* configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with 7158HAS_X86_THREAD_STATE32_*. 7159(x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with 7160HAS_X86_THREAD_STATE64_*. 7161Added value 1 in the above AC_DEFINE's. Important for the upcoming 7162Leopard. 7163* include/private/gcconfig.h: Modified X86_64 define for Darwin. 7164Removed __x86_64__ check in POWERPC section. Added base definitions 7165for the X86_64 Darwin port. 7166* include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION 7167to distinguish between 32 and 64-bit applications. Added definitions 7168for X86_64 Darwin. 7169* darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And 7170replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX. 7171(GC_push_all_stacks): Added code for X86_64 Darwin. Even for the 7172!DARWIN_DONT_PARSE_STACK. Maybe obsolete. 7173* dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER. 7174(GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION. 7175Distinguish between getsectbynamefromheader_64 and 7176getsectbynamefromheader. 7177* os_dep.c (catch_exception_raise): Introduce exception definition for 7178X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with 7179x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr. 7180 7181 7182== [7.0alpha7] 2006-09-19 == 7183 7184* More 6.7 changes. 7185* Declare GC_dump() in gc.h. 7186* Add --enable-large-config, which just defines the LARGE_CONFIG macro. 7187* Make GlobalAlloc address alignment a bit more intuitive (thanks to 7188Charles Mills). 7189* Use #elif in the definitions of GET_MEM. 7190* Overhaul porting.html. Remove corresponding text from README. 7191* Fix typo in DARWIN section of gcconfig.h. 7192* Fix Darwin thread memory leak (thanks to Bruce Mitchener). 7193* Update x86 AO_test_and_set implementation to use "=q". 7194* Add $(EXEEXT) to many tests in tests/tests.am. (Corresponds to a 71956.7 fix, which no longer applied.) 7196* Fix Darwin/PPC port. 7197* Fix Cygwin/threads port. 7198* Fix gcj malloc support. 7199* For GNU-style make, don't build libatomic_ops unless threads are requested. 7200This should allow single-threaded builds on platforms which do not 7201currently support libatomic_ops. 7202* Clean up and hopefully fix the CFLAGS calculation for GNU build. 7203(Substantially improves things on HP/UX.) 7204* Integrated Andrei Polushin's Visual C++ patches. These provide for 7205stack traces, better C++ debug support, and better log file handling. 7206Note that these change the location of the log file to a the path of the 7207executable with a .log extension. To get the old behavior back, define 7208OLD_WIN32_LOG_FILE. For the time being, I'm checking his project 7209files and the like into a windows-untested subdirectory. They 7210are almost certainly already out of date, but better than what we had 7211before. 7212* Fixed some win32 threads bugs, and added support for _beginthreadex. 7213* Fix zero size thread local allocation so that explicit deallocation 7214works correctly. 7215* Removed serious bug in GC_malloc_uncollectable(large size). 7216* Do not try to do thread-local gcj allocation in incremental mode. There 7217are races in setting up the descriptor. 7218* Add GC_INIT() to middle.c, fix some more GC_printfn calls. 7219* Some assertions erroneously used I_HOLD_LOCK() negatively, even though 7220it can now spuriously return TRUE. 7221* Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL. 7222* On Linux and some Un*x variants, allocate memory by first trying sbrk, 7223and then switching to mmap if that fails. 7224* Fixed /proc/x/maps reading to deal with asynchronous deletions. 7225* Fix REDIRECT_MALLOC with threads on Linux. It now usually seems to work 7226with ugly hacks that include having calloc behave differently when it is 7227called from ld.so or the pthreads library. A reasonable amount of 7228infrastructure was added to support some of this. (Thanks to Roland McGrath 7229for ideas and information.) 7230* Import various updated build scripts. 7231* Add GC_register_has_static_roots_callback (thanks to Andrew Haley). 7232* Fix serious bugs in GC_malloc_atomic_uncollectable(). 7233* Return GC_SUCCESS form GC_get_stack_base(). 7234* Fix several atomic_ops problems on IA64 with HP Compiler. 7235* Update to atomic_ops-1.2. 7236* Fix hb_n_marks description and reclaim.c assertion. 7237* Various additional win32 threads fixes. 7238* Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE. 7239 7240 7241== [7.0alpha5] 2005-09-29 == 7242 7243* More 6.6, 6.7 changes. 7244* Some Solaris fixes, including some more general changes in how 7245the assembly pieces of mach_dep.c are handled. 7246* Removed a lot of SOLARIS_THREADS-specific code that was only 7247needed with the old implementation. This included many (mostly no-op) 7248versions of GC_is_fresh. 7249* Don't use atomic_ops in gc_locks.h unless we need threads. 7250* Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK. 7251* Removed Solaris GC_INIT hack. It's a workaround for a long dead bug, 7252and it seemed to be wrong anyway. 7253* Changed win32_threads.c to require preprocessor-based interception 7254of thread routines by default. A client call to GC_use_DllMain is 7255now required to get the old behavior in which DllMain is used to implicitly 7256register threads. This was done for uniformity with other platforms, and 7257because the DllMain solution seemed to require very tricky code which, 7258at least in the past, imposed hard bounds on the number of threads. 7259* Many small changes to make thread support work again on Cygwin. 7260* Moved definition of allocator lock etc. to pthread_support.c and 7261win32_threads.c for those two cases. 7262* Got rid of the FASTLOCK() machinery. It doesn't seem useful on modern 7263platforms. 7264* Cleaned up the uncollectible allocation routines, speeding up the 7265slower paths. The code did enough unnecessary work off the critical path 7266that the underlying logic was getting hard to extract. 7267* No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL. Indications 7268are it just works, and I think the reasons for it not working disappeared 7269a while ago. 7270* Fixed bugs in hb_n_marks calculation and assertion. 7271* Don't use __builtin_expect for pre-3.0 gcc. 7272* Define GWW_VDB only for recent Microsoft tool chains. 7273* Add overview.html to doc directory. 7274* Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings. 7275* Made thread local allocation sort of work with Cygwin. The code should 7276be there to deal with other Windows variants, But non-Cygwin Windows 7277threads need more bug fixes. 7278 7279 7280== [7.0alpha4] 2005-08-02 == 7281 7282* Various 6.5, 6.6 changes. 7283* Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead 7284(thanks to Ben Maurer). 7285* Integrated build patches from Davide Angelocola and Petter Urkedal. 7286* Fix dynamic-linker-based pthread call redirection. 7287* Renamed RS6000 to POWERPC/AIX. 7288* Allow recovery from SIGSEGV in marker on Linux. This works around 7289a race in thread stack marking if /proc is used to find roots. We do 7290that by default with malloc redirection and threads. This involved 7291moving some GC_find_limit and SETJMP related declarations to gc_priv.h. 7292* Added doc/porting.html file. 7293* Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme 7294memory overwrite errors. 7295* Added trivial NO_INCREMENTAL flag to facilitate debugging. 7296* Added GC_getattr_np-based GC_get_stack_base (untested). 7297* Separated thread local allocation into a separate file and added the 7298beginning of win32 support for that. 7299 7300 7301== [7.0alpha3] 2005-04-28 == 7302 7303* Added support for dlopen-based interception of pthread functions. 7304This is only half done. The gc.h redefinitions currently interfere. 7305* Integrated major automake overhaul from Petter Urkedal. 7306 7307 7308== [7.0alpha2] 2005-04-07 == 7309 7310* GC_bytes_allocd was incremented by a possibly uninitialized variable 7311in GC_generic_malloc_inner. (Bug introduced in gc7.0alpha1. Thanks 7312to Ben Hutchings for tracking it down.) 7313* Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani). 7314* Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit 7315implementation for win32. 7316* Removed pc_gc.tar and floppy targets in Makefile.direct. Removed 7317pc_excludes file. 7318* No longer include GC_bytes_wasted when evaluating allocation progress. 7319Since we are now counting live memory, it no longer makes sense. 7320* Applied Davide Angelocola's configure patch. There are now separate 7321Makefile.am's in the cord and tests subdirectory, more tests, etc. 7322* Renamed configure.in to configure.ac. 7323* Merged a very small number of Nathanael Nerode's configure.ac 7324cleanups from the gcc tree. Unfortunately, that file is a bit 7325different from ours. 7326* Changed EINTR handling in sem_wait slightly. 7327* Restructure the root marking code. Remove all traces of 7328USE_GENERIC_PUSH_REGS, and effectively make it the default. 7329Make it easier to pass a context pointer to the mark routine, in 7330case we ever want to do precise stack marking. 7331* Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking(). 7332This remains undocumented, and only implemented for pthreads. But it 7333removes an otherwise unavoidable race with stores of callee-save 7334registers. 7335* Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case. This 7336resulted in bogus complaints in heap dumps. 7337* Upgrade to libatomic_ops-1.0, and update build structure to match. 7338* Remove SRC_M3 support. Clean up lock initialization code in misc.c. 7339* Removed gc_local_alloc.h. If THREAD_LOCAL_ALLOC is defined, the 7340thread local allocation routines are now called automatically. 7341* Renamed gc_inl.h back to gc_inline.h. Changed the interface appreciably 7342since locking has turned into a dominant issue, and in-line allocation 7343only makes sense if it's no worse than thread-local allocation. 7344Gc_inline.h is now also used to implement thread-local allocation. 7345* Finished replacing stubborn allocation with manual write barrier. 7346Untested. 7347* Use thread-local allocation code by default. 7348* Added GC_register_my_thread and friends for Posix and win32. 7349* Patch for GWW_VDB from Ben Hutchings. 7350* Removed explicit THREAD_LOCAL_ALLOC tests, since that now always 7351redefines GC_malloc. 7352* Removed now unused AIX memory allocation code. 7353* Various minor fixes for bugs introduced in 7.0alpha1. 7354 7355 7356== [7.0alpha1] 2004-11-09 == 7357 7358* Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler 7359and use ANSI constructs unconditionally. 7360* Introduce #elif and #error in some of the appropriate places. 7361* Remove GC_printf cruft. Use stdargs. 7362* Remove separate Solaris threads support. Use the more generic Posix 7363implementation. 7364* Use atomic_ops for atomic operations and memory barriers. 7365* Clean up MPROTECT_VDB implementation. Use SA_SIGINFO wherever 7366possible. 7367* Remove broken SIGNALS stuff. 7368* Use size_t instead of word, where appropriate. 7369* Add .S.o rule to Makefile.am. 7370* Officially discontinue SunOS4, several old flavors of M68K (SunOS4, 7371A/UX, HP), IBM PC/RTs and RISCOS/Irix4. (I doubt the old code worked. 7372If anyone cares, these should be easy to resurrect.) 7373* Add EXPECT() in some critical places. 7374* Redefined hb_sz and hb_body to deal with bytes rather than words. 7375This affected a great deal of code. I would like to consistently use 7376byte offsets and sizes where there's not a convincing reason to do 7377otherwise. 7378* Redefined several other variables (GC_mem_found, GC_words_allocd) 7379etc. to use units of bytes. Most of these were also renamed to 7380reflect that fact. 7381* Killed as many "register" declarations as possible. 7382* Partially replaced stubborn allocation with manual write barrier. 7383It's currently broken. 7384* Restructured mark code, to allow mark bits to be kept either on 7385a per allocation granule or per object basis. The emphasis is 7386now on the -DUSE_MARK_BYTES option, since individual bits perform 7387quite badly on hyper-threaded P4s, and are probably suboptimal on 7388other architectures. -DUSE_MARK_BITS is currently broken, and may 7389be resurrected only for the single-threaded case. This significantly 7390reduced the cache footprint required by auxiliary GC data structures. 7391It also reduces space overhead for small heaps. It probably slows 7392things down slightly if interior pointers are very common. 7393* As part of the above, we now maintain an approximate count of set 7394mark bits in each heap block. 7395* As part of the above, the semantics of hb_map changed drastically. 7396For MARK_BIT_PER_OBJ, it doesn't exist. For MARK_BIT_PER_GRANULE, 7397it is purely a way to replace a mod instruction with a table lookup. 7398(Somewhat to my surprise, this still wins on modern hardware.) 7399* Removed PRINTSTATS, GATHERSTATS, and SILENT macros. Everything is 7400now controlled by GC_print_stats variable and GC_PRINT_STATS 7401and new GC_PRINT_VERBOSE_STATS environment variables. 7402* Add GC_log_printf and use it consistently for logging output. 7403* Unconditionally count the objects we reclaim in the sweep phase. 7404For thread local allocation, we need that anyway, and we expect 7405that's increasingly the only case that matters. And it simplifies 7406the code. In general expect minor performance hacks that benefit 7407only the single-threaded case to disappear. 7408* Remove GC_quiet from gc.h and elsewhere. 7409* Changed the heap expansion heuristic, and the definition of 7410GC_free_space_divisor, to refer to live data size, instead of total 7411heap size. I believe this is much more robust. It wasn't previously 7412possible, because we didn't have access to live data size. 7413* Thread local allocation added the extra byte in twice: Once in 7414thread_local_alloc, and once in malloc_many. 7415* Removed GC_malloc_words_small and GC_gcj_fast_malloc. A new 7416mechanism based on the thread local allocation data structures 7417is expected to be added instead. This should allow inlined code 7418that is both fast and doesn't rely on collector internals. 7419* Changed both free lists and reclaim lists to be indexed by granules 7420instead of words, norming halving their size. 7421* MERGE_SIZE is now the only option, and the macro was removed. 7422(Without it, we need a memory reference to GC_all_interior_pointers 7423anyway. Thus it costs us nothing.) 7424* Change GC_size_map to map to granules instead of words. Make sure 7425that every possible size up to TINY_FREELISTS is present. 7426* Split of macros need for fast inline allocation into gc_tiny_fl.h 7427in anticipation of a new inline allocator that doesn't rely on GC 7428internals. 7429* Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS 7430in anticipation of a merge with the inline allocation code. 7431* Removed ALIGN_DOUBLE. This is mostly handled by GRANULE_BYTES. 7432* Make locking on most platforms conditional on GC_need_to_lock. 7433 7434 7435== [6.9] == 7436 7437* Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang). 7438* Fix M68K LINUX port (thanks to Debian packagers). 7439* __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang). 7440* Integrated Allan Hsu's patch for OS X VM deallocation problems. 7441* Applied FreeBSD/X86_64 patch. 7442 7443 7444== [6.8] 2006-07-08 == 7445 7446* Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and 7447Thomas Klausner). 7448* Improvements to the HP/UX section of configure.in/configure.ac (thanks 7449to Andreas Tobler). 7450* GC_unix_get_mem could neglect to release the malloc lock on Irix, under 7451extremely unlikely circumstances. (Thanks to Jean-Baptiste Nivois for 7452some careful code inspection.) 7453* Added support for kFreeBSD + glibc (thanks to Petr Salinger). 7454* Fix more MacOS threads memory leaks (thanks to Allan Hsu). 7455* Added initial Solaris/X86-64 support (thanks to Rainer Orth). 7456 7457 7458== [6.7] 2006-03-03 == 7459 7460* Add "int" to Solaris "end" and "etext" declaration in gc.h. Declared 7461the symbols with underscores and as arrays, since that's what's actually 7462used. Perhaps this could all just be removed. (Thanks to John Bowman.) 7463* Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook). 7464* Added casts for assignments to hb_last_reclaimed, which truncate the 7465value. Added a cast to GC_adj_words_allocd. Use GetModuleHandleA 7466when retrieving a handle to kernel32.dll under win32. 7467* Added Tandem S-Series support. (Thanks to Craig McDaniel. A modified 7468version of his patch was applied, and hence breakage is probably not 7469his fault.) 7470* Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks 7471to Hanno Boeck). 7472* Changed a test for LINUX in config_macros.h to one for __linux__. 7473* Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to 7474David Ayers). 7475* Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack 7476(thanks to Andreas Tobler). 7477* Add support for Darwin/X86 (thanks to Geoff Norton and the Mono 7478developers). 7479* Merge in some recent gcc fixes. Add ppc64 asm code. (Thanks to 7480Bryce McKinlay and other GCJ developers.) 7481* Scan MEM_PRIVATE sections under Windows ME and predecessors. 7482* Interior pointers with some largish offsets into large objects could 7483be ignored, if GC_all_interior_pointers was set. (Oddly this worked 7484correctly for stack references if it was not set. Otherwise it failed 7485for both stack and heap references. Thanks to Andrew McKinlay for the 7486critical test case.) 7487* Integrated Tatsuya Bizenn's NETBSD threads support, with some 7488untested changes. 7489* Added GC_strdup and friends to make leak detection work correctly 7490for strdup clients (thanks to Jon Moore). Fixed the existing strdup 7491with malloc redirection to handle a null malloc return correctly. 7492 7493 7494== [6.6] 2005-09-09 == 7495 7496* Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea). 7497* Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin. 7498* Integrated Andreas Tobler's FreeBSD/PowerPC patch. 7499* Don't access the GC thread structure from the restart handler. It's 7500unsafe, since the handler may run too late. (Thanks to Ben Maurer for 7501tracking this down.) 7502* Applied Christian Thalinger's patch to change comment syntax in 7503alpha_mach_dep.S. 7504* Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to 7505Juan Jose Garcia-Ripoll). 7506* Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to 7507Sugioka Toshinobu and Christian Thalinger). 7508* Rewrote GC_parse_map_entry. This assumed a fixed column layout of 7509/proc/self/maps on Linux. This ceased to be true about 2 years ago. 7510The old code is probably quite problematic with -DREDIRECT_MALLOC. It 7511is also used by default for IA64, though I haven't seen actual failures 7512there. 7513* More consistently define HBLKSIZE to 4096 on 64 bit architectures with 75144K pages (thanks to Andrew Haley). 7515* With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks 7516to Ben Hutchings for the observation and patch). 7517* Move up struct callinfo declaration to make gcc 4.0.2 happy. 7518 7519 7520== [6.5] 2005-05-22 == 7521 7522* Integrated Paolo Molaro's patch to deal with EINTR in sem_wait. 7523* Make GC_approx_sp() write to dummy location to ensure that stack 7524is grown here, when sp looks reasonable, rather than later, when 7525it might look like a bad memory reference. (Problem was never 7526observed that I know of. But on rereading the code it seemed 7527dubious.) 7528* Separate out GC_with_callee_saves_pushed and sometimes call 7529it from GC_suspend_handler in pthread_stop_world.c. Callee-save 7530register values sometimes failed to get traced under HP/UX on 7531PA-RISC. Linux/IA64 had the same problem, though non-stacked 7532callee-save registers seem to be so rarely used there that nobody 7533ever noticed. 7534* Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch 7535from Andreas Tobler, which I had lost. 7536* Fix compare_and_exchange implementation for gcc/IA64 to deal with 7537pickier compiler versions. 7538* Fixed Itanium 32-bit ABI support (HP/UX). In particular, the 7539compare_and_exchange implementation didn't consider that possibility. 7540* Undefine GC_pthread_detach in win32_threads.c (thanks to 7541Tommaso Tagliapietra). 7542* Fixed inclusion of frame.h for NETBSD in os_dep.c. 7543* Applied Dan Bonachea's patch to use mmap on AIX. 7544* Several fixes to resurrect the Irix port on recent OS versions. 7545* Change ALPHA to use LINUX_STACKBOTTOM. 7546* Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential 7547bad values of __libc_stack_end on that platform (thanks to David Miller). 7548* Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set. 7549(Unnecessary in 7.0) 7550* Force a define of __STDC__=0 for the IBM compiler on AIX, so that 7551we get prototypes. (Unnecessary in 7.0) 7552* GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND 7553which are only defined in private include files. 7554* Integrated some small gcconfig.h patches from Dan Bonachea. Also 7555relaxed assertion about FreeBSD stack size in pthread_support.c. 7556* Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit 7557support. This may need additional work. 7558* Avoided potentially infinite recursion in GC_save_callers if 7559the system backtrace calls malloc. The workaround currently requires 7560__thread support if this code is used with threads. 7561* Avoided another similar infinite recursion by conditionally 7562invoking GC_save_callers in alloc.c (thanks to Matthias Andree 7563for helping to track down both of these). 7564* Removed all traces of aix_irix_threads.c. AIX and Irix now use 7565pthread_support.c and pthread_stop_world.c. The old code appeared 7566to be unreliable for AIX, and was not regularly maintained. 7567* On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed; 7568they're not always safe to read. 7569* Fixed a previously vacuous assertion (diagnosed by the SGI compiler) 7570in GC_remove_from_fl. 7571* Fix stack_size assertion in GC_pthread_create. 7572* Fix assertion in GC_steal_mark_stack. 7573 7574 7575== [6.4] 2004-12-21 == 7576 7577* Merge gcconfig.h changes from gcc tree. 7578* Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h, 7579aix_irix_threads.c, and solaris_threads.c to get thread definitions. 7580* Start marker threads in GC_thr_init, so that they get started even 7581if no other threads are ever started. (Oddly enough, the parallel 7582collector worked correctly, though not well, with no helper threads.) 7583* Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc 7584is set (thanks to Alexander Petrossian). 7585* GC_PRINT_BACK_HEIGHT would deadlock with thread support. 7586* Let in_progress_space in backgraph.s grow dynamically. 7587* Fix README.solaris2. The GC_thr_init() hack doesn't work anymore. 7588* Convert GC_finalizer_mem_freed to bytes in allchblk.c. 7589* Add missing declaration for GC_generic_malloc_words_small_inner. 7590Without it, s390x breaks. (Thanks to Ulrich Weigand.) 7591* Applied several MacOSX patches to support older tool chains (thanks 7592to Stefan Ring). 7593* Bug fix for NetBSD/amd64 (thanks to Marc Recht). 7594* Add NetBSD/sh3 support (thanks to Uchiyama Yasushi). 7595* Fixed an uninitialized variable in cordprnt.c. 7596* Eliminated some, but not all, gcc -Wall warnings. 7597* Changed some old style casts to reinterpret_cast in new_gc_alloc.h 7598(thanks to Dan Grayson). 7599* GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if 7600GC_DONT_ADD_BYTE_AT_END is set. 7601* Changed some (long) casts to (word) in preparation for win64 (thanks 7602to Peter Colson). 7603* Changed "int stack_size" declaration in pthread_support.c to use 7604size_t. (Only mattered with GC_ASSERTIONS enabled.) 7605* Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson). 7606* Removed GC_IGNORE_FB frame buffer recognition, and replaced 7607it with a check that the mapping type is MEM_IMAGE. 7608In theory, this should work much better, but it is a high 7609risk change for win32. (Thanks to Ashley Bone for the crucial 7610experimental data behind this, and to Rutger Ovidius for 7611some further experiments.) 7612* GC_allochblk_nth incremented GC_words_wasted by bytes rather than 7613words. 7614* Consider GC_words_wasted in GC_adj_words_allocd only if it is within 7615reason. (A hack to avoid some extremely unlikely scenarios in which 7616we manage to allocate only "wasted" space. 7.0 has a better fix.) 7617* Changed PowerPC GC_clear implementation to use lwsync instead of 7618eieio, since the documentation recommends against eieio, and 7619it seems to be incorrect if the preceding memory op is a load. 7620* Fixed print_block_list to print the correct kind number for 7621STUBBORN (thanks to Rutger Ovidius). 7622* Have configure.in generate an error if it is asked to support 7623pthreads, but doesn't know how to. 7624* Added Kazuhiro Inaoka's patch for Renesas M32R support. 7625* Have the GNU build mechanism link with -ldl. Rename THREADLIBS 7626to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.) 7627* Added Hannes Mehnert's patch for FreeBSD/SPARC support. 7628* Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c. 7629(Thanks to John Merryweather Cooper.) 7630* Define MPROTECT_VDB on MACOSX only if threads are being used, since the 7631dirty page tracking mechanism uses threads. (This avoids an undefined 7632reference to _GC_darwin_register_mach_handler_thread.) 7633* By popular demand, use __libc symbols only if we are built with 7634USE_LIBC_PRIVATES, which is off by default, and not otherwise documented. 7635* Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set. 7636The GC itself will dirty lots of pages in this cases, probably making 7637it counterproductive on all platforms. And the DARWIN port crashes. 7638 7639 7640== [6.3] 2004-07-08 == 7641 7642* Compile test_cpp.cc with CXXCOMPILE instead of COMPILE. 7643* Very large allocations could cause a collector hang. Correct 7644calculation of GC_collect_at_heapsize. 7645* GC_print_hblkfreelist printed some bogus results if USE_MUNMAP 7646was defined. 7647* Include gc_config_macros.h in threadlibs.c. 7648* Correct MacOSX thread stop code (thanks to Dick Porter). 7649* SMALL_OBJ definition was off by one. This could cause crashes 7650at startup. (Thanks to Zoltan Varga for narrowing this down to 7651a trivial test case.) 7652* Integrate Paolo Molaro's patch to deal with a race in the Darwin 7653thread stopping code. 7654* Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB 7655implementation. The old approach appears to have been broken by 7656recent kernels. 7657* Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks 7658to Andrew Begel). 7659* Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski). 7660* Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads. 7661 7662 7663== [6.3alpha6] 2004-05-06 == 7664 7665* Define USE_GENERIC_PUSH_REGS for NetBSD/M68K. 7666* Fixed the X86_64 PREFETCH macros to correctly handle ia32e (which uses 7667different prefetch instructions from AMD64). (Thanks to H.J. Lu.) 7668* GC_config_macros.h did not correctly define GC_WIN32_THREADS from 7669GC_THREADS. 7670* Added simple_example.html. 7671* Merged Andrew Gray's patch to correctly restore signal handlers on 7672FreeBSD. 7673* Merged a patch from Andreas Jaeger to deal with prefetch-related warnings 7674on x86-64. Added some other casts so that the PREFETCH macros 7675always get a ptr_t argument. Removed some casts in the PREFETCH 7676implementations. 7677* Added a header guard for gc_allocator.h and changed GC_debug_free to 7678clobber contents of deallocated object (suggested by Jesse Jones). 7679* The signal masking code in pthread_stop_world.c contained some errors. 7680In particular SIGSEGV was masked in the handler, in spite of the fact that 7681it wrote to the heap. This could lead to an uncaught SIGSEGV, which 7682apparently became much more likely in Linux 2.6. Also fixed some 7683typos, and reduced code duplication in the same area. 7684* Remove ltconfig, clean up configure messages for DG/UX (thanks to 7685Adrian Bunk for the patches). 7686* Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner. 7687 7688 7689== [6.3alpha5] 2004-03-30 == 7690 7691* Fix & vs && typo in GC_generic_malloc and 7692GC_generic_malloc_ignore_off_page. (Propagated from the gcc tree.) 7693* Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler. 7694(According to Christian Limpach, the NetBSD problem is fixed. 7695Presumably so is the Solaris 2.3 problem.) 7696* Removed placement delete from gc_cpp.h for the SGI compiler (thanks 7697to Simon Gornall for the patch). 7698* Changed semantics of the GC_IGNORE_FB environment variable, based 7699on experimentation by Nicolas Cannasse pointing out that the old 7700interpretation was useless. We still need help in identifying win32 7701graphics memory mappings. The current "solution" is a hack. 7702* Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in. 7703It probably made more sense in the gcc context. 7704* Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF. 7705* Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often 7706supports the same extension on various platforms. 7707* Added some basic (completely untested) defines for win64, in support 7708of future work. 7709* Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing 7710a memory overwrite bug on Solaris and perhaps other platforms. 7711* Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to 7712Jakub Jelinek for the patch and explaining the problem). 7713Otherwise pre-linking could cause the collector to fail. 7714* Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC 7715for HP/UX with gcc. The compiler-based implementation appears to work 7716only with the vendor compiler. 7717* Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h, 7718making client mark code cleaner and less dependent on GC version. 7719* Export several new procedures and GC_generic_malloc from gc_mark.h 7720to support user-defined kinds. Use the new procedures to replace existing 7721code in gcj_mlc.c and typd_mlc.c. 7722* Added support for GC_BACKTRACES. 7723* Fixed a remaining problem in CORD_str with signed characters (thanks 7724to Alexandr Petrosian for the patch). 7725* Removed supposedly redundant, but very buggy, definitions of finalizer 7726macros from javaxfc.h. Fortunately this file probably has no users. 7727The correct declarations were already in gc.h. 7728* Also need to set GC_in_thread_creation while waiting for GC during 7729thread termination, since it is also possible to collect from an 7730unregistered thread in that case. 7731* Define NO_GETENV for Windows CE, since getenv doesn't appear to exist. 7732Plus some other minor WinCE fixes (thanks to Alain Novak). 7733* Added GC_register_describe_type_fn. 7734* Arrange for debugging finalizer registration to ignore non-heap 7735registrations, since the regular version of the routine also behaves 7736that way. 7737* GC_gcj_malloc and friends need to check for finalizers waiting to be run. 7738One of the more obscure allocation routines with missing a LOCK() call. 7739* Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE 7740to work with VS.NET. 7741* Cleaned up GC_INIT calls in test. Updated gc.man to encourage GC_INIT 7742use in portable code. 7743* Taught the GC to use libunwind if --enable-full-debug is specified on 7744IA64 and libunwind is present. 7745* The USE_MUNMAP code could get confused about the age of a block and 7746prematurely unmap it. GC_unmap_old had a bug related to wrapping of 7747GC_gc_no. GC_freehblk and GC_merge_unmapped didn't maintain 7748hb_last_reclaimed reasonably when blocks were merged. The code was 7749fixed to reflect original intent, but that may not always be an 7750improvement. 7751 7752 7753== [6.3alpha4] 2004-01-01 == 7754 7755* USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON. 7756* Darwin support was broken in alpha3 as a result of my mis-integration of 7757Andrew Begel's patches. Fixed with another patch from Andrew Begel. 7758* A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was 7759overly aggressive. We may collect from an unregistered thread during 7760thread creation. Fixed by explicitly checking for that case. (Added 7761GC_in_thread_creation.) 7762 7763 7764== [6.3alpha3] 2003-12-20 == 7765 7766* Removed -DSMALL_CONFIG from BCC_MAKEFILE. 7767* Changed macros to test for an ARM processor (Patch from Richard Earnshaw.) 7768* Mostly applied a DJGPP patch from Doug Kaufman. Especially Makefile.dj 7769had suffered from serious bit rot. 7770* Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error, 7771and a call to alloca (for lcc compatibility). 7772* Changed USE_MUNMAP behavior on POSIX platforms to immediately remap 7773the memory with PROT_NONE instead of unmapping it. The latter risks 7774an intervening mmap grabbing the address space out from underneath us. 7775Updated this code to reflect a cleaner patch from Ulrich Drepper. 7776* Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict. 7777(Patch from Andrew Begel.) 7778* Dynamically choose whether or not lock should spin on win32 (thanks 7779to Maurizio Vairani for the patch). This may be a significant performance 7780improvement for win32. 7781* Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE 7782in the distribution (thanks to Maurizio Vairani). 7783* Maybe_install_looping_handler() was accidentally exported, violating 7784our name space convention. 7785* Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD. (Thanks to 7786Christian Limpach. I generalized the patch to use sigsetjmp on all 7787UNIX_LIKE platforms, admittedly a slightly risky move. But it may avoid 7788similar problems on some other platforms. I also cleaned up the definition 7789of UNIX_LIKE a bit.) 7790* Integrated Andrew Begel's Darwin threads patch, adjusted according to 7791some of Fergus Hendersons's comments. (Patch didn't apply cleanly, 7792errors are possible.) 7793* Added another test or two for the Intel 8.0 compiler to avoid 7794confusing it with gcc. The single-threaded collector should now build 7795with icc, at least on ia64. 7796 7797 7798== [6.3alpha2] 2003-11-04 == 7799 7800* Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h. 7801* Put back the WINABI qualifier for GC_CreateThread. (Thanks to 7802Danny Smith for the patch. 6.3alpha1 had the qualifier in one place 7803but not elsewhere, which was clearly wrong.) 7804* Sometimes explicitly define __private_extern__ before DARWIN dyld.h 7805include. (Thanks to Andreas Tobler for posting the patch.) 7806* Included signal.h from pthread_support.c. Removed GC_looping_handler, 7807which was dead code. 7808* GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was 7809defined (thanks to Glauco Masotti for testing and reporting this). 7810Changed GC_find_start to never just return 0. According to its 7811comment it doesn't, and it's unclear that's correct. 7812* GC_alloc_large had several largely compensating bugs in the 7813computation of GC_words_wasted. (It was confused about bytes vs. 7814words in two places.) 7815* Integrated Slava Sysoltsev's patch to support more recent versions of 7816the Intel compiler on IA64/Linux. 7817* Changed win32 spinlock initialization to conditionally set a spin count. 7818(Emmanual Stumpf pointed out that enabling this makes a large performance 7819difference on win32 multiprocessors.) Also cleaned up the win32 spinlock 7820initialization code a bit. 7821* Fixed thread support for HP/UX/IA64. The register backing store base for 7822the main thread was sometimes not set correctly. (Thanks to 7823Laurent Morichetti.) 7824* Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem. 7825* Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to 7826avoid 64-bit size mismatches (thanks to Bernie Solomon). 7827* Fixed GC_generic_push_regs to avoid a potential and very unfortunate 7828tail call optimization. This could lead to prematurely reclaimed 7829objects on configurations that used the generic routine and the new 7830build infrastructure (which potentially optimizes mach_dep.c). 7831This was a serious bug, but it's unclear whether it has resulted in 7832any real failures. 7833* Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian 7834for noticing the problem and supplying the patch). 7835* Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks 7836to Anthony Green). 7837* Partially merged a win32 patch from Ben Hutchings, and substantially 7838revised other parts of win32_threads.c. It had several problems. 7839Under MinGW with a statically linked library, the main thread was 7840not registered. Cygwin detached threads leaked thread descriptors. 7841There were several race conditions. For now, unfortunately the 7842static threads limit remains, though we increased it, and made table 7843traversal cost depend on the actual thread count. 7844There is also still some code duplication with pthread_support.c. 7845(Thread descriptors did become much smaller, since Ben Hutchings 7846removed the thread context from them.) 7847* Integrated a Solaris configure.in patch from Rainer Orth. 7848* Added GC_IGNORE_FB and associated warning to very partially address 7849the issue of the collector treating a mapped frame buffer as part 7850of the root set. (Thanks to David Peroutka for providing some 7851insight. More would be helpful. Is there anything that can be used 7852to at least partially identify such memory segments?) 7853 7854 7855== [6.3alpha1] 2003-07-26 == 7856 7857* Integrated some NetBSD patches by Marc Recht. These 7858were already in the NetBSD package. 7859* GC_pthread_create waited for the semaphore even if pthread_create failed. 7860(Thanks to Dick Porter for the pthread_support.c patch.) Applied the 7861analogous fix for aix_irix_threads.c. 7862* Added Rainer Orth's Tru64 fixes. 7863* The check for exceeding the thread table size in win32 threadDetach 7864was incorrect (thanks to Alexandr Petrosian for the patch). 7865* Applied Andrew Begel's patch to correct some reentrancy issues 7866with dynamic loading on Darwin. 7867* GC_CreateThread() was neglecting to duplicate the thread handle in 7868the table (thanks to Tum Nguyen for the patch). 7869* Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to 7870Roger Sayle for the patch). 7871* Applied more AIX threads patches from Scott Ananian. 7872 7873 7874== [6.2] 2003-06-21 == 7875 7876* Integrated a second round of Irix/AIX patches from Dan Bonachea. 7877Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires 7878the Irix assembler to do the C preprocessing; gcc -E doesn't work. 7879* Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano). 7880* There was a race between GC_pthread_detach and thread exit that could 7881result in a thread structure being deallocated by GC_pthread_detach 7882even though it was still needed by the thread exit code (thanks to 7883Dick Porter for the small test case that allowed this to be debugged). 7884* Fixed version parsing for non-alpha versions in acinclude.m4 and 7885version checking in version.h. 7886* Issues identified (not yet fixed): 7887- A dynamic libgc.so references dlopen unconditionally, but doesn't link 7888against libdl. 7889- GC_proc_fd for Solaris is not correctly updated in response to a 7890fork() call. Thus incremental collection in the child won't work 7891correctly. (Thanks to Ben Cottrell for pointing this out.) 7892- --enable-redirect-malloc is mostly untested and known not to work 7893on some platforms. 7894- There seem to be outstanding issues on Solaris/X86, possibly with 7895finding the data segment starting address. 7896- Very large root set sizes (> 16 MB or so) could cause the collector 7897to abort with an unexpected mark stack overflow. (Thanks to 7898Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial 7899size. 7900- The SGI version of the collector marks from mmapped pages, even 7901if they are not part of dynamic library static data areas. This 7902causes performance problems with some SGI libraries that use mmap 7903as a bitmap allocator. NOT YET FIXED. It may be possible to turn 7904off DYNAMIC_LOADING in the collector as a workaround. It may also 7905be possible to conditionally intercept mmap and use GC_exclude_static_roots. 7906The real fix is to walk rld data structures, which looks possible. 7907- Incremental collector should handle large objects better. Currently, 7908it looks like the whole object is treated as dirty if any part of it is. 7909 7910 7911== [6.2alpha6] 2003-06-05 == 7912 7913* There was an extra underscore in the name of GC_save_registers_in_stack 7914for NetBSD/SPARC (thanks to Jaap Boender for the patch). 7915* Integrated Brian Alliet's patch for Darwin. This restructured the 7916linuxthreads/pthreads support to separate generic pthreads support 7917from more the system-dependent thread-stopping code. I believe this 7918should make it easier to eliminate the code duplication between 7919pthreads platforms in the future. The patch included some other 7920code cleanups. 7921* Integrated Dan Bonachea's patch to support AIX threads. This required 7922substantial manual integration, mostly due to conflicts with other 7923recent threads changes. It may take another iteration to 7924get it to work. 7925* Removed HPUX/PA-RISC support from aix_irix_threads.c. It wasn't used 7926anyway and it cluttered up the code. And anything we can do to migrate 7927towards generic pthreads support is a good thing. 7928* Added a more explicit test for tracing of function arguments to test.c. 7929* Added Akira Tagoh's PowerPC64 patch. 7930* Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for 7931pointing it out). gc.h now includes just windows.h, not winbase.h. 7932* Declared GC_save_regs_in_stack() in gc_priv.h. Remove other declarations. 7933* Changed --enable-cplusplus to use automake consistently. The old way 7934confused libtool. "Make install" didn't work correctly for the old version. 7935Previously --enable-cplusplus was broken on cygwin. 7936* Changed the C version of GC_push_regs to fail at compile time if it is 7937generated with an empty body. This seems to have been the cause of one 7938or two subtle failures on unusual platforms. Those failures should 7939now occur at build time and be easily fixable. 7940 7941 7942== [6.2alpha5] 2003-05-14 == 7943 7944* GC_invoke_finalizers could, under rare conditions, set 7945GC_finalizer_mem_freed to an essentially random value. This could 7946possibly cause unbounded heap growth for long-running applications 7947under some conditions. (The bug was introduced in 6.1alpha5, and 7948is not in gcc3.3.) 7949* Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared. 7950GC_DLL is used instead. All internal tests are now on GC_DLL. 7951README.macros is now more precise about the intended meaning. 7952* Include DllMain in the multi-threaded win32 version only if the 7953collector is actually built as a dll (thanks to Mohan Embar for 7954a version of the patch). 7955* Hide the cygwin threadAttach/Detach functions. They were violating our 7956namespace rules. 7957* Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT 7958(thanks again to Ben Hutchings). 7959* Removed some obsolete definitions for Linux/PowerPC in gcconfig.h. 7960* CORD_cat was not rebalancing unbalanced trees in some cases, violating 7961a CORD invariant. Also tweaked the re-balancing rule for 7962CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report 7963and patch.) 7964* Added hand-coded structured exception handling support to mark.c. 7965This should enable support of dynamic libraries under win32 with 7966gcc-compiled code. (Thanks to Ranjit Mathew for the patch.) 7967Turned on dynamic library scanning for win32/gcc. 7968* Removed some remnants of read wrapping (thanks to Kenneth Schalk). 7969GC_USE_LD_WRAP was probably broken in recent versions. 7970* The build could fail on some platforms since gcconfig.h could include 7971declarations mentioning ptr_t, which was not defined, e.g. when if_mach 7972was built (thanks to Yann Dirson for pointing this out). Also 7973cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit. 7974* The GC_LOOP_ON_ABORT environment variable interfered with incremental 7975collection, since the write fault handler was erroneously overridden. 7976Handlers are now set up in the correct order. 7977* It used to be possible to call GC_mark_thread_local_free_lists() while 7978the world was not stopped during an incremental GC. This was not safe. 7979Fortunately, it was also unnecessary. Added GC_world_stopped flag 7980to avoid it. (This caused occasional crashes in GC_set_fl_marks 7981with thread local allocation and incremental GC. This probably happened 7982primarily on old, slow multiprocessors.) 7983* Allowed overriding of MAX_THREADS in win32_threads.c from the build 7984command line (thanks to Yannis Bres for the patch). 7985* Taught the IA64/linux code to determine the register backing store base from 7986/proc/self/maps after checking the __libc symbol, but before guessing. 7987(__libc symbols are on the endangered list, and the guess is likely to not 7988always be right for 2.6 kernels.) Restructured the code to read and parse 7989/proc/self/maps so it only exists in one place (all platforms). 7990* The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it 7991also registered the main data segment, but didn't actually do so. (I don't 7992think anyone actually uses this configuration, but ...) 7993* Made another attempt to get --enablecplusplus to do the right thing. 7994Since there are unavoidable problems with C programs linking against a 7995dynamic library that includes C++ code, I separated out the c++ code into 7996libgccpp. 7997 7998 7999== [6.2alpha4] 2003-03-10 == 8000 8001* Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS. (See Debian bug 8002# 177204) 8003* Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches. 8004* Integrated Grzegorz Jakacki's substantial GNU build patch. "Make dist" 8005should now work for the GNU build process. Documentation files 8006are installed under share/gc. 8007* Tweaked gc_cpp.h to again support the Borland compiler (thanks to 8008Rene Girard for pointing out the problems). 8009* Updated BCC_MAKEFILE (thanks to Rene Girard). 8010* Added GC_ASSERT check for minimum thread stack size. 8011* Added --enable-gc-assertions. 8012* Added some web documentation to the distribution. Updated it in the 8013process. 8014* Separate gc_conf_macros.h from gc.h. 8015* Added generic GC_THREADS client-defined macro to set the appropriate 8016GC_XXX_THREADS internal macro. (gc_config_macros.h.) 8017* Add debugging versions of _ignore_off_page allocation primitves. 8018* Moved declarations of GC_make_closure and GC_debug_invoke_finalizer 8019from gc.h to gc_priv.h. 8020* Reset GC_fail_count even if only a small allocation succeeds. 8021* Integrated Brian Alliet's patch for dynamic library support on Darwin. 8022* gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF 8023when it should have called the lower case version, since it was 8024explicitly computing a base pointer. 8025 8026 8027== [6.2alpha3] 2003-01-30 == 8028 8029* Don't include execinfo.h in os_dep.c when it's not needed, and may not 8030exist. 8031 8032 8033== [6.2alpha2] == 8034 8035* Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to 8036Hironori Sakamoto for the patch). 8037* Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert). 8038* Attempted to work around the problems with .S filenames and the SGI 8039compiler. (Untested.) 8040* Worked around an HP/UX make issue with the GNU-style build process. 8041* Fixed the --enable-cplusplus build machinery to allow builds without 8042a C++ compiler. (That was always the intent ...) 8043* Changed the debugging allocation macros to explicitly pass the return 8044address for Linux and XXXBSD on hardware for which we can't get stack 8045traces. Use __builtin_return_address(0) to generate it when possible. 8046Some of the configuration work was cleaned up (good) and moved to gc.h 8047(bad, but necessary). This should make leak detection more useful 8048on a number of platforms. (Thanks to Fabian Thylman for the suggestion.) 8049* Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER. 8050* Bumped revision number for dynamic library. 8051 8052 8053== [6.2alpha1] 2003-01-23 == 8054 8055* Guard the test for GC_DUMP_REGULARLY in misc.c with 8056"#ifndef NO_DEBUGGING". Otherwise it fails to build with NO_DEBUGGING 8057defined. (Thanks to Manuel Serrano.) 8058* Message about retrying suspend signals was incorrectly generated even when 8059flag was not set. 8060* Cleaned up MACOSX/NEXT root registration code. There was apparently a 8061separate ifdef case in GC_register_data_segments() for no reason. 8062* Removed MPROTECT_VDB for MACOSX port, based on one negative report. 8063* Arrange for gc.h and friends to be correctly installed with GNU-style 8064"make install". 8065* Enable the GNU-style build facility include C++ support in the library 8066with --enable-cplusplus (thanks to Thomas Maier for some of the patch). 8067* Mark from GC_thread_key in linux_threads.c, in case that's allocated 8068from the garbage collected heap, as it is with our own thread-specific 8069storage implementation (thanks to Jeff Sturm). 8070* Mark all free list header blocks if they are heap allocated. This avoids 8071some unnecessary tracing. And it remains correct if we clear the 8072root set. (Thanks to Jeff Sturm for identifying the bug.) 8073* Improved S390/Linux support. Add S390/Linux 64-bit support (thanks to 8074Ulrich Weigand). 8075* Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to 8076GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h. This is technically 8077an interface change. Based on the fact that nobody reported this, 8078I suspect/hope there were no clients. 8079* Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration 8080when appropriate, (2) doesn't generate references to undefined internal 8081macros, and (3) allows easier manual construction of descriptors. 8082* Close the file descriptor used by GC_print_address_map(). 8083* Set the "close-on-exec" bit for various file descriptors maintained 8084for the collector's internal use. 8085* Added a hack to find memory segments owned by the system allocator 8086under win32. Based on my tests, this tends to eventually find all 8087segments, though it may take a while. There appear to be cleaner, 8088but slower solutions under NT/XP. But they rely on an API that's 8089unsupported under 9X. 8090* Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM. (Thanks 8091to Akira Tagoh for pointing out that HEURISTIC1 does not work on 809264-bit kernels.) 8093* Added GC_set_free_space_divisor to avoid some Windows dll issues. 8094* Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing 8095of candidate pointers for tagging, etc. 8096* Always lock around GC_notify_full_gc(). Simplified code for 8097invoking GC_notify_full_gc(). 8098* Changed the way DATASTART is defined on FreeBSD to be robust against 8099an unmapped page after etext. (Thanks to Hironori Sakamoto for 8100tracking down the intermittent failure.) 8101* Made GC_enable() and GC_disable() official. Deprecated direct update 8102of GC_dont_gc. Changed GC_gcollect to be a noop when garbage collection 8103is disabled. 8104* Call GC_register_dynamic_libraries before stopping the world on Linux, 8105in order to avoid a potential deadlock due to the dl_iterate_phdr lock. 8106* Introduced a more general mechanism for platform-dependent code to 8107decide whether the main data segment should be handled separately 8108from dynamic libraries, or registered by GC_register_dynamic_libraries. 8109The latter is more reliable and easier on Linux with dl_iterate_phdr. 8110 8111 8112== [6.1] == 8113 8114* Added GC_MAXIMUM_HEAP_SIZE environment variable. 8115* Fix configure.in for MIPS/LINUX (thanks to H.J. Lu). 8116* Double page hash table size for -DLARGE_CONFIG. 8117* Integrated Bo Thorsen's X86-64 support. 8118* STACKBOTTOM definition for LINUX/MIPS was partially changed back 8119(thanks to H.J. Lu and Hiroshi Kawashima for resolving this). 8120* Replaced all occurrences of LINUX_DATA_START in gcconfig.h with 8121SEARCH_FOR_DATA_START. It doesn't hurt to fall back to a search. 8122And __data_start doesn't seem to get defined correctly of the GC 8123library is loaded with LD_PRELOAD, e.g. for leak detection. 8124* If the GC_find_leak environment variable is set, do a 8125atexit(GC_gcollect) to give us at least one chance to detect leaks. 8126This may report some very benign leaks, but ... 8127* Addeded REDIRECT_FREE. It's necessary if we want leak detection with 8128LD_PRELOAD. 8129* Defer printing of leaked objects, as for smashed objects. 8130* Fixed process and descriptor leak in GC_print_callers. Try for 8131line number even if we got function name.) 8132* Ported parallel GC support and thread local allocation to Alpha. 8133Not yet well-tested. 8134* Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump(). 8135* Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct 8136alpha_mach_dep.s. 8137* Incorporated a change to new_gc_alloc.h, 8138which should make it work with gcc3.1. 8139* Use alpha_mach_dep.S only on Linux. (It's not clear that this is 8140optimal, but it otherwise didn't build on Tru64. Thanks to Fergus Henderson.) 8141* Added ifdef to guard free() in os_dep.c. Otherwise we get a 8142compilation error on Irix (thanks to Dai Sato). 8143* Added an experimental version of GC_memalign to mallocx.c. This can't 8144always work, since we don't handle alignment requests in the hblk-level 8145allocator, and we can't handle arbitrary pointer displacements unless 8146GC_all_interior_pointers is enabled. But it should work for alignment 8147requests up to HBLKSIZE. This is not yet documented in the standard 8148places. 8149* Finally debugged the OSF1/Tru64 thread support. This needs more testing, 8150since I needed to add a somewhat unconvincing workaround for signal 8151delivery issues that I don't yet completely understand. But it does 8152pass my tests, even in parallel GC mode. Incremental GC support is 8153disabled if thread support is enabled, due to the signal issues. 8154* Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h. 8155* Added GC_debug_malloc_replacement and GC_debug_realloc_replacement 8156declarations to gc.h. On IA64, this is required for REDIRECT_MALLOC 8157to work correctly with these. 8158* Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format. 8159 8160 8161== [6.1alpha5] 2002-06-19 == 8162 8163* Added GC_finalizer_mem_freed, and changed some of the code that 8164decided on heap expansion to look at it. Memory explicitly 8165deallocated by finalizers essentially needs to be counted as reclaimed 8166by the GC. Otherwise there are cases in which the heap can grow 8167infinitely. (Thanks to Mark Reichert for the test case.) 8168* Integrated Adam Megacz patches to not scan dynamic libraries if 8169we are compiling with gcc on win32. Otherwise we need structured 8170exception handling to deal with asynchronously unmapped root 8171segments, and gcc doesn't directly support that. 8172* Integrated Anthony Green's patch to support Wine. 8173* GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several 8174places, including gc_cpp.cc (thanks to Wink Saville for pointing this out). 8175* Integrated Loren J. Rittle's Alpha FreeBSD patches. These also 8176changed the declarations of symbols like _end on many platforms to 8177that they wouldn't mistakenly be declared as short data symbols (suggested by 8178Richard Henderson). 8179* Integrated changes from the Debian distribution (thanks to Ryan Murray 8180for pointing these out). 8181Fix C++ comments in POWERPC port. Add ARM32 8182incremental GC support. Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux, 8183this time for real. Use va_copy to get rid of cord printf problems 8184(finally). 8185* Close file descriptor used to count CPUs (thanks to Jeff Sturm for 8186pointing out the omission). 8187* Don't just drop gcj free lists in GC_start_reclaim, since that can 8188eventually cause the marker to see a bogus mark descriptor in the 8189dropped objects. The usual symptom was a very intermittent segmentation 8190fault in the marker. This mattered only if one of the GC_gcj_malloc 8191variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and 8192Tom Tromey for helping to track this down). 8193* Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller, 8194Jeff Sturm, Tom Tromey, and Christian Joensson). 8195* Fixed a typo in strdup definition (thanks to Gerard A Allan). 8196* Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S. 8197This is needed on Linux. I'm not sure whether it's better or worse 8198on Tru64. 8199* Changed gc_cpp.h once more to declare operator new and friends only in 8200a Microsoft environment. This may need further fine tuning (thanks to 8201Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4). 8202* Don't ever override strdup if it's already macro defined (thanks to 8203Adnan Ali for pointing out the problem). 8204* Changed gc_cpp.h yet again to also overload placement new. Due to the 8205C++ overloading rules, the other overloaded new operations otherwise hide 8206placement new, which causes many STL uses to break (thanks to Reza Shahidi 8207for reporting this, and to Matt Austern for proposing a fix). 8208* Integrated cygwin pthreads support from Dan Bonachea. 8209* Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson). 8210* Changed printing code to print more complete GC times. 8211* Applied Mark Mitchell's Irix patch to correct some bit rot. 8212* Clarified which object-printing routines in dbg_mlc.c should hold 8213the allocation lock. Restructured the code to allow reasonable object 8214printing with -DREDIRECT_MALLOC. 8215* Fix the Linux mmap code to always start with 0x1000 as the initial hint. 8216Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to 8217Jeffrey Mark Siskind). 8218* Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict 8219with a system header (thanks to Philip Brown). 8220* Cause win32_threads.c to handle an out of range stack pointer correctly, 8221though currently with a warning. (Thanks to Jonathan Clark for 8222observing that win32 applications may temporarily use the stack 8223pointer for other purposes, and suggesting a fix. Unfortunately, it's 8224not clear that there is a complete solution to this problem.) 8225 8226 8227== [6.1alpha4] 2002-06-16 == 8228 8229* Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from 8230building. Increased 64-bit heap size limit in test.c slightly, since 8231a functional SPARC collector seems to slightly exceed the old limits. 8232* Use NPRGREG in solaris_threads.c, thus printing all registers if things 8233go wrong. 8234* Added GC_MARKERS environment variable to allow use of a single marker 8235thread on an MP without confusing the lock implementation. 8236* Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED. 8237This is really a purely generational mode, and we can afford to 8238postpone the collection until the heap is (nearly) full. 8239* Remove read() wrapper for MPROTECT_VDB. It was causing more harm than 8240good. It is often no longer needed if system calls avoid writing to 8241pointerful heap objects. 8242* Fix MACOSX test in gcconfig.h (thanks to John Clements). 8243* Change GC_test_and_set so that it consistently has one argument. 8244Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to 8245Ryan Murray). 8246* Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort() 8247declaration (thanks to Michael Smith). 8248* Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START(). 8249* Added win32 recognition code in configure.in. Changed some of the 8250dllimport/export defines in gc.h (thanks to Adam Megacz). 8251* GC_malloc_many didn't set hb_last_reclaimed when it called 8252GC_reclaim_generic. (I'm not sure this matters much, but ...) 8253* Allocating uncollectible objects with debug information sometimes 8254allocated objects that were one byte too small, since uncollectible 8255objects don't have the extra byte added at the end (thanks to 8256Wink Saville for pointing this out). 8257* Added a bit more assertion checking to make sure that gcj objects 8258on free lists never have a nonzero second word. 8259* Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella). 8260* Upgraded libtool, configure.in and some related files to hopefully 8261support NetBSD/SPARC (thanks to Adrian Bunk). Unfortunately, 8262libtool 1.4.2 seemed to be buggy due to missing quotes in several 8263"test" invocations. Fixed those in the ltmain.sh script. 8264* Some win32-specific patches, including the introduction of 8265GC_CreateThread (thanks to Adam Megacz). 8266* Merged in gcj changes from Anthony Green to support embedded systems. 8267* Tried to consistently rename preprocessed assembly files with a capital 8268.S extension. 8269* Use alpha_mach_dep.S on ALPHA again. It doesn't really matter, but this 8270makes our distribution consistent with the gcc one, avoiding future merge 8271problems. 8272* Move GET_MEM definition into gcconfig.h. Include gcconfig.h slightly 8273later in gc_priv.h to avoid forward references to ptr_t. 8274* Add some testing of local allocation to test.c. 8275* Change definition of INVALID_QTID in specific.h. The -1 value was used 8276inconsistently, and too likely to collide with a valid stack address. 8277Some general clean-up of specific.[ch]. Added assertions. (Thanks 8278to Michael Smith for tracking down an intermittent bug to this 8279general area. I'm not sure it has been squashed yet, however.) 8280* On Pthread systems it was not safe to call GC_malloc() between fork() 8281and exec(). According to the applicable standards, it doesn't appear 8282to be safe to call malloc() or many other libc functions either, thus 8283it's not clear this is fixable. Added experimental support for 8284-DHANDLE_FORK in linux_threads.c which tries to support it. It may 8285succeed if libc does the right thing. I'm not sure whether it does. 8286(Thanks to Kenneth Schalk for pointing out this issue.) 8287* Documented thread local allocation primitives to require an 8288explicit GC_init call. GC_init_parallel is no longer declared to 8289be a constructor function, since that isn't portable and often 8290seems to lead to initialization order problems. 8291* Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them 8292compatible with Visual C++ 6 (thanks to Wink Saville for the patch). 8293* Some more patches for Linux on HP PA-RISC. 8294* Added include/gc_allocator.h. It implements (hopefully) standard 8295conforming (as opposed to SGI-style) allocators that allocate 8296collectible (gc_allocator) or GC-traceable, but not collectible 8297(traceable_allocator) objects. This borrows heavily from libstc++, 8298which borrows heavily from the SGI implementation, this part of 8299which was written by Matt Austern. Changed test_cpp.cc to very 8300minimally test this. 8301* On Linux/X86, retry mmap with a different start argument. That should 8302allow the collector to use more (closer to 3GB) of the address space. 8303* Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's 8304patch to the gcc tree). 8305* Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init 8306to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch). 8307* Compensated for the fact that current versions of glibc set 8308__libc_stack_end incorrectly on Linux/IA64 while initialization code 8309is running. This could cause the collector to miss 16 bytes of 8310the memory stack if GC_malloc or friends where called before main(). 8311* Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86. 8312This will probably take another iteration to work, since his 8313patch conflicted with the libtool upgrade. 8314* Added README.arm.cross containing some information about cross- 8315compiling to an ARM processor from Margaret Fleck (original code provided by 8316Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by 8317Tilman Vogel; also ported for iPAQ by Oliver Kurth). 8318 8319 8320== [6.1alpha3] 2002-02-07 == 8321 8322* Minor cleanup on the gcconfig.h section for SPARC. 8323* Minor fix to support Intel compiler for I386/Linux (thanks to 8324Sven Hartrumpf). 8325* Added SPARC V9 (64-bit) support (thanks to Jeff Sturm). 8326* Restructured the way in which we determine whether or not to keep 8327call stacks for debug allocation. By default SAVE_CALL_COUNT is 8328now zero on all platforms. Added SAVE_CALL_NARGS parameters. 8329If possible, use execinfo.h to capture call stack. (This should 8330add support for a number of new platforms, though often at 8331considerable runtime expense.) 8332* Try to print symbolic information for call stacks. On Linux, we 8333do this with a combination of execinfo.h and running addr2line in 8334a separate process. This is both much more expensive and much more 8335useful. Amazingly, it seems to be fast enough for most purposes. 8336* Redefined strdup if -DREDIRECT_MALLOC is given. 8337* Changed incremental collector and MPROTECT_VDB implementation so that, 8338under favorable conditions, pointer-free objects are not protected. 8339Added GC_incremental_protection_needs() to determine ahead of time whether 8340pointer-free objects may be protected. Replaced GC_write_hint() with 8341GC_remove_protection(). 8342* Added test for GC_ENABLE_INCREMENTAL environment variable. 8343* Made GC_time_limit runtime configurable. Added GC_PAUSE_TIME_TARGET 8344environment variable. 8345* Eliminated GC_page_sz, a duplicate of GC_page_size. 8346* Caused the Solaris and Irix thread creation primitives to call 8347GC_init_inner(). 8348 8349 8350== [6.1alpha2] 2001-12-20 == 8351 8352* No longer wrap read by default in multi-threaded applications. It was 8353pointed out on the libgcj list that this holds the allocation lock for 8354way too long if the read blocks. For now, reads into the heap are 8355broken with incremental collection. It's possible to turn this back on 8356if you make sure that read calls don't block (e.g. by calling select 8357first). 8358* Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS. 8359* Added check for environment variable GC_IGNORE_GCJ_INFO. 8360* Added printing of stop-the-world GC times if GC_PRINT_STATS environment 8361variable is set. 8362* The calloc definition in leak_detector.h was missing parentheses, and 8363realloc was missing a second argument to GC_REALLOC (thanks to 8364Elvenlord Elrond). 8365* Added GC_PRINT_BACK_HEIGHT environment variable and associated 8366code, mostly in the new file backgraph.c. See doc/README.environment. 8367* Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to 8368Jonathan Clark). 8369* Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat 8370different address-space layout). This may help for other machines with 8371holes in the data segment. (Thanks to Hironori Sakamoto.) 8372* Changed the order in which GC_push_roots and friends push things onto 8373the mark stack. GC_push_all calls need to come first, since we can't 8374necessarily recover if those overflow the mark stack. (Thanks to 8375Matthew Flatt for tracking down the problem.) 8376* Some minor cleanups to mostly support the Intel compiler on Linux/IA64. 8377 8378 8379== [6.1alpha1] 2001-09-22 == 8380 8381* Non-debug, atomic allocations could result in bogus smashed object 8382reports with debugging on (thanks to Patrick Doyle for the small test case). 8383* Fixed GC_get_register_stack_base (Itanium only) to work around a glibc 83842.2.4 bug. 8385* Initial port to HP/UX on Itanium. Thread support and both 32 and 64 8386bit ABIs appear to work. Parallel mark support doesn't yet, due to 8387some inline assembly code issues. Thread local allocation does appear 8388to work. 8389* ifdef'ed out glibc2.1/Itanium workaround. I suspect nobody is using 8390that combination anymore. 8391* Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to 8392Dimitris Vyzovitis for the patch). 8393* Debugged 64-bit support on HP/UX PA-RISC. 8394* Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel). 8395* Unregistering of finalizers with debugging allocation was broken (thanks 8396to Jani Kajala for the test case). 8397* Old finalizers were not returned correctly from GC_debug_register_finalizer. 8398* Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work. 8399* Cleaned up some statistics gathering code in reclaim.c (thanks to 8400Walter Bright). 8401* Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya). 8402* Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library 8403traversal to dyn_load.c. Changed it to weakly reference dl_iterate_phdr, 8404so that the old code is still used with old versions of glibc. 8405* Cleaned up feature test macros for various threads packages and 8406integrated (partially functional) FreeBSD threads code from Loren J. Rittle. 8407It's likely that the cleanup broke something, since it touched lots of 8408code. It's also likely that it fixed some unreported bugs in the 8409less common thread implementations, since some of the original code 8410didn't stand up to close scrutiny. Support for the next pthreads 8411implementation should be easier to add. 8412 8413 8414== [6.0] 2001-07-26 == 8415 8416* Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL. 8417* Fixed a stack clearing problem that resulted in SIGILL with a 8418misaligned stack pointer for multi-threaded SPARC builds. 8419* Integrated another HURD patch (thanks to Igor Khavkine). 8420 8421 8422== [6.0alpha9] == 8423 8424* added README.macros. 8425* Made gc.mak a symbolic link to work around winzip's tendency to ignore 8426hard links. 8427* Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking 8428it on untested platforms. 8429* Integrated initial GNU HURD port (thanks to Chris Lingard and 8430Igor Khavkine). 8431* A few more fixes for Digital Mars compiler (by Walter Bright). 8432* Fixed gcc version recognition. Renamed OPERATOR_NEW_ARRAY to 8433GC_OPERATOR_NEW_ARRAY. Changed GC_OPERATOR_NEW_ARRAY to be the default. 8434It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to 8435Cesar Eduardo Barros). 8436* Changed the byte size to free-list mapping in thread local allocation 8437so that size 0 allocations are handled correctly. 8438* Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray). 8439* Changed finalization registration to invoke GC_oom_fn when it runs out 8440of memory. 8441* Removed lvalue cast in finalize.c. This caused some debug configurations 8442not to build with some non-gcc compilers. 8443 8444 8445== [6.0alpha8] 2001-06-15 == 8446 8447* Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement 8448so that they compile under Irix (thanks to Dave Love). 8449* Updated powerpc_macosx_mach_dep.s so that it works if the collector 8450is in a dynamic library (thanks to Andrew Begel). 8451* Transformed README.debugging into debugging.html, updating and 8452expanding it in the process. Added gcdescr.html and tree.html 8453from the web site to the GC distribution. 8454* Fixed several problems related to PRINT_BLACK_LIST. This involved 8455restructuring some of the marker macros. 8456* Fixed some problems with the sizing of objects with debug information. 8457Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST. Reduced the 8458object size with SHORT_DEBUG_HDRS by another word. 8459* The "Needed to allocate blacklisted ..." warning had inadvertently 8460been turned off by default, due to a buggy test in allchblk.c. Turned 8461it back on. 8462* Removed the marker macros to deal with 2 pointers in interleaved fashion. 8463They were messy and the performance improvement seemed minimal. We'll 8464leave such scheduling issues to the compiler. 8465* Changed Linux/PowerPC test to also check for __powerpc__ in response 8466to a discussion on the gcc mailing list. 8467* Removed the "static" from the jmp_buf declaration in GC_generic_push_regs 8468(suggested by Matthew Flatt). This was causing problems in 8469systems that register all of their own roots. It looks far more correct 8470to me without the "static" anyway. 8471* Fixed several problems with thread local allocation of pointer-free or 8472typed objects. The collector was reclaiming thread-local free lists, since 8473it wasn't following the link fields. 8474* There was apparently a long-standing race condition related to 8475multi-threaded incremental collection. A collection could be started and 8476a thread stopped between the memory unprotect system call and the setting of 8477the corresponding dirt bit. I believe this did not affect Solaris or PCR, 8478which use a different dirty-bit implementation. Fixed this by installing 8479signal handlers with sigaction instead of signal, and disabling the thread 8480suspend signal while in the write-protect handler. (It is unclear 8481whether this scenario ever actually occurred.) 8482* Incremental collection did not cooperate correctly with the PARALLEL_MARK 8483implementation of GC_malloc_many or the local_malloc primitives. It still 8484doesn't work well, but it shouldn't lose memory anymore. 8485* Integrated some changes from the gcc source tree that I had previously 8486missed (thanks to Bryce McKinlay for the reminder and patch). 8487* Added Makefile.direct as a copy of the default Makefile, which would 8488normally be overwritten if configure is run. 8489* Changed the gc.tar target in Makefile.direct to embed the version number 8490in the gc directory name. This will affect future tar file distributions. 8491* Changed the Irix dynamic library finding code to no longer try to 8492eliminate writable text segments under Irix6.x, since that is probably no 8493longer necessary, and can apparently be unsafe on occasion (thanks to 8494Shiro Kawai for pointing this out). 8495* GC_cleanup with GC_DEBUG enabled passed a real object base address to 8496GC_debug_register_finalizer_ignore_self, which expected a pointer past the 8497debug header. Call GC_register_finalizer_ignore_self instead, even with 8498debugging enabled (thanks to Jean-Daniel Fekete for catching this). 8499* The collector didn't build with call chain saving enabled but NARGS=0. 8500* Fixed up the GNU-style build files enough so that they work in some 8501obvious cases (thanks to Maarten Thibaut). 8502* Added initial port to Digital Mars compiler for win32 (thanks to Walter 8503Bright). 8504 8505 8506== [6.0alpha7] 2001-04-19 == 8507 8508* Added GC_finalizer_notifier. Fixed GC_finalize_on_demand. (The variable 8509actually wasn't being tested at the right points. The build-time flag 8510was.) 8511* Added Tom Tromey's S390 Linux patch. 8512* Added code to push GC_finalize_now in GC_push_finalizer_structures 8513(thanks to Matthew Flatt). 8514* Added GC_push_gc_structures() to push all GC internal roots. 8515* Integrated some FreeBSD changes from Matthew Flatt. 8516* It looks like USRSTACK is not always correctly defined under Solaris. 8517Hacked gcconfig.h to attempt to work around the problem. The result 8518is not well tested. (Thanks again to Matthew Flatt for pointing this out.) 8519* Added Ji-Yong Chung's win32 threads and C++ fixes. 8520* Arranged for hpux_test_and_clear.s to no longer be needed or built. 8521It was causing build problems with gas, and it's not clear this is 8522better than the pthreads alternative on this platform. 8523* Some MINGW32 fixes from Hubert Garavel. 8524* Added initial Hitachi SH4 port from Kaz Kojima. 8525* Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC. 8526* Made include/gc_mark.h more public and separated out the really private 8527pieces. This is probably still not quite sufficient for clients that 8528want to supply their own kind of type information. But it's a start. 8529This involved lots of identifier renaming to make it namespace clean. 8530* Added GC_dont_precollect for clients that need complete control over 8531the root set. 8532* GC_is_visible didn't do the right thing with gcj objects. (Not that 8533many people are likely to care, but ...) 8534* Don't redefine read with GC_USE_LD_WRAP. 8535* Initial port to LINUX/HP_PA. Incremental collection and threads are not 8536yet supported. (Incremental collection should work if you have the 8537right kernel. Threads may work with a sufficiently patched pthread 8538library.) 8539* Changed gcconfig.h to recognize __i386__ as an alternative to i386 in 8540many places (thanks to Benjamin Lerman). 8541* Made win32_threads.c more tolerant of detaching a thread that it didn't 8542know about (thanks to Paul Nash). 8543* Added Makefile.am and configure.in from gcc to the distribution, with 8544minimal changes. For the moment, those are just placeholders. In the 8545future, we're planning to switch to a GNU-style build environment for 8546Un*x-like systems, though the old Makefile will remain as a backup. 8547* Turned off STUBBORN_ALLOC by default, and added it back as a Makefile 8548option. 8549* Redistributed some functions between malloc.c and mallocx.c, so that 8550simple statically linked apps no longer pull in mallocx.o. 8551* Changed large object allocation to clear the first and last few words 8552of each block before releasing the lock. Otherwise the marker could see 8553objects with nonsensical type descriptors. 8554* Fixed a couple of subtle problems that could result in not recognizing 8555interior pointers from the stack. (I believe these were introduced 8556in 6.0alpha6.) 8557* GC_debug_free_inner called GC_free, which tried to reacquire the 8558allocator lock, and hence deadlocked. (DBG_HDRS_ALL probably never worked 8559with threads.) 8560* Fixed several problems with back traces. Accidental references to a free 8561list could cause the free list pointer to be overwritten by a back pointer. 8562There seemed to be some problems with the encoding of root and finalizer 8563references. 8564 8565 8566== [6.0alpha6] == 8567 8568* Changed the definition of DATASTART on ALPHA and IA64, where data_start 8569and __data_start are not defined by earlier versions of glibc. This might 8570need to be fixed on other platforms as well. 8571* Changed the way the stack base and backing store base are found on IA64. 8572This should now remain reliable on future kernels. But since it relies 8573on /proc, it will no longer work in the simulated NUE environment. 8574* Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent 8575on the OS. On non-Unix systems, rand() should be used instead. Handled 8576small RAND_MAX (thanks to Peter Ross for pointing this out). 8577* Fixed the cord make rules to create the cord subdirectory, if necessary 8578(thanks to Doug Moen). 8579* Changed fo_object_size calculation in finalize.c. Turned finalization 8580of non-heap object into a no-op. Removed anachronism from GC_size() 8581implementation. 8582* Changed GC_push_dirty call in solaris_threads.c to GC_push_selected. 8583It was missed in a previous renaming (thanks to Vladimir Tsichevski 8584for pointing this out). 8585* Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay). 8586* Added GC_no_dls hook for applications that want to register their own 8587roots. 8588* Integrated Kjetil Matheussen's Amiga changes. 8589* Added FREEBSD_STACKBOTTOM. Changed the X86/FreeBSD port to use it 8590(thanks to Matthew Flatt). 8591* Added pthread_detach interception for platforms supported by linux_threads.c 8592and irix_threads.c. 8593* Changed the USE_MMAP code to check for the case in which we got the 8594high end of the address space, i.e. mem_ptr + mem_sz == 0. It appears 8595that this can happen under Solaris 7. It seems to be allowed by what 8596I would claim is an oversight in the mmap specification. (Thanks to 8597Toshio Endo for pointing out the problem.) 8598* Cleanup of linux_threads.c. Some code was originally cloned from 8599irix_threads.c and now unnecessary. Some comments were obviously wrong. 8600* (Mostly) fixed a longstanding problem with setting of dirty bits from 8601a signal handler. In the presence of threads, dirty bits could get lost, 8602since the getting of a bit in the bit vector was not atomic with respect 8603to other updates. The fix is 100% correct only for platforms for which 8604GC_test_and_set is defined. The goal is to make that all platforms with 8605thread support. Matters only if incremental GC and threads are both 8606enabled. 8607* made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an 8608initialization time, instead of build-time option. This is a 8609nontrivial, high risk change. It should slow down the code measurably 8610only if MERGE_SIZES is not defined, which is a very nonstandard 8611configuration. 8612* Added doc/README.environment, and implemented what it describes. This 8613allows a number of additional configuration options to be set through 8614the environment. It documents a few previously undocumented options. 8615* Integrated Eric Benson's leak testing improvements. 8616* Removed the option to throw away the beginning of each page (DISCARD_WORDS). 8617This became less and less useful as processors enforce stricter alignment. 8618And it hadn't been tested in ages, and was thus probably broken anyway. 8619 8620 8621== [6.0alpha5] == 8622 8623* Changed the definition of GC_pause in linux_threads.c to use a volatile 8624asm. Some versions of gcc apparently optimize away writes to local volatile 8625variables. This caused poor locking behavior starting at about 86264 processors. 8627* Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep 8628to linux_threads.c. 8629The first two calls could be used to generally avoid sending GC signals to 8630blocked threads, avoiding both premature wakeups and unnecessary overhead. 8631* Fixed a serious bug in thread-local allocation. At thread termination, 8632GC_free could get called on small integers. Changed the code for thread 8633termination to more efficiently return left-over free-lists. 8634* Integrated Kjetil Matheussen's BeOS support. 8635* Rearranged the directory structure to create the doc and tests 8636subdirectories. 8637* Sort of integrated Eric Benson's patch for OSF1. This provided basic 8638OSF1 thread support by suitably extending hpux_irix_threads.c. Based 8639on earlier email conversations with David Butenhof, I suspect that it 8640will be more reliable in the long run to base this on linux_threads.c 8641instead. Thus I attempted to patch up linux_threads.c based on Eric's code. 8642The result is almost certainly broken, but hopefully close enough that 8643someone with access to a machine can pick it up. 8644* Integrated lots of minor changes from the NetBSD distribution. (These 8645were supplied by David Brownlee. I'm not sure about the original 8646authors.) 8647* Hacked a bit more on the HP/UX thread-support in linux_threads.c. It 8648now appears to work in the absence of incremental collection. Renamed 8649hpux_irix_threads.c back to irix_threads.c, and removed the attempt to 8650support HPUX there. 8651* Changed gc.h to define _REENTRANT in cases in which it should already 8652have been defined. It is still safer to also define it on the command 8653line. 8654 8655 8656== [6.0alpha4] == 8657 8658* Moved up the detection of mostly full blocks to the initiation of the 8659sweep phase. This eliminates some lock contention in the PARALLEL_MARK case, 8660as multiple threads try to look at mostly full blocks concurrently. 8661* Restored the code in GC_malloc_many that grabs a prefix of the global 8662free list. This avoids the case in which every GC_malloc_many call 8663tries and fails to allocate a new heap block, and the returns a single 8664object from the global free list. 8665* Some minor fixes in new_hblk.c. (Attempted to build free lists in order 8666of increasing addresses instead of decreasing addresses for cache performance 8667reasons. But this seems to be only a very minor gain with -DEAGER_SWEEP, 8668and a loss in other cases. So the change was backed out.) 8669* Fixed some of the documentation (thanks in large part to Fergus Henderson). 8670* Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform 8671large numbers of mmaps (thanks to Eric Benson). Also fixed that code to 8672deal with short reads. 8673* Added GC_get_total_bytes(). 8674* Fixed leak detection mode to avoid spurious messages under linuxthreads. 8675(This should also now be easy for the other supported threads packages. 8676But the code is tricky enough that I'm hesitant to do it without being able 8677to test. Everything allocated in the GC thread support itself should be 8678explicitly deallocated.) 8679* Made it possible (with luck) to redirect malloc to GC_local_malloc. 8680 8681 8682== [6.0alpha3] 2000-09-26 == 8683 8684* Fixed the /proc/self/maps code to not seek, since that apparently is not 8685reliable across all interesting kernels. 8686* Fixed some compilation problems in the absence of PARALLEL_MARK 8687(introduced in alpha2). 8688* Fixed an algorithmic problem with PARALLEL_MARK. If work needs to 8689be given back to the main mark "stack", the BOTTOM entries of the local 8690stack should be given away, not the top ones. This has substantial 8691performance impact, especially for > 2 processors, from what I can tell. 8692* Extracted gc_lock.h from gc_priv.h. This should eventually make it a 8693bit easier to avoid including gc_priv.h in clients. 8694* Moved all include files to include/ and removed duplicate links to the 8695same file. The old scheme was a bad idea because it was too easy to get the 8696copies out of sync, and many systems don't support hard links. 8697Unfortunately, it's likely that I broke some of the non-Unix Makefiles in 8698the process, although I tried to update them appropriately. 8699* Removed the partial support for a copied nursery. It's not clear that 8700this would be a tremendous win, since we don't consistently lose to 8701generational copying collectors. And it would significantly complicate 8702many things. May be reintroduced if/when it really turns out to win. 8703* Removed references to IRIX_JDK_THREADS, since I believe there never 8704were and never will be any clients. 8705* Added some code to linux_threads.c to possibly support HPUX threads 8706using the Linux code. Unfortunately, it doesn't work yet, and is 8707currently disabled. 8708* Added support under Linux/X86 for saving the call chain, both in (debug) 8709objects for client debugging, and in GC_arrays._last_stack for GC 8710debugging. This was previously supported only under Solaris. It is 8711not enabled by default under X86, since it requires that code be compiled 8712to explicitly gave frame pointers on the call stack. (With gcc this 8713currently happens by default, but is often turned off explicitly.) 8714To turn it on, define SAVE_CALL_CHAIN. 8715 8716 8717== [6.0alpha2] == 8718 8719* Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms 8720for which that's expensive. 8721* Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems. 8722* Added a missing volatile to OR_WORD and renamed the parameter to 8723GC_compare_and_swap so it's not a C++ reserved word (thanks to 8724Toshio Endo for pointing out both of those). 8725* Changed Linux dynamic library registration code to look at /proc/self/maps 8726instead of the rld data structures when REDIRECT_MALLOC is defined. 8727Otherwise some of the rld data data structures may be prematurely garbage 8728collected. 8729* Fixed USE_LD_WRAP a bit more, so it should now work without threads. 8730* Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness. 8731Temporarily added some backward compatibility definitions. Renamed 8732USE_LD_WRAP to GC_USE_LD_WRAP. 8733* Many MACOSX POWERPC changes, some additions to the gctest output, and 8734a few minor generic bug fixes (thanks to Dietmar Planitzer). 8735 8736 8737== [6.0alpha1] == 8738 8739* Added HP/PA prefetch support. 8740* Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve 8741the reliability of generating pointer backtrace information, e.g. in 8742the Bigloo environment. 8743* Added parallel marking support (-DPARALLEL_MARK). This currently 8744works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt 8745to other platforms. This is intended to be a lighter-weight (less 8746new code, probably not as scalable) solution than the work by Toshio Endo 8747et al, at the University of Tokyo. A number of their ideas were 8748reused, though the code wasn't, and the underlying data structure 8749is significantly different. In particular, we keep the global mark 8750stack as a single shared data structure, but most of the work is done 8751on smaller thread-local mark stacks. 8752* Changed GC_malloc_many to be cheaper, and to require less mutual exclusion 8753with -DPARALLEL_MARK. 8754* Added full support for thread local allocation under Linux 8755(-DTHREAD_LOCAL_ALLOC). This is a thin veneer on GC_malloc_many, and 8756should be easily portable to other platforms, especially those that 8757support pthreads. 8758* CLEAR_DOUBLE was not always getting invoked when it should have been. 8759* GC_gcj_malloc and friends used different out of memory handling than 8760everything else, probably because I forgot about one when I implemented 8761the other. They now both call GC_oom_fn(), not GC_oom_action(). 8762* Integrated Jakub Jelinek's fixes for Linux/SPARC. 8763* Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of 8764GC_arrays, and separately registered the first two as excluded roots. 8765This makes code compiled with gc_inl.h less dependent on the 8766collector version. (It would be nice to remove the inclusion of 8767gc_priv.h by gc_inl.h completely, but we're not there yet. The 8768locking definitions in gc_priv.h are still referenced.) 8769This change was later conditioned on SEPARATE_GLOBALS, which 8770is not defined by default, since it involves a performance hit. 8771* Register GC_obj_kinds separately as an excluded root region. The 8772attempt to register it with GC_arrays was usually failing. (This wasn't 8773serious, but seemed to generate some confusion.) 8774* Moved backptr.h to gc_backptr.h. 8775 8776 8777== [5.4] == 8778 8779* Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to 8780Shawn Wagner for actually testing this). 8781* Fixed GC_is_thread_stack in solaris_threads.c. It forgot to return a value 8782in the common case. 8783* Fixed another silly syntax problem in GC_double_descr (thanks to 8784Fergus Henderson for finding it). 8785* Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice. 8786 8787 8788== [5.3] 2000-09-24 == 8789 8790* Fixed _end declaration for OSF1. 8791* There were lots of spurious leak reports in leak detection mode, caused 8792by the fact that some pages were not being swept, and hence unmarked 8793objects weren't making it onto free lists. (This bug dated back to 5.0.) 8794* Fixed a typo in the liblinuxgc.so Makefile rule. 8795* Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work 8796around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia). 8797 8798 8799== [5.2] == 8800 8801* dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it 8802was defined as a macro. This prevented the collector from building on 8803Irix. 8804* We quietly assumed that indirect mark descriptors were never 0. 8805Our own typed allocation interface violated that. This could result 8806in segmentation faults in the marker with typed allocation. 8807* Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to 8808Ben Hutchings for the patch). 8809* Taught the collector about VC++ handling array operator new (thanks to 8810Ben Hutchings for the patch). 8811* The two copies of gc_hdrs.h had diverged. Made one a link to the other 8812again. 8813 8814 8815== [5.1] == 8816 8817* Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan). 8818* Fixed a typo in GC_double_descr in typd_mlc.c. 8819This probably could result in objects described by array descriptors not 8820getting traced correctly (thanks to Ben Hutchings for pointing this out). 8821* The block nearly full tests in reclaim.c were not correct for 64 bit 8822environments. This could result in unnecessary heap growth under unlikely 8823conditions. 8824 8825 8826== [5.0] == 8827 8828* Fixed threadlibs.c for linux threads. -DUSE_LD_WRAP was broken and 8829-ldl was omitted. Fixed Linux stack finding code to handle 8830-DUSE_LD_WRAP correctly. 8831* Added MSWIN32 exception handler around marker, so that the collector 8832can recover from root segments that are unmapped during the collection. 8833This caused occasional failures under Windows 98, and may also be 8834an issue under Windows NT/2000. 8835 8836 8837== [5.0alpha7] == 8838 8839* -DREDIRECT_MALLOC was broken in alpha6. Fixed. 8840* Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to 8841accept it. 8842* Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be 8843linked into every executable. 8844* Added PREFETCH to bitmap marker. Changed it to use the header cache. 8845* GC_push_marked sometimes pushed one object too many, resulting in a 8846segmentation fault in GC_mark_from_mark_stack. This was probably an old 8847bug. It finally showed up in gctest on win32. 8848* Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE 8849when SMALL_CONFIG was defined. This was no doubt a major performance bug for 8850the default win32 configuration. 8851* Removed -DSMALL_CONFIG from NT_MAKEFILE. It seemed like an anachronism now 8852that the average PC has 64MB or so. 8853* Integrated Bryce McKinlay's patches for linux threads and dynamic loading 8854from the libgcj tree. Turned on dynamic loading support for Linux/PPC. 8855* Changed the stack finding code to use environ on HP/UX (thanks 8856to Gustavo Rodriguez-Rivera for the suggestion). This should 8857probably be done on other platforms, too. Since I can't test those, that'll 8858wait until after 5.0. 8859 8860 8861== [5.0alpha6] == 8862 8863* GC_malloc_explicitly_typed and friends sometimes failed to 8864initialize first word. 8865* Added allocation routines and support in the marker for mark descriptors 8866in a type structure referenced by the first word of an object. This was 8867introduced to support gcj, but hopefully in a way that makes it 8868generically useful. 8869* Added GC_requested_heapsize, and inhibited collections in non-incremental 8870mode if the actual used heap size is less than what was explicitly 8871requested. 8872* The Solaris pthreads version of GC_pthread_create didn't handle a NULL 8873attribute pointer. Solaris thread support used the wrong default thread 8874stack size (thanks to Melissa O'Neill for the patch). 8875* Changed PUSH_CONTENTS macro to no longer modify first parameter. 8876This usually doesn't matter, but it was certainly an accident waiting 8877to happen ... 8878* Added GC_register_finalizer_no_order and friends to gc.h. They're 8879needed by Java implementations. 8880* Integrated a fix for a win32 deadlock resulting from clock() calling 8881malloc (thanks to Chris Dodd). 8882* Integrated Hiroshi Kawashima's port to Linux/MIPS. This was designed 8883for a handheld platform, and may or may not be sufficient for other 8884machines. 8885* Fixed a va_arg problem with the %c specifier in cordprnt.c. It appears 8886that this was always broken, but recent versions of gcc are the first to 8887report the (statically detectable) bug. 8888* Added an attempt at a more general solution to dlopen races/deadlocks. 8889GC_dlopen now temporarily disables collection. Still not ideal, but ... 8890* Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64 8891prefetch instructions. May improve performance measurably, but I'm not 8892sure the code will run correctly on processors that don't support the 8893instruction. Won't build except with very recent gcc. 8894* Added caching for header lookups in the marker. This seems to result 8895in a barely measurable performance gain. Added support for interleaved 8896lookups of two pointers, but unconfigured that since the performance 8897gain is currently near zero, and it adds to code size. 8898* Changed Linux DATASTART definition to check both data_start and 8899__data_start, since nothing else seems to be portable. 8900* Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function 8901wrapping mechanism. Probably currently useful only on Linux. 8902* Moved some variables for the scratch allocator into GC_arrays (suggested 8903by Martin Hirzel). 8904* Fixed a win32 threads bug that caused the collector to not look for 8905interior pointers from one of the thread stacks without 8906ALL_INTERIOR_POINTERS (thanks to Jeff Sturm). 8907* Added Mingw32 support (thanks to Jeff Sturm for the patch). 8908* Changed the alpha port to use the generic register scanning code instead 8909of alpha_mach_dep.s. Alpha_mach_dep.s doesn't look for pointers in fp 8910registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano 8911for helping debug this). Changed the IA64 code to 8912do something similar for similar reasons. 8913 8914 8915== [5.0alpha4] 1999-10-30 == 8916 8917* Added protection fault handling patch for Linux/M68K from Fergus 8918Henderson and Roman Hodek. 8919* Removed the tests for SGI_SOURCE in new_gc_alloc.h. This was causing that 8920interface to fail on non-SGI platforms. 8921* Changed the Linux stack finding code to use /proc, after changing it 8922to use HEURISTIC1 (thanks to David Mossberger for pointing out /proc hook). 8923* Added HP/UX incremental GC support and HP/UX 11 thread support. 8924Thread support is currently still flaky. 8925* Added basic Linux/IA64 support. 8926* Integrated Anthony Green's PicoJava support. 8927* Integrated Scott Ananian's StrongARM/NetBSD support. 8928* Fixed some fairly serious performance bugs in the incremental 8929collector. These have probably been there essentially forever. 8930(Mark bits were sometimes set before scanning dirty pages. 8931The reclaim phase unnecessarily dirtied full small object pages.) 8932* Changed the reclaim phase to ignore nearly full pages to avoid 8933touching them. 8934* Limited GC_black_list_spacing to roughly the heap growth increment. 8935* Changed full collection triggering heuristic to decrease full GC 8936frequency by default, but to explicitly trigger full GCs during 8937heap growth. This doesn't always improve things, but on average it's 8938probably a win. 8939* GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the 8940bug report and fix). 8941 8942 8943== [5.0alpha3] 1999-09-15 == 8944 8945(Also known as 4.15alpha3.) 8946* Added some highly incomplete code to support a copied young generation. 8947Comments on nursery.h are appreciated. 8948* Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND, 8949so the same effect could be obtained with a runtime switch. This is 8950a step towards standardizing on a single dynamic GC library. 8951* Significantly changed the way leak detection is handled, as a consequence 8952of the above. 8953 8954 8955== [5.0alpha2] 1999-07-23 == 8956 8957* Fixed bugs introduced in alpha1 (OpenBSD & large block initialization). 8958* Added -DKEEP_BACK_PTRS and backptr.h interface. (The implementation 8959idea came from Alan Demers.) 8960 8961 8962== [5.0alpha1] 1999-06-30 == 8963 8964(Also known as 4.15alpha1.) 8965* Reworked large block allocator. Now uses multiple doubly linked free 8966lists to approximate best fit. 8967* Changed heap expansion heuristic. Entirely free blocks are no longer 8968counted towards the heap size. This seems to have a major impact on 8969heap size stability; the old version could expand the heap way too 8970much in the presence of large block fragmentation. 8971* added -DGC_ASSERTIONS and some simple assertions inside the collector. 8972This is mainlyt for collector debugging. 8973* added -DUSE_MUNMAP to allow the heap to shrink. Supported on only 8974a few UNIX-like platforms for now. 8975* added GC_dump_regions() for debugging of fragmentation issues. 8976* Changed PowerPC pointer alignment under Linux to 4. 8977* Changed the Linux/Alpha port to walk the data segment backwards until 8978it encounters a SIGSEGV. The old way to find the start of the data 8979segment broke with a recent release. 8980* cordxtra.c needed to call GC_REGISTER_FINALIZER instead of 8981GC_register_finalizer, so that it would continue to work with GC_DEBUG. 8982* allochblk sometimes cleared the wrong block for debugging purposes 8983when it dropped blacklisted blocks. This could result in spurious 8984error reports with GC_DEBUG. 8985* added MACOS X Server support (thanks to Andrew Stone). 8986* Changed the Solaris threads code to ignore stack limits > 8 MB with 8987a warning. Empirically, it is not safe to access arbitrary pages 8988in such large stacks. And the dirty bit implementation does not 8989guarantee that none of them will be accessed. 8990* Integrated Martin Tauchmann's Amiga changes. 8991* Integrated James Dominy's OpenBSD/SPARC port. 8992 8993 8994== [4.14] 1999-04-16 == 8995 8996* changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea). 8997 8998 8999== [4.14alpha2] 1999-03-26 == 9000 9001* -DSMALL_CONFIG did not work reliably with large (> 4K) pages. 9002Recycling the mark stack during expansion could result in a size 9003zero heap segment, which confused things. (This was probably also an 9004issue with the normal config and huge pages.) 9005* Did more work to make sure that callee-save registers were scanned 9006completely, even with the setjmp-based code. Added USE_GENERIC_PUSH_REGS 9007macro to facilitate testing on machines I have access to. 9008* Added code to explicitly push register contents for win32 threads. 9009This seems to be necessary. (Thanks to Pierre de Rop.) 9010 9011 9012== [4.14alpha1] 1999-03-10 == 9013 9014* Fixed GC_print_source_ptr to not use a prototype. 9015* generalized CYGWIN test. 9016* gc::new did the wrong thing with PointerFreeGC placement (thanks to 9017Rauli Ruohonen). 9018* In the ALL_INTERIOR_POINTERS (default) case, some callee-save register 9019values could fail to be scanned if the register was saved and 9020reused in a GC frame. This showed up in verbose mode with gctest 9021compiled with an unreleased SGI compiler. I vaguely recall an old 9022bug report that may have been related. The bug was probably quite old. 9023(The problem was that the stack scanning could be deferred until 9024after the relevant frame was overwritten, and the new save location 9025might be outside the scanned area. Fixed by more eager stack scanning.) 9026* PRINT_BLACK_LIST had some problems. A few source addresses were garbage. 9027* Replaced Makefile.dj and added -I flags to cord make targets (thanks to 9028Gary Leavens). 9029* GC_try_to_collect was broken with the non-incremental collector. 9030* gc_cleanup destructors could pass the wrong address to 9031GC_register_finalizer_ignore_self in the presence of multiple 9032inheritance (thanks to Darrell Schiebel). 9033* Changed PowerPC Linux stack finding code. 9034 9035 9036== [4.13] 1999-02-19 == 9037 9038* Fixed a crucial bug in the Watcom port. There was a redundant declaration 9039of GC_push_one in gc_priv.h. 9040* Added FINALIZE_ON_DEMAND. 9041* Fixed some pre-ANSI cc problems in test.c. 9042* Removed getpagesize() use for Solaris. It seems to be missing in one 9043or two versions. 9044* Fixed bool handling for SPARCCompiler version 4.2. 9045* Fixed some files in include that had gotten unlinked from the main 9046copy. 9047* Some RS/6000 fixes (missing casts). (Thanks to Toralf Foerster.) 9048* Fixed several problems in GC_debug_realloc, affecting mostly the 9049FIND_LEAK case. 9050* GC_exclude_static_roots contained a buggy unsigned comparison to 9051terminate a loop (thanks to Wilson Ho). 9052* CORD_str failed if the substring occurred at the last possible position. 9053(Only affects cord users.) 9054* Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's 9055os_dep.c code for dealing with various Linux versions. 9056* Added workaround for Irix pthreads sigaction bug and possible signal 9057misdirection problems. 9058 9059 9060== [4.13alpha3] 1998-12-08 == 9061 9062* Fixed MSWIN32 recognition test, which interfered with cygwin. 9063* Removed unnecessary gc_watcom.asm from distribution. Removed 9064some obsolete README.win32 text. 9065* Added Alpha Linux incremental GC support (thanks to Philipp Tomsich 9066for code for retrieving the fault address in a signal handler). 9067Changed Linux signal handler context argument to be a pointer. 9068* Took care of some new warnings generated by the 7.3 SGI compiler. 9069* Integrated Phillip Musumeci's FreeBSD/ELF fixes. 9070* -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h). 9071 9072 9073== [4.13alpha2] 1998-08-08 == 9074 9075* Fixed more Linux threads problems. 9076* Changed default GC_free_space_divisor to 3 with new large block allocation 9077(thanks to Matthew Flatt for some measurements that suggest the old 9078value sometimes favors space too much over time). 9079* More CYGWIN32 fixes. 9080* Integrated Tyson Dowd's Linux-M68K port. 9081* Minor HP PA and DEC UNIX fixes from Fergus Henderson. 9082* Integrated Christoffe Raffali's Linux-SPARC changes. 9083* Allowed for one more GC fixup iteration after a full GC in incremental 9084mode. Some quick measurements suggested that this significantly 9085reduces pause times even with smaller GC_RATE values. 9086* Moved some more GC data structures into GC_arrays. This decreases 9087pause times and GC overhead, but makes debugging slightly less convenient. 9088* Fixed namespace pollution problem ("excl_table"). 9089* Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking 9090that slightly. 9091* Added some win32 threads fixes. 9092* Integrated Ivan Demakov and David Stes' Watcom fixes. 9093* Various other minor fixes contributed by many people. 9094* Renamed config.h to gcconfig.h, since config.h tends to be used for 9095many other things. 9096* Integrated Matthew Flatt's support for 68K MacOS "far globals". 9097* Fixed up some of the dynamic library Makefile targets for consistency 9098across platforms. 9099* Fixed a USE_MMAP typo that caused out-of-memory handling to fail 9100on Solaris. 9101* Added code to test.c to test thread creation a bit more. 9102* Integrated GC_win32_free_heap (as suggested by Ivan Demakov). 9103* Fixed Solaris 2.7 stack base finding problem. (This may actually 9104have been done in an earlier alpha release.) 9105 9106 9107== [4.13alpha1] 1998-02-17 == 9108 9109* Changed RS6000 STACKBOTTOM. 9110* Integrated Patrick Beard's Mac changes. 9111* Alpha1 didn't compile on Irix m.n, m < 6. 9112* Replaced Makefile.dj with a new one from Gary Leavens. 9113* Added Andrew Stitcher's changes to support SCO OpenServer. 9114* Added PRINT_BLACK_LIST, to allow debugging of high densities of false 9115pointers. 9116* Added code to debug allocator to keep track of return address 9117in GC_malloc caller, thus giving a bit more context. 9118* Changed default behavior of large block allocator to more 9119aggressively avoid fragmentation. This is likely to slow down the 9120collector when it succeeds at reducing space cost. 9121* Integrated Fergus Henderson's CYGWIN32 changes. They are untested, 9122but needed for newer versions. 9123* USE_MMAP had some serious bugs. This caused the collector to fail 9124consistently on Solaris with -DSMALL_CONFIG. 9125* Added Linux threads support (thanks to Fergus Henderson). 9126 9127 9128== [4.12] 1997-08-26 == 9129 9130* Fixed ElfW definition in dyn_load.c. 9131This prevented the dynamic library support from compiling on some 9132older ELF Linux systems. 9133* Fixed UTS4 port (which I apparently mangled during the integration). 9134(Thanks to Alistair Crooks.) 9135* "Make C++" failed on Suns with SC4.0, due to a problem with "bool". 9136Fixed in gc_priv.h. 9137* Added more pieces for GNU win32 (thanks to Timothy N. Newsham). 9138The current state of things should suffice for at least some 9139applications. 9140* Changed the out of memory retry count handling. (This matters only 9141if GC_max_retries > 0, which is no longer the default.) 9142* If a /proc read failed repeatedly, GC_written_pages was not updated 9143correctly (thanks to Peter Chubb for diagnosing this). 9144* Under unlikely circumstances, the allocator could infinite loop in 9145an out of memory situation (thanks to Kenjiro Taura for 9146identifying the problem and supplying a fix). 9147* Fixed a syntactic error in the DJGPP code. Also fixed a test program 9148problem with DJGPP (thanks to Fergus Henderson and Peter Monks). 9149* Atomic uncollectible objects were not treated correctly by the 9150incremental collector. This resulted in weird log statistics and 9151occasional performance problems (thanks to Peter Chubb for pointing this out). 9152* Fixed some problems resulting from compilers that don't define 9153__STDC__. In this case void * and char * were used inconsistently 9154in some cases. (Void * should not have been used at all. If 9155you have an ANSI superset compiler that does not define __STDC__, 9156please compile with -D__STDC__=0. Thanks to Manuel Serrano and others 9157for pointing out the problem.) 9158* Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS. 9159Also fixed some other IRIX_THREADS problems which may or may not have 9160had observable symptoms. 9161* Fixed an HP PA compilation problem in dyn_load.c (thanks to 9162Philippe Queinnec). 9163* SEGV fault handlers sometimes did not get reset correctly (thanks 9164to David Pickens). 9165* Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens). 9166This probably needs more work to become functional. 9167* Fixed struct sigcontext_struct in os_dep.c for compilation under 9168Linux 2.1.X (thanks to Fergus Henderson). 9169* Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested 9170(by Kristian Kristensen). These may still not be right, but it is 9171it is likely to work more often than what was there before. They may 9172even be exactly right. 9173* Added a #include <string.h> to test_cpp.cc. This appears to help 9174with HP/UX and gcc (thanks to Assar Westerlund). 9175* Version 4.11 failed to run in incremental mode on recent 64-bit Irix 9176kernels. This was a problem related to page unaligned heap segments. 9177Changed the code to page align heap sections on all platforms. 9178(I had mistakenly identified this as a kernel problem earlier. 9179It was not.) 9180* Version 4.11 did not make allocated storage executable, except on 9181one or two platforms, due to a bug in a #if test (thanks to David Grove 9182for pointing this out). 9183* Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4. 9184* Added GC_exclude_static_roots. 9185* Fixed the object size mapping algorithm. This shouldn't matter, 9186but the old code was ugly. 9187* Heap checking code could die if one of the allocated objects was 9188larger than its base address. (Unsigned underflow problem. Thanks 9189to Clay Spence for isolating the problem.) 9190* Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks 9191to Fred Stearns). 9192* Added Fergus Henderson's patches for improved robustness with large 9193heaps and lots of blacklisting. 9194* Added Peter Chubb's changes to support Solaris Pthreads, to support 9195MMAP allocation in Solaris, to allow Solaris to find dynamic libraries 9196through /proc, to add malloc_typed_ignore_off_page, and a few other 9197minor features and bug fixes. 9198* The Solaris 2 port should not use sbrk. I received confirmation from 9199Sun that the use of sbrk and malloc in the same program is not 9200supported. The collector now defines USE_MMAP by default on Solaris. 9201* Replaced the djgpp makefile with Gary Leavens' version. 9202* Fixed MSWIN32 detection test. 9203* Added Fergus Henderson's patches to allow putting the collector into 9204a DLL under GNU win32. 9205* Added Ivan V. Demakov's port to Watcom C on X86. 9206* Added Ian Piumarta's Linux/PowerPC port. 9207* Added PointerFreeGC to the placement options in gc_cpp.h (suggested by 9208Brian Burton). This is of course unsafe, and may be controversial. 9209On the other hand, it seems to be needed often enough that it's worth 9210adding as a standard facility. 9211* Add Lars Farm's suggestions on building the collector for MacOS. 9212 9213 9214== [4.12alpha2] == 9215 9216(Changes not specified.) 9217 9218 9219== [4.11] 1996-12-03 == 9220 9221* Rationalized (hopefully) GC_try_to_collect in an incremental collection 9222environment. It appeared to not handle a call while a collection was in 9223progress, and was otherwise too conservative. 9224* Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some 9225code. 9226* Added Patrick Beard's Mac fixes, with substantial completely untested 9227modifications. 9228* Fixed the MPROTECT_VDB code to deal with large pages and imprecise 9229fault addresses (as on an UltraSPARC running Solaris 2.5). Note that this 9230was not a problem in the default configuration, which uses PROC_VDB. 9231* The DEC Alpha assembly code needed to restore $gp between calls (thanks to 9232Fergus Henderson for tracking this down and supplying a patch). 9233* The write command for "de" was completely broken for large files. 9234I used the easiest portable fix, which involved changing the semantics 9235so that f.new is written instead of overwriting f. That's safer anyway. 9236* Added README.solaris2 with a discussion of the possible problems of 9237mixing the collector's sbrk allocation with malloc/realloc. 9238* Changed the data segment starting address for SGI machines. The 9239old code failed under IRIX6. 9240* Required double word alignment for MIPS. 9241* Various minor fixes to remove warnings. 9242* Attempted to fix some Solaris threads problems (reported by Zhiying Chen). 9243In particular, the collector could try to fork a thread with the 9244world stopped as part of GC_thr_init. It also failed to deal with 9245the case in which the original thread terminated before the whole 9246process did. 9247* Added -DNO_EXECUTE_PERMISSION. This has a major performance impact 9248on the incremental collector under Irix, and perhaps under other 9249operating systems. 9250* Added some code to support allocating the heap with mmap. This may 9251be preferable under some circumstances. 9252* Integrated dynamic library support for HP (thanks to Knut Tvedten). 9253* Integrated James Clark's win32 threads support, and made a number 9254of changes to it (many of which suggested by Pontus Rydin). This is still 9255not 100% solid. 9256* Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl 9257370-class machine. 9258* Fixed a serious bug in explicitly typed allocation. Objects requiring 9259large descriptors where handled in a way that usually resulted in 9260a segmentation fault in the marker (thanks to Jeremy Fitzhardinge 9261for helping to track this down). 9262* Added partial support for GNU win32 development (thanks to 9263Fergus Henderson). 9264* Added optional support for Java-style finalization semantics (thanks to 9265Patrick Bridges). This is recommended only for Java implementations. 9266* GC_malloc_uncollectable faulted instead of returning 0 when out of 9267memory (thanks to Daniel R. Grayson for noticing). 9268* Calls to GC_base before the collector was initialized failed on a 9269DEC Alpha (thanks to Matthew Flatt). 9270* Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode 9271(thanks to Jeremy Fitzhardinge). 9272* GC_debug_realloc failed for uncollectible objects (thanks to 9273Jeremy Fitzhardinge). 9274* Explicitly typed allocation could crash if it ran out of memory (thanks to 9275Jeremy Fitzhardinge). 9276* Added minimal support for a DEC Alpha running Linux. 9277* Fixed a problem with allocation of objects whose size overflowed 9278ptrdiff_t. (This now fails unconditionally, as it should.) 9279* Added the beginning of Irix pthread support. 9280* Integrated Xiaokun Zhu's fixes for djgpp 2.01. 9281* Added SGI-style STL allocator support (gc_alloc.h). 9282* Fixed a serious bug in README.solaris2. 9283Multi-threaded programs must include 9284gc.h with SOLARIS_THREADS defined. 9285* Changed GC_free so it actually deallocates uncollectible objects (thanks 9286to Peter Chubb for pointing out the problem). 9287* Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges). 9288* Changed the Borland cc configuration so that the assembler is not 9289required. 9290* Fixed a bug in the C++ test that caused it to fail in 64-bit 9291environments. 9292 9293 9294== [4.10t3] 1996-11-18 == 9295 9296Some changes related to threads support. 9297 9298 9299== [4.10] 1996-02-19 == 9300 9301* Fixed a typo around a call to GC_collect_or_expand in alloc.c. It broke 9302handling of out of memory. (Thanks to Patrick C. Beard for noticing.) 9303 9304 9305== [4.9] 1996-02-12 == 9306 9307* More README.debugging fixes. 9308* Objects ready for finalization, but not finalized in the same GC 9309cycle, could be prematurely collected. This occasionally happened 9310in test_cpp. 9311* Too little memory was obtained from the system for very large 9312objects. That could cause a heap explosion if these objects were 9313not contiguous (e.g. under PCR), and too much of them was blacklisted. 9314* Due to an improper initialization, the collector was too hesitant to 9315allocate blacklisted objects immediately after system startup. 9316* Moved GC_arrays from the data into the bss segment by not explicitly 9317initializing it to zero. This significantly 9318reduces the size of executables, and probably avoids some disk accesses 9319on program startup. It's conceivable that it might break a port that I 9320didn't test. 9321* Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which 9322occurred a while ago. 9323 9324 9325== [4.8] 1995-11-20 == 9326 9327* Changed a "comment" in a MacOS specific part of mach_dep.c that caused 9328gcc to fail on other platforms. 9329 9330 9331== [4.7] 1995-11-18 == 9332 9333* Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle). 9334* Updated some Mac specific files (to synchronize with Patrick C. Beard). 9335* Fixed a serious bug for machines with non-word-aligned pointers. 9336(Thanks to Patrick C. Beard for pointing out the problem. The collector 9337should fail almost any conceivable test immediately on such machines.) 9338 9339 9340== [4.6] 1995-11-09 == 9341 9342* Added Linux ELF support (thanks to Arrigo Triulzi). 9343* GC_base crashed if it was called before any other GC_ routines. 9344This could happen if a gc_cleanup object was allocated outside the heap 9345before any heap allocation. 9346* The heap expansion heuristic was not stable if all objects had finalization 9347enabled. Fixed finalize.c to count memory in finalization queue and 9348avoid explicit deallocation. Changed alloc.c to also consider this count. 9349(This is still not recommended. It's expensive if nothing else. Thanks 9350to John Ellis for pointing this out.) 9351* GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing 9352this out). 9353* The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for 9354pointing this out). The current workaround is ugly, but expected to be 9355temporary. 9356* Fixed a formatting problem for SPARC stack traces. 9357* Fixed some '=='s in os_dep.c that should have been assignments. 9358Fortunately these were in code that should never be executed anyway (thanks 9359to Fergus Henderson). 9360* Fixed the heap block allocator to only drop blacklisted blocks in small 9361chunks. Made BL_LIMIT self adjusting. (Both of these were in response 9362to heap growth observed by Paul Graham.) 9363* Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to 9364Patrick C. Beard). 9365* Significantly updated README.debugging. 9366* Fixed some problems with longjmps out of signal handlers, especially under 9367Solaris. Added a workaround for the fact that siglongjmp doesn't appear to 9368do the right thing with -lthread under Solaris. 9369* Added MSDOS/djgpp port (thanks to Mitch Harris). 9370* Added "make reserved_namespace" and "make user_namespace". The 9371first renames ALL "GC_xxx" identifiers as "_GC_xxx". The second is the 9372inverse transformation. Note that doing this is guaranteed to break all 9373clients written for the other names. 9374* descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END 9375defined should be -ALIGNMENT not WORDS_TO_BYTES(-1). This is 9376a serious bug on machines with pointer alignment of less than a word. 9377* GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the 9378end of the object correctly. Caused failures of the C++ test on a DEC Alpha 9379with g++. 9380* gc_inl.h still had problems. Partially fixed. Added warnings at the 9381beginning to hopefully specify the remaining dangers. 9382* Added DATAEND definition to config.h. 9383* Fixed some of the .h file organization. Fixed "make floppy". 9384 9385 9386== [4.5] 1995-06-14 == 9387 9388* Fixed many minor and one major README bugs (thanks to Franklin Chen 9389for pointing out many of them). 9390* Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach). 9391* Added incremental GC support (MPROTECT_VDB) for Linux (with some 9392help from Bruno Haible). 9393* Altered SPARC recognition tests in gc.h and config.h (mostly as 9394suggested by Fergus Henderson). 9395* Added basic incremental GC support for win32, as implemented by 9396Windows NT and Windows 95. GC_enable_incremental is a no-op 9397under win32s, which doesn't implement enough of the VM interface. 9398* Added -DLARGE_CONFIG. 9399* Fixed GC_..._ignore_off_page to also function without 9400-DALL_INTERIOR_POINTERS. 9401* (Hopefully) fixed RS/6000 port. (Only the test was broken.) 9402* Fixed a performance bug in the non-incremental collector running 9403on machines supporting incremental collection with MPROTECT_VDB 9404(e.g. SunOS 4, DEC AXP). This turned into a correctness bug under 9405win32s with win32 incremental collection. (Not all memory protection 9406was disabled.) 9407* Fixed some ppcr related bit rot. 9408* Caused dynamic libraries to be unregistered before re-registering. 9409The old way turned out to be a performance bug on some machines. 9410* GC_root_size was not properly maintained under MSWIN32. 9411* Added -DNO_DEBUGGING and GC_dump. 9412* Fixed a couple of bugs arising with SOLARIS_THREADS + 9413REDIRECT_MALLOC. 9414* Added NetBSD/M68K port (thanks to Peter Seebach). 9415* Fixed a serious realloc bug. For certain object sizes, the collector 9416wouldn't scan the expanded part of the object. (Thanks to Clay Spence 9417for noticing the problem, and helping me to track it down.) 9418 9419 9420== [4.4] 1995-02-18 == 9421 9422* ASM_CLEAR_CODE was erroneously defined for HP 9423PA machines, resulting in a compile error. 9424* Fixed OS/2 Makefile to create a library (thanks to Mark Boulter). 9425* Gc_cleanup objects didn't work if they were created on 9426the stack. Fixed. 9427* One copy of Gc_cpp.h in the distribution was out of 9428synch, and failed to document some known compiler 9429problems with explicit destructor invocation. Partially 9430fixed. There are probably other compilers on which 9431gc_cleanup is miscompiled. 9432* Fixed Makefile to pass C compiler flags to C++ compiler. 9433* Added Mac fixes. 9434* Fixed os_dep.c to work around what appears to be 9435a new and different VirtualQuery bug under newer 9436versions of win32S. 9437* GC_non_gc_bytes was not correctly maintained by 9438GC_free. Fixed (thanks to James Clark). 9439* Added GC_set_max_heap_size. 9440* Changed allocation code to ignore blacklisting if it is preventing 9441use of a very large block of memory. This has the advantage 9442that naive code allocating very large objects is much more 9443likely to work. The downside is you might no 9444longer find out that such code should really use 9445GC_malloc_ignore_off_page. 9446* Changed GC_printf under win32 to close and reopen the file 9447between calls. FAT file systems otherwise make the log file 9448useless for debugging. 9449* Added GC_try_to_collect and GC_get_bytes_since_gc. These 9450allow starting an abortable collection during idle times. 9451This facility does not require special OS support. (Thanks to 9452Michael Spertus of Geodesic Systems for suggesting this. It was 9453actually an easy addition. Kumar Srikantan previously added a similar 9454facility to a now ancient version of the collector. At the time 9455this was much harder, and the result was less convincing.) 9456* Added some support for the Borland development environment (thanks 9457to John Ellis and Michael Spertus). 9458* Removed a misfeature from checksums.c that caused unexpected 9459heap growth (thanks to Scott Schwartz). 9460* Changed finalize.c to call WARN if it encounters a finalization cycle. 9461WARN is defined in gc_priv.h to write a message, usually to stdout. 9462In many environments, this may be inappropriate. 9463* Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own 9464naming convention. 9465* Added GC_set_warn_proc to intercept warnings. 9466* Fixed Amiga port (thanks to Michel Schinz). 9467* Fixed a bug in mark.c that could result in an access to unmapped 9468memory from GC_mark_from_mark_stack on machines with unaligned 9469pointers. 9470* Fixed a win32 specific performance bug that could result in scanning of 9471objects allocated with the system malloc. 9472* Added REDIRECT_MALLOC. 9473 9474 9475== [4.3] 1994-12-23 == 9476 9477* Fixed SPARC alignment problem with GC_DEBUG. 9478* Fixed Solaris threads /proc workaround. The real 9479problem was an interaction with mprotect. 9480* Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h). 9481* Slightly improved allocator space utilization by 9482fixing the GC_size_map mechanism. 9483* Integrated some Sony News and MIPS RISCos 4.51 9484patches (thanks to Nobuyuki Hikichi at Software Research Associates, 9485Inc., Japan). 9486* Fixed HP_PA alignment problem (thanks to Brian F. Dennis). 9487* Added GC_same_obj and friends. Changed GC_base 9488to return 0 for pointers past the end of large objects. 9489Improved GC_base performance with ALL_INTERIOR_POINTERS 9490on machines with a slow integer mod operation. 9491Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare 9492for preprocessor. 9493* changed the default on most UNIX machines to be that 9494signals are not disabled during critical GC operations. 9495This is still ANSI-conforming, though somewhat dangerous 9496in the presence of signal handlers. But the performance 9497cost of the alternative is sometimes problematic. 9498Can be changed back with a minor Makefile edit. 9499* renamed IS_STRING in gc.h, to CORD_IS_STRING, thus 9500following my own naming convention. Added the function 9501CORD_to_const_char_star. 9502* Fixed a gross bug in GC_finalize. Symptom: occasional 9503address faults in that function (thanks to Anselm Baird-Smith). 9504* Added port to ICL DRS6000 running DRS/NX. Restructured 9505things a bit to factor out common code, and remove obsolete 9506code. Collector should now run under SUNOS5 with either 9507mprotect or /proc dirty bits. (Thanks to Douglas Steel.) 9508* More bug fixes and workarounds for Solaris 2.X. (These were 9509mostly related to putting the collector in a dynamic library, 9510which didn't really work before. Also SOLARIS_THREADS 9511didn't interact well with dl_open.) (Thanks to Brian Lewis.) 9512* Fixed a serious performance bug on the DEC Alpha. The text 9513segment was getting registered as part of the root set. 9514(Amazingly, the result was still fast enough that the bug 9515was not conspicuous.) The fix works on OSF/1, version 1.3. 9516Hopefully it also works on other versions of OSF/1 ... 9517* Fixed a bug in GC_clear_roots. 9518* Fixed a bug in GC_generic_malloc_words_small that broke 9519gc_inl.h (reported by Antoine de Maricourt). 9520* Fixed some problems with cord/de under Linux. 9521* Fixed some cord problems, notably with CORD_riter4. 9522* Added DG/UX port (thanks to Ben A. Mesander). 9523* Added finalization registration routines with weaker ordering 9524constraints. (This is necessary for C++ finalization with 9525multiple inheritance, since the compiler often adds self-cycles.) 9526* Filled the holes in the SCO port (thanks to Michael Arnoldus). 9527* Completely rewritten the documentation in the interface gc_c++.h 9528(later renamed gc_cpp.h) making it both clearer and more precise (done by 9529John Ellis). 9530* The definition of accessibility now ignores pointers from a finalizable 9531object (an object with a clean-up function) to itself (done by John Ellis). 9532This allows objects with virtual base classes to be finalizable by the 9533collector. Compilers typically implement virtual base classes using 9534pointers from an object to itself, which under the old definition of 9535accessibility prevented objects with virtual base classes from ever 9536being collected or finalized. 9537* gc_cleanup now includes gc as a virtual base. This was enabled by 9538the change in the definition of accessibility (by John Ellis). 9539* Added support for operator new[] (by John Ellis). Since most compilers 9540don't yet support operator new[], it is conditionalized on 9541-DOPERATOR_NEW_ARRAY. The code is untested, but its trivial and looks 9542correct. 9543* The test program test_gc_c++ (later renamed test_cpp.cc) 9544tries to test for the C++-specific functionality not tested by the 9545other programs. 9546* Added unistd.h include to misc.c. (Needed for ppcr.) 9547* Added PowerMac port (thanks to Patrick C. Beard). 9548* Fixed "srcdir"-related Makefile problems. Changed things so 9549that all externally visible include files always appear in the 9550include subdirectory of the source. Made gc.h directly 9551includable from C++ code (thanks to Per Bothner). 9552* Changed Intel code to also mark from ebp (thanks to Kevin Warne). 9553* Renamed C++ related files so they could live in a FAT 9554file system (thanks to Charles Fiterman). 9555* Changed Windows NT Makefile to include C++ support in 9556gc.lib. Added C++ test as Makefile target. 9557 9558 9559== [4.2] 1994-08-03 == 9560 9561* Multiple bug fixes/workarounds in the Solaris threads version. 9562(It occasionally failed to locate some register contents for 9563marking. It also turns out that thr_suspend and friends are 9564unreliable in Solaris 2.3. Dirty bit reads appear 9565to be unreliable under some weird 9566circumstances. My stack marking code 9567contained a serious performance bug. The new code is 9568extremely defensive, and has not failed in several CPU 9569hours of testing. But no guarantees ...) 9570* Added MacOS support. (Thanks to Patrick C. Beard. 9571David Chase suggested several improvements.) 9572* Fixed several syntactic bugs in gc_c++.h and friends. (These 9573didn't bother g++, but did bother most other compilers.) 9574Fixed gc_c++.h finalization interface. 9575* 64 bit alignment for allocated objects was not guaranteed in a 9576few cases in which it should have been. 9577* Added GC_malloc_atomic_ignore_off_page. 9578* Added GC_collect_a_little. 9579* Added some prototypes to gc.h. 9580* Some other minor bug fixes (notably in Makefile). 9581* Fixed OS/2 / EMX port (thanks to Ari Huttunen). 9582* Fixed AmigaDOS port (thanks to Michel Schinz). 9583* Fixed the DATASTART definition under Solaris. There 9584was a 1 in 16K chance of the collector missing the first 958564K of static data (and thus crashing). 9586* Fixed some blatant anachronisms in the README file. 9587* Fixed PCR-Makefile for upcoming PPCR release. 9588 9589 9590== [4.1] 1994-05-20 == 9591 9592* Changed finalization implementation to guarantee that 9593finalization procedures are called outside of the allocation 9594lock, making direct use of the interface a little less dangerous. 9595MAY BREAK EXISTING CLIENTS that assume finalizers 9596are protected by a lock. Since there seem to be few multi-threaded 9597clients that use finalization, this is hopefully not much of 9598a problem. 9599* Fixed a gross bug in CORD_prev. 9600* Fixed a bug in blacklst.c that could result in unbounded 9601heap growth during startup on machines that do not clear 9602memory obtained from the OS (e.g. win32S). 9603* Ported de editor to win32/win32S. (This is now the only 9604version with a mouse-sensitive UI. Thanks to Rob Haack for the 9605implementation based on the generic Windows application template.) 9606* Added GC_malloc_ignore_off_page to allocate large arrays 9607in the presence of ALL_INTERIOR_POINTERS. 9608* Changed GC_call_with_alloc_lock to not disable signals in 9609the single-threaded case. 9610* Reduced retry count in GC_collect_or_expand for garbage 9611collecting when out of memory. 9612* Made uncollectible allocations bypass black-listing, as they 9613should. 9614* Fixed a bug in typed_test in test.c that could cause (legitimate) 9615GC crashes. 9616* Fixed some potential synchronization problems in finalize.c 9617* Fixed a real locking problem in typd_mlc.c. 9618* Worked around an AIX 3.2 compiler feature that results in 9619out of bounds memory references. 9620* Partially worked around an IRIX5.2 beta problem (which may 9621or may not persist to the final release). 9622* Fixed a bug in the heap integrity checking code that could 9623result in explicitly deallocated objects being identified as 9624smashed. Fixed a bug in the dbg_mlc stack saving code 9625that caused old argument pointers to be considered live. 9626* Fixed a bug in CORD_ncmp (and hence CORD_str). 9627* Repaired the OS2 port, which had suffered from bit rot 9628in 4.0. Worked around what appears to be CSet/2 V1.0 9629optimizer bug. 9630* Fixed a Makefile bug for target "c++". 9631 9632 9633== [4.0] 1994-04-07 == 9634 9635* Added support for Solaris threads (which was possible 9636only by reimplementing some fraction of Solaris threads, 9637since Sun doesn't currently make the thread debugging 9638interface available). 9639* Added non-threads win32 and win32S support. 9640* (Grudgingly, with suitable muttering of obscenities) renamed 9641files so that the collector distribution could live on a FAT 9642file system. Files that are guaranteed to be useless on 9643a PC still have long names. Gc_inline.h and gc_private.h 9644still exist, but now just include gc_inl.h and gc_priv.h. 9645* Fixed a really obscure bug in finalization that could cause 9646undetected mark stack overflows. (I would be surprised if 9647any real code ever tickled this one.) 9648* Changed finalization code to dynamically resize the hash 9649tables it maintains. (This probably does not matter for well- 9650-written code. It no doubt does for C++ code that overuses 9651destructors.) 9652* Added typed allocation primitives. Rewrote the marker to 9653accommodate them with more reasonable efficiency. This 9654change should also speed up marking for GC_malloc allocated 9655objects a little. See gc_typed.h for new primitives. (Thanks to 9656Zhong Shao performed much of the experimentation that led to the 9657current typed allocation facility.) 9658* Improved debugging facilities slightly. Allocation time 9659stack traces are now kept by default on SPARC/SUNOS4. (Thanks to 9660Scott Schwartz.) 9661* Added better support for small heap applications. 9662* Significantly extended cord package. Fixed a bug in the 9663implementation of lazily read files. Printf and friends now 9664have cord variants. Cord traversals are a bit faster. 9665* Made ALL_INTERIOR_POINTERS recognition the default. 9666* Fixed de so that it can run in constant space, independent 9667of file size. Added simple string searching to cords and de. 9668* Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis). 9669* Added dynamic library support for OSF/1 (thanks to Alan Dosser and 9670Tim Bingham at DEC). 9671* Changed argument to GC_expand_hp to be expressed 9672in units of bytes instead of heap blocks. (Necessary 9673since the heap block size now varies depending on 9674configuration. The old version was never very clean.) 9675* Added GC_get_heap_size(). The previous "equivalent" 9676was broken. 9677* Restructured the Makefile a bit. 9678* Added FreeBSD port (provided by Jeffrey Hsu). 9679 9680 9681== [3.7] 1994-03-15 == 9682 9683* Added a workaround for an HP/UX compiler bug. 9684* Fixed another stack clearing performance bug. Reworked 9685that code once more. 9686 9687 9688== [3.6] 1994-01-14 == 9689 9690* fixed a bug in the mark stack growth code that was introduced 9691in 3.4. 9692* fixed Makefile to work around DEC AXP compiler tail recursion 9693bug. 9694 9695 9696== [3.5] == 9697 9698* Minor collections now mark from roots only once, if that 9699doesn't cause an excessive pause. 9700* The stack clearing heuristic was refined to prevent anomalies 9701with very heavily recursive programs and sparse stacks. 9702* Fixed a bug that prevented mark stack growth in some cases. 9703GC_objects_are_marked should be set to TRUE after a call 9704to GC_push_roots and as part of GC_push_marked, since 9705both can now set mark bits. I think this is only a performance 9706bug, but I wouldn't bet on it. It's certainly very hard to argue 9707that the old version was correct. 9708* Fixed an incremental collection bug that prevented it from 9709working at all when HBLKSIZE != getpagesize() 9710* Changed dynamic_loading.c to include gc_priv.h before testing 9711DYNAMIC_LOADING. SunOS dynamic library scanning 9712must have been broken in 3.4. 9713* Object size rounding now adapts to program behavior. 9714* Added a workaround (provided by Manuel Serrano and 9715colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug 9716that I had incorrectly assumed to have been squished. 9717The collector was broken if the text segment size was within 971832 bytes of a multiple of 8K bytes, and if the beginning of 9719the data segment contained interesting roots. The workaround 9720assumes a demand-loadable executable. The original may have 9721have "worked" in some other cases. 9722* Added dynamic library support under IRIX5. 9723* Added support for EMX under OS/2 (thanks to Ari Huttunen). 9724* Added support of Motorola 88K processor running CX/UX (by Brent Benson). 9725 9726 9727== [3.4] == 9728 9729* Fixed a performance bug in GC_realloc. 9730* Updated the amiga port. 9731* Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks). 9732* Added cord library. 9733* Added trivial performance enhancement for 9734ALL_INTERIOR_POINTERS (do not scan last word). 9735 9736 9737== [3.3] 1993-10-02 == 9738 9739* PCR-specific bugs (thanks to Neil Sharman). 9740* Missing locking in GC_free, redundant FASTUNLOCK 9741in GC_malloc_stubborn, and 2 bugs in 9742GC_unregister_disappearing_link (pointed out by Neil Sharman). 9743* Common symbols allocated by the SunOS4.X dynamic loader 9744were not included in the root set. 9745* Bug in GC_finalize (reported by Brian Beuning and Alan Dosser). 9746* Merged Amiga port from Jesper Peterson (untested). 9747* Merged NeXT port from Thomas Funke (significantly 9748modified and untested). (Also thanks to Brian D. Carlstrom for 9749the supplied the NeXT ports.) 9750 9751 9752== [3.2] == 9753 9754Fixed a serious and not entirely repeatable bug in 9755the incremental collector. It appeared only when dirty bit info 9756on the roots was available, which is normally only under Solaris. 9757It also added GC_general_register_disappearing_link, and some 9758testing code. Interface.c disappeared. 9759 9760 9761== [3.1] == 9762 9763* A workaround for a SunOS 4.X SPARC C compiler 9764misfeature that caused problems when the collector was turned into 9765a dynamic library. 9766* A fix for a bug in GC_base that could result in a memory fault. 9767* A fix for a performance bug (and several other misfeatures) pointed 9768out by Dave Detlefs and Alan Dosser. 9769* Use of dirty bit information for static data under Solaris 2.X. 9770* DEC Alpha/OSF1 support (thanks to Alan Dosser). 9771* Incremental collection on more platforms. 9772* A more refined heap expansion policy. Less space usage by default. 9773* Various minor enhancements to reduce space usage, and to reduce 9774the amount of memory scanned by the collector. 9775* Uncollectible allocation without per object overhead. 9776* More conscientious handling of out-of-memory conditions. 9777* Fixed a bug in debugging stubborn allocation. 9778* Fixed a bug that resulted in occasional erroneous reporting of smashed 9779objects with debugging allocation. 9780* Fixed bogus leak reports of size 4096 blocks with FIND_LEAK. 9781 9782 9783== [3.0] == 9784 9785Added generational/incremental collection and stubborn objects. 9786 9787 9788== [2.6] 1993-04-27 == 9789 9790(Changes not specified.) 9791 9792 9793== [2.5] == 9794 9795* Removed an explicit call to exit(1) 9796* Fixed calls to GC_printf and GC_err_printf, so the correct number of 9797arguments are always supplied. The OS/2 C compiler gets confused if 9798the number of actuals and the number of formals differ. (ANSI C 9799doesn't require this to work. The ANSI sanctioned way of doing things 9800causes too many compatibility problems.) 9801 9802 9803== [2.4] 1993-01-26 == 9804 9805Added GC_free_space_divisor as a tuning knob, added 9806support for OS/2 and linux, and fixed the following bugs: 9807* On machines with unaligned pointers (e.g. Sun 3), every 128th word could 9808fail to be considered for marking. 9809* Dynamic_load.c erroneously added 4 bytes to the length of the data and 9810bss sections of the dynamic library. This could result in a bad memory 9811reference if the actual length was a multiple of a page. (Observed on 9812Sun 3. Can probably also happen on a Sun 4.) 9813(Thanks to Robert Brazile for pointing out that the Sun 3 version 9814was broken. Dynamic library handling is still broken on Sun 3s 9815under 4.1.1U1, but apparently not 4.1.1. If you have such a machine, 9816use -Bstatic.) 9817 9818 9819== [2.3] == 9820 9821* Added ALL_INTERIOR_POINTERS. 9822* Missing declaration of etext in the A/UX version. 9823* Some PCR root-finding problems. 9824* Blacklisting was not 100% effective, because the plausible future 9825heap bounds were being miscalculated. 9826* GC_realloc didn't handle out-of-memory correctly. 9827* GC_base could return a nonzero value for addresses inside free blocks. 9828* test.c wasn't really thread safe, and could erroneously report failure 9829in a multi-threaded environment. (The locking primitives need to be 9830replaced for other threads packages.) 9831* GC_CONS was thoroughly broken. 9832* On a SPARC with dynamic linking, signals stayed disabled while the 9833client code was running (thanks to Manuel Serrano). 9834 9835 9836== [2.2] == 9837 9838* GC_realloc could fail to extend the size of the object for certain large 9839object sizes. 9840* A blatant subscript range error in GC_printf, which unfortunately 9841wasn't exercised on machines with sufficient stack alignment constraints. 9842* GC_register_displacement did the wrong thing if it was called after 9843any allocation had taken place. 9844* The leak finding code would eventually break after 2048 byte 9845byte objects leaked. 9846* interface.c didn't compile. 9847* The heap size remained much too small for large stacks. 9848* The stack clearing code behaved badly for large stacks, and perhaps 9849on HP/PA machines. 9850 9851 9852== [2.1] == 9853 9854* The first stable version since 1.9. 9855* Added support for PPCR. 9856 9857 9858== [2.0] == 9859 9860* Introduced a consistent naming convention for collector 9861routines and added support for registering dynamic library data segments 9862in the standard mark_roots.c (original code supporting the SunOS dynamic 9863loader provided by Bill Janssen). Most of the data structures were revamped. 9864The treatment of interior pointers was completely changed. Finalization 9865was added. Support for locking was added. Object kinds were added. 9866We added a black listing facility to avoid allocating at addresses known 9867to occur as integers somewhere in the address space. Much of this 9868was accomplished by adapting ideas and code from the PCR collector. 9869The test program was changed and expanded. 9870 9871 9872== [1.9] 1992-01-29 == 9873 9874* fixed a major bug in gc_realloc. 9875 9876 9877== [1.8] == 9878 9879* added ULTRIX support in gc_private.h. (Robert Brazile originally supplied 9880the ULTRIX code. Alan Dosser and Regis Cridlig subsequently provided updates 9881and information on variation between ULTRIX systems.) 9882 9883 9884== [1.5] == 9885 9886* ensure 8 byte alignment for objects allocated on a sparc based machine. 9887 9888 9889== [1.4] == 9890 9891* Does not use compile time determined values 9892for the stack base. This no longer works on Sun 3s, since Sun 3/80s use 9893a different stack base. We now use a straightforward heuristic on all 9894machines on which it is known to work (incl. Sun 3s) and compile-time 9895determined values for the rest. There should really be library calls 9896to determine such values. 9897 9898 9899== [1.3] == 9900 9901* Fixed spurious 9902assembly language assignments to TMP_SP. Only the assignment in the PC/RT 9903code is necessary. On other machines, with certain compiler options, 9904the assignments can lead to an unsaved register being overwritten. 9905Known to cause problems under SunOS 3.5 WITHOUT the -O option. (With 9906-O the compiler recognizes it as dead code. It probably shouldn't, 9907but that's another story.) 9908The SPARC-specific code was originally contributed by Mark Weiser. 9909The Encore Multimax modifications were supplied by Kevin Kenny. 9910The adaptation to the IBM PC/RT is largely 9911due to Vernon Lee, on machines made available to Rice by IBM. 9912Much of the HP specific code and a number of good suggestions for improving 9913the generic code are due to Walter Underwood. 9914Parag Patel supplied the A/UX code. 9915Manuel Serrano supplied linux and Sony News specific code. 9916