Debian Codegraph @

ChangeLog

raw
1
2 == [8.2.12] 2026-02-05 ==
3
4 * Do not prevent shared builds on OpenBSD/alpha
5 * Eliminate 'argument unused' gcc warning in push_all_stack_partially_eager
6 * Eliminate 'assign long to void*' gcc warning in get_stack_base on Serenity
7 * Eliminate 'format expects argument of type' gcc warnings in dump_meminfo
8 * Eliminate 'GC_push_all_stack not used' gcc warning if fix-up pointers
9 * Eliminate 'GC_remove_roots_subregion not used' gcc warning on Solaris
10 * Eliminate 'unused parameter' clang warnings in GC_darwin_sigbus
11 * Fix 'KERN_PROTECTION_FAILURE while world is stopped' error on MacOS X
12 * Fix 'MA_FETCHOP undeclared' gcc error if USE_PROC_FOR_LIBRARIES on Solaris
13 * Fix 'PIOCNMAP undeclared' gcc error if USE_PROC_FOR_LIBRARIES on Solaris
14 * Fix 'reserved' argument handling in GC_DllMain
15 * Fix 'undefined errno' compiler error in strdup/strndup on WinCE
16 * Fix a cycle in NORMAL freelist if malloc is redirected on Linux
17 * Fix assertion in GC_wait_for_reclaim if DllMain-based thread registration
18 * Fix code defect of LOCK/UNLOCK in separate 'if' in GC_generic_malloc_many
19 * Fix missing new-line in help message of console variant of cord/de
20 * Fix race in DllMain by deferring delete_thread call to GC_start_world
21 * Fix redirected 'free' for callers from libdl/libpthread if IGNORE_FREE
22 * Fix reliance on glibc-specific '__data_start' for some Linux platforms
23 * Fix shared library build on MinGW if disable_single_obj_compilation
24 * Fix SIGSEGV during pthread_setname_np if redirect malloc on FreeBSD
25 * Fix SIGSEGV if pthread_detach is called before collector initialization
26 * Fix SIGSEGV in remove_all_threads_but_me if fork from unregistered thread
27 * Fix typos (about getcontext) in printed message in setjmp_test
28 * Fix various typos in comments and documentation
29 * Prevent collection if fork from an unregistered thread
30 * Refine USE_PROC_FOR_LIBRARIES macro documentation for Solaris
31 * Remove unneeded '__MINGW_EXCPT_DEFINE_PSDK' macro define for mingw32
32 * Remove unused GC_VERSION in configure
33 * Remove unused redefinition of GC_free in gctest
34 * Revert 'Avoid abort on ResumeThread failure if DllMain closes thread'
35 * Revert 'Fix GC_suspend abort when the thread is deleted by DllMain'
36 * Turn on pthread_atfork usage on Hurd
37 * Workaround locals not pushed in sanitized binaries by disabling fake stacks
38
39
40 == [8.2.10] 2025-10-18 ==
41
42 * Add missing test_cpp dependency on gc_allocator.h in build scripts
43 * Add Serenity OS to list of platforms with POSIX threads in configure
44 * Avoid abort on ResumeThread failure if Win32 DllMain closes thread handle
45 * Avoid code duplication in GC_dyld_image_add/remove on Darwin
46 * Do not define GC_SysVGetDataStart on AIX
47 * Do not produce '-lpthread' by threadlibs on Tru64/OSF1
48 * Do not search for data start using GC_find_limit on Haiku
49 * Do not use deprecated _dyld_bind_fully_image_containing_address (Darwin)
50 * Do not use deprecated get_etext and get_end on Darwin
51 * Do not use deprecated getsectbynamefromheader_64 (Darwin)
52 * Duplicate abort message in system app crash dialog on Haiku
53 * Eliminate 'allocating insufficient size 0 for char` gcc warning in gctest
54 * Eliminate 'compare signed/unsigned in check_finalizer_nested' bcc warning
55 * Eliminate 'conversion from void* to ptr_t' g++ warning in PS_ALLOCA_BUF
56 * Eliminate 'int-to-ptr cast' gcc warning in GC_push_all_stacks on Solaris
57 * Eliminate 'int-to-ptr cast' gcc warning in GC_restart_all on OpenBSD
58 * Eliminate 'int-to-ptr cast' gcc warnings in DEBUG_THREADS code
59 * Eliminate 'message number 726 is invalid' wcc warning
60 * Eliminate 'unused parameter fd' gcc warning in NOSYS GC_write
61 * Eliminate 'value exceeds maximum obj size' gcc warning in hugetest on x32
62 * Ensure no GC_proc_buf overrun on Solaris
63 * Export CMake libraries with aliases
64 * Fix 'cannot implement AO_compare_and_swap_full' error by wcc in tests
65 * Fix 'cannot locate assembly file' bcc32 error in CMake script
66 * Fix 'conflicting types for sbrk' gcc error on Solaris if redirect malloc
67 * Fix 'missing GNU-stack section in atomic_ops_sysdeps' ld warning
68 * Fix 'symbol undefined _snprintf' dmc linker error in cordtest
69 * Fix 'undefined STACKBOTTOM' preprocessor error for no-OS PowerPC target
70 * Fix 'undefined symbol GC_arrays` in tools on Solaris
71 * Fix 'undefined symbol sbrk' linker error on FreeBSD
72 * Fix all broken URLs in documentation (as of Nov 2024)
73 * Fix assertion violation about GC_mark_lock_holder in fork_child_proc
74 * Fix blocked signals in fork_prepare_proc on HP/UX
75 * Fix cast of struct-based pthread_t to void pointer on Win32
76 * Fix code blocks formatting in .md files
77 * Fix compilation error regarding locks initialization in GC_init on HP_PA
78 * Fix CPP_WORDSZ for LoongArch
79 * Fix deprecation warning about support of CMake older than v3.10
80 * Fix extraneous '#' symbol before comment near USE_WINALLOC for Cygwin
81 * Fix GC_GRANULE_BYTES for SPARC V9
82 * Fix GC_suspend abort when the thread is deleted by DllMain
83 * Fix GC_threads alignment caused by 1-byte global AO_TS_t variables (wcc)
84 * Fix GETPAGESIZE and USE_M[UN]MAP for Nintendo Switch
85 * Fix getting memory from OS on Haiku
86 * Fix I_HOLD_LOCK assertion violation in child process
87 * Fix mark lock in child process after fork
88 * Fix missing export for Symbian-specific GC_init_global_static_roots
89 * Fix missing parentheses in SIG_THR_RESTART macro definition
90 * Fix print_heap_obj call with the lock held in backgraph add_edge
91 * Fix pthread id stored in GC_threads of child process
92 * Fix pthread id stored in key thread_specific_data of child process
93 * Fix pthread_sigmask result checking in GC_start_mark_threads_inner
94 * Fix reading async proc maps when GC is single-threaded but process is not
95 * Fix rounding up in STACKBOTTOM for OSF1
96 * Fix stack base detection on Haiku by using pthread_getattr_np()
97 * Fix stack direction detection in setjmp_t on E2K
98 * Fix symbols alignment checking for CRIS and M68K
99 * Fix undefined reference to GC_objfreelist and GC_bytes_allocd
100 * Fix usage of new structured procfs interface on Solaris
101 * Fix various typos in comments and documentation
102 * Force use of spin locks to improve performance on Haiku
103 * Grow GC_proc_buf to required size in GC_proc_read_dirty instead of WARN
104 * Handle sparc-sun-solaris3 (SunOS6) in configure to use sparc_mach_dep.S
105 * Initial support of Serenity OS on x86[_64]
106 * Refine comment in fork_child_proc() about GC_allocate_ml attribute
107 * Refine description of 'more background' links in Overview document
108 * Remove always-false check if C++ allocator.allocate returns null in test
109 * Remove comment about limited support of memory unmapping
110 * Remove improper comment about returned value of CORD_extend_path
111 * Remove outdated comment about 'make distcheck' from Makefile.am
112 * Support RISC-V ILP32 ABI (rv64ilp32)
113 * Suppress 'missing return value' wcc warning for AO asm primitives
114 * Suppress 'unreachable code' wcc warnings in win32 threads ASSERT (CMake)
115 * Turn off thread suspend/resume API support explicitly
116 * Update libatomic_ops repo URL in README after repo transfer
117 * Update URLs in documentation after repo transfer to bdwgc organization
118 * Workaround '__stdcall__ ignored for this target' clang warning on Cygwin64
119 * Workaround 'array index 4096 is above bounds' gcc warning in malloc_kind
120 * Workaround 'REFERENCED_DYNAMICALLY flag' linker error on macOS 15.4
121 * Workaround incremental collection fails on Haiku
122 * Workaround tests crash if mprotect-based VDB is manually selected (bcc)
123 * Workaround undefined GC_ptr_store_and_dirty MinGW error in Makefile.direct
124 * Workaround vpush/vpop instructions generation for non-FPU ARMv5 target
125
126
127 == [8.2.8] 2024-09-08 ==
128
129 * Allow GC_size() argument to be null
130 * Disable backtrace saving at garbage collections if DONT_SAVE_TO_LAST_STACK
131 * Eliminate 'cast signed to bigger unsigned' CSA warnings in GC_find_limit
132 * Eliminate 'x might be clobbered by longjmp' gcc warning in setjmp_t.c
133 * Fix 'un-mprotect vdb failed' abort with out-of-memory reason on Linux
134 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
135 * Fix GC_debug_realloc to support custom kind
136 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
137 * Fix GC_print_trace_inner to print the last element of the circular buffer
138 * Fix cordtst2.tmp file deletion in cordtest on Windows
139 * Fix double lock in GC_malloc called from backtrace()
140 * Fix handling of page-unaligned boundaries in soft_set_grungy_pages
141 * Fix heap blocks size computation by GC_get_memory_use
142 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
143 * Fix infinite resend lost signals if a thread is restarted by SIGQUIT
144 * Fix null pointer dereference in GC_is_visible if type_descr is null
145 * Fix per_object_helper() after changing hb_sz units
146 * Fix pointer relational comparison in GC_do_enumerate_reachable_objects
147 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
148 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
149 * Fix potential address overflow in GC_add_to_heap
150 * Fix potential buffer overrun during read in GC_text_mapping
151 * Fix various typos in comments
152 * Prevent GC_noop_sink from scanning by the collector
153 * Prevent redirected malloc call from a garbage collection routine
154 * Redirect malloc_usable_size() in leak_detector.h
155 * Remove redundant dirty/reachable_here calls in GC_malloc_explicitly_typed
156 * Update and fix diagrams describing the tree structure for pointer lookups
157 * Use atomic store to set GC_first_nonempty in GC_do_parallel_mark
158 * Use atomic store to set entry id and update cache_ptr in slow_getspecific
159 * Workaround '.obj file not found' error reported by watcom wlib
160
161
162 == [8.2.6] 2024-02-04 ==
163
164 * Avoid unexpected heap growth in gctest for the case of VERY_SMALL_CONFIG
165 * Change gc.man to include gc/gc.h
166 * Check for out-of-memory on every memory allocation in tests
167 * Do not compile pthread_start.c on Cygwin even if build shared libs (CMake)
168 * Eliminate 'alloc_small declared but unused' gcc warning in gctest
169 * Eliminate 'make_key is defined but unused' gcc warning in threadkeytest
170 * Eliminate 'old_segv_handler is defined but unused' gcc warning on OpenBSD
171 * Eliminate 'rand() may return deterministic values' warning
172 * Eliminate 'unused parameter' compiler warnings reported by MS clang
173 * Eliminate 'unused parameter' gcc warning in free() if IGNORE_FREE
174 * Eliminate 'unused value' gcc warnings in init_global_static_roots (Symbian)
175 * Eliminate GCC warning of unsafe __builtin_return_address(1) in Cmake script
176 * Eliminate compiler warning of missing cast in LONG_MULT after shift
177 * Eliminate warning of unused expression result in GC_FreeBSDGetDataStart
178 * Ensure _GNU_SOURCE is defined if HAVE_DLADDR is defined by configure
179 * Fix 'g++ not found' error on OpenBSD (Makefile.direct)
180 * Fix 'implicit declaration of function pthread_atfork' gcc error on MinGW
181 * Fix 'implicit declaration of function sbrk' gcc error on Symbian
182 * Fix 'implicit declaration of iscntrl()' warning in cord/de_win (MinGW)
183 * Fix 'info' buffer potential overrun in GC_save_callers
184 * Fix 'l-value specifies const object' MSVC error in GC_push_many_regs
185 * Fix 'linker input unused' error inside check_c_compiler_flag (CMake)
186 * Fix 'missing binary operator before token' gcc error in gcconfig.h
187 * Fix 'missing sysconf() prototype' gcc error in setjmp_t tool (OpenBSD)
188 * Fix 'sigset_t undeclared' MS VC error if pthreads-w32 is used
189 * Fix 'undefined reference' linker errors if shared build on OpenBSD (CMake)
190 * Fix 'unused GC_set_and_save_fault_handler' warning on OS X
191 * Fix GC_push_stack_for() to push also Xmm registers on Windows/x64
192 * Fix GC_set_handle_fork(1) on Darwin when MPROTECT_VDB but no threads
193 * Fix MACH_TYPE macro redefinition on Symbian/arm
194 * Fix SVR4 macro definition order
195 * Fix asm constraint in LONG_MULT for gcc/x86
196 * Fix assertion violation in GC_get_maps on Linux if malloc redirection
197 * Fix back graph and checksums support in WCC_MAKEFILE
198 * Fix bitwise negation and rounding direction in setjmp_t tool
199 * Fix checksums GC_record_fault invocation on Darwin
200 * Fix closing bracket placement for case statement in configure
201 * Fix deprecation warning about support of CMake older than v3.5
202 * Fix extra 'extern C' for include signal.h in gcconfig.h
203 * Fix getcontext() detection by CMake on OpenBSD
204 * Fix handling of GC_gc_no counter wrap in GC_clear_stack
205 * Fix handling of GC_gc_no counter wrap in GC_notify_or_invoke_finalizers
206 * Fix indent of a closing curly brace in GC_forward_exception
207 * Fix lock assertion violation in GC_try_to_collect_inner on OS X
208 * Fix missing GC_pthread_sigmask on FreeBSD and NetBSD
209 * Fix missing _setjmp() on djgpp
210 * Fix missing atomic barriers in CORD_from_file_lazy
211 * Fix missing outermost parentheses in CORD_pos_cur_char_addr and hugetest
212 * Fix missing redirect and implementation of pthread_sigmask() on OpenBSD
213 * Fix missing type widening before left shift in GC_MAKE_PROC
214 * Fix misspelled GC_HEADERS_H macro in gc_priv.h
215 * Fix null dereference in check_finalizer_nested if redirect malloc on Linux
216 * Fix posix_memalign() to overwrite pointer storage only on success
217 * Fix race in init_lib_bounds on Linux with glibc v2.34+ if redirect malloc
218 * Fix skipped removal of page protection in case of address hash collision
219 * Fix typos in comments
220 * Fix undefined GC_real_pthread_sigmask if redirect malloc on OS X
221 * Fix update of last_back_trace_gc_no if KEEP_BACK_PTRS is not defined
222 * Handle GC_gc_no counter overflow properly in GC_print_trace
223 * Include Darwin CoreFoundation.h only if 32-bit ARM
224 * Make gc_allocator<void> members public
225 * Re-enable incremental mode on OS X (arm64)
226 * Remove .log and cordtest .tmp files by 'make clean' (Makefile.direct)
227 * Remove a redundant check of HOST_ANDROID in gcconfig.h
228 * Remove duplication of random numbers generator formula
229 * Specify constexpr in GC allocators if C++20 or later
230 * Support NetBSD/riscv64
231 * Support non-msys MinGW build by CMake
232 * Turn on handle fork by default on Darwin (multi-threaded only)
233 * Use AO primitives in GC_RAND_NEXT instead of no_sanitize attribute
234 * Workaround 'malloc inconsistent dll linkage' MS VC error in CMake script
235 * Workaround MS Clang failure to compile de_win.rc
236 * Workaround mark stack overflow in GC_push_finalizer_structures on MinGW
237
238
239 == [8.2.4] 2023-05-26 ==
240
241 * Abort with appropriate message if first call of mmap fails with EPERM
242 * Adjust CORD_ec comment placement in ec.h
243 * Adjust WoW64 workaround to work on UWP/WinRT
244 * Adjust naming of Win32/64 and x86/64 words in comments and documentation
245 * Avoid potential race between realloc and GC_block_was_dirty
246 * Do not double-clear first two words of object in GC_generic_malloc
247 * Do not mention FASTLOCK in comment
248 * Do not mix debug and non-debug allocations in disclaim tests
249 * Do not prohibit threaded builds with malloc redirection on non-Linux
250 * Do not prohibit zero proc argument in GC_register_disclaim_proc
251 * Eliminate '&array may not produce intended result' wcc warnings
252 * Eliminate 'GC_unmap_end declared but unused' bcc warning in disclaim_bench
253 * Eliminate 'ISO C++17 does not allow register specifier' gcc warning
254 * Eliminate 'cast signed to bigger unsigned' CSA warning in WARNs, new_thread
255 * Eliminate 'n obtained from untrusted source' code defect FP in test_cpp
256 * Eliminate 'skipping config since MAXSIG/_NSIG is unknown' cppcheck FP
257 * Eliminate data race FP between remove_protection and write_fault_handler
258 * Eliminate data race FP reported in need_unreachable_finalization by TSan
259 * Ensure 'new' system header is included by gc_cpp.h if GC_INCLUDE_NEW
260 * Ensure GC_NO_PTHREAD_SIGMASK defined if no GC_pthread_sigmask prototype
261 * Fix 'EMSCRIPTEN macro redefined' compile error
262 * Fix 'ISO C90 forbids mixed decl and code' warning in SOFT_VDB dirty_init
263 * Fix 'call to undeclared pthread_setname_np' errors in configure and cmake
264 * Fix 'failed to create new win32 semaphore' Cygwin fatal error at fork
265 * Fix 'operator new is missing throw(bad_alloc)' clang warning in gc_cpp.h
266 * Fix 'overflow in conversion from word' g++ warning in GC_init
267 * Fix 'unknown option --no-undefined' linker error in cmake script (OS X)
268 * Fix 'unresolved _end' linker error when targeting Android bitcode
269 * Fix CORD_next() indent inside loop in test_basics() of cordtest
270 * Fix DCL_LOCK_STATE placement in GC_set_oom_fn
271 * Fix GC_excl_table overrun on overflow in GC_exclude_static_roots
272 * Fix GC_thread_is_registered for finished threads
273 * Fix GC_unreachable_finalize_mark_proc to ensure its unique address
274 * Fix GC_unregister_my_thread call before GC functions usage in gctest
275 * Fix IRIX5 defined wrongly on FreeBSD/mips, WinCE/mips, Tandem S-Series
276 * Fix allocated objects count increment in alloc8bytes of gctest
277 * Fix alt-stack handling in GC_push_all_stacks if stack grows up
278 * Fix comparisons to heap boundary in GC_get_back_ptr_info and GC_mark_from
279 * Fix data race in GC_heapsize_at_forced_unmap variable
280 * Fix description of client promise for IGNORE_OFF_PAGE allocated objects
281 * Fix disabling of automatic dynamic libraries registration
282 * Fix double initialization of main thread local free lists on Win32
283 * Fix gccpp and gctba library names in gcinterface.md
284 * Fix infinite loop in disable_gc_for_dlopen and GC_wait_for_gc_completion
285 * Fix infinite wait in pthread_join/detach if thread already finished (Win32)
286 * Fix joinable threads shutdown on NaCl
287 * Fix loop condition over dll_thread_table in GC_lookup_pthread (Win32)
288 * Fix missing GC_CALLBACK for GC_waitForSingleObjectInfinite
289 * Fix missing extern C for __asan_default_options
290 * Fix missing libalphagc.so dependency in Makefile.direct
291 * Fix missing lock while updating GC_in_thread_creation in GC_exit_check
292 * Fix missing recovery from faults in GC_mark_some on Win64 if MinGW
293 * Fix missing result check of pthread_attr_getdetachstate in pthread_create
294 * Fix mistyped function name in documentation of REDIRECT_REALLOC
295 * Fix negative heap size values reported in WARN
296 * Fix null pointer dereference in TRACE_TARGET
297 * Fix of GC_bytes_allocd increment in GC_generic_malloc_inner
298 * Fix overlapping region assertion in mark_some if malloc redirect on Linux
299 * Fix potential SIGSEGV on out-of-memory in gctest
300 * Fix signals delivery fail in find-leak mode if init from non-main thread
301 * Fix stack top/bottom print order in GC_push_all_stacks if stack grows up
302 * Fix store-and-dirty call in GC_CONS
303 * Fix unregistering of thread created by intercepted pthread_create on NaCl
304 * Fix unused GC_parse_version if no SOFT_VDB and no parallel mark on Linux
305 * Fix use of unset errno after pthread_create/sigmask calls
306 * Fix various typos in comments and documentation
307 * Increment allocated objects count after GC_GCJ_MALLOC() in gctest
308 * Invoke GC_oom_fn if GC_make_array_descriptor failed because of no memory
309 * Make Emscripten Asyncify feature optional
310 * Mention gctba library in README.cmake
311 * Prevent 'function should return a value' BCC error in CMake script
312 * Provide meaningful error message in case of Emscripten threaded build
313 * Reduce local variable scope in resend_lost_signals_retry for cppcheck
314 * Remove disable-warning options from WCC_MAKEFILE unrecognized by wcc v2.0
315 * Remove false warning of missing libpthread.so on Linux
316 * Remove redundant 'ifdef THREADS' around LOCK/UNLOCK in call_with_alloc_lock
317 * Remove redundant GC_ATTR_UNUSED for GC_mark_and_push
318 * Remove unused GC_old_sig_mask from gc_locks.h
319 * Replace WARN in GC_mark_some wrapper back to GC_COND_LOG_PRINTF
320 * Specify throw and noexcept for operator new/delete in gc_cpp.h for MS VC
321 * Support Hurd/x86_64
322 * Support client-defined stack pointer adjustment before thread stack push
323 * Suppress 'unreachable code' wcc warning in I_HOLD_LOCK assertion (CMake)
324 * Update autotools for release preparation (ac-2.71, am-1.16.5, m4-1.14.19)
325 * Update dump function name in GC_DUMP_REGULARLY variable documentation
326 * Use emscripten_stack_get_base instead of emscripten_scan_stack
327 * Use sbrk() to get OS memory on Emscripten
328 * Workaround 'writing into region of size 0' gcc warning in suspend_handler
329 * Workaround CSA null pointer dereference FP in invalidate_map of cord/de
330 * Workaround a malfunction of soft-dirty bits clearing on Power9
331
332
333 == [8.2.2] 2022-08-26 ==
334
335 * Abort if no progress with thread suspend/resume signals resending
336 * Add CMake option to force libatomic_ops headers usage
337 * Add _PROP suffix to CORD/GC[CPP]_VERSION variables in CMake script
338 * Allow not to bypass pthread_cancel hardening in pthread_start
339 * Allow to start marker threads in child of single-threaded client
340 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
341 * Avoid potential signal loss before sigsuspend in suspend_handler if TSan
342 * Define SUNOS5SIGS macro for kFreeBSD
343 * Distribute gc_gcj.h and some other headers in single-obj-compilation
344 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
345 * Do not call SET_HDR() to remove forwarding counts if none exists in hblk
346 * Do not call mprotect/mmap to GC_unmap/remap (Linux)
347 * Do not count unmapped regions if GC_unmap is madvise-based (Linux)
348 * Do not define NEED_FIND_LIMIT in case of OpenBSD user threads
349 * Do not fail tests if pthread_create returns resource unavailable error
350 * Do not name GCC intrinsics as C11 ones
351 * Do not probe to find main data root start if dl_iterate_phdr exists
352 * Do not send signal to thread which is suspended manually
353 * Do not use usleep between signals resend if ThreadSanitizer
354 * Eliminate '-pedantic is not option that controls warnings' GCC-6.3 message
355 * Eliminate '/GS cannot protect parameters' MS VC warning in msvc_dbg
356 * Eliminate 'R_AARCH64_ABS64 used with TLS symbol' linker warning (clang)
357 * Eliminate 'buffer overflow detected' FP error in realloc_test
358 * Eliminate 'extension used' clang warning in sparc_mach_dep.S (configure)
359 * Eliminate 'function/data pointer conversion in expression' MSVC warning
360 * Eliminate 'implicit decl of _setjmp' gcc warning if -std=c11 on Cygwin
361 * Eliminate 'layout of aggregates has changed in GCC 5' warning in test_cpp
362 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
363 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
364 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
365 * Eliminate 'potentially uninitialized local variable tc' warning (MSVC)
366 * Eliminate 'skipping config since MAX_HEAP_SECTS is unknown' cppcheck FP
367 * Eliminate 'unused but set variable' gcc warnings in cpptest
368 * Eliminate 'value exceeds maximum size' warnings in debug_malloc, huge_test
369 * Eliminate 'writing into region of size 0' gcc FP warning in realloc
370 * Eliminate ASan stack-buffer-underflow FP in GC_mark_and_push_stack (E2K)
371 * Eliminate code defect about incorrect size of allocated object (leaktest)
372 * Eliminate data race reported by TSan in GC_have_errors
373 * Eliminate division-by-zero FP warning in GC_ASSERT in reclaim_block
374 * Eliminate stringop-overflow gcc-12 warning in CORD__next
375 * Ensure typed objects descriptor is never located in the first word
376 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
377 * Fix 'GC_text_mapping not used' GCC warning if redirect malloc w/o threads
378 * Fix 'ISO C forbids conversion of function pointer to object' warning
379 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
380 * Fix 'undefined reference to __data_start' linker error on Linux/aarch64
381 * Fix 'unresolved __imp__wsprintfA' linker error in msvc_dbg.c (MSVC)
382 * Fix 'unresolved symbol GetModuleHandle' error in win32_threads.c (UWP)
383 * Fix (workaround) stack overflow in gctest on Alpine Linux/s390x
384 * Fix GC_ATTR_NO_SANITIZE_THREAD definition for GCC
385 * Fix GC_allocate_ml incorrect cleanup in GC_deinit if pthreads (MinGW)
386 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
387 * Fix GC_make_descriptor for zero length argument
388 * Fix GC_suspend_thread if called before thread destructor
389 * Fix GC_unmapped_bytes update in GC_unmap for Sony PS/3
390 * Fix SIGSEGV caused by dropped stack access from child process in gctest
391 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
392 * Fix abort in Win32 DllMain if PARALLEL_MARK
393 * Fix abort when GC_repeat_read returns zero
394 * Fix assertion about built-in AO_test_and_set_acquire on sparc64 (gcc-12)
395 * Fix assertion violation in GC_allow_register_threads on Windows
396 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
397 * Fix comment in GC_init regarding GC_init_parallel call
398 * Fix context saving when GC_suspend_thread(self)
399 * Fix data race in fail_proc1 of gctest
400 * Fix hang in GC_free if GC_PREFER_MPROTECT_VDB (Mingw64)
401 * Fix hang in select() called from suspend signal handler if TSan
402 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
403 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
404 * Fix incremental mode enabling in gctest if TEST_MANUAL_VDB
405 * Fix linking of tests in case of finalization is off
406 * Fix lock assertion violation in GC_find_limit if always multi-threaded
407 * Fix memory return to OS in GC_unmap
408 * Fix missing lock when GC_generate_random_valid_address is called
409 * Fix missing write() declaration if CONSOLE_LOG (Watcom)
410 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
411 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
412 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
413 * Fix potential race if start_mark_threads called from threads in child
414 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
415 * Fix pthread_setname_np and dladdr detection by CMake
416 * Fix race between calloc_explicitly_typed and push_complex_descriptor
417 * Fix typos in comments and debugging.md
418 * Fix undefined __stack_base__ on UWP/arm64 (llvm-mingw)
419 * Force GC_with_callee_saves_pushed in suspend_handler if NO_SA_SIGACTION
420 * Link with rt library to get clock_gettime where necessary
421 * Make finalizer_closure pointer read/write atomic in malloc and callback
422 * Move platform-specific sleep call to GC_usleep (refactoring)
423 * Pass -lrt linker option in CMake script on HP/UX, NetBSD
424 * Prevent (fix) parallel custom mark procs run in single-threaded clients
425 * Prevent changing of GC_markers_m1 value while collection in progress
426 * Refer to Makefile.direct instead of deleted Makefile file in README
427 * Relax assertion of hb_n_marks in reclaim_block if more than two markers
428 * Remove IF_IA64 macro in pthread_stop_world (refactoring)
429 * Remove checking of RS6000 completely
430 * Remove duplicate check of MSWIN_XBOX1 in os_dep.c
431 * Remove duplicate include gc_tiny_fl.h in gc_priv.h
432 * Remove non-working check of M68K in gctest
433 * Remove useless TSan W/A about read of mark_lock_holder for Windows
434 * Replace RAISE_SIGNAL macro with a static function (refactoring)
435 * Replace SSH cloning with HTTPS one in README
436 * Retry pthread_kill if EAGAIN (Linux)
437 * Revert "Check real-symbols are already initialized in pthread_join/detach"
438 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
439 * Revert addition of msvc_dbg.h in include.am
440 * Set default build type to RelWithDebInfo (CMake)
441 * Start configure help messages with a lower case letter
442 * Support 'z' format modifier by CORD_vsprintf
443 * Support Elbrus 2000 (Linux/e2k)
444 * Support GCC MCF thread model (mcfgthreads) in configure (MinGW)
445 * Support GC_remove_roots on Win32
446 * Support OpenBSD/riscv64
447 * Support build using Makefile.direct on Linux/sparc
448 * Support space-separated flags in CFLAGS_EXTRA passed to CMake
449 * Update README.win32 about default build configuration (configure, cmake)
450 * Update documentation of GC_RATE and MAX_PRIOR_ATTEMPTS
451 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
452 * Use SIGUSR1/2 on FreeBSD/arm64
453 * Use compiler TLS on NetBSD only if at least gcc-4.4 or clang-3.9
454 * Workaround 'info is not assigned' cppcheck FP if assertions on (OS X)
455 * Workaround SIG_SUSPEND delivery to thread inside mutex_lock fail if TSan
456 * Workaround TSan FP about race between generic_malloc and array_mark_proc
457 * Workaround TSan FP in acquire_mark_lock called from fork_prepare_proc
458 * Workaround TSan FP warning in finalized_malloc, push_unconditionally
459 * Workaround TSan FP warning in fork_prepare_proc
460 * Workaround TSan FP warning in push_marked1/2/4, ptr_store_and_dirty
461 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
462 * Workaround call stack size exceeded in gctest (Wasm)
463 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage
464 * Workaround gctest hang if test compiled as C++ code by MSVC (CMake)
465 * Workaround msvc_dbg.c build failure on arm[64] (MSVC)
466
467
468 == [8.2.0] 2021-09-29 ==
469
470 * Add API for accessing incremental GC time limit with nanosecond precision
471 * Add API function to force start of incremental collection
472 * Add GC_ prefix to scan_ptr and some other static variables (refactoring)
473 * Add GC_get/set_disable_automatic_collection API
474 * Add I_HOLD_LOCK assertion to expand_hp_inner and related functions
475 * Add assertion on free-list argument and result of GC_new_kind
476 * Add assertion that GC is initialized to base incremental_protection_needs
477 * Add assertions that GC_page_size is initialized
478 * Add cordtest, staticrootstest, test_cpp, tracetest, disclaim tests (CMake)
479 * Add debug messages on thread suspend/resume (Win32)
480 * Add dummy testing of GC_incr_bytes_allocd/freed
481 * Add table of contents in gcdescr.md
482 * Add testing of GC_CALLOC/MALLOC_EXPLICITLY_TYPED (gctest)
483 * Adjust formatting of numbered lists in README.md to match other .md files
484 * Adjust highlighting of API prototypes in gcinterface.md
485 * Adjust macro def/usage for AVR32, CRIS, NETBSD, OPENBSD, SH4 in gcconfig.h
486 * Adjust printf calls in gctest check_heap_stats so that each has new-line
487 * Allow incremental GC on Cygwin
488 * Allow memory unmapping in case of MPROTECT_VDB
489 * Allow to disable GWW or mprotect-based VDB at build
490 * Allow to disable Glibc FPU exception mask and TSX workarounds (Linux)
491 * Allow to disable __builtin_return_address(1) usage (x86 and x64)
492 * Allow to specify custom value of LOG_PHT_ENTRIES
493 * Always abort on failure to access /proc/self/maps (Linux)
494 * Always define default_push_other_roots (code refactoring)
495 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
496 * Avoid initial 3ms pause on world stop/start with GC_retry_signals (Linux)
497 * Build cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE
498 * Build gc as a shared multi-threaded library by default (CMake)
499 * Build gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE
500 * Build gctba library
501 * Build shared libraries by default (WCC_MAKEFILE)
502 * Change CLOCK_TYPE to timespec for Nintendo Switch (code refactoring)
503 * Change EMSCRIPTEN macro for internal use to no-underscore format
504 * Change log_size fields of finalizer to unsigned type (code refactoring)
505 * Change type of toggleref_array_size/capacity to size_t (code refactoring)
506 * Check leak of objects allocated by CRT malloc in gctest (MS VC)
507 * Check real-symbols are already initialized in pthread_join/detach
508 * Collapse multiple includes of windows.h (code refactoring)
509 * Comments reformatting in mark.c to properly delimit sentences
510 * Compile de test GUI app with resources (CMake)
511 * Compile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)
512 * Compile msvc_dbg.c by CMake script (MS VC)
513 * Declare API function and print amount of memory obtained from OS
514 * Define GC_win32_free_heap API function for all Windows targets
515 * Define STATIC macro to static by default
516 * Depend number of fork_a_thread calls on NTHREADS (gctest)
517 * Detect dladdr() presence in CMake script
518 * Detect presence of execinfo.h system header in CMake script
519 * Detect presence of getcontext and dl_iterate_phdr in CMake script
520 * Detect sigsetjmp() availability in CMake script
521 * Disable Clang/GCC aliasing optimization in CMake script by default
522 * Do not build tests by default (Makefile.direct and other Makefiles)
523 * Do not build the tests by default (CMake)
524 * Do not call GC_push_conditional unless PROC_VDB
525 * Do not call add_to_our_memory with null pointer (refactoring)
526 * Do not compile pthread_*.c files in Cygwin or MSYS (CMake)
527 * Do not define GC_write_cs for Xbox One target
528 * Do not define HAVE_NO_FORK for all Unix-like systems
529 * Do not hard-code CMAKE_DL_LIBS value and install paths (CMake)
530 * Do not hard-code finalizable objects limit which triggers GC
531 * Do not update scratch_last_end_ptr unless used by reg dynamic libraries
532 * Document GC_incr_bytes_allocd/freed API function
533 * Eliminate '(long)size<=0 is always false' cppcheck FP
534 * Eliminate 'Consecutive return is unnecessary' cppcheck style warning
535 * Eliminate 'accessing GC_dont_gc without lock' in GC_init code defect FP
536 * Eliminate 'bytes_freed access w/o lock in incr_bytes_free' code defect FP
537 * Eliminate 'checking if unsigned i < 0' cppcheck FP in is_heap_base
538 * Eliminate 'hash_val value is never used' cppcheck false positive
539 * Eliminate 'passing tainted var maps_buf to tainted sink' code defect FP
540 * Eliminate 'retry_cnt is assigned value but never used' cppcheck FP
541 * Eliminate 'stop variable is always 0' compiler warning in print_callers
542 * Eliminate 'struct member os_callback is never used' cppcheck warning
543 * Eliminate 't->flags not atomically updated' code defect FP
544 * Eliminate 'tmpl might be accessed at non-zero index' cppcheck error
545 * Eliminate GCC warning of unsafe __builtin_return_address(1)
546 * Eliminate code duplication in reclaim_clear and disclaim_and_reclaim
547 * Eliminate double lock code defect false positive in generic_lock
548 * Eliminate memory leak reported in add_current_malloc_heap at exit (Win32)
549 * Emscripten single-threaded support (detect stack base, push registers)
550 * Enable CMake-based build for Borland and Watcom compilers
551 * Enable compilation without C runtime (Win32)
552 * Enable fork testing in single-thread builds (Unix-like)
553 * Enable mprotect-based incremental GC for Linux/arm and Linux/aarch64
554 * Enable true incremental collection even if parallel marker is on
555 * Enable use of __builtin_unwind_init() if clang-8 or later
556 * Ensure ELFSIZE is defined in dyn_load.c for OpenBSD (code refactoring)
557 * Ensure add_to_heap_inner arguments are valid (refactoring)
558 * Ensure all getters and setters are run at least once by gctest (pthreads)
559 * Export CMake targets with namespace BDWgc
560 * Fix 'const obj must be initialized if not extern' error in gc_alloc_ptrs.h
561 * Fix ./libgc.la dependency on FreeBSD (Automake)
562 * Fix HOST determination in CMake script
563 * Fix copyright message in de_win.rc, gc_cpp.cc, ec.h and specific.h
564 * Fix missing OS_TYPE definition for some targets
565 * Fix mmap(PROT_NONE) failure if RLIMIT_AS value is low (Linux)
566 * Generate cordtest and de executable files in GC base folder
567 * Generate pkg-config metadata file (CMake)
568 * Get rid of some non-ELF ifdefs (code refactoring)
569 * Handle potential incomplete buffer read in GC_linux_main_stack_base
570 * Implement GET_TIME for Nintendo Switch
571 * Increase NTHREADS value in tests if code coverage analysis
572 * Install docs and man page if enable_docs (CMake)
573 * Install gc_gcj.h and gc_pthread_redirects.h only if appropriate
574 * Log abort message details even if not print_stats (unless SMALL_CONFIG)
575 * Mark buffer returned by get_maps as const (code refactoring)
576 * Move C++ GC_ATTR_EXPLICIT and GC_NOEXCEPT definition to gc_config_macros.h
577 * Move GC state non-pointer variables into GC_arrays (code refactoring)
578 * Move GC state pointer variables into GC_arrays
579 * Move GC_scratch_recycle_inner() to alloc.c (refactoring)
580 * Move GC_throw_bad_alloc definition to new C++ file
581 * Move QNX and Emscripten macro definitions to proper place in gcconfig.h
582 * Move definition of GC_n_mark_procs and GC_n_kinds from mark.c to misc.c
583 * New API (GC_set_markers_count) to control number of parallel markers
584 * New API function to clear GC exclusion table
585 * New API function to get size of object debug header
586 * New API standalone functions to acquire and release the allocator lock
587 * New CMake option (disable_gc_debug) to remove debugging code
588 * New CMake option (disable_handle_fork) to disable fork handling completely
589 * New macro (CONSOLE_LOG) to enable logging to console on Win32
590 * New macro (GCTEST_PRINT_VERBOSE) to enable verbose logging in test.c only
591 * New macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)
592 * OpenBSD does not use ELF_CLASS (code refactoring)
593 * Pass -D GC_DLL -fvisibility=hidden if default configure build is requested
594 * Pass -no-undefined linker flag if building shared libraries (CMake)
595 * Print pid of child processes if verbose logging (gctest)
596 * Read environment variables from a file on WinCE (CMake script)
597 * Reduce stack-allocated buffer in get_nprocs from 4KB to 1.7KB
598 * Refine flags field comment in pthread_support.h
599 * Reflect result of VDB selection at runtime in incremental_protection_needs
600 * Reformat code of GC_push_roots
601 * Reformat gc.man (wrap long lines)
602 * Reformatting and code refactoring of CMake script
603 * Remove 'current users' section from overview.md
604 * Remove 'distributed ports', 'scalable versions' sections from overview.md
605 * Remove AC_MSG_RESULT for THREADDLLIBS (dgux386)
606 * Remove Borland-specific Makefile and gc.mak script
607 * Remove GC_eobjfreelist variable in typd_mlc.c (code refactoring)
608 * Remove GC_gcj_malloc_initialized variable (code refactoring)
609 * Remove Linux-specific commands for building cord/de from Makefile.direct
610 * Remove Win32 main_thread static variable if threads discovery is disabled
611 * Remove code duplication between GC_unmap and GC_unmap_gap (refactoring)
612 * Remove code duplication between PROTECT and UNPROTECT macros (refactoring)
613 * Remove commented out assignment of gc_use_mmap in configure (refactoring)
614 * Remove dash characters comprising prefix of some verbose logs (gctest)
615 * Remove dependency on user32.dll import library from static libgc (Win32)
616 * Remove documentation specific to particular old BDWGC releases
617 * Remove duplicate Linux-related macro definitions in gcconfig.h
618 * Remove duplicate macro definitions in gcconfig.h except for Linux
619 * Remove gcmt-dll generation, rename libgc-lib.a to libgc.a (CMake)
620 * Remove goto statement in print_callers (code refactoring)
621 * Remove limit on number of heap sections
622 * Remove new_gc_alloc.h file
623 * Remove redundant GC_with_callee_saves_pushed call in multi-threaded builds
624 * Remove redundant check of GC_free argument in register_finalizer
625 * Remove redundant type casts in backgraph HEIGHT_UNKNOWN/IN_PROGRESS
626 * Remove unused GC_prev_heap_addr (refactoring)
627 * Remove unused STACK_GRAN macro definitions (code refactoring)
628 * Remove unused sparc_sunos4_mach_dep.s file
629 * Remove useless empty statements after block ones (refactoring)
630 * Remove weakobj_free_list variable in disclaim_weakmap_test (refactoring)
631 * Rename READ to PROC_READ in os_dep.c (code refactoring)
632 * Rename cord/cord test executable to de (CMake)
633 * Rename ext_descr to typed_ext_descr_t (code refactoring)
634 * Rename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE
635 * Rename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile
636 * Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
637 * Rename nothreads option to disable_threads in NT_MAKEFILE
638 * Repeat run_one_test NTHREADS times by gctest if single-threaded
639 * Replace "msecs" with "ms" in all comments and messages
640 * Replace 'stack base' with 'stack bottom' in the documentation
641 * Replace SN_TARGET_ORBIS to PLATFORM_* and GC_NO_* macros
642 * Replace _M_AMD64 macro with _M_X64 (code refactoring)
643 * Replace find_limit_openbsd to find_limit_with_bound (OpenBSD 5.2+)
644 * Replace obsolete AC_HELP_STRING with AS_HELP_STRING (refactoring)
645 * Replace push_one calls with push_many_regs one for Win32 thread context
646 * Report memory region bounds and errno on GC_unmap/remap failure
647 * Report presence of process fork testing (gctest)
648 * Report time with a nanosecond precision where available
649 * Retry suspend/resume signals on all platforms by default
650 * Run tree and typed tests in child process (gctest)
651 * Set GC_collecting hint for GC_collect_a_little_inner calls (pthreads)
652 * Set name of GC marker threads
653 * Set so-version for installed shared libraries (CMake)
654 * Simplify logged message in scratch_recycle
655 * Simplify loops of collect_a_little/stopped_mark invoking mark_some
656 * Support -fvisibility=hidden option in CMake script
657 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)
658 * Support FreeBSD/RISC-V, Linux/arc, LoongArch, OpenBSD/powerpc64
659 * Support header files installation (CMake)
660 * Support most configure options in CMake script
661 * Suppress warnings in test_tinyfl() of gctest reported by Watcom C complier
662 * Take nanoseconds into account when updating full_gc_total_time
663 * Turn off C++ API by default, export it in gccpp library (CMake)
664 * Turn on automatic fork() handling by default on Android
665 * Update README.cmake regarding Unix, C++ and tests
666 * Update libgc.so version info to differentiate against v8.0.x
667 * Update the ASCII diagrams describing the tree structure for pointer lookups
668 * Update the documentation to match the current GC implementation
669 * Upgrade cmake_minimum_required(version) to 3.1
670 * Use CreateThread without GC_ prefix in gctest (code refactoring)
671 * Use KB/MB/GB abbreviations uniformly across entire documentation
672 * Use USE_MMAP_ANON when USE_MMAP is configured on OpenBSD
673 * Use a specific Emscripten allocator for Tiny
674 * Use atomic primitives for Sony PlayStation Portable 2 and PS4
675 * Use better precision Windows timers
676 * Use clock_gettime() instead of clock() on Cygwin and Linux
677 * Use compiler TLS on FreeBSD and NetBSD
678 * Use mprotect-based VDB on PowerPC and S390 (Linux)
679 * Use soft dirty bits on Linux (x86, powerpc, s390, x64)
680 * Workaround 'condition result<=0 is always false' cppcheck FP in get_maps
681 * Workaround 'push_regs configured incorrectly' error (GCC-11)
682 * Workaround 'same value in both branches of ternary operator' cppcheck FP
683 * Workaround various cppcheck false positives
684
685
686 == [8.0.18] 2026-02-04 ==
687
688 * Eliminate 'GC_push_all_stack not used' gcc warning if fix-up pointers
689 * Fix 'MA_FETCHOP undeclared' gcc error if USE_PROC_FOR_LIBRARIES on Solaris
690 * Fix 'PIOCNMAP undeclared' gcc error if USE_PROC_FOR_LIBRARIES on Solaris
691
692 Also, includes 7.6.26 changes
693
694
695 == [8.0.16] 2025-10-17 ==
696
697 * Add missing test_cpp dependency on gc_allocator.h in build scripts
698 * Avoid abort on ResumeThread failure if Win32 DllMain closes thread handle
699 * Do not define GC_SysVGetDataStart on AIX
700 * Do not produce '-lpthread' by threadlibs on Tru64/OSF1
701 * Eliminate 'allocating insufficient size 0 for char` gcc warning in gctest
702 * Eliminate 'compare signed/unsigned in check_finalizer_nested' bcc warning
703 * Eliminate 'int-to-ptr cast' gcc warning in GC_restart_all on OpenBSD
704 * Eliminate 'int-to-ptr cast' gcc warnings in DEBUG_THREADS code
705 * Eliminate 'unused parameter fd' gcc warning in NOSYS GC_write
706 * Eliminate 'value exceeds maximum obj size' gcc warning in hugetest on x32
707 * Eliminate 'writing into region of size 0' gcc warning in suspend_handler
708 * Fix 'cannot implement AO_compare_and_swap_full' error by wcc in tests
709 * Fix 'missing GNU-stack section in atomic_ops_sysdeps' ld warning
710 * Fix 'symbol undefined _snprintf' dmc linker error in cordtest
711 * Fix 'undefined STACKBOTTOM' preprocessor error for no-OS PowerPC target
712 * Fix 'undefined symbol sbrk' linker error on FreeBSD
713 * Fix blocked signals in fork_prepare_proc on HP/UX
714 * Fix code blocks formatting in .md files
715 * Fix GC_GRANULE_BYTES for SPARC V9
716 * Fix GC_suspend abort when the thread is deleted by DllMain
717 * Fix GETPAGESIZE and USE_M[UN]MAP for Nintendo Switch
718 * Fix missing parentheses in SIG_THR_RESTART macro definition
719 * Fix print_heap_obj call with the lock held in backgraph add_edge
720 * Fix pthread id stored in GC_threads of child process
721 * Fix pthread_sigmask result checking in GC_start_mark_threads_inner
722 * Fix rounding up in STACKBOTTOM for OSF1
723 * Fix symbols alignment checking for CRIS and M68K
724 * Fix undefined reference to GC_objfreelist and GC_bytes_allocd
725 * Fix usage of new structured procfs interface on Solaris
726 * Fix various typos in comments and documentation
727 * Refine comment in fork_child_proc() about GC_allocate_ml attribute
728 * Remove always-false check if C++ allocator.allocate returns null in test
729 * Remove comment about limited support of memory unmapping
730 * Remove improper comment about returned value of CORD_extend_path
731 * Remove outdated comment about 'make distcheck' from Makefile.am
732 * Update libatomic_ops repo URL in README after repo transfer
733 * Update URLs in documentation after repo transfer to bdwgc organization
734 * Workaround '__stdcall__ ignored for this target' clang warning on Cygwin64
735 * Workaround tests crash if mprotect-based VDB is manually selected (bcc)
736
737
738 == [8.0.14] 2024-09-07 ==
739
740 * Disable backtrace saving at garbage collections if DONT_SAVE_TO_LAST_STACK
741 * Fix infinite resend lost signals if a thread is restarted by SIGQUIT
742
743 Also, includes 7.6.22 changes
744
745
746 == [8.0.12] 2024-02-04 ==
747
748 * Eliminate 'make_key is defined but unused' gcc warning in threadkeytest
749 * Ensure _GNU_SOURCE is defined if HAVE_DLADDR is defined by configure
750 * Fix 'implicit declaration of function pthread_atfork' gcc error on MinGW
751 * Fix 'missing binary operator before token' gcc error in gcconfig.h
752 * Fix GC_set_handle_fork(1) on Darwin when MPROTECT_VDB but no threads
753 * Fix checksums GC_record_fault invocation on Darwin
754 * Fix extra 'extern C' for include signal.h in gcconfig.h
755
756 Also, includes 7.6.20 changes
757
758
759 == [8.0.10] 2023-05-26 ==
760
761 * Abort with appropriate message if first call of mmap fails with EPERM
762 * Avoid potential race between realloc and GC_block_was_dirty
763 * Do not prohibit zero proc argument in GC_register_disclaim_proc
764 * Eliminate '&array may not produce intended result' wcc warnings
765 * Eliminate 'cast signed to bigger unsigned' CSA warning in GC_new_thread
766 * Ensure 'new' system header is included by gc_cpp.h if GC_INCLUDE_NEW
767 * Fix 'overflow in conversion from word' g++ warning in GC_init
768 * Fix description of client promise for IGNORE_OFF_PAGE allocated objects
769 * Fix infinite loop in disable_gc_for_dlopen and GC_wait_for_gc_completion
770 * Fix missing extern C for __asan_default_options
771 * Fix store-and-dirty call in GC_CONS
772 * Fix typo in comment of GC_Thread_Rep.dummy
773 * Fix use of unset errno after pthread_sigmask calls
774 * Increment allocated objects count after GC_GCJ_MALLOC() in gctest
775 * Remove redundant GC_ATTR_UNUSED for GC_mark_and_push
776 * Workaround CSA null pointer dereference FP in invalidate_map of cord/de
777
778 Also, includes 7.6.18 changes
779
780
781 == [8.0.8] 2022-08-26 ==
782
783 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
784 * Define SUNOS5SIGS macro for kFreeBSD
785 * Distribute gc_disclaim.h in single-obj-compilation
786 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
787 * Do not name GCC intrinsics as C11 ones
788 * Do not send signal to thread which is suspended manually
789 * Eliminate 'buffer overflow detected' FP error in realloc_test
790 * Eliminate 'extension used' clang warning in sparc_mach_dep.S (configure)
791 * Eliminate 'function/data pointer conversion in expression' MSVC warning
792 * Eliminate 'implicit decl of _setjmp' gcc warning if -std=c11 on Cygwin
793 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
794 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
795 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
796 * Eliminate 'value exceeds maximum size' warnings in debug_malloc, huge_test
797 * Eliminate 'writing into region of size 0' gcc FP warning in realloc
798 * Eliminate division-by-zero FP warning in GC_ASSERT in reclaim_block
799 * Eliminate stringop-overflow gcc-12 warning in CORD__next
800 * Ensure typed objects descriptor is never located in the first word
801 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
802 * Fix 'GC_text_mapping not used' GCC warning if redirect malloc w/o threads
803 * Fix 'ISO C forbids conversion of function pointer to object' warning
804 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
805 * Fix 'undefined reference to __data_start' linker error on Linux/aarch64
806 * Fix GC_allocate_ml incorrect cleanup in GC_deinit if pthreads (MinGW)
807 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
808 * Fix GC_make_descriptor for zero length argument
809 * Fix GC_suspend_thread if called before thread destructor
810 * Fix GC_unmapped_bytes update in GC_unmap for Sony PS/3
811 * Fix SIGSEGV caused by dropped stack access from child process in gctest
812 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
813 * Fix abort in Win32 DllMain if PARALLEL_MARK
814 * Fix assertion about built-in AO_test_and_set_acquire on sparc64 (gcc-12)
815 * Fix assertion violation in GC_allow_register_threads on Windows
816 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
817 * Fix context saving when GC_suspend_thread(self)
818 * Fix data race in fail_proc1 of gctest
819 * Fix get_maps failure when GC_repeat_read returns zero
820 * Fix hang in GC_free if GC_PREFER_MPROTECT_VDB (Mingw64)
821 * Fix hang in select() called from suspend signal handler if TSan
822 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
823 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
824 * Fix incremental mode enabling in gctest if TEST_MANUAL_VDB
825 * Fix lock assertion violation in GC_find_limit if always multi-threaded
826 * Fix missing lock when GC_generate_random_valid_address is called
827 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
828 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
829 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
830 * Fix potential race if start_mark_threads called from threads in child
831 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
832 * Fix race between calloc_explicitly_typed and push_complex_descriptor
833 * Fix stack overflow in gctest on Alpine Linux/s390x
834 * Fix typo in debugging.html
835 * Fix typos in comments of .c files and gc.h
836 * Fix undefined __stack_base__ on UWP/arm64 (llvm-mingw)
837 * Make finalizer_closure pointer read/write atomic in malloc and callback
838 * Prevent (fix) parallel custom mark procs run in single-threaded clients
839 * Prevent changing of GC_markers_m1 value while collection in progress
840 * Refer to Makefile.direct instead of deleted Makefile file in README
841 * Relax assertion of hb_n_marks in reclaim_block if more than two markers
842 * Remove checking of RS6000 completely
843 * Remove duplicate check of MSWIN_XBOX1 in os_dep.c
844 * Remove non-working check of M68K in gctest
845 * Remove useless TSan W/A about read of mark_lock_holder for Windows
846 * Replace SSH cloning with HTTPS one in README
847 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
848 * Revert addition of msvc_dbg.h in include.am
849 * Support 'z' format modifier by CORD_vsprintf
850 * Update documentation of GC_RATE and MAX_PRIOR_ATTEMPTS
851 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
852 * Workaround TSan FP about race between generic_malloc and array_mark_proc
853 * Workaround TSan FP warning in finalized_malloc, push_unconditionally
854 * Workaround TSan FP warning in push_marked1/2/4, ptr_store_and_dirty
855 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
856 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage (tests)
857
858
859 == [8.0.6] 2021-09-28 ==
860
861 * Add loop to handle abort error like in suspend logic on Darwin
862 * Add support of OpenBSD/aarch64
863 * Add threading libraries to bdw-gc.pc
864 * Allocate start_info struct on the stack in GC_pthread_create
865 * Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
866 * Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
867 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
868 * Check _MSVC_LANG macro in addition to __cplusplus (MS VC)
869 * Compile C++ code with exception handling enabled in NT_MAKEFILE
870 * Define OS_TYPE and DATAEND for UWP targets
871 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
872 * Do not report 'Incremental GC incompatible' warning more than once
873 * Do not use Manual VDB mode if C malloc is redirected
874 * Do not use iOS private symbols
875 * Eliminate 'GC_non_gc_bytes is deprecated' warning in new_gc_alloc.h
876 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
877 * Eliminate 'cast between incompatible func types' warnings for FARPROC vars
878 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
879 * Eliminate 'gc_pthread_redirects.h should contain header guard' code defect
880 * Eliminate 'implicit declaration of sbrk' gcc warning if -std=c11 on Cygwin
881 * Eliminate 'possible loss of data' BCC and MS VC warnings
882 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
883 * Eliminate 'unused function' compiler warnings (GC_add_map_entry, GC_lock)
884 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
885 * Enable sbrk-to-mmap fallback on major supported Unix-like platforms
886 * Ensure process is running on one CPU core if AO ops are emulated with locks
887 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
888 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
889 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
890 * Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
891 * Fix 'Wrong __data_start/_end pair' if -Bsymbolic-functions used (Linux)
892 * Fix 'condition pred!=NULL is always true' compiler warning
893 * Fix 'external linkage required for var because of dllimport' error on MinGW
894 * Fix 'ulong undefined' compilation error on AIX
895 * Fix 'undefined reference to __data_start' linker error on RISC-V
896 * Fix 'use of undeclared BUS_PAGE_FAULT' compilation error on FreeBSD 12
897 * Fix 'write to GC log failed' error (Cygwin)
898 * Fix 'wrong finalization data' gctest failure on Windows
899 * Fix CMake build on macOS Catalina
900 * Fix GC_OPENBSD_THREADS definition (OpenBSD/hppa)
901 * Fix GC_proc_fd value in child process at fork (Solaris)
902 * Fix GC_with_callee_saves_pushed for Android NDK r23 (clang-12)
903 * Fix MPROTECT_VDB definition for single-threaded GC builds
904 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
905 * Fix STACKBOTTOM on 32-bit HP/UX 11.11
906 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
907 * Fix assertion violation in register_dynlib_callback on Android
908 * Fix build for OS X (CMake)
909 * Fix building of shared library with C++ support on MinGW
910 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
911 * Fix configure message about 'AIX gcc optimization fix'
912 * Fix cordtest build in SMakefile.amiga
913 * Fix data race regarding *rlh value in generic_malloc_many
914 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
915 * Fix gc_allocator.h compilation by Clang
916 * Fix gc_cflags variable name in configure (HP/UX)
917 * Fix handling of areas smaller than page size in GC_scratch_recycle
918 * Fix incorrect markup formatting in documentation
919 * Fix misaligned tlfs passed to AO_load on m68k
920 * Fix missing GC_quiet declaration in pcr_interface.c
921 * Fix missing gc_dlopen.c and specific.c in CMake script
922 * Fix missing scratch_last_end_ptr update (Irix)
923 * Fix mmap() failures on AIX, HP/UX and Haiku
924 * Fix overflow of scratch_free_ptr value
925 * Fix page_was_[ever_]dirty() for static roots (Solaris)
926 * Fix printf format specifier in simple_example.md
927 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
928 * Fix subexpression widening in memhash() of disclaim_weakmap_test
929 * Fix test_cpp failure caused by arbitrary link order (Win32)
930 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
931 * Fix various typos mostly in documentation files
932 * Fix word size, data start and alignment for OpenBSD/mips64(el)
933 * Include <alloca.h> when using alloca on AIX
934 * Limit number of unmapped regions (Linux and DragonFly)
935 * New macro to avoid system-wide new/delete inlining in gc_cpp.h (Win32)
936 * Prevent GetThreadContext failure (Windows)
937 * Prevent WARN of incompatible incremental GC if default or manual VDB
938 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
939 * Refactoring of WoW64 workaround (Win32)
940 * Refine GC_INIT documentation about its multiple invocation
941 * Refine GC_parallel documentation in gc.h
942 * Refine do_blocking() documentation in gc.h
943 * Remove a misleading comment about Solaris in gc.h
944 * Remove cord .h files from list of non-installed headers (Automake)
945 * Remove dead part of condition to define NEED_FIND_LIMIT in gc_priv.h
946 * Remove gcmt-lib generation by CMake
947 * Support MSYS builds by CMake and configure
948 * Update documentation about the incremental collector support
949 * Use HEURISTIC2 on OpenBSD when single-threaded
950 * Use pstat_getprocvm to determine main stack bottom on HP-UX
951 * Workaround 'expression is only useful for its side effects' WCC warning
952 * Workaround clang-3.8/s390x bug when processing __builtin_frame_address
953 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
954
955
956 == [8.0.4] 2019-03-02 ==
957
958 * Avoid a full GC when growing finalizer tables if in incremental mode
959 * Avoid potential race in hb_sz access between realloc and reclaim_block
960 * Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
961 * Avoid unexpected heap growth in gctest caused by GC_disable
962 * Ensure result of every variant of MS_TIME_DIFF has unsigned long type
963 * Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
964 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
965 * Fix 'unexpected mark stack overflow' abort in push_all_stack
966 * Fix 'wrong __data_start/_end pair' error on Android
967 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
968 * Fix GetThreadContext stale register values use if WoW64 (Win32)
969 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
970 * Fix thread_info() count argument value (OS X)
971 * Support de_win.c compilation by Makefile.direct (cord/de)
972
973
974 == [8.0.2] 2018-12-23 ==
975
976 * Abort with appropriate message if executable pages cannot be allocated
977 * Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
978 * Add paths to filenames mentioned in the copyright section in README
979 * Add test using disclaim notifiers to implement a weak map
980 * Adjust #error messages format
981 * Allow to force executable pages allocation in gctest
982 * Avoid potential 'macro redefinition' errors for config.h macros
983 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
984 * Check result of pthread_mutex_unlock in specific.c
985 * Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
986 * Default to non-executable memory allocation across all make scripts
987 * Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
988 * Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
989 * Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
990 * Do not use spin locks if AO test-and-set is emulated (pthreads)
991 * Document HANDLE_FORK macro optional usage in Makefile.direct
992 * Document assertion in the setters that used to return old value
993 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
994 * Eliminate 'casting signed to bigger unsigned int' CSA warning
995 * Eliminate 'different const qualifiers' MS VC warnings in cordbscs
996 * Eliminate 'function is never used' cppcheck warning for calloc/realloc
997 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
998 * Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
999 * Eliminate 'struct member is never used' cppcheck warnings in os_dep
1000 * Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
1001 * Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
1002 * Eliminate redundant check in backwards_height
1003 * Fix 'USE_MUNMAP macro redefinition' error for NaCl
1004 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1005 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1006 * Fix 'too wide non-owner permissions are set for resource' code defect
1007 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
1008 * Fix GC_register_disclaim_proc for leak-finding mode
1009 * Fix a deadlock in write_fault_handler if AO_or is emulated
1010 * Fix comment typo in CMakeLists.txt
1011 * Fix concurrent bitmap update in GC_dirty
1012 * Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
1013 * Fix executable memory allocation in GC_unix_get_mem
1014 * Fix hbp overflow in GC_install_counts
1015 * Fix linkage with a system libatomic_ops shared library
1016 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
1017 * Fix marking of finalizer closure object
1018 * Fix marks and hb_n_marks consistency when disclaim returns true
1019 * Fix memory allocation on GCF (Linux/x64)
1020 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1021 * Fix test_cpp assertion violation in find-leak mode
1022 * Fix tests linkage with internal atomic_ops.o
1023 * Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
1024 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1025 * New macro to suppress printing of leaked objects
1026 * Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
1027 * Prefix internal durango_get_mem symbol with 'GC_'
1028 * Prevent double inclusion of javaxfc.h and private/specific.h
1029 * Print relevant message in tests not appropriate for leak detection mode
1030 * Reduce scope of local variables in GC_remove_all_threads_but_me
1031 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
1032 * Refine documentation in gc_disclaim.h
1033 * Remove extra USE_MMAP definition for Interix
1034 * Remove redundant header double-inclusion checks in the private headers
1035 * Remove strlen calls with a constant string argument in msvc_dbg
1036 * Specify register_disclaim_proc and finalized_malloc argument as non-null
1037 * Support UWP/arm64 target
1038 * Test marking of finalizer closure object in disclaim_test
1039 * Turn off leak detection mode explicitly in cord/de
1040 * Turn off parallel marker, thread-local allocation if used AO ops emulated
1041 * Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
1042 * Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
1043 * Update NO_EXECUTE_PERMISSION documentation
1044 * Update documentation about arm64 ABI in gcconfig.h
1045 * Use AO_or in async_set_pht_entry_from_index if available
1046 * Use GC_WORD_MAX macro across all C source files
1047 * Use macro to operate on a flag residing in GC_stop_count
1048 * Use standalone private macro to guard against ptr_t redefinition
1049 * Workaround '#error' cppcheck messages in backgraph and private headers
1050 * Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
1051 * Workaround 'GC_dump function is never used' cppcheck warning
1052 * Workaround 'local address assignment to a global variable' CSA warning
1053 * Workaround 'local variable end shadows outer symbol' cppcheck warnings
1054 * Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
1055 * Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
1056 * Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
1057 * Workaround 'potential non-terminated string' false positive in cordbscs
1058 * Workaround 'value of _MAX_PATH is unknown' cppcheck warning
1059 * Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
1060
1061
1062 == [8.0.0] 2018-09-05 ==
1063
1064 * Accept Android platform by both CMake and configure
1065 * Access finalize_now atomically to avoid TSan warning without no-sanitize
1066 * Acknowledge thread restart from suspend_handler (NetBSD)
1067 * Add a sanity check that load_acquire and store_release are available
1068 * Add AO primitives implementation to GC based on GCC atomic intrinsic
1069 * Add assertion for suspend_ack_sem in start_world
1070 * Add assertion to allocobj that live unmarked object cannot be reclaimed
1071 * Add assertions about held lock when accessing all_bottom_indices
1072 * Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
1073 * Add assertions to finalize and threads support for MANUAL_VDB needs
1074 * Add basic calculation of the total full-collection time
1075 * Add check that gc_cpp operator delete is called (test_cpp)
1076 * Add debug logging to new_thread about GC_threads hash table collisions
1077 * Add GC prefix to _MSVC_DBG_H macro
1078 * Add initial RISC-V support
1079 * Add Makefile target to run all tests without test-driver
1080 * Add test_atomic_ops to perform minimal testing of used atomic primitives
1081 * Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
1082 * Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
1083 * Allocate non-executable memory by default (CMake)
1084 * Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
1085 * Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
1086 * Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
1087 * Allow disabling of dynamic loading in CMake script and configure
1088 * Allow disabling of main static data registration in CMake and configure
1089 * Allow disabling of threads discovery in CMake script and configure
1090 * Allow gc_assertions enabling in CMake script
1091 * Allow gc_debug, redirect_malloc, large_config options in CMake script
1092 * Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
1093 * Allow mmap enabling in CMake script and configure
1094 * Allow passing -D DEFAULT_VDB to CFLAGS
1095 * Allow subthreadcreate_test to be compiled with zero NTHREADS
1096 * Allow to turn on spin locking even if thread-local allocations are used
1097 * Always include gc_atomic_ops.h unless threads are disabled
1098 * Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
1099 * Avoid duplication of code handling pthreads case in configure
1100 * Avoid potential data race during apply_to_each_object(reset_back_edge)
1101 * Avoid potential data race during GC_dump execution
1102 * Avoid potential race between malloc_kind and mark_thread_local_fls_for
1103 * Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
1104 * Avoid potential race in print_static_roots called by dyld_image_add/remove
1105 * Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
1106 * Avoid potential race when accessing size_map table
1107 * Avoid potential race when storing oh_back_ptr during parallel marking
1108 * Avoid SIGSEGV during GC_INIT on some Android devices
1109 * Build only shared libraries by default (configure)
1110 * Change pointer arguments of push_all[_eager]/conditional API to void* type
1111 * Change type of hb_sz field (of hblkhdr) from size_t to word
1112 * Check consistency of descr, adjust, clear arguments of GC_new_kind
1113 * Check that GC_WIN32_PTHREADS is not specified for Cygwin
1114 * Check thread_local is initialized before accessing thread_key
1115 * Collapse multiple BCOPY_EXISTS macro definitions
1116 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
1117 * Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
1118 * Compile checksums.c only if --enable-checksums is given (configure)
1119 * Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
1120 * Convert .html files to Markdown format
1121 * Convert code of .c files to valid C++ code
1122 * Decide between memory unmapping and mprotect-based dirty bits at runtime
1123 * Declare t local variable in the block where the variable is used
1124 * Define ABORT() using _CrtDbgBreak (if available) on Windows host
1125 * Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
1126 * Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
1127 * Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
1128 * Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
1129 * Define GC_THREADS instead of GC_x_THREADS in Makefiles
1130 * Define macro to specify the environment file name extension (Win32/WinCE)
1131 * Define static resend_lost_signals(), restart_all() in pthread_stop_world
1132 * Detect sigsetjmp() availability by configure
1133 * Determine whether to use compiler TLS for kFreeBSD at compile time
1134 * Do not call BCOPY and BZERO if size is zero
1135 * Do not call sem_getvalue in stop_world if one thread exists
1136 * Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
1137 * Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
1138 * Do not declare dl_iterate_phdr as weak for kFreeBSD
1139 * Do not include windows.h when compiling gc_cpp.cc
1140 * Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
1141 * Do not merge dynamic root with the existing static one in add_roots_inner
1142 * Do not print n_rescuing_pages value if incremental collections disabled
1143 * Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
1144 * Do not rebuild_root_index unless remove_root_at_pos is called
1145 * Do not specify version info for test libraries (Automake)
1146 * Do not use alternate thread library on Solaris
1147 * Do not use asm in GC_pause
1148 * Do not use PKG_CHECK_MODULES in configure
1149 * Do not use system clock consistently if NO_CLOCK
1150 * Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
1151 * Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
1152 * Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
1153 * Eliminate 'comparison is always false' code defect in get_maps
1154 * Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
1155 * Eliminate 'potential unsafe sign check of a bitwise operation' code defect
1156 * Enable alternative finalization interface (DISCLAIM) in all makefiles
1157 * Enable compilation for Cygwin with MPROTECT_VDB
1158 * Enable handle-fork and memory unmapping by default
1159 * Enable mprotect-based incremental GC for Win64 (GCC)
1160 * Expose API to control rate and max prior attempts of collect_a_little
1161 * Expose API to control the minimum bytes allocated before a GC occurs
1162 * Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
1163 * Fix 'doc' files installation folder
1164 * Fix build of cord tests as C++ files (Makefile.direct)
1165 * Fix comment typos in backgraph.c, de.c, gcconfig.h
1166 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
1167 * Fix start_world not resuming all threads on Darwin
1168 * Fix test_cpp failure in case GC_DEBUG is defined
1169 * Group common defines for POSIX platforms in configure and CMake scripts
1170 * Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
1171 * Handle pthread restart signals loss if retry_signals
1172 * Hide value stored to thread-specific entries for a test purpose
1173 * Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
1174 * Implement memory unmapping for Sony PS/3
1175 * Imply configure --single-obj-compilation if --disable-static
1176 * Include malloc.c in extra/gc.c after include gc_inline.h
1177 * Increase MAX_HEAP_SECTS (10 times) for large-config
1178 * Initial single-threaded support of Interix subsystem
1179 * Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
1180 * Initial support of TIZEN platform
1181 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1182 * Make extend_size_map() static (code refactoring)
1183 * Make subthreadcreate test compilable even without libatomic_ops
1184 * Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
1185 * Move de_win compiled resource files to cord/tests
1186 * Move pcr_interface.c, real_malloc.c to 'extra' folder
1187 * New API function (GC_dump_named) to produce named dumps
1188 * New API function (GC_is_incremental_mode)
1189 * New API function (get_expl_freed_bytes_since_gc)
1190 * New API function (get_size_map_at) to get element of size_map table
1191 * New API to stop and start the GC world externally
1192 * New API to turn on manual VDB at runtime
1193 * New field (expl_freed_bytes_since_gc) in public prof_stats_s
1194 * New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
1195 * New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
1196 * Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
1197 * Print time passed since GC initialization in GC_dump
1198 * Public API (GC_deinit) to allow Win32 critical sections deletion
1199 * Reduce probability of collision in threads hashtable for 64-bit targets
1200 * Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
1201 * Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
1202 * Reformat code and comments in gc_allocator.h
1203 * Remove 'dist' target from Makefile.direct
1204 * Remove a redundant check of __cplusplus in Symbian-specific .cpp files
1205 * Remove Android-specific code in gcconfig.h for M68K
1206 * Remove C++ WeakPointer and CleanUp API which lacks implementation
1207 * Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
1208 * Remove done_init static variable from fnlz_mlc.c
1209 * Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
1210 * Remove duplicated sample code in leak.md
1211 * Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
1212 * Remove GC code fragment (which already merged) from README.Mac
1213 * Remove GC_GNU_THREADS macro (HURD)
1214 * Remove GENERAL_MALLOC internal macro
1215 * Remove HIGH_BIT macro duplicating SIGNB
1216 * Remove lint-specific code
1217 * Remove Makefile KandRtest target (that supported K&R C compiler)
1218 * Remove MIN_WORDS macro from gc_priv.h
1219 * Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
1220 * Remove name of optional arguments of operator new and new[] in gc_cpp.h
1221 * Remove notes that K&R C compiler is unsupported
1222 * Remove PUSH_CONTENTS_HDR multi-line macro
1223 * Remove redundant check that clear_fl_marks argument is non-null
1224 * Remove redundant THREADS macro checks in alloc.c and gc_priv.h
1225 * Remove stubborn objects allocation code completely, remove stubborn.c
1226 * Remove unnecessary argument casts in add_roots_inner calls
1227 * Remove unnecessary type casts in n_set_marks
1228 * Remove unused USE_GENERIC macro definition and description
1229 * Remove version info in 'de' cord test application
1230 * Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
1231 * Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
1232 * Replace some FIXME items with TODO ones
1233 * Run command passed to if_not_there directly from Makefile.direct
1234 * Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
1235 * Skip grungy_pages update when mark state invalid to speedup read_dirty
1236 * Skip typed_test in gctest if NO_TYPED_TEST macro is defined
1237 * Support configure --disable-thread-local-alloc option (similar for CMake)
1238 * Support enable_checksums option in CMake script
1239 * Support Haiku multi-threaded build by CMake
1240 * Support threads for DragonFly in configure
1241 * Turn on 'atomic uncollectable' functionality by default (CMake)
1242 * Turn on GC assertions in NT_MAKEFILE for debug builds
1243 * Turn on gcj, disclaim and java finalization by default (CMake)
1244 * Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
1245 * Turn on incremental mode in cordtest and cord/de
1246 * Turn on incremental mode in disclaim_test, test_cpp and staticroots test
1247 * Turn on parallel marker by default for all multi-threaded builds
1248 * Update GC compilation and usage notes for Win32
1249 * Update shared libraries version info to differentiate against v7.6
1250 * Update top_index entry pointer only when the entry is constructed fully
1251 * Use __builtin_expect in SIZET_SAT_ADD macro
1252 * Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
1253 * Use __int64 instead of 'long long' in LONG_MULT if appropriate
1254 * Use __thread keyword for Android NDK r12b+ Clang (arm)
1255 * Use atomic allocation for leafs in reverse_test (gctest)
1256 * Use atomic load/store for the concurrently accessed variables in GC_lock
1257 * Use C11 static_assert if available
1258 * Use compiler atomic intrinsics by default if available (configure)
1259 * Use EXPECT FALSE for mark_from code documented as executed rarely
1260 * Use heap-allocated memory for local mark stack of non-marker thread
1261 * Use HOST_ANDROID define instead of PLATFORM_ANDROID
1262 * Use include gc.h with the angle brackets in the man page synopsis
1263 * Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
1264 * Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
1265 * Use noexcept specifier in gc_allocator and gc_cpp if C++11
1266 * Use same macro (NTHREADS) across all tests to specify number of threads
1267 * Use sigsetjmp() in setjmp_t tool if available
1268 * Use thread-local allocations for all multi-threaded builds
1269 * Use THREAD_EQUAL consistently to compare pthread_t values
1270 * Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
1271 * Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
1272 * Workaround Thread Sanitizer (TSan) false positive warnings
1273
1274
1275 == [7.6.26] 2026-02-04 ==
1276
1277 * Eliminate 'argument unused' gcc warning in push_all_stack_partially_eager
1278 * Fix GC_NO_THREADS_DISCOVERY macro check before definition
1279 * Fix redirected 'free' for callers from libdl/libpthread if IGNORE_FREE
1280
1281 Also, includes 7.4.32 changes
1282
1283
1284 == [7.6.24] 2025-10-17 ==
1285
1286 * Eliminate 'int-to-ptr cast' gcc warning in GC_restart_all on OpenBSD
1287 * Eliminate 'int-to-ptr cast' gcc warnings in DEBUG_THREADS code
1288 * Fix 'missing GNU-stack section in atomic_ops_sysdeps' ld warning
1289 * Fix pthread id stored in GC_threads of child process
1290 * Fix pthread_sigmask result checking in GC_start_mark_threads_inner
1291 * Remove always-false check if C++ allocator.allocate returns null in test
1292 * Update libatomic_ops repo URL in README after repo transfer
1293
1294 Also, includes 7.4.30 changes
1295
1296
1297 == [7.6.22] 2024-09-07 ==
1298
1299 * Eliminate 'cast signed to bigger unsigned' CSA warnings in GC_find_limit
1300 * Fix GC_debug_realloc to support custom kind
1301 * Fix heap blocks size computation by GC_get_memory_use
1302 * Fix pointer relational comparison in GC_do_enumerate_reachable_objects
1303 * Prevent GC_noop_sink from scanning by the collector
1304
1305 Also, includes 7.4.28 changes
1306
1307
1308 == [7.6.20] 2024-02-03 ==
1309
1310 * Eliminate compiler warning of missing cast in LONG_MULT after shift
1311 * Fix 'sigset_t undeclared' MS VC error if pthreads-w32 is used
1312 * Fix lock assertion violation in GC_try_to_collect_inner on OS X
1313 * Fix missing outermost parentheses in macro definitions in huge test
1314 * Fix undefined GC_real_pthread_sigmask if redirect malloc on OS X
1315
1316 Also, includes 7.4.26 changes
1317
1318
1319 == [7.6.18] 2023-05-26 ==
1320
1321 * Fix IRIX5 defined wrongly on FreeBSD/mips
1322 * Fix alt-stack handling in GC_push_all_stacks if stack grows up
1323 * Fix data race in GC_heapsize_at_forced_unmap variable
1324
1325 Also, includes 7.4.24 changes
1326
1327
1328 == [7.6.16] 2022-08-26 ==
1329
1330 * Do not send signal to thread which is suspended manually
1331 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
1332 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
1333 * Fix context saving when GC_suspend_thread(self)
1334 * Fix data race in fail_proc1 of gctest
1335 * Fix GC_suspend_thread if called before thread destructor
1336 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
1337 * Fix lock assertion violation in GC_find_limit if always multi-threaded
1338 * Fix potential race if start_mark_threads called from threads in child
1339 * Make finalizer_closure pointer read/write atomic in malloc and callback
1340 * Prevent changing of GC_markers_m1 value while collection in progress
1341 * Replace SSH cloning with HTTPS one in README
1342 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
1343
1344 Also, includes 7.4.22 changes
1345
1346
1347 == [7.6.14] 2021-09-28 ==
1348
1349 * Add loop to handle abort error like in suspend logic on Darwin
1350 * Add support of OpenBSD/aarch64
1351 * Add threading libraries to bdw-gc.pc
1352 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
1353 * Do not use iOS private symbols
1354 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
1355 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
1356 * Eliminate 'possible loss of data' BCC and MS VC warnings
1357 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
1358 * Eliminate 'unused function GC_add_map_entry' compiler warning
1359 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
1360 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
1361 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
1362 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
1363 * Fix 'ulong undefined' compilation error on AIX
1364 * Fix 'undefined reference to __data_start' linker error on RISC-V
1365 * Fix 'write to GC log failed' error
1366 * Fix GC_proc_fd value in child process at fork (Solaris)
1367 * Fix MPROTECT_VDB definition for single-threaded GC builds
1368 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
1369 * Fix STACKBOTTOM on 32-bit HP/UX 11.11
1370 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
1371 * Fix assertion violation in register_dynlib_callback on Android
1372 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
1373 * Fix configure message about 'AIX gcc optimization fix'
1374 * Fix cordtest build in SMakefile.amiga
1375 * Fix data race regarding *rlh value in generic_malloc_many
1376 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
1377 * Fix gc_allocator.h compilation by Clang
1378 * Fix gc_cflags variable name in configure (HP/UX)
1379 * Fix handling of areas smaller than page size in GC_scratch_recycle
1380 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
1381 * Fix misaligned tlfs passed to AO_load on m68k
1382 * Fix missing GC_quiet declaration in pcr_interface.c
1383 * Fix missing gc_dlopen.c in CMake script
1384 * Fix missing scratch_last_end_ptr update (Irix)
1385 * Fix overflow of scratch_free_ptr value
1386 * Fix page_was_[ever_]dirty() for static roots (Solaris)
1387 * Fix printf format specifier in simple_example.html
1388 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
1389 * Fix test_cpp failure caused by arbitrary link order (Win32)
1390 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
1391 * Fix various typos mostly in documentation files
1392 * Fix word size, data start and alignment for OpenBSD/mips64(el)
1393 * Prevent GetThreadContext failure (Windows)
1394 * Prevent WARN of incompatible incremental GC if default or manual VDB
1395 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
1396 * Refactoring of WoW64 workaround (Win32)
1397 * Remove a misleading comment about Solaris in gc.h
1398 * Workaround 'expression is only useful for its side effects' WCC warning
1399 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
1400
1401
1402 == [7.6.12] 2019-03-01 ==
1403
1404 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
1405 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1406 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
1407 * Fix 'unexpected mark stack overflow' abort in push_all_stack
1408 * Fix 'wrong __data_start/_end pair' error on Android
1409 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
1410 * Fix GetThreadContext stale register values use if WoW64 (Win32)
1411 * Fix executable memory allocation in GC_unix_get_mem
1412 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
1413 * Fix thread_info() count argument value (OS X)
1414 * Update NO_EXECUTE_PERMISSION documentation
1415
1416
1417 == [7.6.10] 2018-12-13 ==
1418
1419 * Add paths to filenames mentioned in the copyright section in README
1420 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
1421 * Eliminate 'casting signed to bigger unsigned int' CSA warning
1422 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
1423 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1424 * Fix 'too wide non-owner permissions are set for resource' code defect
1425 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
1426 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
1427 * Fix GC_register_disclaim_proc for leak-finding mode
1428 * Fix a deadlock in write_fault_handler if AO_or is emulated
1429 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
1430 * Fix concurrent bitmap update in GC_dirty
1431 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
1432 * Fix hbp overflow in GC_install_counts
1433 * Fix linkage with a system libatomic_ops shared library
1434 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
1435 * Fix marking of finalizer closure object
1436 * Fix marks and hb_n_marks consistency when disclaim returns true
1437 * Fix memory allocation on GCF (Linux/x64)
1438 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1439 * Fix start_world not resuming all threads on Darwin
1440 * Fix test_cpp assertion violation in find-leak mode
1441 * Fix tests linkage with internal atomic_ops.o
1442 * Fix unneeded end_stubborn_change in disclaim_test
1443 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1444 * New macro to suppress printing of leaked objects
1445 * Prevent double inclusion of javaxfc.h and private/specific.h
1446 * Reduce scope of local variables in GC_remove_all_threads_but_me
1447 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
1448 * Refine documentation in gc_disclaim.h
1449 * Test marking of finalizer closure object in disclaim_test
1450 * Update documentation about arm64 ABI in gcconfig.h
1451 * Use AO_or in async_set_pht_entry_from_index if available
1452 * Use include gc.h with the angle brackets in the man page synopsis
1453
1454
1455 == [7.6.8] 2018-08-12 ==
1456
1457 * Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
1458 * Add NetBSD/aarch64 and initial RISC-V support
1459 * Adjust formatting of configure help messages and config.h comments
1460 * Avoid multiple 'getcontext failed' warnings if getcontext is broken
1461 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
1462 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
1463 * Do not call GC_dirty_inner unless GC_incremental
1464 * Do not use NULL in gc_inline.h
1465 * Eliminate 'cast between incompatible function types' compiler warning
1466 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
1467 * Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
1468 * Eliminate 'declaration of var hides global declaration' compiler warning
1469 * Eliminate 'language extension used' Clang warning in gc.h
1470 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
1471 * Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
1472 * Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
1473 * Eliminate 'switch statement contains no case label' compiler warning
1474 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
1475 * Eliminate duplicate clear_mark_bit call when removing disappearing link
1476 * Fast fail on invalid CPU parameter passed to NT_MAKEFILE
1477 * Fix 'collecting from unknown thread' abort in leak-finding mode
1478 * Fix 'pointer arithmetic with NULL' code defect in print_callers
1479 * Fix Borland version in documentation to match that in BCC_MAKEFILE
1480 * Fix comment about inv_sz computation in setup_header
1481 * Fix comments style in configure.ac and Makefile.am
1482 * Fix compilation by digimars.mak (DMC)
1483 * Fix compilation by WCC makefile
1484 * Fix compilation of darwin_stop_world for iOS 8+
1485 * Fix cords for MANUAL_VDB
1486 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
1487 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
1488 * Fix gctest in leak-finding mode
1489 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
1490 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
1491 * Fix mark stack overflow checking in push_selected
1492 * Fix missing GC_dirty calls for GC-allocated objects used internally
1493 * Fix missing GC_dirty invocation from debug_end_stubborn_change
1494 * Fix MSWIN32 macro redefinition (WCC)
1495 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
1496 * Fix new and delete operators definition for DigitalMars compiler
1497 * Fix NT_MAKEFILE for VS 2017
1498 * Fix potential null dereference in GC_CONS
1499 * Fix register_dynamic_libraries on Windows 10
1500 * Fix result computation in n_set_marks
1501 * Fix return type in GC_set_warn_proc API documentation
1502 * Fix tests for GC compiled with MANUAL_VDB
1503 * Fix the build for Emscripten
1504 * Fix typo in comment for CORD_ec_flush_buf prototype
1505 * Fix typos in ChangeLog and generic_malloc
1506 * Fix UNTESTED for multi-threaded API functions in gctest
1507 * Fix VirtualQuery call in case of malloc failure (Win32)
1508 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1509 * Keep pointer to the start of previous entry in remove_specific_after_fork
1510 * Move de_win compiled resource files to cord/tests
1511 * Never return null by C++ GC allocators and gc_cpp operator new
1512 * Perform thread_suspend in loop as it may be interrupted (Darwin)
1513 * Really abort if failed to read /proc for library registration (Linux)
1514 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
1515 * Remove duplicate local variable in reclaim_block
1516 * Remove information how to send bugs from README.cords file
1517 * Remove libatomic_ops license information
1518 * Remove unused USE_GENERIC macro definition and description
1519 * Suppress 'functions containing switch are not expanded inline' bcc warning
1520 * Suppress 'non-member operator new/delete may not be inline' VC++ warning
1521 * Turn on incremental collection in gctest also if MANUAL_VDB
1522 * Update copyright information in alloc.c, gc.c/h and the documentation
1523 * Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
1524 * Update NT_MAKEFILE usage information in README files for Win32 and Win64
1525 * Workaround 'class C does not have a copy constructor' cppcheck warning
1526 * Workaround 'function nested_sp is never used' cppcheck style warning
1527 * Workaround 'opposite expression on both sides of &' cppcheck style warning
1528 * Workaround 'template-id not supported in this context' compiler error (WCC)
1529
1530
1531 == [7.6.6] 2018-04-20 ==
1532
1533 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
1534 * Eliminate 'boolean result used in bitwise operation' cppcheck warning
1535 * Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
1536 * Explicitly unblock GC signals on GC initialization
1537 * Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
1538 * Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
1539 * Fix arguments delimiter in pcr_interface.c (PCR)
1540 * Fix assertion violation in DllMain of win32_threads
1541 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
1542 * Fix data race during apply_to_each_object(reset_back_edge)
1543 * Fix dbg_mlc.c/o file name in documentation
1544 * Fix gctest with musl libc on s390x
1545 * Fix include gc_gcj.h in thread_local_alloc.c
1546 * Fix man section number (3)
1547 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
1548 * Fix missing new-line in ABORT_ARG<n> definition
1549 * Fix missing SIGBUS handler setup for kFreeBSD
1550 * Fix null dereference in print_callers on backtrace_symbols failure
1551 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
1552 * Fix the collector hang when it is configured with --enable-gc-debug
1553 * Fix thread_suspend fail for threads registered from key destructor (OS X)
1554 * Fix type of local variables receiving result of PHT_HASH
1555 * Fix typo in AIX macro name
1556 * Fix typo in comment in specific.h
1557 * Fix unbounded heap growth in case of intensive disappearing links usage
1558 * Remove API symbols renaming in WCC_MAKEFILE
1559 * Support Haiku/x64 and Haiku/x86 hosts
1560 * Support threads for DragonFly in configure
1561 * Workaround 'address of auto-variable returned' cppcheck error
1562 * Workaround gctest hang on kFreeBSD (if thread-local allocations are on)
1563
1564
1565 == [7.6.4] 2018-01-26 ==
1566
1567 * Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
1568 * Change compiler invocation example in gc.man to use dynamic libgc
1569 * Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
1570 * Do not declare dl_iterate_phdr as weak for DragonFly
1571 * Fix 'cords' parallel build in Makefile.direct
1572 * Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
1573 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
1574 * Fix GC allocation mutex in child after a fork
1575 * Fix global operator delete definition for C++14 in gc_cpp
1576 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
1577 * Fix libgc version which was changed in linkage breaking way
1578 * Fix missing EOLn output in threadlibs tool
1579 * Fix threadlibs tool to output '-lpthread' for DragonFly
1580 * Prevent DATASTART redefinition for NaCl
1581 * Remove obsolete advice about linking with _DYNAMIC=0 (Linux)
1582
1583
1584 == [7.6.2] 2017-12-23 ==
1585
1586 * Add assertion that no hb_n_marks underflow occurs
1587 * Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
1588 * Add minimal testing of GC_set_bit (gctest)
1589 * Add more cases to huge_test to cover sizes close to word-type maximum
1590 * Add testing of new[]/delete[] (test_cpp)
1591 * Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
1592 * Adjust code indentation of calloc_explicitly_typed
1593 * Align local_mark_stack in help_marker explicitly
1594 * Allow custom TRACE_ENTRIES value
1595 * Allow gctest and thread_leak_test with zero NTHREADS
1596 * Avoid data race in finalized_count (gctest)
1597 * Code refactoring of divide-by-HBLKSIZE occurrences
1598 * Code refactoring of huge_test
1599 * Code refactoring of tests/subthread_create regarding AO add primitive
1600 * Compile thread_local_alloc only if multi-threaded build (Makefile.am)
1601 * Delete preprocessor output on make clean (Makefile.direct)
1602 * Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
1603 * Do not disable parallel mark for WRAP_MARK_SOME
1604 * Do not enable mprotect-based incremental mode if unmapping is on (gctest)
1605 * Do not install documentation if configure --disable-docs (new option)
1606 * Do not use tkill (Android)
1607 * Document base and size of objects allocated by finalized_malloc
1608 * Document configure 'syntax error' issue in README
1609 * Eliminate 'address of local variable returned' static analyzer warning
1610 * Eliminate 'array vs singleton' code defect in typed_test (gctest)
1611 * Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
1612 * Eliminate 'boolean result used in bitwise op' cppcheck false warning
1613 * Eliminate 'C-style pointer casting' cppcheck style warnings in test
1614 * Eliminate 'checking if unsigned variable is <0' cppcheck style warning
1615 * Eliminate 'class member var with name also defined in parent' warning
1616 * Eliminate 'comparison is always false' static analyzer warning in finalize
1617 * Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
1618 * Eliminate 'condition is always true' cppcheck style warning
1619 * Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
1620 * Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
1621 * Eliminate 'dereference of null' CSA false warning in array_mark_proc
1622 * Eliminate 'function result not used' code defect in GC_mark_local
1623 * Eliminate 'GC_collecting is set but never used' code defect (Win32)
1624 * Eliminate 'GC_record_fault is never used' cppcheck style warning
1625 * Eliminate 'integer shift by a negative amount' code defect in finalize
1626 * Eliminate 'label not used' cppcheck false warnings in GC_mark_X
1627 * Eliminate 'memory leak' code defect for scratch-allocated memory
1628 * Eliminate 'memory leak' code defect in remove_specific
1629 * Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
1630 * Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
1631 * Eliminate 'possible integer underflow' code defect (cord-de)
1632 * Eliminate 'potential overflow' static analyzer warning in test
1633 * Eliminate 'printf format specifies type void*' GCC pedantic warnings
1634 * Eliminate 'scope of variable can be reduced' cppcheck warnings
1635 * Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
1636 * Eliminate 'this statement may fall through' GCC warnings
1637 * Eliminate 'unnecessary comparison of static strings' cppcheck warning
1638 * Eliminate 'unsafe vsprintf is deprecated' compiler warning
1639 * Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
1640 * Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
1641 * Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
1642 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
1643 * Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
1644 * Eliminate 'value of DATASTART2 unknown' cppcheck info messages
1645 * Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
1646 * Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
1647 * Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
1648 * Eliminate 'write to memory that was const-qualified' code analyzer warning
1649 * Eliminate all 'scope of variable can be reduced' cppcheck style warnings
1650 * Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
1651 * Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
1652 * Eliminate CSA warning of non-virtual destructor in test_cpp base class
1653 * Eliminate CSA warning of staticroot that can be a local variable (tests)
1654 * Eliminate CSA warning of unmodified non-const static var (disclaim_test)
1655 * Eliminate redundant local variable in register_finalizer
1656 * Eliminate TSan (Thread Sanitizer) warnings in gctest
1657 * Eliminate UBSan warning of overflow during descr subtraction in mark_from
1658 * Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
1659 * Eliminate unsigned fl_builder_count underflow in mark_thread
1660 * Enable GC_is_tmp_root for all platforms
1661 * Execute more single-threaded GC tests by CMake
1662 * Expand tabs to spaces in de_win.rc (tests)
1663 * Export GC_dump_finalization/regions()
1664 * Export GC_is_tmp_root() and GC_print_trace[_inner]()
1665 * Export GC_print_free_list()
1666 * Fix '32-bit value shift followed by expansion to 64-bit' code defect
1667 * Fix 'GC_written_pages never read' code defect (GWW_VDB)
1668 * Fix 'label cannot be reached' static analyzer warning in disclaim_test
1669 * Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
1670 * Fix 'syntax error' reported by cppcheck for mach_dep
1671 * Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
1672 * Fix 'variable assigned a value that is never used' cppcheck style warnings
1673 * Fix 'void pointers in calculations: behavior undefined' cppcheck warning
1674 * Fix assertion violation about disabled cancel in try_to_collect_inner
1675 * Fix atomic_ops build in Makefile.direct for Solaris
1676 * Fix Clang static analyzer warning about not found gc_priv.h in extra files
1677 * Fix compilation error in get_main_stack_base (Emscripten)
1678 * Fix compilation for winpthreads if HANDLE_FORK
1679 * Fix compilation if configured with --enable-werror on OS X
1680 * Fix cord/de build in Makefile.direct (Linux)
1681 * Fix data race in a list referenced by A.aa (gctest)
1682 * Fix data race in collectable_count (gctest)
1683 * Fix data race in do_local_mark when comparing active_count to helper_count
1684 * Fix data race in GC_suspend/resume_thread
1685 * Fix data race in last_stop_count access (suspend_handler_inner)
1686 * Fix data race in make_descriptor when setting explicit_typing_initialized
1687 * Fix data race in mark_thread when updating mark_no
1688 * Fix data race when getting object size in explicitly-typed allocators
1689 * Fix deadlock in GC_suspend_thread
1690 * Fix gctest failure for Darwin if CPPCHECK is defined
1691 * Fix lack of barriers to synchronize memory for suspend_handler
1692 * Fix marking of disclaim-reachable objects in the incremental mode
1693 * Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
1694 * Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
1695 * Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
1696 * Fix page calculation in checksums
1697 * Fix parallel build in Makefile.direct
1698 * Fix test_cpp and c++ parallel build in Makefile.direct
1699 * Fix typo in comment of GC_mark_some
1700 * Fix typos in cdescr.html and README.sgi
1701 * Make GC_INIT optional for clients even if thread-local allocations enabled
1702 * Match uclinux pattern in configure
1703 * Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
1704 * Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
1705 * New API function (GC_is_init_called) to check if BDWGC is initialized
1706 * New target (check-cpp) in Makefile.direct
1707 * Prevent abort in register_data_segments for Symbian and Emscripten
1708 * Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
1709 * Print realloc_count value in gctest
1710 * Put invariant name in quotes to make mark_state comments clearer
1711 * Refine configure messages when checking for compiler option support
1712 * Remove extraneous semicolons after AC_MSG_WARN (configure)
1713 * Remove page_was_dirty and remove_protection duplicate definitions
1714 * Remove unnecessary type casts of printf arguments to unsigned long
1715 * Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
1716 * Rename 'test' to 'check' target in Makefile.direct
1717 * Replace deprecated rewind to fseek in cordxtra
1718 * Report gcc/clang pedantic warnings (configure)
1719 * Skip thread suspend/resume API testing for Tru64 (OSF1)
1720 * Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
1721 * Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
1722 * Suppress 'tainted string passed to vulnerable operation' false defects
1723 * Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
1724 * Test GC initialization from non-main thread on FreeBSD and NetBSD
1725 * Test GCJ object creation with length-based descriptor (gctest)
1726 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
1727 * Update README regarding make cords with Makefile.direct
1728 * Update README to use autogen.sh on build from the source repository
1729 * Update shared libraries version info to differentiate against v7.4
1730 * Use mprotect instead of mmap in GC_unmap() on Cygwin
1731 * Use same style of include gc.h in documentation
1732 * Workaround '!GC_page_size is always false' cppcheck style warning
1733 * Workaround '#error' cppcheck error messages
1734 * Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
1735 * Workaround 'array compared to 0', 'untrusted loop bound' false defects
1736 * Workaround 'bad address arithmetic' static analysis tool false positive
1737 * Workaround 'checking if unsigned value is negative' cppcheck warning
1738 * Workaround 'checking unsigned value is negative' code defect in mark_from
1739 * Workaround 'comparison of identical expressions' false code defects
1740 * Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
1741 * Workaround 'condition is always false' cppcheck warning in get_next_stack
1742 * Workaround 'condition is always true' cppcheck style warnings in GC_init
1743 * Workaround 'function is never used' cppcheck style warnings
1744 * Workaround 'insecure libc pseudo-random number generator used' code defect
1745 * Workaround 'int shift by negative amount' false code defect in finalize
1746 * Workaround 'local variable size too big' static analyzer warning
1747 * Workaround 'memory leak: result' cppcheck false error (POSIX)
1748 * Workaround 'null pointer dereference' false positive in push_next_marked
1749 * Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
1750 * Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
1751 * Workaround 'obsolete function alloca() called' cppcheck warnings
1752 * Workaround 'passing untyped NULL to variadic function' cppcheck warning
1753 * Workaround 'pointer used before comparison to null' code defect (pthread)
1754 * Workaround 'possible null pointer dereference' cppcheck warnings
1755 * Workaround 'potential multiplication overflow' code defect in de_win (cord)
1756 * Workaround 'redundant assignment of *result to itself' cppcheck warning
1757 * Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
1758 * Workaround 'same expression on both sides of ==' cppcheck style warning
1759 * Workaround 'same expression on both sides of OR' cppcheck style warning
1760 * Workaround 'struct member is never used' cppcheck style warnings
1761 * Workaround 'tainted int used as loop bound' static analysis tool warning
1762 * Workaround 'Uninitialized variable' cppcheck errors
1763 * Workaround 'unused variable' cppcheck style warnings
1764 * Workaround 'va_list used before va_start' cppcheck error in cord
1765 * Workaround 'value of macro unknown' cppcheck info messages
1766 * Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
1767 * Workaround 'value of SIGBUS unknown' cppcheck info messages
1768 * Workaround 'value of WINAPI unknown' cppcheck info messages
1769 * Workaround 'variable hides enumerator with same name' cppcheck warnings
1770 * Workaround 'variable reassigned before old value used' cppcheck warnings
1771 * Workaround 'waiting while holding lock' code defect in stop_world (Unix)
1772 * Workaround false 'uninitialized var use' code defect (initsecondarythread)
1773
1774 Also, includes 7.4.6 changes
1775
1776
1777 == [7.6.0] 2016-08-02 ==
1778
1779 * ABORT_ARGn log details at INFO level (Android)
1780 * Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
1781 * Add API function to calculate total memory in use by all GC blocks
1782 * Add API function to set/modify GC log file descriptor (Unix)
1783 * Add alloc_size attribute to GC_generic_malloc
1784 * Add alt-stack registration support
1785 * Add assertion for GC_new_kind boolean arguments
1786 * Add assertion on lock status to GC_alloc_large and its callers
1787 * Add build scripts for VC 9 (Win32/64)
1788 * Add build system plumbing for building with -Werror
1789 * Add incremental GC support for Darwin/arm64
1790 * Add profiling callback events to indicate start/end of reclaim phase
1791 * Add support for enumerating the reachable objects in the heap
1792 * Add toggle-ref support (following Mono GC API)
1793 * Added instructions to README.md for building from git
1794 * Adjust code indentation of malloc/calloc/str[n]dup
1795 * Allow fork() automatic handling on Android with API level 21+
1796 * Allow specific TLS attributes for GC_thread_key
1797 * Allow thread local allocations from within pthread TLS destructors
1798 * Allow to force GC_dump_regularly set on at compilation
1799 * Altera NIOS2 support
1800 * Change 'cord' no-argument functions declaration style to ANSI C
1801 * Check DATASTART is less than DATAEND even assertions off
1802 * Check for execinfo.h by configure
1803 * Code refactoring of GC_push_finalizer/thread/typed_structures
1804 * Code refactoring regarding 'data start' definition for FreeBSD
1805 * Consistently set type of DATASTART/END to ptr_t (code refactoring)
1806 * Consistently use int[] type for '_end' symbol (code refactoring)
1807 * Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
1808 * Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
1809 * Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
1810 * Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
1811 * Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
1812 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
1813 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
1814 * Document GC_register_my_thread returned value
1815 * Dump the block information in CSV format
1816 * Eliminate redundant *flh check for null in GC_allocobj
1817 * Enable atomic-uncollectable in operator new in gc_cpp.h
1818 * Enable build with musl libc
1819 * Enable gc.h inclusion by client without implicit include windows.h (Win32)
1820 * Enable huge_test for Win64 (and LLP64 target)
1821 * Enable thread-local storage for Android Clang
1822 * Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
1823 * Export GC_push_all_eager, GC_push_finalizer_structures
1824 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
1825 * Fix assertion in GC_mark_from for non-heap regions
1826 * Fix compilation for Android clang/arm with bfd linker
1827 * Fix integer shift undefined behavior in GC_init_explicit_typing
1828 * Fix missing new-line and redundant trailing dot in WARN messages
1829 * Fix STACKBOTTOM for Solaris 11/x86
1830 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
1831 * Fix unchecked fork() result in gctest (Unix, Cygwin)
1832 * Fix user-defined signals drop by marker threads
1833 * Fix various typos in comments and documentation
1834 * FreeBSD/arm support improvement
1835 * GC_make_descriptor code refactoring (eliminate two local variables)
1836 * GC_malloc[_atomic] global and thread-local generalization with kind
1837 * GC_malloc_[atomic_]uncollectable generalization
1838 * GC_scratch_alloc code refactoring (and WARN message improvement)
1839 * Group all compact fields of GC_arrays to fit in single page
1840 * Handle load_segs overflow in register_dynlib_callback gracefully
1841 * Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
1842 * Implement event callbacks for profiling (following Mono GC API)
1843 * Implement the finalization extension API
1844 * Implement thread suspend/resume API (Linux threads only)
1845 * Improve documentation for disappearing links in gc.h
1846 * Make heap growth more conservative after GC_gcollect_and_unmap call
1847 * Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
1848 * Move MessageBox invocation code from GC_abort to a separate routine (Win32)
1849 * NaCl/arm initial support; NaCl runtime fixes for other CPUs
1850 * New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
1851 * New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
1852 * New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
1853 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
1854 * Re-implement GC_finalized_malloc using GC_malloc_kind
1855 * Refactoring of android_thread_kill/pthread_kill calls
1856 * Refactoring of GC_Xobjfreelist (use single array to keep free lists)
1857 * Refactoring of thread-local *_freelists (use single array of free lists)
1858 * Refine description in README how to build from source repository
1859 * Refine GC_free_space_divisor comment regarding its initial value
1860 * Reformat code of gc_cpp.cc/h
1861 * Remove 'opp' local variable in GC_malloc_X
1862 * Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
1863 * Remove code commented out by 'ifdef UNDEFINED'
1864 * Remove hb_large_block field (use 1 extra bit of hb_flags instead)
1865 * Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
1866 * Remove redundant casts in GC_generic_or_special_malloc and similar
1867 * Remove unsupported FreeBSD/ia64 case from gcconfig.h file
1868 * Remove unused GC_gcjdebugobjfreelist
1869 * Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
1870 * Replace non-API occurrences of GC_word to word (code refactoring)
1871 * Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
1872 * Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
1873 * Standalone profiling callback for threads suspend/resume
1874 * Support (add machine description for) TILE-Gx and TILEPro targets
1875 * Support build for Android 64-bit (arm64, mips64, x64)
1876 * Support FreeBSD/aarch64, FreeBSD/mips
1877 * Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
1878 * Support MinGW build in scripts
1879 * Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
1880 * Use magic header on objects to improve disclaim_test
1881 * Workaround 'sa_sigaction member missing' compiler error (Android/x32)
1882 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
1883 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
1884
1885 Also, includes 7.4.4 changes
1886
1887
1888 == [7.4.32] 2026-02-04 ==
1889
1890 * Eliminate 'cast between incompatible func types' warnings for FARPROC vars
1891 * Eliminate 'format expects argument of type' gcc warnings in dump_meminfo
1892 * Eliminate 'GC_remove_roots_subregion not used' gcc warning on Solaris
1893 * Eliminate 'unused parameter' clang warnings in GC_darwin_sigbus
1894 * Eliminate 'unused variable i' gcc warning in GC_start_world (Windows)
1895 * Fix 'KERN_PROTECTION_FAILURE while world is stopped' error on MacOS X
1896 * Fix 'reserved' argument handling in GC_DllMain
1897 * Fix 'undefined errno' compiler error in strdup/strndup on WinCE
1898 * Fix a cycle in NORMAL freelist if malloc is redirected on Linux
1899 * Fix assertion in GC_wait_for_reclaim if DllMain-based thread registration
1900 * Fix missing new-line in help message of console variant of cord/de
1901 * Fix race in DllMain by deferring delete_thread call to GC_start_world
1902 * Fix SIGSEGV if pthread_detach is called before collector initialization
1903 * Fix typos (about getcontext) in printed message in setjmp_test
1904 * Fix various typos in comments and documentation
1905 * Prevent collection if fork from an unregistered thread
1906 * Refine USE_PROC_FOR_LIBRARIES macro documentation for Solaris
1907 * Remove unused GC_VERSION in configure
1908 * Remove unused redefinition of GC_free in gctest
1909 * Revert 'Avoid abort on ResumeThread failure if Win32 DllMain closes thread'
1910 * Revert 'Fix GC_suspend abort when the thread is deleted by DllMain'
1911
1912
1913 == [7.4.30] 2025-10-17 ==
1914
1915 * Add missing test_cpp dependency on gc_allocator.h in build scripts
1916 * Allocate non-executable memory by default (CMake)
1917 * Avoid abort on ResumeThread failure if Win32 DllMain closes thread handle
1918 * Do not produce '-lpthread' by threadlibs on Tru64/OSF1
1919 * Eliminate 'allocating insufficient size 0 for char` gcc warning in gctest
1920 * Eliminate 'compare signed/unsigned in check_finalizer_nested' bcc warning
1921 * Eliminate 'unused parameter fd' gcc warning in NOSYS GC_write
1922 * Fix 'symbol undefined _snprintf' dmc linker error in cordtest
1923 * Fix 'undefined STACKBOTTOM' preprocessor error for no-OS PowerPC target
1924 * Fix 'undefined symbol sbrk' linker error on FreeBSD
1925 * Fix blocked signals in fork_prepare_proc on HP/UX
1926 * Fix CMake build on macOS Catalina
1927 * Fix GC_suspend abort when the thread is deleted by DllMain
1928 * Fix missing parentheses in SIG_THR_RESTART macro definition
1929 * Fix print_heap_obj call with the lock held in backgraph add_edge
1930 * Fix rounding up in STACKBOTTOM for OSF1
1931 * Fix symbols alignment checking for CRIS and M68K
1932 * Fix undefined reference to GC_objfreelist and GC_bytes_allocd
1933 * Fix various typos in comments and documentation
1934 * Remove improper comment about returned value of CORD_extend_path
1935 * Remove outdated comment about 'make distcheck' from Makefile.am
1936 * Update URLs in documentation after repo transfer to bdwgc organization
1937 * Workaround tests crash if mprotect-based VDB is manually selected (bcc)
1938
1939
1940 == [7.4.28] 2024-09-07 ==
1941
1942 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
1943 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
1944 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
1945 * Fix GC_print_trace_inner to print the last element of the circular buffer
1946 * Fix cordtst2.tmp file deletion in cordtest on Windows
1947 * Fix double lock in GC_malloc called from backtrace()
1948 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
1949 * Fix null pointer dereference in GC_is_visible if type_descr is null
1950 * Fix per_object_helper() after changing hb_sz units
1951 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
1952 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
1953 * Fix potential address overflow in GC_add_to_heap
1954 * Fix potential buffer overrun during read in GC_text_mapping
1955 * Fix typos in comments
1956 * Prevent redirected malloc call from a garbage collection routine
1957 * Remove redundant dirty/reachable_here calls in GC_malloc_explicitly_typed
1958 * Update and fix diagrams describing the tree structure for pointer lookups
1959
1960
1961 == [7.4.26] 2024-02-03 ==
1962
1963 * Eliminate 'unused parameter' gcc warning in free() if IGNORE_FREE
1964 * Eliminate 'unused value' gcc warnings in init_global_static_roots (Symbian)
1965 * Fix 'implicit declaration of function sbrk' gcc error on Symbian
1966 * Fix 'unused GC_set_and_save_fault_handler' warning on OS X
1967 * Fix GC_push_stack_for() to push also Xmm registers on Windows/x64
1968 * Fix MACH_TYPE macro redefinition on Symbian/arm
1969 * Fix missing GC_pthread_sigmask on FreeBSD and NetBSD
1970 * Fix missing redirect and implementation of pthread_sigmask() on OpenBSD
1971
1972 Also, includes 7.2r changes.
1973
1974
1975 == [7.4.24] 2023-05-25 ==
1976
1977 * Adjust CORD_ec comment placement in ec.h
1978 * Do not mix debug and non-debug allocations in disclaim tests
1979 * Eliminate 'cast signed to bigger unsigned' CSA warning in WARN calls
1980 * Ensure GC_NO_PTHREAD_SIGMASK defined if no GC_pthread_sigmask prototype
1981 * Fix GC_thread_is_registered for finished threads
1982 * Fix GC_unregister_my_thread call before GC functions usage in gctest
1983 * Fix missing lock while updating GC_in_thread_creation in GC_exit_check
1984 * Fix null pointer dereference in TRACE_TARGET
1985 * Fix of GC_bytes_allocd increment in GC_generic_malloc_inner
1986 * Remove redundant 'ifdef THREADS' around LOCK/UNLOCK in call_with_alloc_lock
1987
1988 Also, includes 7.2q changes.
1989
1990
1991 == [7.4.22] 2022-08-26 ==
1992
1993 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
1994 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
1995 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
1996 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
1997 * Fix SIGSEGV caused by dropped stack access from child process in gctest
1998 * Fix abort in Win32 DllMain if PARALLEL_MARK
1999 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
2000 * Fix comment in GC_init regarding GC_init_parallel call
2001 * Fix stack overflow in gctest on Alpine Linux/s390x
2002 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
2003 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
2004 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage
2005
2006 Also, includes 7.2p changes.
2007
2008
2009 == [7.4.20] 2021-09-28 ==
2010
2011 * Do not hold GC_fault_handler_lock when in Sleep (Windows)
2012 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
2013 * Eliminate 'unused function GC_add_map_entry' compiler warning
2014 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
2015 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
2016 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
2017 * Fix configure message about 'AIX gcc optimization fix'
2018 * Fix cordtest build in SMakefile.amiga
2019 * Prevent GetThreadContext failure (Windows)
2020 * Refactoring of WoW64 workaround (Win32)
2021
2022 Also, includes 7.2o changes
2023
2024
2025 == [7.4.18] 2019-03-01 ==
2026
2027 * Fix 'wrong __data_start/_end pair' error on Android
2028 * Fix thread_info() count argument value (OS X)
2029
2030 Also, includes 7.2n changes
2031
2032
2033 == [7.4.16] 2018-12-13 ==
2034
2035 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
2036 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
2037 * Fix GC_register_disclaim_proc for leak-finding mode
2038 * Fix concurrent bitmap update in GC_dirty
2039 * Fix marking of finalizer closure object
2040 * Fix marks and hb_n_marks consistency when disclaim returns true
2041 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
2042 * Refine documentation in gc_disclaim.h
2043
2044 Also, includes 7.2m changes
2045
2046
2047 == [7.4.14] 2018-08-11 ==
2048
2049 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
2050 * Do not call GC_dirty_inner unless GC_incremental
2051 * Eliminate 'cast between incompatible function types' compiler warning
2052 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
2053 * Eliminate 'language extension used' Clang warning in gc.h
2054 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
2055 * Eliminate 'switch statement contains no case label' compiler warning
2056 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
2057 * Eliminate duplicate clear_mark_bit call when removing disappearing link
2058 * Fix 'collecting from unknown thread' abort in leak-finding mode
2059 * Fix compilation by digimars.mak (DMC) and by WCC makefile
2060 * Fix cords for MANUAL_VDB
2061 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
2062 * Fix gctest in leak-finding mode
2063 * Fix missing GC_dirty calls for GC-allocated objects used internally
2064 * Fix missing GC_dirty invocation from debug_end_stubborn_change
2065 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
2066 * Fix typos in ChangeLog and generic_malloc
2067 * Keep pointer to the start of previous entry in remove_specific_after_fork
2068 * New API function (GC_is_init_called) to check if BDWGC is initialized
2069 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
2070 * Remove duplicate local variable in reclaim_block
2071 * Remove libatomic_ops license information from README
2072 * Workaround 'dynamic exception specifications deprecated in C++11' warning
2073
2074 Also, includes 7.2l changes
2075
2076
2077 == [7.4.12] 2018-04-19 ==
2078
2079 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
2080 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
2081 * Fix gctest with musl libc on s390x
2082 * Fix missing new-line in ABORT_ARG<n> definition
2083 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
2084 * Fix type of local variables receiving result of PHT_HASH
2085 * Remove API symbols renaming in WCC_MAKEFILE
2086
2087 Also, includes 7.2k changes
2088
2089
2090 == [7.4.10] 2018-01-22 ==
2091
2092 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
2093 Also, includes 7.2j changes
2094
2095
2096 == [7.4.8] 2017-12-22 ==
2097
2098 * Eliminate 'this statement may fall through' GCC warnings
2099 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
2100 * Fix data race in make_descriptor when setting explicit_typing_initialized
2101 * Fix marking of disclaim-reachable objects in the incremental mode
2102 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
2103 Also, includes 7.2i changes
2104
2105
2106 == [7.4.6] 2017-10-26 ==
2107
2108 * Add configure --enable-gcov option (enable code coverage analysis)
2109 * Add configure check whether to define NO_GETCONTEXT
2110 * Adjust GC_memalign comment
2111 * Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
2112 * Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
2113 * Avoid busy waiting in mark_thread while GC_parallel is false
2114 * Better document minimum value of size argument for typed allocations
2115 * Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
2116 * Consistently use 'msec' instead of 'ms' in comments in pthread_support
2117 * Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
2118 * Do not produce .tar.bz2 distribution file (configure)
2119 * Do not require libatomic_ops for single-threaded builds (configure)
2120 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
2121 * Document GWW_VDB in gcdescr.html
2122 * Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
2123 * Eliminate 'conditional expression is always true' code defect in GC_init
2124 * Eliminate 'FP divide-by-zero' static analyzer warning
2125 * Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
2126 * Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
2127 * Eliminate 'ISO C forbids object to function pointer conversion' warning
2128 * Eliminate 'locally defined symbol imported' MS linker warnings (cord)
2129 * Eliminate 'null dereference' code defect warning in register_finalizer
2130 * Eliminate 'possible loss of data' compiler warnings (MS VC)
2131 * Eliminate 'printf format specifier mismatch' compiler warning (tools)
2132 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
2133 * Eliminate 'value stored is never read' warning of Clang static analyzer
2134 * Eliminate duplicate log messages in GC_mark_from
2135 * Eliminate most of collisions in GC_threads on Linux/x64
2136 * Ensure GC initialized when atfork_prepare is called by client
2137 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
2138 * Fix 'bogus LR' detection in FindTopOfStack (Darwin)
2139 * Fix 'execvp argument incompatible pointer type' compiler warning (tools)
2140 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
2141 * Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
2142 * Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
2143 * Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
2144 * Fix 'ISO C90 forbids mixed declarations and code' compiler warning
2145 * Fix 'missing libc-version.h' build error (uClibc/x86[_64])
2146 * Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
2147 * Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
2148 * Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
2149 * Fix (adjust) GC_scratch_alloc actual argument type
2150 * Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
2151 * Fix finalize.c compilation in 'strict ANSI' mode
2152 * Fix GC shared library tests failure related to dl_iterate_phdr (musl)
2153 * Fix gc.h compliance to strict ANSI (pthreads)
2154 * Fix GC_bytes_allocd incrementation in case of allocation failure
2155 * Fix GC_jmp_buf multiple definition
2156 * Fix GC_noop6 definition to avoid its calls to be optimized away
2157 * Fix gctest failure if PARALLEL_MARK (musl)
2158 * Fix gctest thread stack overflow (musl-gcc)
2159 * Fix initsecondarythread_test runtime failure if GC compiled w/o threads
2160 * Fix lack of 2 trailing zeros in _MSC_VER numbers
2161 * Fix local variable declarations in disclaim_bench
2162 * Fix missing #error pragma
2163 * Fix missing .exe for disclaim test filenames in Makefile (MinGW)
2164 * Fix missing atomic/[un]collectable/realloc_count increments in gctest
2165 * Fix missing new-line and redundant trailing dot in WARN messages
2166 * Fix missing new-line at format strings end in subthread_create test
2167 * Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
2168 * Fix potential overflow in decrement when computing GC_markers_m1
2169 * Fix printf format specifiers in extra files (cppcheck warnings)
2170 * Fix pthread_start compilation if single-obj-compilation (Linux)
2171 * Fix register_finalizer call in disclaim_bench for GC_DEBUG
2172 * Fix static assertion violation in LONG_MULT for 64-bit targets
2173 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
2174 * Fix thread id leaks in subthread_create and threadkey_test
2175 * Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
2176 * Fix tools/setjmp_t to prevent nested_sp inlining
2177 * Fix typo in CHECK_GCLIB_VERSION name (test)
2178 * Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
2179 * Fix unchecked fork() result in gctest (Unix, Cygwin)
2180 * Improve detection of internal libatomic_ops (configure)
2181 * Move libraries version info to the beginning of Makefile.am
2182 * Prevent abort in register_data_segments for Symbian
2183 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
2184 * Refine Makefile.direct comment about multi-threaded GC build
2185 * Refine README about library source downloading
2186 * Refine should_invoke_finalizers documentation
2187 * Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
2188 * Remove non-existent configure option in simple_example.html
2189 * Replace C++ style comments to C ones, remove commented out code (extra)
2190 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
2191 * Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
2192 * Suppress 'tainted string passed to vulnerable operation' false defects
2193 * Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
2194 * Update bdwgc mailing list online archive link in documentation
2195 * Update shared libraries version info to differentiate against v7.2
2196 * Use AC_DEFINE for defining NO_GETCONTEXT in configure
2197 * Workaround 'index out of bounds' UBSan false warning in push_marked
2198 * Workaround 'mmap() resource handle leak' static analyzer warning
2199 * Workaround 'redundant assignment of *result to itself' cppcheck warning
2200 * Workaround 'resource leak' error reported by cppcheck (tools, test)
2201 Also, includes 7.2h changes
2202
2203
2204 == [7.4.4] 2016-05-25 ==
2205
2206 * Allow GC_FAST_MALLOC_GRANS() multiple use in a function
2207 * Also enable the TSX workaround for Linux/x86
2208 * Avoid unstructured procfs on Solaris
2209 * Change cord/de main() declaration style from K-R to ANSI C
2210 * Change no-argument functions declaration style to ANSI C (cord)
2211 * Do not include sigcontext.h and asm/sigcontext.h
2212 * Eliminate 'divide by zero' compiler warning in cordtest
2213 * Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
2214 * Eliminate warnings detected by Cppcheck in cord de[_win]
2215 * Fix 'comparison of non-null parameter is always false' warning (Clang)
2216 * Fix 'CORD_iter5 unused result' code defect in cordxtra
2217 * Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
2218 * Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
2219 * Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
2220 * Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
2221 * Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
2222 * Fix 'statement unreachable' compiler warning in GC_mark_from
2223 * Fix 'statement unreachable' compiler warning in memalign
2224 * Fix 'unused label' compiler warning in cord/de
2225 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
2226 * Fix 'variable unused' warning in GC_save_callers
2227 * Fix 'visibility attribute not supported' GCC warning (IBM AIX)
2228 * Fix CMake warning about CMP0054 by unquoting instances of HOST
2229 * Fix Cygwin64 build
2230 * Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
2231 * Fix Makefile.direct for Cygwin
2232 * Fix __alloc_size__ availability detection (Clang)
2233 * Fix abort message in GC_move_long_link
2234 * Fix and code refactoring of lock elision workaround (Linux/x64)
2235 * Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
2236 * Fix data race in GC_init_explicit_typing
2237 * Fix gc.mak regarding msvc_dbg and test (MSVC)
2238 * Fix missing error handling of pthread_attr_init/getstacksize
2239 * Fix missing error handling of pthread_mutex_init and cond_wait
2240 * Fix missing numeric casts in cord
2241 * Fix potential left shift overflows in finalize.c (64-bit targets)
2242 * Fix pthreads-win32 name in comments and documentation
2243 * Fix setup_mark_lock missing prototype
2244 * Fix unchecked fcntl() result
2245 * Fix unchecked pointer dereference in check_ints (gctest)
2246 * Fix unchecked pthread_join() result in threadkey_test
2247 * Fix unchecked sigdelset() result in pthread_support
2248 * Fix undefined PTRFREE/NORMAL in gc_inline.h
2249 * Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
2250 * Relax mark_mutex attribute needed to disable elision (Linux/x64)
2251 * Remove (deprecate) TODO file
2252 * Remove code duplication in GC_realloc
2253 * Remove duplicate new-line in OUT_OF_MEMORY message (cord)
2254 * Remove references to missing linux_threads.c from documentation
2255 * Revert "Move asm machine-dependent files to 'src' folder" (partly)
2256 * Support Android API level 21
2257 * Update compiler options in gc.mak (Win32)
2258 * Use mmap instead of sbrk (Hurd)
2259 * Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
2260 * Workaround 'identical expr on both sides of bitwise op' warning
2261 * Workaround Linux NTPL lock elision bug
2262 * Workaround false warning about unreachable code path
2263 * Workaround invalid '_end' symbol on Android clang 3.5+
2264 Also, includes 7.2g changes
2265
2266
2267 == [7.4.2] 2014-06-03 ==
2268
2269 * Add config option to use STGRTMIN-based signals for thread suspend/resume
2270 * Allow parallel mark to be enabled on powerpc-linux systems
2271 * Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
2272 * Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
2273 * Fix 'attribute declaration must precede definition' warning (clang-3.1)
2274 * Fix (enable) Cygwin-64 build
2275 * Fix GC_finalized_malloc failure on disclaim_test
2276 * Fix GC_sig_suspend initialization when non-constant SIGRTMIN used
2277 * Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
2278 * Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
2279 * Fix data roots registration for Android/x86 and NDK ARM 'gold' linker
2280 * Fix find stackbottom on BlueGene P/Q systems
2281 * Fix machdep .lo files path in configure (SPARC, IA-64)
2282 * Fix ok_init assignment (missing cast) in GC_new_kind_inner
2283 * Fix typos in names in AUTHORS and ChangeLog files
2284 * Remove barrett_diagram file duplicated by tree.html
2285 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
2286 * Restore contribution information for ancient releases in ChangeLog
2287 Also, includes 7.2f changes
2288
2289
2290 == [7.4.0] 2013-11-17 ==
2291
2292 * Add 'bytes reclaimed' counters to public GC_prof_stats_s
2293 * Add AArch64 (64-bit ARM) target support
2294 * Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality
2295 * Add GC_get_prof_stats[_unsafe]() to GC public API
2296 * Add GC_push_all/conditional() to GC public API
2297 * Add assertion on number_of_objs to GC_extend_size_map
2298 * Add assertion to GC_enable() ensuring no counter underflow
2299 * Add assertion to LOCK definition that lock is not already held
2300 * Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR
2301 * Add double-lock assertion to GC_acquire_mark_lock
2302 * Add manual POSIX fork handling support (Android)
2303 * Add note about 'pkg-config' solving problem with autoconf 2.68 or older
2304 * Add public GC_set/get_abort_func to replace default GC_on_abort
2305 * Add public GC_start_mark_threads() to allow parallel marker in fork child
2306 * Add public setter and getter for GC_push_other_roots
2307 * Add support of Android logger
2308 * Add tests for GC_register/move/unregister_long_link
2309 * Add thread suspend/resume signals public setters (POSIX threads)
2310 * Added long weakref support
2311 * Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h
2312 * Adjust README.md title and references to doc .html files in it
2313 * Adjust build scripts to enable additional test library in staticrootstest
2314 * Adjust logged messages in start_mark_threads and GC_thr_init
2315 * Adjust printf format specifiers in GC_print_trace
2316 * Allow not to rely on __data_start value (Linux)
2317 * Allow pthread_kill error code logging in GC_suspend/resume (debugging)
2318 * Allow to compile GC_inner_start_routine aside from extra/gc.c
2319 * Allow to omit libc atexit() call
2320 * Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
2321 * Better document GC_warn_proc in gc.h
2322 * Call GC_on_abort (with NULL argument) on exit(1)
2323 * Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats
2324 * Change policy regarding version numbers ("micro" part instead of "alpha")
2325 * Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style
2326 * Check GC_base result in GC_print_all_smashed_proc
2327 * Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)
2328 * Check traceable_allocator.allocate result before dereference in test_cpp
2329 * Code refactoring of GC_x_printf (move shared code to macro)
2330 * Convert readme to markdown
2331 * Default to use libc_stack_end in single-threaded GC on glibc targets
2332 * Define GC_VSNPRINTF internal macro in misc.c (code refactoring)
2333 * Define functions in darwin_semaphore.h as inline instead of static
2334 * Define old_bus_handler static variable only if used (Unix)
2335 * Detect dladdr() presence by configure
2336 * Disable find-leak GC_gcollect on GC abnormal EXIT
2337 * Do not define _setjmp/_longjmp macros in mach_dep.c
2338 * Do not duplicate android_log_write output to GC log file (Android)
2339 * Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
2340 * Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
2341 * Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified
2342 * Elaborate comment on dependencies in autogen.sh
2343 * Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots
2344 * Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
2345 * Eliminate 'uninitialized variable use' warning in test_printf (cord)
2346 * Eliminate 'unused result' compiler warning in main() of test_cpp
2347 * Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
2348 * Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX)
2349 * Eliminate Clang warning for GC_pthread_exit attribute
2350 * Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
2351 * Eliminate GCC warning in GC_get_main_stack_base (OpenBSD)
2352 * Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app
2353 * Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion
2354 * Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
2355 * Eliminate warning and simplify expression in GC_init_explicit_typing
2356 * Enable 'force GC at every GC_malloc' debug-related functionality
2357 * Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
2358 * Enable prefetch operations by default (GCC 3.0+)
2359 * Enable staticrootstest for the case of GC shared library build
2360 * Enable thread-local allocation support for Clang on Cygwin
2361 * Explicitly specify that Darwin, Linux and Solaris platforms have dladdr
2362 * Fix ABORT definition for mingw32ce (WinCE)
2363 * Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1
2364 * Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
2365 * Fix GC_INIT_CONF_ROOTS in gc.h for Android
2366 * Fix GC_INLINE definition to comply with ISO C90 standard (GCC)
2367 * Fix GC_remove_all_threads_but_me for Android (fork support)
2368 * Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
2369 * Fix dyn_load.c compilation for Android 4.3
2370 * Fix make disclaim_test to link with new GNU ld linking rules
2371 * Improve GC error printing atomicity in GC_debug_X and GC_print_obj
2372 * Improve GC output atomicity in GC_print_obj, GC_print_all_errors
2373 * Improve debug-only messages of add/remove_roots and init_linux_data_start
2374 * Improve fork test logging in gctest
2375 * Improve logged messages about heap size and usage
2376 * Improve logging for Android differentiating messages by log level
2377 * Improve staticrootstest (add global data to library, add lib w/o GC_INIT)
2378 * Improve staticrootstest checks (tests)
2379 * Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
2380 * Include proper header file in 'tools' for configuration macros
2381 * Include pthread_np.h from pthread_stop_world.c on OpenBSD
2382 * Log error messages to stderr instead of stdout in tests
2383 * Make GC_generic_malloc_ignore_off_page() public
2384 * Make GC_mark_lock_holder variable static
2385 * Make GC_print_trace always thread-safe and remove 'lock' argument
2386 * Mark GC_started_thread_while_stopped() as GC_INNER
2387 * Minimize code duplication in GC_mark_and_push
2388 * Move 'include setjmp.h' from mach_dep.c to gc_priv.h
2389 * Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)
2390 * Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
2391 * Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer
2392 * Port BDWGC to Android/x86
2393 * Postpone the suspend signal in GC_dirty_init only if used to stop world
2394 * Prepend '#' symbol to GC number in logged messages
2395 * Prevent POSIX fork if mprotect_thread is started (Darwin)
2396 * Prevent abort on GC_err/warn_printf write failure
2397 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
2398 * Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined
2399 * Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC)
2400 * Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h
2401 * Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
2402 * Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h
2403 * Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD
2404 * Remove DebugBreak on WriteFile failure (Win32)
2405 * Remove GC_BUILD definition from build scripts
2406 * Remove abort on open log failure from GC_write (Win32)
2407 * Remove configure.ac outdated revision number
2408 * Remove nested EXPECT in GC_core_finalized_malloc
2409 * Remove nested always-false ifdef for HPUX and FREEBSD
2410 * Remove redundant GC_err_printf before abort
2411 * Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)
2412 * Rename subthread_create to subthreadcreate_test (Makefile)
2413 * Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages
2414 * Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()
2415 * Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
2416 * Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world
2417 * Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
2418 * Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF
2419 * Replace sprintf with defensive snprintf
2420 * Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning)
2421 * Simplify LOCK/UNLOCK macro definition for static code analysis tools
2422 * Specify GC_malloc result is unused in some tests
2423 * Specify GC_pthread_join result is unused in threadkey_test
2424 * Specify LT_INIT in configure.ac
2425 * Start of port to QNX
2426 * Support rthreads introduced in OpenBSD 5.2+
2427 * Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
2428 * Tag GC malloc routines with alloc_size attribute for Clang 3.2+
2429 * Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code
2430 * Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING
2431 * Turn on world-stop delay logging at debug level by default for Android
2432 * Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
2433 * Use GC_log_printf for logging instead of GC_[err_]printf
2434 * Use compiler TLS for Android NDK gcc/arm
2435 * Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning)
2436 * Use pthread API to operate thread-local data on Linux if no compiler TLS
2437 * Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h
2438 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
2439 Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes
2440
2441
2442 == [7.3alpha2] 2012-05-11 ==
2443
2444 * Add 'const' qualifier to pointer argument of some API functions
2445 * Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
2446 * Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API
2447 * Add GC_is_heap_ptr, GC_move_disappearing_link to GC API
2448 * Add SHORT_DBG_HDRS macro template to configure
2449 * Add Symbian port to mainline (porting done by Djamel Magri)
2450 * Add TODO file
2451 * Add assertion ensuring proper alignment of 'pushed' GC symbols
2452 * Add assertion in GC_getspecific on qtid
2453 * Add assertion to GC_incremental_protection_needs, refine documentation
2454 * Add assertion to check GC_large_free_bytes by GC_finish_collection
2455 * Add configure option to compile all library .c files into single gc.o
2456 * Add cordtest to make check
2457 * Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM)
2458 * Add finalization.html to 'doc' folder
2459 * Add javaxfc.h to the installation set of GC header files (configure)
2460 * Add on-heap-resize event notification to API
2461 * Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
2462 * Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
2463 * Allow GC_exclude_static_roots() region start to be unaligned
2464 * Allow Win32 DllMain chaining on the client side
2465 * Allow to exclude finalization support by GC_NO_FINALIZATION macro
2466 * Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin
2467 * Avoid unnecessary GC_find_limit invocation if GC_no_dls
2468 * Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest
2469 * Cast pointers to word (instead of unsigned long) in specific.h
2470 * Changed the order in autogen.sh so ltmain exists in time for automake
2471 * Declare privately and use handy GC_base_C() for constant object pointers
2472 * Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW)
2473 * Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off
2474 * Do not compile backgraph.c unless configure '--enable-gc-debug'
2475 * Do not compile pthread_stop_world.c for Cygwin/Darwin (configure)
2476 * Do not install ancient new_gc_alloc.h broken for modern STL (configure)
2477 * Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
2478 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
2479 * Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32)
2480 * Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation)
2481 * Extend thread-related debug messages
2482 * Fix 'configure --enable-cplusplus' for Cygwin/MinGW
2483 * Fix DATASTART (and other minor improvements) for NaCl target
2484 * Fix GC_setspecific to prevent garbage collection inside
2485 * Fix compiler warning in cordtest
2486 * Fix minor warnings reported by GCC with '-pedantic' option
2487 * Fix static data roots registration on Android (if GC is shared)
2488 * Implement GC_get_stack_base for Darwin for single-threaded mode
2489 * Improve GC_allochblk algorithm of block splitting when unmapping enabled
2490 * Improve GC_collect_or_expand algorithm for many finalizers registered case
2491 * In tests, print a message in case a test is a no-op
2492 * Instruct configure to hide internal libgc.so symbols if supported by GCC
2493 * Log amount of unmapped memory (if enabled) on marking-for-collection
2494 * Make __data_start a weak symbol to allow loading modules on mips
2495 * Move "cord" library tests to "cord/tests" folder
2496 * Move asm machine-dependent files to "src" folder
2497 * Move build tools sources to "tools" folder
2498 * Move cord_pos.h to public headers folder
2499 * Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin)
2500 * Optimize some functions by moving pthread_self calls out of LOCK section
2501 * Place only major per-release changes description to ChangeLog (this file)
2502 * Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin)
2503 * Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
2504 * Remove all auto-generated files from the repo
2505 * Remove binary icon file for de_win
2506 * Remove cordtest from "cord" library
2507 * Remove duplicate MacOS_Test_config.h file
2508 * Remove gc_amiga_redirects.h (included internally) from public headers
2509 * Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure)
2510 * Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX
2511 * Remove unsupported MMAP_STACKS (specific to Solaris threads)
2512 * Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros
2513 * Replace ARGSUSED comment-based annotation with GCC 'unused' attribute
2514 * Replace GC_ms_entry declaration with opaque definition for public API
2515 * Replace long GC_markers global variable with int GC_markers_m1
2516 * Replace pointer relational comparisons with non-pointer ones
2517 * Replace printf PRIxMAX specifier with '%p' for thread id debug output
2518 * Require autoconf 2.61 instead of v2.64
2519 * Simplify autogen.sh (use autoreconf)
2520 * Split GC_abort with GC_on_abort and abort() invoked from ABORT
2521 * Support GC_ATTR_MALLOC for MS VisualStudio
2522 * Tag auxiliary malloc-like API functions with 'malloc' attribute
2523 * Tag deprecated variables in GC API
2524 * Tag must-be-non-null arguments of GC API functions
2525 * Turn on "extra" GCC warnings
2526 * Turn on unused-parameter checking for GCC
2527 * Update AUTHORS file
2528 * Use EXPECT for checking various 'initialized' boolean variables
2529 * Use USE_COMPILER_TLS on Cygwin
2530 * Use pthread_key for thread-local storage on FreeBSD
2531 * Use union of AO_t and word to favor strict-aliasing compiler optimization
2532 Also, includes 7.2 changes
2533
2534
2535 == [7.2u] 2026-02-04 ==
2536
2537 * Change cord function declaration style from K-R to ANSI C
2538 * Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
2539 * Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
2540 * Fix 'KERN_PROTECTION_FAILURE while world is stopped' error on MacOS X
2541 * Fix 'reserved' argument handling in DllMain
2542 * Fix 'undefined errno' compiler error in strdup/strndup on WinCE
2543 * Fix a cycle in NORMAL freelist if malloc is redirected on Linux
2544 * Fix GC_push_stack_for() to push also Xmm registers on Windows/x64
2545 * Fix missing new-line in help message of console variant of cord/de
2546 * Fix race in DllMain by deferring delete_thread call to GC_start_world
2547 * Fix SIGSEGV if pthread_detach is called before collector initialization
2548 * Fix typos (about getcontext) in printed message in setjmp_test
2549 * Fix various typos in comments and documentation
2550 * Prevent collection if fork from an unregistered thread
2551 * Prevent GetThreadContext failure (Windows)
2552 * Refactoring of WoW64 workaround (Win32)
2553 * Refine USE_PROC_FOR_LIBRARIES macro documentation for Solaris
2554 * Remove dummy GC_noop call from code visible to Lint tool only
2555 * Remove part of DllMain-specific code which is always disabled (Windows)
2556 * Remove unused GC_VERSION in configure
2557 * Remove unused redefinition of GC_free in gctest
2558 * Replace var-args GC_noop with fixed-args one
2559 * Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
2560 * Use GC_noop1 instead of GC_noop in GC_pause and remove duplicate GC_noop1
2561
2562
2563 == [7.2t] 2025-10-17 ==
2564
2565 * Add missing test_cpp dependency on gc_allocator.h in build scripts
2566 * Allocate non-executable memory by default (CMake)
2567 * Do not produce '-lpthread' by threadlibs on Tru64/OSF1
2568 * Fix 'symbol undefined _snprintf' dmc linker error in cordtest
2569 * Fix 'undefined STACKBOTTOM' preprocessor error for no-OS PowerPC target
2570 * Fix (enable) Cygwin-64 build
2571 * Fix blocked signals in fork_prepare_proc on HP/UX
2572 * Fix CMake build on macOS Catalina
2573 * Fix missing parentheses in SIG_THR_RESTART macro definition
2574 * Fix print_heap_obj call with the lock held in backgraph add_edge
2575 * Fix rounding up in STACKBOTTOM for OSF1
2576 * Fix symbols alignment checking for CRIS and M68K
2577 * Fix undefined reference to GC_objfreelist and GC_bytes_allocd
2578 * Fix various typos in comments and documentation
2579 * Remove improper comment about returned value of CORD_extend_path
2580 * Remove outdated comment about 'make distcheck' from Makefile.am
2581 * Update URLs in documentation after repo transfer to bdwgc organization
2582 * Workaround tests crash if mprotect-based VDB is manually selected (bcc)
2583
2584
2585 == [7.2s] 2024-09-06 ==
2586
2587 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
2588 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
2589 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
2590 * Eliminate warning and simplify expression in GC_init_explicit_typing
2591 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
2592 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
2593 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
2594 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
2595 * Fix GC_jmp_buf multiple definition
2596 * Fix GC_print_trace_inner to print the last element of the circular buffer
2597 * Fix double lock in GC_malloc called from backtrace()
2598 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
2599 * Fix null pointer dereference in GC_is_visible if type_descr is null
2600 * Fix per_object_helper() after changing hb_sz units
2601 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
2602 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
2603 * Fix potential address overflow in GC_add_to_heap
2604 * Fix potential buffer overrun during read in GC_text_mapping
2605 * Fix typos in comments
2606 * Prevent compiler warnings regarding unused argument and printf in extra
2607 * Prevent redirected malloc call from a garbage collection routine
2608 * Remove barrett_diagram file duplicated by tree.html
2609 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
2610 * Resolve GCC warning in setjmp_t.c
2611 * Update and fix diagrams describing the tree structure for pointer lookups
2612
2613
2614 == [7.2r] 2024-02-03 ==
2615
2616 * Fix 'g++ not found' error on OpenBSD (Makefile.direct)
2617 * Fix 'implicit declaration of iscntrl()' warning in cord/de_win (MinGW)
2618 * Fix 'info' buffer potential overrun in GC_save_callers
2619 * Fix 'missing sysconf() prototype' gcc error in setjmp_t tool (OpenBSD)
2620 * Fix SVR4 macro definition order
2621 * Fix asm constraint in LONG_MULT for gcc/x86
2622 * Fix assertion violation in GC_get_maps on Linux if malloc redirection
2623 * Fix bitwise negation and rounding direction in setjmp_t tool
2624 * Fix closing bracket placement for case statement in configure
2625 * Fix indent of a closing curly brace in GC_forward_exception
2626 * Fix missing outermost parentheses in CORD_pos_cur_char_addr
2627 * Fix missing type widening before left shift in GC_MAKE_PROC
2628 * Fix misspelled GC_HEADERS_H macro in gc_priv.h
2629 * Fix null dereference in check_finalizer_nested if redirect malloc on Linux
2630 * Fix posix_memalign() to overwrite pointer storage only on success
2631 * Fix skipped removal of page protection in case of address hash collision
2632 * Fix typos in comments
2633 * Fix update of last_back_trace_gc_no if KEEP_BACK_PTRS is not defined
2634
2635
2636 == [7.2q] 2023-05-25 ==
2637
2638 * Fix CORD_next() indent inside loop in test_basics() of cordtest
2639 * Fix DCL_LOCK_STATE placement in GC_set_oom_fn
2640 * Fix GC_excl_table overrun on overflow in GC_exclude_static_roots
2641 * Fix IRIX5 defined wrongly on Tandem S-Series and WinCE/mips
2642 * Fix comparisons to heap boundary in GC_get_back_ptr_info and GC_mark_from
2643 * Fix disabling of automatic dynamic libraries registration
2644 * Fix double initialization of main thread local free lists on Win32
2645 * Fix joinable threads shutdown on NaCl
2646 * Fix loop condition over dll_thread_table in GC_lookup_pthread (Win32)
2647 * Fix missing GC_CALLBACK for GC_waitForSingleObjectInfinite
2648 * Fix missing libalphagc.so dependency in Makefile.direct
2649 * Fix missing result check of pthread_attr_getdetachstate in pthread_create
2650 * Fix overlapping region assertion in mark_some if malloc redirect on Linux
2651 * Fix potential SIGSEGV on out-of-memory in gctest
2652 * Fix typos in comments and documentation
2653 * Fix unregistering of thread created by intercepted pthread_create on NaCl
2654 * Fix use of unset errno after pthread_create call
2655 * Invoke GC_oom_fn if GC_make_array_descriptor failed because of no memory
2656
2657
2658 == [7.2p] 2022-08-25 ==
2659
2660 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
2661 * Define SUNOS5SIGS macro for kFreeBSD
2662 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
2663 * Ensure typed objects descriptor is never located in the first word
2664 * Fix GC_make_descriptor for zero length argument
2665 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
2666 * Fix assertion violation in GC_allow_register_threads on Windows
2667 * Fix get_maps failure when GC_repeat_read returns zero
2668 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
2669 * Fix missing lock when GC_generate_random_valid_address is called
2670 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
2671 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
2672 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
2673 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
2674 * Fix race between calloc_explicitly_typed and push_complex_descriptor
2675 * Fix typos in comments of .c files, gc.h and a typo in debugging.html
2676 * Refer to Makefile.direct instead of deleted Makefile file in README
2677 * Remove checking of RS6000 completely
2678 * Remove non-working check of M68K in gctest
2679 * Revert addition of msvc_dbg.h in include.am
2680
2681
2682 == [7.2o] 2021-09-28 ==
2683
2684 * Add loop to handle abort error like in suspend logic on Darwin
2685 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
2686 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
2687 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
2688 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
2689 * Fix 'expected function body after declarator' clang error in gc_cpp.cc
2690 * Fix 'write to GC log failed' error
2691 * Fix GC_proc_fd value in child process at fork (Solaris)
2692 * Fix assertion violation in register_dynlib_callback on Android
2693 * Fix configure message about 'AIX gcc optimization fix'
2694 * Fix data race regarding *rlh value in generic_malloc_many
2695 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
2696 * Fix fread failure after enable_incremental if malloc is redirected (Linux)
2697 * Fix gc_cflags variable name in configure (HP/UX)
2698 * Fix handling of areas smaller than page size on recycle scratch area
2699 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
2700 * Fix misaligned tlfs passed to AO_load on m68k
2701 * Fix missing GC_quiet declaration in pcr_interface.c
2702 * Fix missing gc_dlopen.c in CMake script
2703 * Fix missing scratch_last_end_ptr update (Irix)
2704 * Fix overflow of scratch_free_ptr value
2705 * Fix page_was_[ever_]dirty() for static roots (Solaris)
2706 * Fix printf format specifier in simple_example.html
2707 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
2708 * Fix various typos in comments and documentation files
2709 * Fix word size, data start and alignment for OpenBSD/mips64(el)
2710 * Prevent WARN of incompatible incremental GC if default or manual VDB
2711 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
2712 * Remove a misleading comment about Solaris in gc.h
2713
2714
2715 == [7.2n] 2019-03-01 ==
2716
2717 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
2718 * Fix 'unexpected mark stack overflow' abort in push_all_stack
2719 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
2720 * Fix GetThreadContext stale register values use if WoW64 (Win32)
2721 * Fix executable memory allocation in GC_unix_get_mem
2722 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
2723
2724
2725 == [7.2m] 2018-12-11 ==
2726
2727 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
2728 * Fix hbp overflow in GC_install_counts
2729 * Fix start_world not resuming all threads on Darwin
2730 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
2731
2732
2733 == [7.2l] 2018-08-10 ==
2734
2735 * Fix 'pointer arithmetic with NULL' code defect in print_callers
2736 * Fix Borland version in documentation to match that in BCC_MAKEFILE
2737 * Fix comment about inv_sz computation in setup_header
2738 * Fix comments style in configure.ac and Makefile.am
2739 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
2740 * Fix global operator delete definition for C++14 in gc_cpp
2741 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
2742 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
2743 * Fix mark stack overflow checking in push_selected
2744 * Fix MSWIN32 macro redefinition (WCC)
2745 * Fix potential null dereference in GC_CONS
2746 * Fix register_dynamic_libraries on Windows 10
2747 * Fix result computation in n_set_marks
2748 * Fix return type in GC_set_warn_proc API documentation
2749 * Fix typo in comment for CORD_ec_flush_buf prototype
2750 * Fix typos in ChangeLog
2751 * Fix VirtualQuery call in case of malloc failure (Win32)
2752 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
2753 * Perform thread_suspend in loop as it may be interrupted (Darwin)
2754 * Workaround 'template-id not supported in this context' compiler error (WCC)
2755
2756
2757 == [7.2k] 2018-04-19 ==
2758
2759 * Fix arguments delimiter in pcr_interface.c (PCR)
2760 * Fix assertion violation in DllMain of win32_threads
2761 * Fix data race during apply_to_each_object(reset_back_edge)
2762 * Fix dbg_mlc.c/o file name in documentation
2763 * Fix include gc_gcj.h in thread_local_alloc.c
2764 * Fix man section number (3)
2765 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
2766 * Fix missing SIGBUS handler setup for kFreeBSD
2767 * Fix null dereference in print_callers on backtrace_symbols failure
2768 * Fix the collector hang when it is configured with --enable-gc-debug
2769 * Fix thread_suspend fail for threads registered from key destructor (OS X)
2770 * Fix typo in AIX macro name
2771 * Fix typo in comment in specific.h
2772
2773
2774 == [7.2j] 2018-01-21 ==
2775
2776 * Fix GC allocation mutex in child after a fork
2777 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
2778 * Fix libgc version which was changed in linkage breaking way
2779 * Fix missing EOLn output in threadlibs tool
2780
2781
2782 == [7.2i] 2017-12-21 ==
2783
2784 * Avoid data race in finalized_count (gctest)
2785 * Fix assertion violation about disabled cancel in try_to_collect_inner
2786 * Fix data race in a list referenced by A.aa (gctest)
2787 * Fix data race in do_local_mark when comparing active_count to helper_count
2788 * Fix data race in GC_init_explicit_typing
2789 * Fix data race in last_stop_count access (suspend_handler_inner)
2790 * Fix data race in mark_thread when updating mark_no
2791 * Fix data race when getting object size in explicitly-typed allocators
2792 * Fix lack of barriers to synchronize memory for suspend_handler
2793 * Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
2794 * Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)
2795
2796
2797 == [7.2h] 2017-10-12 ==
2798
2799 * Add gctest as a test (CMake)
2800 * Change no-argument functions declaration style to ANSI C (extra files)
2801 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
2802 * Ensure oom_fn callback executed on out-of-memory in calloc
2803 * Fix '~' operator application to unsigned values shorter than word
2804 * Fix 'context local variable might be clobbered by setjmp' compiler warning
2805 * Fix 'doc' files installation folder
2806 * Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
2807 * Fix ALL_INTERIOR_POINTERS name in comments and documentation
2808 * Fix AO_SRC_DIR target name in NT_*_MAKEFILE
2809 * Fix assertion in GC_mark_from for non-heap regions
2810 * Fix assertion in GC_steal_mark_stack for non-heap regions
2811 * Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
2812 * Fix assertion violation in GC_wait_builder called from start_mark_threads
2813 * Fix assertion violation in mark_local checking GC_mark_stack_top
2814 * Fix assertion violation in return_single_freelist in child process
2815 * Fix bm_huge initialization for 64-bit targets (gctest)
2816 * Fix broken external links in documentation
2817 * Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
2818 * Fix calloc_explicitly_typed in case of lb*n overflow
2819 * Fix CMake warning about CMP0054 by unquoting instances of HOST
2820 * Fix conditional expression in pos_fetch, next non-macro definitions (cord)
2821 * Fix configure --disable-munmap handling
2822 * Fix CORD_substr_closure for the case when CORD_from_fn returns C string
2823 * Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
2824 * Fix double lock in pthread_detach (Cygwin, winpthreads)
2825 * Fix double multiplication of lb by n in calloc_explicitly_typed
2826 * Fix enable_parallel_mark condition in CMake script
2827 * Fix external libatomic_ops pkg-config-based detection
2828 * Fix gc_allocator.h file name in new_gc_alloc.h comment
2829 * Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
2830 * Fix gc_cleanup destructor for non-heap objects (gc_cpp)
2831 * Fix GC_collect_or_expand to prevent allocation size value wrap-around
2832 * Fix GC_incremental declaration/definition type mismatch
2833 * Fix GC_mark_stack_top assertion violation properly in mark_local
2834 * Fix GC_remove_specific invocation from remove_all_threads_but_me
2835 * Fix GC_requested_heapsize increment in GC_init
2836 * Fix GC_setspecific to prevent garbage collection inside
2837 * Fix GC_SIZE_MAX definition (Linux/musl-gcc)
2838 * Fix GCJ support in CMake build script
2839 * Fix gctest crash if configure --enable-handle-fork on Darwin
2840 * Fix get_maps on proc maps file asynchronous growth
2841 * Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ
2842 * Fix header filename in gcconfig.h comment
2843 * Fix infinite mark_some calls after memory mapping disappeared (Glibc)
2844 * Fix integer shift undefined behavior in GC_init_explicit_typing
2845 * Fix leak_test crash in print_callers if free() is redirected
2846 * Fix Makefile.direct recursive invocation
2847 * Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
2848 * Fix missing win32_threads.c compilation for Cygwin (CMake)
2849 * Fix MS VC warning about compiling unused checksums and thread_local_alloc
2850 * Fix name typos in GC_FAST_MALLOC_GRANS comment
2851 * Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
2852 * Fix OSF1 host pattern in CMakeLists.txt
2853 * Fix PCR-Makefile by removing compilation of a missing file
2854 * Fix potential data race in GC_SysVGetDataStart (SPARC)
2855 * Fix potential integer overflow in GC_find_limit_* functions
2856 * Fix printf arguments type in print_callers
2857 * Fix pthread_detach for threads not yet registered (Cygwin, winpthreads)
2858 * Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads)
2859 * Fix pthread_join when thread is registered in thread key destructor
2860 * Fix push_complex_descriptor to avoid unlimited global mark stack growth
2861 * Fix removal of dead threads in a child process
2862 * Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
2863 * Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME
2864 * Fix Solaris/sparc detection in case of strict C compliance is enforced
2865 * Fix STACKBOTTOM for Solaris 11/x86
2866 * Fix storage class of local variable in register_dynamic_libraries (Irix)
2867 * Fix tools/setjmp_t hang (OS X)
2868 * Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
2869 * Fix undefined HEAP_START in register_dynamic_libraries
2870 * Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32
2871 * Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h
2872 * Fix various typos in comments, documentation and printed messages
2873 * Handle load_segs overflow in register_dynlib_callback gracefully
2874 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
2875 * Replace (fix) 'objs' acronym in comments with 'objects' word
2876 * Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
2877 * Update documentation about bugs reporting and new releases notification
2878 * Update Download information in GC overview document
2879 * Update shared libraries version info (v7.2)
2880 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
2881 * Workaround missing getcontext() in Docker osrf/ubuntu_32bit
2882
2883
2884 == [7.2g] 2016-05-23 ==
2885
2886 * Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
2887 * Fix 'implicit declaration of function' compiler warnings in cord/de
2888 * Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
2889 * Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)
2890 * Fix GC initialization in cord de_win for Cygwin
2891 * Fix GC_get_stack_base if called before GC_init (Win32)
2892 * Fix OSX issue with pthread_attr_setstacksize failure
2893 * Fix Unicode Win32 API calls in cord de_win
2894 * Fix USE_COMPILER_TLS macro duplicate description in README
2895 * Fix cord de_win WndProc prototype parameters for 64-bit (Win64)
2896 * Fix file descriptor resource leak in GC_register_data_segments (OS/2)
2897 * Fix filename printing in cordtest
2898 * Fix missing cord_pos.h, ec.h among installed headers (Automake)
2899 * Fix missing GC_get_stack_base for Amiga
2900 * Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
2901 * Fix mistyped ARM_THREAD_STATE macro (Darwin/arm)
2902 * Fix null-pointer dereferences on out-of-memory in cord and tests
2903 * Fix potential multiplication overflow in check_heap_stats (gctest)
2904 * Fix race (and potential deadlock) at marker threads initialization
2905 * Fix signedness of char values passed to isspace, iscntrl, isxdigit
2906 * Fix typo (items numbering) in GC_finalize_all documentation
2907 * Fix typos in ERROR_FL, GC_malloc_uncollectable comments
2908 * Fix typos in gc_priv.h, in README for ews4800
2909 * Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)
2910 * Fix various spelling errors
2911 * Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX
2912 * Regenerate configure files using official libtool release (v2.4.2)
2913 * Remove documentation about obsolete GC_REDIRECT_TO_LOCAL
2914 * Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from
2915 * windows-untested: Fix paths to msvc_dbg.c/h
2916
2917
2918 == [7.2f] 2014-06-03 ==
2919
2920 * Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
2921 * Fix 'source file in a subdirectory' Automake warnings
2922 * Fix ABORT message in GC_restart_handler
2923 * Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
2924 * Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
2925 * Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap
2926 * Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
2927 * Fix GET_MEM argument rounding in GC_scratch_alloc and similar
2928 * Fix PARALLEL_MARK for Windows 7+
2929 * Fix build (broken by fenv.h inclusion) on Linux/x64 under uClibc
2930 * Fix crash when using GC_malloc_many() as first allocation call
2931 * Fix mark stack excessive growth during parallel mark
2932 * Fix or remove broken URLs in documentation
2933 * Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)
2934 * Fix typo in GC_collect_or_expand comment
2935 * Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes
2936 * Regenerate configure files by automake 1.14.1, libtool 2.4.2.418
2937 * Update emails/links due to project site and ML transition
2938
2939
2940 == [7.2e] 2013-11-10 ==
2941
2942 * Add weak attribute to avoid __data_start undefined messages (s390x)
2943 * Add weak stubs for pthread_cancel API
2944 * Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
2945 * Append _test suffix to 'initsecondarythread' binary file names
2946 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
2947 * Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
2948 * Fix GC_CreateThread 'dwStackSize' argument type for Win64
2949 * Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
2950 * Fix GC_clear_stack by declaring 'dummy' local array as volatile
2951 * Fix GC_get_stack_base assembly code (Cygwin/Clang)
2952 * Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
2953 * Fix GC_marker_Id elements initialization (WinCE)
2954 * Fix GC_print_trace missing unlock
2955 * Fix GC_unix_mmap_get_mem for open of /dev/zero failure
2956 * Fix GC_win32_free_heap compilation error for Cygwin
2957 * Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
2958 * Fix Win32 GC_write preventing potential infinite recursion at abort
2959 * Fix assertion violation in GC_mark_from prefetch loop
2960 * Fix collection of objects referenced only from GC_mark_stack_X variables
2961 * Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
2962 * Fix heap sections overflow for Win32/Cygwin with enabled parallel marker
2963 * Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
2964 * Fix missing tabs in SMakefile.amiga file
2965 * Fix null-pointer dereference in CORD_substr_closure
2966 * Fix old_segv/bus_act variables initialization for FreeBSD
2967 * Fix potential double fclose in test_extras (cordtest)
2968 * Fix pthread_attr_t resource leak in pthread_create
2969 * Fix race in GC_print_all_errors regarding GC_leaked
2970 * Fix sizeof in GC_push_thread_structures
2971 * Fix stackbottom/stack_end assignment in GC_call_with_gc_active
2972 * Fix tests makefile to link with new GNU ld linking rules
2973 * Fix typos in comments and documentation
2974 * Fix unportable '==' test operators in configure
2975 * Fix vsprintf_args cleanup in CORD_vsprintf
2976 * Merge FreeBSD New ports collection for boehm-gc v7.2d
2977 * Replace GC_DBG_RA with GC_DBG_EXTRAS macro
2978 * Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file
2979 * Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)
2980
2981
2982 == [7.2d] 2012-08-09 ==
2983
2984 * Fix GC_call_with_stack_base to prevent its tail-call optimization
2985 * Fix all address-of-dummy operations by using GC_approx_sp() instead
2986 * Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
2987 * Fix test_cpp (ensure the collector recognizes pointers to interiors)
2988 * Fix thread-related tests for pthreads-w32
2989 * test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
2990
2991
2992 == [7.2c] 2012-06-11 ==
2993
2994 * Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory
2995 * Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
2996 * Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
2997 * Fix visibility of GC_clear/set_mark_bit (unhide symbols)
2998 * Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols
2999
3000
3001 == [7.2b] 2012-05-23 ==
3002
3003 * Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
3004
3005
3006 == [7.2] 2012-05-11 ==
3007
3008 * Abort in GC_thr_init on pthread_atfork failure (POSIX threads)
3009 * Add GC_WIN32_PTHREADS target in configure
3010 * Add GC_is_disabled new function to GC API
3011 * Add info that getcontext() resets FPE mask no longer on Linux/x64
3012 * Add public GC_set_handle_fork to control forked child handling support
3013 * Add realloc_test.c test
3014 * Add support for Hexagon target
3015 * Add thread-safe GC_get_heap_usage_safe to GC API
3016 * Change GC_check_fl_marks prototype and implementation
3017 * Check pthread_create/join result in test
3018 * Define GC_DLL (in configure) if building only dynamic libraries
3019 * Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set
3020 * Disable incremental mode on Darwin if fork handling requested
3021 * Enable parallel marker in configure for Solaris
3022 * Fix "comparison of signed and unsigned values" compiler warnings
3023 * Fix 'volatile' keyword placement in GC_SysVGetDataStart
3024 * Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target
3025 * Fix GC_READ_ENV_FILE code for Cygwin
3026 * Fix GC_add_roots_inner for Mac OS X (align segment start)
3027 * Fix GC_check_fl_marks regarding concurrent access
3028 * Fix GC_finalizer_nested size to workaround alignment problem in Watcom
3029 * Fix GC_find_limit_with_bound to always reset fault handler on return
3030 * Fix GC_init static assertion for clang/x64 (Darwin)
3031 * Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection
3032 * Fix GC_push_all/selected boundaries check
3033 * Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
3034 * Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
3035 * Fix GC_restart_handler to preserve errno if needed
3036 * Fix GC_root_size update in GC_add_roots_inner (Win32)
3037 * Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32)
3038 * Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
3039 * Fix calloc, GC_generic_malloc to check for allocation size overflows
3040 * Fix compiler warning in GC_dyld_image_add/remove (Darwin)
3041 * Fix configure --enable-cplusplus make install
3042 * Fix configure to disable GCC aliasing optimization unless forced to
3043 * Fix duplicate definitions in gcconfig.h for NetBSD
3044 * Fix fork() support on Cygwin and Darwin targets
3045 * Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS
3046 * Fix gc_cpp.cc for Cygwin (remove duplicate function definition)
3047 * Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
3048 * Fix gcconfig.h to handle mips64-linux target
3049 * Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
3050 * Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6
3051 * Fix tests to check GC_malloc result for NULL (out-of-memory)
3052 * Fix thread model in configure for MinGW ("win32" instead of "posix")
3053 * Fix various warnings reported by LINT-like tools
3054 * Fix visibility of some GC internal symbols used by GNU GCJ currently
3055 * Port some thread tests to Win32
3056 * Refine API GC setters and getter comments regarding locking
3057 * Refine GC_stackbottom description in gc.h
3058 * Remove duplicate calls in GC_register_dynamic_libraries
3059 * Remove locking in API GC_get_bytes_since_gc and friends
3060 * Remove newly-added GC_get_heap_size/free_bytes_inner from API
3061 * Remove some local variables that are unused
3062 * Support multi-threading for RTEMS target
3063 * Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning
3064 * Use pkg-config to pick up libatomic_ops, etc
3065 * Workaround some Linux/arm kernels bug to get correct GC_nprocs value
3066
3067
3068 == [7.2alpha6] 2011-06-14 ==
3069
3070 * configure_atomic_ops.sh: Remove.
3071 * Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
3072 * Makefile.am (EXTRA_DIST): Add autogen.sh.
3073
3074 * NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
3075 filename passed.
3076 * NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
3077 extension.
3078 * NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
3079 * NT_MAKEFILE (.cpp.obj): Likewise.
3080
3081 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
3082 GC_traverse_back_graph): Move prototype to gc_priv.h.
3083 * checksums.c (GC_page_was_ever_dirty): Likewise.
3084 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
3085 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
3086 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
3087 GC_get_next_stack): Likewise.
3088 * finalize.c (GC_reset_finalizer_nested,
3089 GC_check_finalizer_nested): Likewise.
3090 * gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
3091 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
3092 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
3093 * misc.c (GC_register_main_static_data, GC_init_win32,
3094 GC_setpagesize, GC_init_linux_data_start,
3095 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
3096 GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
3097 GC_bl_init_no_interiors): Likewise.
3098 * os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
3099 Likewise.
3100 * reclaim.c (GC_check_leaked): Likewise.
3101 * win32_threads.c (GC_gww_dirty_init): Likewise.
3102 * darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
3103 GC_mprotect_resume): Move prototype to darwin_stop_world.h.
3104 * pthread_support.c (GC_FindTopOfStack): Likewise.
3105 * dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
3106 * mark.c (GC_page_was_ever_dirty): Remove (as already declared).
3107 * mark_rts.c (GC_roots_present): Change return type to void
3108 pointer (to match the prototype); return NULL instead of FALSE.
3109 * mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
3110 * os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
3111 * os_dep.c (GC_write_fault_handler): Make STATIC.
3112 * os_dep.c (GC_set_write_fault_handler): New function (only if
3113 GC_WIN32_THREADS).
3114 * pthread_start.c (GC_start_rtn_prepare_thread,
3115 GC_thread_exit_proc): Move prototype to pthread_support.h.
3116 * pthread_support.c (GC_nacl_initialize_gc_thread,
3117 GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
3118 Likewise.
3119 * pthread_support.c (GC_stop_init): Move prototype to
3120 pthread_stop_world.h.
3121 * win32_threads.c (GC_write_fault_handler): Remove prototype.
3122 * win32_threads.c (GC_register_my_thread_inner): Call
3123 GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
3124 (only if MPROTECT_VDB).
3125 * doc/README.win32: Add information about DMC.
3126 * include/private/gc_priv.h (GC_set_write_fault_handler): New
3127 prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
3128
3129 * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
3130
3131 * win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
3132 instead of FINISHED macro.
3133 * tests/test.c (check_heap_stats): Round up max_heap_sz value for
3134 Win32 (same as for USE_MMAP).
3135
3136 * tests/test.c (check_heap_stats): Adjust printf format specifier
3137 for max_heap_sz; cast max_heap_sz accordingly.
3138
3139 * doc/README.solaris2: Add note.
3140
3141 * configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
3142 Solaris/x86 2.10+.
3143
3144 * tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
3145 defined; explicitly define for some targets.
3146
3147 * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
3148 * stubborn.c (GC_dirty): Likewise.
3149 * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
3150 PROC_VDB): Undefine if MANUAL_VDB.
3151 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
3152 MANUAL_VDB.
3153 * os_dep.c (async_set_pht_entry_from_index): Define for
3154 MANUAL_VDB.
3155 * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
3156 success; if ioctl() failed then just print warning instead of
3157 aborting.
3158
3159 * include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
3160 for line number printing.
3161
3162 * os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
3163 (for PROC_VDB only); print errors via GC_err_printf; rename "ps"
3164 and "np" local variables to npages and pagesize, respectively;
3165 remove "current_addr" local variable.
3166
3167 * os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
3168 for BeOS and OS/2; define HAVE_GET_STACK_BASE.
3169 * os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
3170 GC_get_main_stack_base implementation is defined.
3171 * os_dep.c (GC_get_main_stack_base): Define that based on
3172 GC_get_stack_base() in a single place (only if
3173 GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
3174 result.
3175
3176 * mark.c (GC_push_selected): Remove "push_fn" argument (use
3177 GC_push_all directly); update the documentation.
3178 * mark.c (GC_push_conditional): Simplify the code (for better
3179 readability).
3180
3181 * mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
3182 boolean local variables.
3183 * doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
3184 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
3185 GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
3186 place.
3187 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
3188 PHT_HASH(h) only once (store result to a local variable).
3189
3190 * doc/README.solaris2: Update.
3191
3192 * include/private/gcconfig.h (end, InitStackBottom): Declare
3193 extern variable for RTEMS.
3194 * include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
3195 Update (for RTEMS).
3196 * include/private/gcconfig.h (DATAEND): Fix a typo in the macro
3197 name (for RTEMS).
3198 * tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
3199 Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
3200
3201 * include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
3202 single-threaded environment.
3203
3204 * include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
3205 * tests/test.c (NUMBER_ROUND_UP): New macro.
3206 * tests/test.c (check_heap_stats): Round up total expected heap
3207 size to the nearest 4 MiB bound.
3208 * tests/test.c (check_heap_stats): Print the current and expected
3209 heap sizes in case of failure.
3210
3211 * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
3212 only if GC_print_stats; print errors using GC_err_printf.
3213 * checksums.c (GC_check_blocks): Join adjacent printf() calls into
3214 a single one.
3215
3216 * pthread_support.c (pthread_join): Add assertion (check thread is
3217 finished).
3218 * pthread_support.c (GC_register_my_thread): Don't detach the
3219 thread if invoked from the thread destructor.
3220 * win32_threads.c (GC_register_my_thread): Likewise.
3221 * win32_threads.c (GC_unregister_my_thread): Don't delete the
3222 thread (just set FINISHED) if the thread is not detached (only if
3223 GC_PTHREADS); add assertion (check the thread is not finished).
3224 * tests/threadkey_test.c (main): Join some created threads.
3225
3226 * pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
3227 variable to "t".
3228 * win32_threads.c (GC_delete_gc_thread): Likewise.
3229 * pthread_support.c (pthread_join, pthread_detach,
3230 pthread_cancel): Rename "thread_gc_id" local variable to "t".
3231 * win32_threads.c (GC_pthread_detach): Likewise.
3232 * win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
3233 variable.
3234 * win32_threads.c (GC_pthread_join): Rename "joinee" local
3235 variable to "t".
3236
3237 * pthread_stop_world.c (pthread_sigmask): Undefine even if not
3238 DEBUG_THREADS.
3239 * pthread_stop_world.c (GC_unblock_gc_signals): New function (only
3240 if GC_EXPLICIT_SIGNALS_UNBLOCK).
3241 * pthread_support.c (GC_unblock_gc_signals): New prototype.
3242 * pthread_support.c (GC_register_my_thread_inner,
3243 GC_register_my_thread): Call GC_unblock_gc_signals (only if
3244 GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
3245 * include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
3246 macro.
3247
3248 * pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
3249 "sig" local variables; rename my_thread local variable to "self".
3250
3251 * tests/threadkey_test.c (LIMIT): Use smaller value (don't create
3252 more than 30 in parallel by default).
3253
3254 * tests/threadkey_test.c (key_once, main): Work around for Solaris
3255 PTHREAD_ONCE_INIT.
3256 * tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
3257
3258 * dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
3259 variable.
3260 * pthread_support.c (GC_unregister_my_thread_inner): Revert back
3261 GC_remove_specific invocation; add a comment.
3262 * include/private/thread_local_alloc.h (GC_remove_specific):
3263 Revert back.
3264 * specific.c (slow_getspecific): Cast qtid to AO_t.
3265 * include/private/specific.h (key_create, setspecific,
3266 remove_specific): Remove "extern" keyword.
3267 * include/private/specific.h (getspecific): Change type of "qtid"
3268 local variable to unsigned long.
3269
3270 * pthread_support.c (GC_check_tls): Fix "#endif" comment.
3271 * include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
3272 * include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
3273 Remove redundant test of the macro.
3274
3275 * backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
3276 * os_dep.c (GC_set_and_save_fault_handler): Recognize
3277 SIGACTION_FLAGS_NODEFER_HACK macro.
3278 * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
3279 macro.
3280 * pthread_support.c (GC_acquire_mark_lock): Remove commented out
3281 code.
3282 * include/private/gc_priv.h (SUNOS5SIGS): Don't include
3283 sys/siginfo.h on Linux.
3284 * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
3285 recognized, force PREFETCH_FOR_WRITE to be defined on x86.
3286 * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
3287 macro recognized (for HP/UX).
3288
3289 * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
3290 GWW_VDB).
3291 * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
3292 resetting (for PROC_VDB).
3293
3294 * tests/threadkey_test.c: New file.
3295 * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
3296 * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
3297 New variable.
3298
3299 * pthread_support.c (GC_unregister_my_thread_inner): Don't call
3300 GC_remove_specific.
3301 * include/private/thread_local_alloc.h (GC_remove_specific):
3302 Remove (since it is empty for all targets).
3303 * pthread_support.c (GC_record_stack_base): New inline function.
3304 * win32_threads.c (GC_record_stack_base): Likewise.
3305 * pthread_support.c (GC_register_my_thread_inner): Invoke
3306 GC_record_stack_base.
3307 * win32_threads.c (GC_register_my_thread_inner): Likewise.
3308 * pthread_support.c (GC_register_my_thread): If thread is FINISHED
3309 then call GC_record_stack_base, clear FINISHED, initialize
3310 thread-local list and return success.
3311 * win32_threads.c (GC_register_my_thread): Likewise.
3312 * include/gc.h (GC_register_my_thread): Update documentation.
3313 * include/private/thread_local_alloc.h (GC_thread_key): Likewise.
3314
3315 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
3316 adjacent "#ifdef".
3317 * thread_local_alloc.c (GC_malloc_atomic): Call
3318 GC_core_malloc_atomic (instead of GC_core_malloc).
3319
3320 * pthread_start.c (GC_start_rtn_prepare_thread): Change return
3321 type to GC_thread.
3322 * pthread_start.c (GC_inner_start_routine): Pass the current
3323 thread descriptor to pthread_cleanup_push (same as in
3324 win32_threads.c).
3325 * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
3326 variable to "self".
3327 * win32_threads.c (GC_push_all_stacks): Likewise.
3328 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
3329 "my_thread" local variable to "self".
3330 * pthread_support.c (GC_unregister_my_thread_inner): New static
3331 function.
3332 * pthread_support.c (GC_unregister_my_thread,
3333 GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
3334 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
3335 GC_do_blocking_inner): Rename "t" local variable to "thread_id".
3336 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
3337 "id" local variable to "thread_id".
3338
3339 * pthread_support.c (GC_unregister_my_thread): Call pthread_self
3340 only once.
3341 * win32_threads.c (GC_pthread_start_inner): Likewise.
3342 * pthread_support.c (GC_unregister_my_thread): Add debug output.
3343 * win32_threads.c (GC_unregister_my_thread): Likewise.
3344 * pthread_support.c (GC_register_my_thread,
3345 GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
3346 to "self".
3347
3348 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
3349 unconditionally (do not test GC_I_HIDE_POINTERS); update the
3350 comment.
3351 * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
3352 GC_HIDE/REVEAL_POINTER, respectively.
3353 * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
3354 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
3355
3356 * include/gc.h (GC_register_my_thread): Refine the comment.
3357
3358 * include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
3359 parentheses.
3360 * include/gc_typed.h (GC_get_bit, GC_set_bit,
3361 GC_CALLOC_EXPLICITLY_TYPED): Likewise.
3362
3363 * include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
3364
3365 * include/private/gcconfig.h (NO_GETCONTEXT): Do not use
3366 getcontext(2) on m68k because it is not implemented there.
3367
3368 * alloc.c (GC_clear_a_few_frames): Use BZERO().
3369 * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
3370 * reclaim.c (GC_start_reclaim): Likewise.
3371 * blacklst.c (total_stack_black_listed): Remove "len" local
3372 variable.
3373 * dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
3374 statement with "do-while" one.
3375 * dyn_load.c (GC_register_dynamic_libraries,
3376 GC_register_dynlib_callback): Remove redundant parentheses.
3377
3378 * cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
3379 "unused result" compiler warning for fread().
3380
3381 * os_dep.c (GC_write_fault_handler): Break when in_allocd_block
3382 is set to true.
3383
3384 * dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
3385 return -1 if the object has (or had) debugging info but was
3386 marked deallocated.
3387 * include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
3388 * dbg_mlc.c (GC_has_other_debug_info): Update documentation;
3389 remove "ohdr" local variable.
3390 * dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
3391 probably been deallocated.
3392 * dbg_mlc.c (GC_debug_free): Don't actually free the object even
3393 in the leak-finding mode if GC_findleak_delay_free.
3394 * dbg_mlc.c (GC_check_leaked): New function (only unless
3395 SHORT_DBG_HDRS).
3396 * doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
3397 * doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
3398 * include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
3399 on 64-bit architectures.
3400 * include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
3401 parentheses.
3402 * include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
3403 GC_has_other_debug_info change).
3404 * include/private/gc_priv.h (GC_findleak_delay_free): New global
3405 variable declaration (unless SHORT_DBG_HDRS).
3406 * misc.c (GC_findleak_delay_free): New global variable; recognize
3407 GC_FINDLEAK_DELAY_FREE.
3408 * misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
3409 variable (unless SHORT_DBG_HDRS).
3410 * reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
3411 * reclaim.c (GC_add_leaked): Don't add the object to leaked list
3412 if marked as deallocated.
3413
3414 * dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
3415 comment.
3416 * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
3417 * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
3418 * dbg_mlc.c (GC_smashed): Refine documentation.
3419 * mark.c (GC_push_selected): Change dirty_fn return type to
3420 GC_bool.
3421 * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
3422 * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
3423 local variable.
3424 * reclaim.c (GC_reclaim_block): Pass true constant to
3425 GC_reclaim_small_nonempty_block (instead of report_if_found).
3426 * doc/README.autoconf: Update; fix a typo.
3427 * include/private/gcconfig.h (GC_WORD_C): New macro.
3428
3429 * dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
3430 * dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
3431 comment.
3432 * dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
3433 argument.
3434 * dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
3435 message to GC_print_smashed_obj.
3436 * dbg_mlc.c (GC_debug_free): Call GC_size once.
3437 * dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
3438 allocation succeeded; remove unnecessary check for object is
3439 smashed (since this is done in GC_debug_free); remove "clobbered"
3440 local variable.
3441
3442 * dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
3443 Rename "integer" argument to "linenum"; change the type of the
3444 argument to int.
3445 * gcj_mlc.c (GC_store_debug_info): Likewise.
3446 * dbg_mlc.c (GET_OH_LINENUM): New macro.
3447 * dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
3448 GET_OH_LINENUM; adjust print format specifier.
3449 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
3450 GC_debug_malloc_atomic_ignore_off_page,
3451 GC_debug_generic_malloc_inner,
3452 GC_debug_generic_malloc_inner_ignore_off_page,
3453 GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
3454 GC_debug_malloc_uncollectable,
3455 GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
3456 "i".
3457 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
3458
3459 * os_dep.c (GC_linux_stack_base): Rename to
3460 GC_linux_main_stack_base.
3461 * os_dep.c (GC_freebsd_stack_base): Rename to
3462 GC_freebsd_main_stack_base; adjust error message.
3463 * pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
3464 as an argument for sem_init().
3465 * pthread_support.c (pthread_create): Likewise.
3466 * pthread_support.c (pthread_create): Abort in case sem_init()
3467 fails.
3468 * include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
3469 * tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
3470 from main() if it should be done from the primordial thread only.
3471
3472 * alloc.c: Don't include sys/types.h for ArmCC.
3473 * dyn_load.c: Likewise.
3474 * os_dep.c: Likewise.
3475 * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
3476 ArmCC.
3477 * mark.c (GC_noop): Define specially for ArmCC.
3478 * include/private/gc_priv.h (GC_noop): Likewise.
3479 * misc.c (GC_init): Don't test pointers comparison for ArmCC.
3480 * misc.c: Don't include unistd.h for ArmCC.
3481 * os_dep.c (pages_executable): Rename to GC_pages_executable;
3482 make STATIC.
3483 * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
3484 * ptr_chck.c (GC_is_visible): Explicitly cast
3485 (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
3486 a compiler warning).
3487 * include/private/gcconfig.h: Recognize __arm.
3488 * include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
3489 * include/private/gcconfig.h (HBLKPTR): Add parentheses for
3490 "bytes" argument.
3491
3492 * pthread_support.c (GC_get_nprocs): Don't define for Android.
3493 * pthread_support.c (GC_dummy_thread_local): Don't test
3494 GC_LINUX_THREADS.
3495 * include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
3496 Define for Android.
3497
3498 * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
3499 * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
3500 NO_GETCONTEXT.
3501 * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
3502 call for Android.
3503
3504 * include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
3505 Define before including windows.h.
3506 * include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
3507 Likewise.
3508 * include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
3509 NOSERVICE): Likewise.
3510 * include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
3511 arithmetics; add a comment.
3512
3513 * mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
3514 * extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
3515 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
3516 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
3517 "mark_byte" local variable.
3518 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
3519 about that AO_or() is not used by GC unless USE_MARK_BITS
3520 explicitly set.
3521 * include/private/gc_priv.h (OR_WORD): Likewise.
3522 * include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
3523 add parentheses.
3524 * include/private/gc_priv.h (ONES): Define before use by
3525 MAKE_COOLER.
3526 * include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
3527 * include/private/gc_priv.h (OR_WORD): Don't define if
3528 USE_MARK_BYTES.
3529 * include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
3530 definition; simplify expression.
3531
3532 * os_dep.c (GC_get_maps): Always close the file.
3533 * pthread_support.c (GC_get_nprocs): Likewise.
3534 * os_dep.c (READ): Define similarly across the file (without
3535 parameters).
3536 * pthread_support.c (GC_get_nprocs): Use signed int type for "i"
3537 and "len" local variables (since read() may return -1).
3538 * include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
3539 double underscore; add "volatile" for asm.
3540 * include/private/gc_pmark.h (LONG_MULT): Add missing
3541 parentheses.
3542 * include/private/gc_priv.h (OR_WORD): Likewise.
3543 * include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
3544 and ';' symbol.
3545
3546 * os_dep.c (GC_get_stack_base): Implement for Android (same as
3547 for Linux).
3548 * pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
3549 failed to open "stat" file (not to issue a warning twice); update
3550 the comment.
3551 * pthread_support.c (GC_thr_init): Call sysconf() on Android to
3552 get the number of CPUs.
3553
3554 * include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
3555 recent patches regarding this macro as the macro should be set
3556 (to 1) before including any other system header.
3557
3558 * doc/README.environment (GC_INITIAL_HEAP_SIZE,
3559 GC_MAXIMUM_HEAP_SIZE): Update.
3560
3561 * misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
3562 heap size specifier; return 0 if not a valid one.
3563 * include/gc_cpp.h: Explicitly define inline one-argument delete
3564 operator for Cygwin (as a workaround).
3565 * tests/test_cpp.cc (main): Suppress compiler warnings about
3566 "assigned value is unused".
3567
3568 * misc.c (GC_parse_mem_size_arg): New function.
3569 * misc.c (GC_init): Use GC_parse_mem_size_arg().
3570 * pthread_stop_world.c (tkill): Declare for Android.
3571
3572 * include/private/gc_priv.h (_GNU_SOURCE): Include features.h
3573 first (except for NaCl) and then define the macro to 1 if not yet.
3574
3575 * tests/tests.am (TESTS, check_PROGRAMS): Add
3576 'initsecondarythread'.
3577 * tests/tests.am (initsecondarythread_SOURCES,
3578 initsecondarythread_LDADD): New variable.
3579
3580 * dbg_mlc.c (GC_store_debug_info_inner): Always define; add
3581 "const" to its string argument.
3582 * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
3583 * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
3584 smashed or previously deallocated found.
3585 * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
3586 one.
3587 * reclaim.c (GC_reclaim_check): Likewise.
3588 * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
3589 * os_dep.c (GC_get_stack_base): Don't initialize
3590 stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
3591 calling GC_INIT() from a non-primordial thread is possible now).
3592 * reclaim.c (GC_add_leaked): Turn into an inline one.
3593 * reclaim.c (GC_reclaim_small_nonempty_block):
3594 Change report_if_found type from int/word to boolean.
3595 * include/private/gc_priv.h (GC_start_reclaim): Likewise.
3596 * include/private/gc_priv.h (set_mark_bit_from_hdr,
3597 clear_mark_bit_from_hdr): Place closing parenthesis properly.
3598
3599 * os_dep.c (GC_get_main_stack_base): Try to use
3600 pthread_attr_getstack first for Linux if THREADS.
3601 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
3602 alignment.
3603
3604 * dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
3605 typo.
3606 * dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
3607 * dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
3608 case of NULL argument).
3609 * dbg_mlc.c (GC_free): In case of NULL argument, just return
3610 (without any warning printed); eliminate "uncollectable" local
3611 variable.
3612
3613 * configure.ac (THREADDLLIBS): Use alternate thread library on
3614 Solaris 8.
3615 * configure.ac (need_atomic_ops_asm): Set to true only for SPARC
3616 Solaris.
3617 * configure.ac: Don't use libdl on mips-sgi-irix6.
3618
3619 * mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
3620 * mach_dep.c (GC_with_callee_saves_pushed): Don't call
3621 __builtin_unwind_init() for RTEMS; use setjmp() without the
3622 leading underscore (for RTEMS).
3623 * tests/test.c (BIG): Use smaller value for RTEMS.
3624 * tests/test.c (main): Customize for RTEMS.
3625
3626 * configure.host: Remove doubled words in comments.
3627 * os_dep.c: Likewise.
3628 * doc/README: Likewise.
3629 * extra/setjmp_t.c: Likewise.
3630 * tests/huge_test.c: Likewise.
3631 * extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
3632 K&R-style function definition with the ANSI C one.
3633 * extra/setjmp_t.c (nested_sp): Implement in the same way as
3634 GC_approx_sp.
3635
3636 * dyn_load.c (GC_dyld_sections): Add more sections.
3637 * dyn_load.c (GC_dyld_add_sect_fmts): New static variable.
3638 * dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
3639 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
3640 logging; add support for on-demand sections.
3641
3642 * gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
3643 GC_ASSERTIONS.
3644 * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
3645 declare (as external) unless GC_ASSERTIONS.
3646 * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
3647 Cygwin; add FIXME.
3648 * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
3649 * include/private/gcconfig.h: Add "#error" for every "-->" mark.
3650 * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
3651 an expression.
3652 * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
3653 (which existed previously as SUSPENDED and still exists in GCJ).
3654 * include/private/pthread_support.h (DISABLED_GC): Change the
3655 value (as it is already used by SUSPENDED_EXT).
3656
3657 * tests/test.c (reverse_test): Modify count (BIG) for
3658 ppc64-darwin.
3659
3660 * reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
3661 macro and environment variable; abort if any error has been
3662 printed provided the environment variable (or macro) is set.
3663 * doc/README.environment (GC_ABORT_ON_LEAK): Document.
3664 * doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
3665
3666 * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
3667 for RTEMS.
3668 * include/private/gcconfig.h (RTEMS): Add support for.
3669 * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
3670
3671 * mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
3672 it is used internally in some places).
3673
3674 * dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
3675 declaration.
3676 * dbg_mlc.c (GC_debug_malloc_replacement,
3677 GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
3678 * malloc.c (GC_debug_malloc_replacement): Likewise.
3679 * mallocx.c (GC_debug_realloc_replacement): Likewise.
3680 * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
3681 * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
3682 * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
3683 includes of string.h.
3684 * mallocx.c: Include string.h (for GC_strdup).
3685 * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
3686 to dbg_mlc.c.
3687 * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
3688 redundant trailing ';'.
3689 * include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
3690 * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
3691 properly.
3692 * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
3693 malloc.c, mallocx.c.
3694
3695 * alloc.c (GC_check_heap, GC_print_all_smashed): Move the
3696 definition from misc.c.
3697 * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
3698 public.
3699 * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
3700 * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
3701 macro.
3702 * dbg_mlc.c (MAX_SMASHED): Don't define if already set.
3703 * reclaim.c (MAX_LEAKED): Likewise.
3704 * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
3705 access to the global array.
3706 * reclaim.c (GC_add_leaked): Likewise.
3707 * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
3708 (new macro) is defined.
3709 * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
3710 * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
3711 GC_dump_regularly and GC_print_back_height variables with
3712 FALSE/TRUE.
3713 * reclaim.c (GC_print_all_errors): Refine the comment.
3714
3715 * tests/test.c (reverse_test_inner): Undo one of the previous
3716 patches which shifts "c" and "d" pointers only if
3717 ALL_INTERIOR_POINTERS (since interior pointers are always
3718 recognized in stacks).
3719
3720 * misc.c (GC_stdout, GC_stderr): Move the definition to the place
3721 where GC_log is defined (Unix only).
3722 * misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
3723 variable and the similar macro; redirect GC_stdout and GC_stderr
3724 to GC_log if "GC_LOG_FILE" environment variable is set unless
3725 prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
3726 * doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
3727 * doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
3728
3729 * misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
3730 only).
3731 * misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
3732 accordingly.
3733 * misc.c (GC_printf): Check GC_quiet before va_start().
3734
3735 * allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
3736 inside "if (GC_print_stats)" branch.
3737 * alloc.c (GC_collect_or_expand): Likewise.
3738 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3739 * headers.c (GC_scratch_alloc): Likewise.
3740 * os_dep.c (GC_get_maps, GC_remap, PROTECT,
3741 GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
3742 * alloc.c (min_bytes_allocd): Use GC_log_printf instead of
3743 GC_printf for DEBUG_THREADS output.
3744 * darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
3745 GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
3746 * pthread_start.c (GC_inner_start_routine): Likewise.
3747 * pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
3748 GC_push_all_stacks, GC_suspend_all, GC_stop_world,
3749 GC_start_world): Likewise.
3750 * pthread_support.c (GC_mark_thread, GC_get_nprocs,
3751 GC_start_rtn_prepare_thread, pthread_create): Likewise.
3752 * checksums.c (GC_update_check_page): Use GC_printf() instead of
3753 GC_err_printf() for error printing.
3754 * checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
3755 instead of GC_printf for logging purposes.
3756 * dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
3757 external variable outside from GC_register_dynamic_libraries.
3758 * dyn_load.c (GC_register_dynamic_libraries): Don't use
3759 sys_errlist value if errno equals to sys_nerr.
3760 * dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
3761 instead of GC_printf for DL_VERBOSE output.
3762 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
3763 GC_init_dyld): Use GC_log_printf instead of GC_printf for
3764 DARWIN_DEBUG output.
3765 * os_dep.c (catch_exception_raise): Use GC_log_printf
3766 instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
3767 * reclaim.c (GC_print_free_list): Move "n" increment out of
3768 GC_printf() call.
3769
3770 * win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
3771 DEBUG_WIN32_THREADS): Remove.
3772 * win32_threads.c (GC_register_my_thread_inner,
3773 GC_win32_start_inner): Use GC_log_printf instead of GC_printf
3774 inside "if (GC_print_stats)" branch.
3775 * win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
3776 GC_PTHREADS).
3777 * win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
3778 GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
3779 macro.
3780 * win32_threads.c (GC_push_stack_for, GC_mark_thread,
3781 GC_CreateThread, GC_beginthreadex, GC_pthread_join,
3782 GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
3783 GC_mark_thread_local_free_lists): Use GC_log_printf instead of
3784 GC_printf for DEBUG_THREADS output.
3785 * win32_threads.c (GC_win32_start_inner, GC_CreateThread,
3786 GC_beginthreadex, GC_pthread_join, GC_pthread_create,
3787 GC_pthread_start_inner, GC_thread_exit_proc): Cast
3788 GetCurrentThreadId result to long; don't cast value of pthread_t
3789 type to int; adjust printf format specifiers.
3790 * doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
3791 information.
3792
3793 * tests/test.c (cons, small_cons, gcj_cons, check_ints,
3794 check_uncollectable_ints, print_int_list, check_marks_int_list,
3795 fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
3796 alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
3797 test, main): Remove unnecessary casts of GC_printf calls to void.
3798
3799 * allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
3800 BDWGC) printed message (adjust letters case, terminating dot and
3801 new line symbols).
3802 * alloc.c (GC_check_fl_marks): Likewise.
3803 * backgraph.c (new_back_edges): Likewise.
3804 * checksums.c (GC_check_dirty): Likewise.
3805 * darwin_stop_world.c (GC_push_all_stacks,
3806 GC_suspend_thread_list): Likewise.
3807 * dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
3808 store_old): Likewise.
3809 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3810 * mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
3811 GC_push_selected, GC_push_next_marked_dirty): Likewise.
3812 * mark_rts.c (GC_exclude_static_roots_inner): Likewise.
3813 * os_dep.c (GC_remap, GC_default_push_other_roots,
3814 GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
3815 catch_exception_raise_state, catch_exception_raise_state_identity,
3816 GC_mprotect_thread_notify, GC_mprotect_thread,
3817 catch_exception_raise): Likewise.
3818 * pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
3819 GC_stop_world, GC_stop_init): Likewise.
3820 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
3821 GC_start_routine): Likewise.
3822 * win32_threads.c (GC_register_my_thread_inner,
3823 GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
3824 GC_pthread_start_inner): Likewise.
3825 * alloc.c (GC_expand_hp_inner): Realign the code.
3826 * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
3827 Likewise.
3828 * misc.c (GC_init): Likewise.
3829 * os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
3830 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
3831 * tests/test.c (run_one_test): Likewise.
3832 * misc.c (GC_err_puts): Document.
3833 * misc.c (GC_err_write): Remove.
3834 * os_dep.c (dump_maps): Likewise.
3835 * include/private/gc_priv.h (GC_err_write): Likewise.
3836 * os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
3837 dump_maps() and GC_err_write().
3838 * os_dep.c (GC_read_dirty): Remove redundant brackets.
3839
3840 * tests/test.c (reverse_test_inner): Test interior pointer
3841 recognition only if ALL_INTERIOR_POINTERS.
3842 * tests/test.c (run_one_test): Replace GC_all_interior_pointers
3843 with GC_get_all_interior_pointers(); simplify the expression.
3844 * tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
3845 GC_bytes_allocd_before_gc with GC_get_total_bytes().
3846 * tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
3847
3848 * dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
3849 warning if the argument is NULL and GC is in leaks detection mode.
3850 * dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
3851 function definition.
3852 * malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
3853 * mallocx.c (GC_posix_memalign): Likewise.
3854 * malloc.c (strdup): Fix string size value; rename "len" to "lb".
3855 * mallocx.c: Include errno.h unless WinCE (otherwise include
3856 windows.h for Win32 error constants).
3857 * win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
3858 windows.h inclusion.
3859 * misc.c (GC_init): Register at-exit callback if GC_find_leak
3860 (even if GC_FIND_LEAK macro is unset).
3861 * pthread_stop_world.c (NACL_STORE_REGS,
3862 __nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
3863 Use BCOPY() instead of memcpy().
3864 * pthread_support.c (GC_init_real_syms): Likewise.
3865 * doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
3866 Document new macro.
3867 * doc/README.macros (REDIRECT_MALLOC): Update documentation.
3868 * include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
3869 New API function prototype.
3870 * include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
3871 GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
3872 * include/gc.h (GC_STRDUP): Remove redundant parentheses.
3873 * include/leak_detector.h (realloc, strdup): Likewise.
3874 * include/gc.h (GC_STRNDUP): New API macro.
3875 * include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
3876 GC_NEW_UNCOLLECTABLE): Add missing parentheses.
3877 * include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
3878 prototype (only if GC_REQUIRE_WCSDUP).
3879 * include/gc.h (GC_WCSDUP): New API macro (only if
3880 GC_REQUIRE_WCSDUP).
3881 * include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
3882 GC_DONT_INCLUDE_STDLIB).
3883 * include/leak_detector.h (malloc, calloc, free, realloc):
3884 Undefine symbol before its redefinition.
3885 * include/leak_detector.h (strndup, memalign, posix_memalign):
3886 Redefine to the corresponding GC function.
3887 * include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
3888 if GC_REQUIRE_WCSDUP).
3889 * include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
3890 the macro if already defined.
3891
3892 * misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
3893 when doing code static analysis (to inform the tool that the
3894 function is a no-return one).
3895 * os_dep.c (GC_linux_stack_base): Remove a duplicate validation
3896 of the length of "stat" file; use signed int type for "i",
3897 "buf_offset" and "len" local variables (since read() may
3898 return -1).
3899
3900 * blacklst.c (GC_bl_init_no_interiors): New function (the code
3901 moved from GC_bl_init).
3902 * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
3903 GC_all_interior_pointers mode; remove unnecessarily parameter cast
3904 for GC_scratch_alloc call.
3905 * include/private/gc_priv.h (GC_bl_init): Move the function
3906 declaration to misc.c file.
3907 * misc.c (GC_bl_init_no_interiors): Add a prototype.
3908 * misc.c (GC_set_all_interior_pointers): Allow values other than 0
3909 and 1; allow altering GC_set_all_interior_pointers value even
3910 after GC initialization.
3911 * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
3912 GC_modws_valid_offsets if GC_all_interior_pointers is off.
3913 * misc.c (GC_init): Don't call GC_initialize_offsets() unless
3914 GC_all_interior_pointers mode.
3915
3916 * alloc.c (GC_finish_collection): Remove redundant brackets;
3917 adjust code indentation.
3918 * blacklst.c (GC_add_to_black_list_normal): Simplify expression
3919 (to improve code readability).
3920 * blacklst.c (GC_is_black_listed): Join nested "if" (into a single
3921 conditional expression); initialize "nblocks" just before the loop
3922 beginning.
3923 * misc.c (GC_init): Don't compute initial_heap_sz if GC is already
3924 initialized.
3925 * include/private/gc_priv.h (GC_initialize_offsets): Move the
3926 function declaration to misc.c file.
3927 * obj_map.c (GC_initialize_offsets): Remove offsets_initialized
3928 static variable since the function is called only once.
3929 * tests/middle.c (main): Use setter for GC_all_interior_pointers;
3930 adjust printf format specifier (and cast the value passed to).
3931
3932 * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
3933 documentation.
3934 * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
3935 if LARGE_CONFIG is defined.
3936 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
3937
3938 * alloc.c (GC_finish_collection): Replace "#else #ifdef" with
3939 "#elif".
3940 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
3941 MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
3942 * alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
3943 overflow even if not LARGE_CONFIG.
3944 * dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
3945 SMALL_CONFIG.
3946 * finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
3947 * doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
3948 GC_FULL_FREQUENCY): Refine the documentation.
3949
3950 * extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
3951 GC_word).
3952 * extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
3953 as word.
3954
3955 * dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
3956 GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
3957 LINT-like tool to instruct it that the function is invoked only
3958 with valid parameters (otherwise a SEGV is ok); recognize LINT2
3959 new macro.
3960 * misc.c (GC_abort): Instruct a LINT-like tool that the function
3961 never returns in fact.
3962 * os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
3963 close the file immediately after read; use STRTOULL() instead of
3964 decoding the address number manually.
3965 * include/private/gc_priv.h (EXPECT): Don't specify outcome for a
3966 LINT-like tool.
3967 * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
3968 LINT-like tool that the value is restricted to zero and one only
3969 (required since the variable is global and its value is used as a
3970 part of array index expression is some places).
3971
3972 * dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
3973 NULL.
3974 * dbg_mlc.c (GC_debug_register_finalizer,
3975 GC_debug_register_finalizer_no_order,
3976 GC_debug_register_finalizer_unreachable,
3977 GC_debug_register_finalizer_ignore_self): Handle out of memory
3978 case properly (similar to GC_register_finalizer_inner).
3979 * headers.c (GC_install_header): Handle the case when alloc_hdr()
3980 returns NULL.
3981 * os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
3982 * pthread_support.c (GC_mark_thread): Place a dummy return
3983 statement (which uses "id" argument) before the actual use of "id"
3984 as an array index (to suppress a warning produced by some static
3985 code analysis tools).
3986 * win32_threads.c (GC_mark_thread): Likewise.
3987 * pthread_support.c (GC_thr_init): Abort (with the appropriate
3988 message) if out of memory.
3989
3990 * finalize.c (GC_register_finalizer_inner): Fix a typo in a
3991 comment.
3992 *include/private/gcconfig.h (STACKBOTTOM): Likewise.
3993 * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
3994 EXPECT (the 2nd argument).
3995 * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
3996 Likewise.
3997 * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
3998 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
3999 * include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
4000 * include/private/gc_priv.h (SMALL_OBJ): Likewise.
4001 * include/private/specific.h (getspecific): Likewise.
4002 * pthread_support.c (LOCK_STATS): Add a comment.
4003
4004 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
4005 GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
4006 GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
4007 definition to gc_config_macros.
4008
4009 * pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
4010 GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
4011 GC_PTHREAD_EXIT_ATTRIBUTE).
4012 * include/gc_pthread_redirects.h (GC_pthread_cancel,
4013 pthread_cancel): Likewise.
4014 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
4015 GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
4016 code.
4017 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
4018 Define as empty for NaCl.
4019 * include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
4020 defined.
4021
4022 * dyn_load.c (GC_init_dyld): Do not invoke
4023 _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
4024 not required to register the main data segment in that case).
4025 * include/gc.h (GC_no_dls): Adjust the comment.
4026
4027 * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
4028 GC_NO_DLOPEN.
4029 * gc_dlopen.c: Likewise.
4030 * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
4031 * gc_dlopen.c: Don't include dlfcn.h (as it is included in
4032 gc_pthread_redirects.h).
4033 * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
4034 GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
4035 GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
4036 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
4037 pthread_sigmask): Likewise.
4038 * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
4039 GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
4040 * pthread_support.c (pthread_create, GC_pthread_create_t,
4041 GC_pthread_create): Rename GC_PTHREAD_CONST to
4042 GC_PTHREAD_CREATE_CONST.
4043 * win32_threads.c (GC_pthread_create): Likewise.
4044 * include/gc_pthread_redirects.h: Likewise.
4045 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
4046 GC_NO_PTHREAD_SIGMASK): New macro defined.
4047 * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
4048 empty for NaCl.
4049 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
4050 not define for Android (as CANCEL_SAFE is not defined).
4051
4052 * include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
4053 GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
4054 definition to gc_config_macros.h file.
4055 * include/gc_config_macros.h: Check the file is included from gc.h
4056 file.
4057 * include/gc_version.h: Likewise.
4058
4059 * gc_dlopen.c: Empty unit for NaCl.
4060 * os_dep.c: Include fcntl.h for NaCl.
4061 * os_dep.c (GC_get_main_stack_base): Ignore
4062 USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
4063 * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
4064 * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
4065 * pthread_start.c (GC_inner_start_routine): Don't invoke
4066 pthread_cleanup_push/pop for NaCl.
4067 * pthread_stop_world.c (GC_nacl_num_gc_threads,
4068 GC_nacl_thread_idx, GC_nacl_park_threads_now,
4069 GC_nacl_thread_parker, GC_nacl_gc_thread_self,
4070 GC_nacl_thread_parked, GC_nacl_thread_used,
4071 GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
4072 variable (fo NaCl only).
4073 * pthread_stop_world.c (GC_remove_allowed_signals,
4074 suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
4075 GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
4076 GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
4077 GC_restart_handler): Don't define for NaCl.
4078 * pthread_support.c (GC_get_nprocs): Likewise.
4079 * include/private/gc_priv.h (SIG_SUSPEND): Likewise.
4080 * include/private/gcconfig.h (LINUX): Likewise.
4081 * pthread_stop_world.c (GC_push_all_stacks): Push register storage
4082 for NaCl.
4083 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
4084 GC_start_world): Implement for NaCl.
4085 * pthread_stop_world.c (GC_stop_world): Don't define unused "i"
4086 local variable for OpenBSD (and NaCl).
4087 * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
4088 NaCl.
4089 * pthread_stop_world.c (nacl_pre_syscall_hook,
4090 __nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
4091 GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
4092 function (for NaCl only).
4093 * pthread_stop_world.c (GC_stop_init): Empty for NaCl.
4094 * pthread_support.c (pthread_cancel, pthread_sigmask): Don't
4095 redirect for NaCl.
4096 * include/gc_pthread_redirects.h (pthread_cancel,
4097 pthread_sigmask): Likewise.
4098 * pthread_support.c (GC_nacl_initialize_gc_thread,
4099 GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
4100 * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
4101 and shutdown thread for NaCl.
4102 * pthread_support.c (GC_thr_init): Call sysconf for NaCl.
4103 * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
4104 for NaCl.
4105 * include/gc.h: Don't include features.h for NaCl.
4106 * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
4107 * include/gc_pthread_redirects.h (GC_pthread_create): Use
4108 GC_PTHREAD_CONST instead of const.
4109 * win32_threads.c (GC_pthread_create): Likewise.
4110 * pthread_support.c (GC_pthread_create_t, GC_pthread_create,
4111 pthread_create): Likewise.
4112 * include/private/gcconfig.h (NACL): Recognize NaCl.
4113 * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
4114 * include/private/pthread_stop_world.h (thread_stop_info): Add
4115 reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
4116 NaCl only).
4117 * include/private/pthread_support.h (GC_nacl_gc_thread_self):
4118 Declare internal variable (for NaCl only).
4119
4120 * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
4121 macro.
4122
4123 * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
4124 keywords with double underscore.
4125 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
4126 catch_exception_raise_state_identity): Add GC_API_OSCALL to
4127 function definition.
4128 * os_dep.c (catch_exception_raise_state,
4129 catch_exception_raise_state_identity): Move definition to be
4130 before GC_ports.
4131 * os_dep.c (catch_exception_raise): Declare to have the symbol
4132 defined before GC_ports.
4133 * os_dep.c (GC_ports): Store references to catch_exception_raise,
4134 catch_exception_raise_state, catch_exception_raise_state_identity
4135 (to prevent stripping these symbols as dead).
4136 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
4137 catch_exception_raise_state_identity): Mark these symbols as
4138 "referenced dynamically" via an assembler directive (unless
4139 NO_DESC_CATCH_EXCEPTION_RAISE).
4140 * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
4141 similar to GC_API but as if GC_DLL is always defined).
4142
4143 * os_dep.c: Don't include signal.h for GC_write_fault_handler on
4144 Win32.
4145 * os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
4146 FreeBSD.
4147 * os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
4148 SEGV_ACCERR for older FreeBSD releases).
4149
4150 * dyn_load.c (GC_register_map_entries,
4151 GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
4152 DATASTART only once if DATASTART_IS_FUNC.
4153 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
4154 Calculate DATAEND only once if DATAEND_IS_FUNC.
4155 * dyn_load.c: Add comment to some endif; realign some code.
4156 * dyn_load.c (GC_init_dyld): Don't use
4157 _dyld_bind_fully_image_containing_address if
4158 NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
4159 * include/private/gcconfig.h (GC_data_start, GC_find_limit):
4160 Declare if used by DATASTART/DATAEND, respectively.
4161 * include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
4162 Define if DATASTART/DATAEND is a function, respectively.
4163 * include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
4164 NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
4165 unistd.h.
4166
4167 * os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
4168 Reorder to remove redundant ifdef for Win32.
4169 * os_dep.c: Add comment to some endif.
4170 * os_dep.c: Include pthread.h (for Linux even if single-threaded)
4171 if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
4172 * os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
4173 for some reason).
4174 * os_dep.c (GC_get_main_stack_base): Allow
4175 USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
4176 assertion for the returned result.
4177 * os_dep.c (GC_get_stack_base): Define for Darwin if
4178 multi-threaded.
4179 * os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
4180 * os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
4181 * os_dep.c (catch_exception_raise): Remove redundant parentheses;
4182 refine the documentation.
4183
4184 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
4185 well.
4186 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4187 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
4188 * include/gc.h (GC_INIT): Document.
4189 * include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
4190 GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
4191 define these macros also for ARM).
4192 * tests/test.c (check_heap_stats): Print main thread stack bottom
4193 as well (only if verbose mode is on).
4194
4195 * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
4196 introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
4197 and X86_64).
4198
4199 * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
4200 "volatile" keyword with double underscore.
4201 * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
4202 include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
4203 * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
4204 mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
4205 * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
4206 for Linux/x64 (since its GLibc getcontext currently has the bug).
4207
4208 * allchblk.c (GC_use_entire_heap): Change type to int (as declared
4209 in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
4210 macro.
4211 * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
4212 alter the default value of GC_use_entire_heap.
4213 * doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
4214 * doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
4215
4216 * include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
4217 MPROTECT_VDB undefining.
4218
4219 * include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
4220 the comment.
4221
4222 * include/private/gc_priv.h (_GC_arrays): Move the conditional
4223 macro definitions (shortcuts for GC_arrays members) into the
4224 structure body.
4225
4226 * darwin_stop_world.c (GC_mach_handler_thread,
4227 GC_use_mach_handler_thread,
4228 GC_darwin_register_mach_handler_thread): Define only if
4229 MPROTECT_VDB.
4230 * darwin_stop_world.c (GC_suspend_thread_list): Use
4231 GC_mach_handler_thread and GC_use_mach_handler_thread only if
4232 MPROTECT_VDB.
4233 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
4234 only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
4235 * misc.c (GC_init): Fix comment for GWW_VDB.
4236 * os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
4237 DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
4238 * os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
4239 DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
4240 * pthread_support.c (GC_thr_init): Define "dummy" local variable
4241 only unless GC_DARWIN_THREADS.
4242 * include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
4243 even in the single-threaded mode; define for iPhone/iPad.
4244 * include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
4245 around "undef".
4246 * include/private/gcconfig.h (HEURISTIC1): Remove unused for
4247 Cygwin.
4248 * include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
4249 Darwin/arm (instead of HEURISTIC1).
4250
4251 * misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
4252 (for ECOS and NOSYS).
4253 * os_dep.c (GC_get_main_stack_base): Likewise.
4254 * os_dep.c (GC_get_main_stack_base): Check
4255 USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
4256 remove "dummy" variable (use result one instead).
4257 * doc/README.macros (SN_TARGET_PS3): Document.
4258 * extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
4259 for Android.
4260 * include/private/pthread_support.h: Fix comment for "endif".
4261
4262 * misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
4263 * misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
4264 * os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
4265 * os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
4266 * os_dep.c (GC_default_push_other_roots,
4267 GC_push_thread_structures): Define for SN_TARGET_PS3.
4268 * include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
4269 for SN_TARGET_PS3.
4270 * include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
4271 (Sony PS/3 target).
4272 * include/private/gcconfig.h (THREADS): Define unconditionally if
4273 SN_TARGET_PS3.
4274 * include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
4275
4276 * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
4277 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
4278 GC_debug_malloc_atomic_ignore_off_page,
4279 GC_debug_generic_malloc_inner,
4280 GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
4281 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
4282 GC_debug_malloc_atomic_uncollectable): Likewise.
4283 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
4284 * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
4285 comment.
4286 * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
4287 * mark_rts.c (GC_roots_present): Likewise.
4288 * doc/README: Likewise.
4289 * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
4290 * include/private/gc_priv.h (_GC_arrays): Likewise.
4291
4292 * configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
4293 just blindly linking to -lpthread, as Android includes pthread
4294 support within libc and does not provide a separate libpthread.
4295 * dyn_load.c (GC_register_dynamic_libraries): Skip current link map
4296 entry if l_addr is NULL (Android/bionic only).
4297 * pthread_stop_world.c (android_thread_kill): New internal function
4298 (Android only).
4299 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
4300 android_thread_kill (based on tkill) instead of pthread_kill on
4301 Android (since pthread_kill cannot be used safely on the platform).
4302 * pthread_support.c (GC_new_thread): Store thread Id (obtained from
4303 gettid) for use by android_thread_kill (Android only).
4304 * include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
4305 structure member (Android only).
4306 * include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
4307 of __x86_64__ (Darwin); define __environ macro (Android on M68K).
4308
4309 * allchblk.c (GC_freehblk): Print extended error message (done via
4310 GC_printf() before aborting with a short message) only if
4311 GC_print_stats.
4312 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
4313 * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
4314 PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
4315 * pthread_stop_world.c (GC_start_world): Likewise.
4316 * win32_threads.c (GC_register_my_thread_inner): Likewise.
4317 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
4318 GC_dirty_init): Remove redundant print of an error message before
4319 aborting with the same message.
4320 * os_dep.c (GC_register_data_segments): Remove format specifier
4321 from the string passed to GC_err_puts(); use ABORT instead of EXIT
4322 (if invalid executable type).
4323 * os_dep.c (GC_remap): Adjust printf format specifier (for long
4324 type).
4325 * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
4326 (for SIGSEGV/BUS) only if GC_print_stats.
4327 * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
4328 calls.
4329
4330 * tests/test.c (main): Print the relevant message if GWW_VDB.
4331 * include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
4332 on x64 if compiled by GCC.
4333
4334 * tests/staticrootstest.c: Include string.h for memset() prototype.
4335 * tests/thread_leak_test.c (main): Fix printf() format specifiers.
4336
4337 * CMakeLists.txt: Check enable_parallel_mark on Darwin.
4338 * configure.ac: Likewise.
4339 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
4340 DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
4341 GC_DISCOVER_TASK_THREADS, respectively.
4342 * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
4343 * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
4344 * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
4345 (and remove FIXME).
4346 * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
4347 comment; remove FIXME.
4348 * win32_threads.c (GC_NO_DLLMAIN): Rename to
4349 GC_NO_THREADS_DISCOVERY.
4350 * tests/test.c (GC_NO_DLLMAIN): Likewise.
4351 * doc/README.macros (GC_NO_DLLMAIN): Likewise.
4352 * doc/README.win32 (GC_NO_DLLMAIN): Likewise.
4353 * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
4354 * win32_threads.c (GC_win32_dll_threads): Define as macro to true
4355 if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
4356 update the comment.
4357 * win32_threads.c (GC_use_DllMain): Rename to
4358 GC_use_threads_discovery; do not set GC_win32_dll_threads if
4359 GC_DISCOVER_TASK_THREADS.
4360 * win32_threads.c (GC_started_thread_while_stopped,
4361 GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
4362 GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
4363 which use GC_win32_dll_threads to minimize the possibility of
4364 an "unreachable code" compiler warning when GC_win32_dll_threads
4365 is defined as a macro.
4366 * win32_threads.c (GC_unregister_my_thread): Don't call
4367 GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
4368 (since can't happen); use "t" local variable only if not
4369 GC_win32_dll_threads.
4370 * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
4371 * include/gc.h (GC_use_DllMain): Rename to
4372 GC_use_threads_discovery but keep old name as a macro definition.
4373 * include/gc.h (GC_use_threads_discovery): Declare also for
4374 Darwin; update the comment.
4375 * tests/test.c (main): Call GC_use_threads_discovery for Darwin
4376 (to test the mode if possible).
4377
4378 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
4379 DARWIN_QUERY_TASK_THREADS): New macro recognized.
4380 * darwin_stop_world.c (GC_query_task_threads): add STATIC;
4381 initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
4382 or DARWIN_QUERY_TASK_THREADS; remove FIXME.
4383 * darwin_stop_world.c (GC_use_threads_discovery): New function
4384 (for setting GC_query_task_threads value).
4385 * darwin_stop_world.c (GC_mach_handler_thread,
4386 GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
4387 GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
4388 GC_darwin_register_mach_handler_thread): Define only if not
4389 DARWIN_SUSPEND_GC_THREADS.
4390 * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
4391 the code for GC_query_task_threads case from compilation unless
4392 DARWIN_SUSPEND_GC_THREADS.
4393 * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
4394 if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
4395 * os_dep.c (GC_mprotect_thread): Call
4396 GC_darwin_register_mach_handler_thread only if THREADS and not
4397 DARWIN_SUSPEND_GC_THREADS.
4398 * pthread_support.c (marker_mach_threads): Don't define if
4399 DARWIN_SUSPEND_GC_THREADS.
4400 * pthread_support.c (GC_mark_thread): Don't fill in
4401 marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
4402 * include/private/gc_locks.h (GC_need_to_lock): Always declare for
4403 THREADS case.
4404
4405 * darwin_stop_world.c (GC_query_task_threads): Don't define to
4406 false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
4407 the variable to false (for now).
4408 * darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
4409 only if not DARWIN_DONT_PARSE_STACK.
4410 * darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
4411 approach based on task_threads() only if GC_query_task_threads
4412 else use GC_threads table.
4413
4414 * darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
4415 * darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
4416 really clear GC_mach_threads[]).
4417 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
4418 (instead of calling GC_stop_init).
4419 * include/private/pthread_support.h (GC_stop_init): Remove proto.
4420 * pthread_support.c (GC_stop_init): Add proto (unless Darwin).
4421 * pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
4422 GC_DARWIN_THREADS.
4423
4424 * darwin_stop_world.c (GC_stack_range_for): New static function
4425 (move the code from GC_push_all_stacks).
4426 * darwin_stop_world.c (GC_push_all_stacks): Call
4427 GC_stack_range_for(); rename kern_return local variable to
4428 kern_result.
4429 * darwin_stop_world.c (GC_is_mach_marker): Change argument type
4430 from mach_port_t to thread_act_t.
4431 * pthread_support.c (GC_is_mach_marker): Likewise.
4432
4433 * darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
4434 variable initialization (always call current_task()).
4435 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
4436 Don't set thread's stop_info.stack_ptr value for Darwin.
4437 * include/private/darwin_stop_world.h (thread_stop_info): Update
4438 the comment for stack_ptr.
4439
4440 * darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
4441 variables to "kern_return" and "my_thread" ones, respectively;
4442 call mach_port_deallocate() unconditionally.
4443 * darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
4444 if DEBUG_THREADS.
4445
4446 * darwin_stop_world.c (GC_mach_thread): Move from
4447 darwin_stop_world.h.
4448 * include/private/darwin_stop_world.h (GC_mach_thread): Remove.
4449 * win32_threads.c (GC_start_world): Define "thread_id" local
4450 variable only if GC_ASSERTIONS; decide whether to resume a thread
4451 based on its "suspended" field value; assert that suspended thread
4452 stack_base is non-zero and the thread is not our one.
4453
4454 * darwin_stop_world.c (GC_thread_resume): New inline function
4455 (move code from GC_thread_resume).
4456 * darwin_stop_world.c (GC_start_world): Check result of
4457 task_threads(); call GC_thread_resume().
4458 * os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
4459 only if not CYGWIN32.
4460 * os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
4461 if not CYGWIN32.
4462
4463 * darwin_stop_world.c (FindTopOfStack): Change return type to
4464 ptr_t (from long); make GC_INNER; add GC_ prefix.
4465 * darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
4466 local variable (initialized from the corresponding GC_thread
4467 field unless GC_query_task_threads); add assertion that our
4468 thread is not blocked; prefix FindTopOfStack with GC_ and remove
4469 no longer needed cast to ptr_t of the result; handle thread
4470 blocked case (and remove FIXME); use GC_push_all_stack_sections
4471 unless GC_query_task_threads (and remove FIXME).
4472 * pthread_support.c (GC_FindTopOfStack): Declare (if needed).
4473 * pthread_support.c (GC_do_blocking_inner): Call
4474 GC_save_regs_in_stack (if needed) before acquiring the lock.
4475 * win32_threads.c (GC_do_blocking_inner): Likewise.
4476 * pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
4477 field of GC_thread (Darwin only).
4478 * include/private/pthread_support.h (GC_thread): Add topOfStack
4479 field for Darwin (unless DARWIN_DONT_PARSE_STACK).
4480
4481 * finalize.c (GC_check_finalizer_nested): Change return type to
4482 char pointer (instead of int pointer); use explicit cast for
4483 GC_finalizer_nested assignment.
4484 * pthread_support.c (GC_check_finalizer_nested): Likewise.
4485 * win32_threads.c (GC_check_finalizer_nested): Likewise.
4486 * finalize.c (GC_finalizer_nested): Change type to unsigned char.
4487 * finalize.c (GC_notify_or_invoke_finalizers): Change type of
4488 "pnested" local variable to char pointer.
4489 * pthread_support.c (GC_do_blocking_inner,
4490 GC_call_with_gc_active): Use explicit cast for "thread_blocked"
4491 field assignment.
4492 * win32_threads.c (GC_lookup_pthread): Use explicit cast for
4493 "suspended" field assignment.
4494 * win32_threads.c (GC_Thread_Rep): Use short type for
4495 finalizer_skipped; use char type for finalizer_nested and flags
4496 fields and reorder some fields (to minimize GC_Thread_Rep
4497 structure size).
4498 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
4499 * win32_threads.c (GC_Thread_Rep): Use char type for suspended
4500 field (instead of GC_bool).
4501 * include/private/pthread_support.h (GC_Thread_Rep): Use char type
4502 for thread_blocked field (instead of short).
4503
4504 * darwin_stop_world.c (GC_query_task_threads): New variable (or
4505 macro).
4506 * darwin_stop_world.c (GC_push_all_stacks): Use
4507 GC_query_task_threads (to choose between algorithms based on
4508 kernel task_threads and based on GC_threads table); update FIXME;
4509 remove commented out GC_push_one statements.
4510 * pthread_support.c (GC_thr_init, GC_do_blocking_inner,
4511 GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
4512 stack_ptr field for all platforms.
4513 * pthread_support.c (GC_call_with_gc_active): Initialize
4514 saved_stack_ptr field for all platforms.
4515 * include/private/darwin_stop_world.h (thread_stop_info): Add
4516 stack_ptr field; change type of already_suspended from int to
4517 GC_bool.
4518
4519 * darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
4520 * darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
4521 GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
4522 * darwin_stop_world.c (GC_mach_threads): Add FIXME.
4523 * darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
4524 GC_stop_world): Use FALSE and TRUE for already_suspended field and
4525 "changed", "found" variables.
4526 * darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
4527 PARALLEL_MARK).
4528 * darwin_stop_world.c (GC_suspend_thread_list): Change return type
4529 to GC_bool; change type of "changed", "found" to GC_bool; make
4530 "my_thread" as an argument (instead of acquiring/deallocating it
4531 locally); do not add my_thread, GC_mach_handler_thread and marker
4532 threads to GC_mach_threads table; check for overflow of
4533 GC_mach_threads table; increase GC_mach_threads_count if "found"
4534 is true and info.suspend_count is non-zero.
4535 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
4536 Adjust "thread" format specifiers for GC_printf(); search thread
4537 in "old_list" starting from the previous found one.
4538 * darwin_stop_world.c (GC_stop_world): Rename "changes" to
4539 "changed" local variable; remove "result" variable; adjust
4540 GC_printf debugging message.
4541 * darwin_stop_world.c (GC_start_world): Do not check for
4542 my_thread and GC_use_mach_handler_thread (since they are not added
4543 to GC_mach_threads table); call thread_info() only if
4544 DEBUG_THREADS or GC_ASSERTIONS.
4545 * pthread_support.c (marker_mach_threads): New static variable (if
4546 Darwin).
4547 * pthread_support.c (GC_is_mach_marker): New function (if Darwin).
4548 * pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
4549 table (if Darwin).
4550
4551 * alloc.c (GC_parallel): Define only if THREADS.
4552 * misc.c (GC_get_parallel): Likewise.
4553 * include/gc.h (GC_parallel, GC_get_parallel,
4554 GC_get_suspend_signal, GC_allow_register_threads,
4555 GC_register_my_thread, GC_unregister_my_thread): Define only if
4556 GC_THREADS.
4557 * include/gc.h (GC_get_heap_size): Fix a typo in a comment.
4558
4559 * configure.ac: Use `AC_C_INLINE'.
4560 * include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
4561 (determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
4562
4563 * dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
4564 FreeBSD).
4565 * dyn_load.c (GC_register_main_static_data): Move the definition
4566 above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
4567 case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
4568 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
4569 GC_register_main_static_data() result (instead of direct testing
4570 of dl_iterate_phdr (to prevent a compiler warning).
4571 * os_dep.c (CODE_OK): Test si_code also for the value of 2
4572 (FreeBSD case; required for FreeBSD v7+).
4573 * os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
4574 * include/private/gcconfig.h (DATASTART): Cast etext argument in
4575 GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
4576 case).
4577
4578 * include/private/specific.h (quick_thread_id): Define thru
4579 GC_approx_sp(); define as a macro.
4580 * include/private/specific.h (getspecific): Use GC_INLINE instead
4581 of __inline__ (to work around Sun CC which does not recognize
4582 inline keyword surrounded with underscores).
4583
4584 * darwin_stop_world.c (FindTopOfStack): Simplify condition
4585 expressions.
4586 * darwin_stop_world.c (GC_push_all_stacks): Merge two variants
4587 of this function (DARWIN_DONT_PARSE_STACK).
4588 * darwin_stop_world.c (GC_push_all_stacks): Add a check for our
4589 thread is found (same as in pthread_stop_world.c).
4590 * darwin_stop_world.c (GC_push_all_stacks): Print the number of
4591 scanned threads if verbose (same as in pthread_stop_world.c).
4592
4593 * darwin_stop_world.c (GC_push_all_stacks): Reset
4594 thread_state_count value before every thread_get_state call;
4595 refine the comment for thread_state_count.
4596 * darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
4597 rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
4598 register pushing.
4599 * darwin_stop_world.c (GC_push_all_stacks): Set outCount to
4600 GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
4601 * darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
4602 for x86.
4603
4604 * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
4605 * darwin_stop_world.c (GC_use_mach_handler_thread): Change type
4606 to GC_bool.
4607 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
4608 Simplify the expressions involving GC_use_mach_handler_thread.
4609 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
4610 Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
4611
4612 * include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
4613 pthread_sigmask, dlopen): Don't define for pthreads-win32 (and
4614 don't include signal.h and dlfcn.h).
4615
4616 * dyn_load.c (GC_register_dynlib_callback): Add FIXME.
4617
4618 * include/private/gcconfig.h: Add support for FreeBSD on ppc64.
4619
4620 * os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
4621 VM_PROT_EXECUTE.
4622
4623 * os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
4624 pages_executable is on.
4625 * os_dep.c (os2_alloc): Add FIXME (for recursion).
4626 * os_dep.c (UNPROTECT): Abort with a more informative message if
4627 pages_executable is on ("mprotect" case).
4628 * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
4629 pages_executable is on (Darwin case).
4630 * pthread_support.c (GC_init_real_syms): Abort with an informative
4631 message if libgc is linked after libpthread.
4632
4633 * dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
4634 for 64-bit targets.
4635 * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
4636 macro.
4637 * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
4638 since REAL(pthread_create) is used.
4639 * pthread_support.c (PTHREAD_CREATE): Remove unused.
4640
4641 * extra/threadlibs.c (main): Remove --wrap for "read" (since not
4642 wrapped anymore).
4643 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
4644 * os_dep.c (__wrap_read): Likewise.
4645
4646 * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
4647 beginning of the file.
4648 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
4649 macro (defined only for Linux and Solaris).
4650 * include/gc_pthread_redirects.h (GC_pthread_cancel,
4651 GC_pthread_exit): Declare new API function (only if
4652 GC_PTHREAD_EXIT_ATTRIBUTE).
4653 * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
4654 Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
4655 * include/private/pthread_support.h (DISABLED_GC): New macro.
4656 * pthread_support.c (pthread_cancel, pthread_exit): Restore
4657 original definition or declare "real" function (if needed and
4658 GC_PTHREAD_EXIT_ATTRIBUTE).
4659 * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
4660 Declare new types if needed.
4661 * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
4662 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
4663 * pthread_support.c (GC_init_real_syms): Initialize pointers to
4664 the "real" pthread_cancel and pthread_exit (only if
4665 GC_PTHREAD_EXIT_ATTRIBUTE).
4666 * pthread_support.c (GC_unregister_my_thread): Enable collections
4667 if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
4668 * pthread_support.c (pthread_cancel, pthread_exit): New wrapped
4669 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
4670 * pthread_support.c (GC_start_routine): Refine the comment.
4671 * extra/threadlibs.c (main): Adjust --wrap (add "read",
4672 "pthread_exit", "pthread_cancel" but remove "sleep").
4673 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
4674
4675 * include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
4676 macro definition.
4677 * include/gc.h (GC_reachable_here): Likewise.
4678 * include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
4679 with double '_'.
4680
4681 * pthread_start.c: New file.
4682 * CMakeLists.txt (SRC): Add pthread_start.c.
4683 * Makefile.am (libgc_la_SOURCES): Likewise.
4684 * Makefile.direct (CSRCS): Likewise.
4685 * Makefile.direct (OBJS): Add pthread_start.obj.
4686 * extra/gc.c: Add a comment; include pthread_start.c.
4687 * pthread_support.c (start_info): Move the struct definition down
4688 closer to its usage.
4689 * pthread_support.c (GC_thread_exit_proc): Replace STATIC with
4690 GC_INNER.
4691 * pthread_support.c (GC_inner_start_routine): Move to the
4692 definition to pthread_start.c; leave only the prototype; remove
4693 STATIC.
4694 * pthread_support.c (GC_start_rtn_prepare_thread): New function
4695 (contains parts of the original GC_inner_start_routine).
4696
4697 * configure.ac (NO_EXECUTE_PERMISSION): Add comment.
4698 * doc/README.macros (NO_EXECUTE_PERMISSION): Update the
4699 documentation.
4700 * include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
4701 New API function declaration.
4702 * os_dep.c (OPT_PROT_EXEC): Remove (superseded by
4703 pages_executable).
4704 * os_dep.c (pages_executable): New static variable.
4705 * os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
4706 GC_get_pages_executable only).
4707 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
4708 Replace OPT_PROT_EXEC with pages_executable.
4709 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
4710 GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
4711 * os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
4712 UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
4713 * os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
4714 API function definition.
4715
4716 * tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
4717 64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
4718 at least).
4719
4720 * tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
4721 32-bit CPUs (to prevent "Unexpected heap growth" failure).
4722
4723 * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
4724 * pthread_support.c (pthread_create, pthread_join, pthread_detach,
4725 pthread_sigmask): Likewise.
4726 * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
4727 is added).
4728 * gc_dlopen.c (GC_dlopen): Fix return type.
4729 * pthread_support.c (GC_init_real_syms): Don't define
4730 LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
4731 libpthread_name if RTLD_NEXT.
4732
4733 * gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
4734 * gc_dlopen.c (dlopen): Likewise.
4735 * include/gc.h (GC_enable_incremental): Refine the comment.
4736 * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
4737 missing (only for Win32).
4738 * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
4739 * win32_threads.c (GC_ExitThread): Likewise.
4740 * include/gc.h (GC_endthreadex): Add a comment.
4741
4742 * include/cord.h: Fix typos.
4743
4744 * Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
4745 "tests/CMakeLists.txt".
4746 * doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
4747
4748 * mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
4749 * include/private/gcconfig.h (AVR32): New macro (also define the
4750 supplementary macros for the target).
4751 * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
4752 define for AVR32.
4753
4754 * tests/leak_test.c (main): Explicitly define as returning int
4755 (to prevent a spurious test failure on some Linux/alpha targets).
4756 * tests/thread_leak_test.c (main): Likewise.
4757 * tests/thread_leak_test.c: Initialize GC_find_leak in the main
4758 thread (before GC_INIT) only.
4759 * tests/leak_test.c (main): Use GC_set_find_leak() instead of
4760 accessing GC_find_leak directly.
4761 * tests/thread_leak_test.c (main): Likewise.
4762
4763 * include/gc.h (GC_find_leak, GC_finalize_on_demand,
4764 GC_java_finalization, GC_dont_expand, GC_no_dls,
4765 GC_dont_precollect): Simplify the comment (remove the information
4766 about data races since the value is boolean).
4767
4768 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
4769 Solaris-specific implementation (based on thr_stksegment).
4770 * os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
4771 variable used by the Solaris-specific GC_get_stack_base().
4772
4773 * pthread_support.c (GC_mark_thread_local_free_lists,
4774 GC_check_tls): Mark (and check) only for live threads (in case of
4775 GC_destroy_thread_local() is called already but GC_delete_thread()
4776 is not yet).
4777 * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
4778 Likewise.
4779
4780 * NT_MAKEFILE: Remove the comment about DLL and win32s.
4781 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4782 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4783 * NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
4784 properly on VS 2005+).
4785 * NT_MAKEFILE: Update GC log file name in comments.
4786 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4787 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4788 * NT_X64_THREADS_MAKEFILE: Likewise.
4789 * doc/README.win32: Likewise.
4790 * NT_MAKEFILE: Remove ":full" for "-debug" option (since no
4791 longer supported by VS).
4792 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4793 * NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
4794 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4795 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4796 * NT_X64_THREADS_MAKEFILE: Likewise.
4797 * NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
4798 * NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
4799 * NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
4800 default stack size limit).
4801 * NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
4802 * win32_threads.c (GC_get_next_stack): Always define (since it is
4803 also used for Cygwin now).
4804
4805 * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
4806 be just before GC_clear_marks() call.
4807 * include/gc_mark.h (GC_start_callback_proc): Refine the comment.
4808
4809 * Makefile.am (check_LTLIBRARIES): Initialize to empty.
4810 * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
4811 * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
4812 libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
4813 libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
4814 Define.
4815 * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
4816
4817 * tests/staticrootstest.c: New file.
4818 * tests/staticrootslib.c: Likewise.
4819
4820 * dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
4821 Cygwin as well as other win32 targets.
4822 * dyn_load.c (GC_wnt): Define to constant true.
4823 * dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
4824 well as other win32 targets.
4825 * mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
4826 Don't define for Cygwin, as on other win32.
4827 * mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
4828 Cygwin as for other win32 targets.
4829 * mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
4830 other win32.
4831 * mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
4832 other win32.
4833 * mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
4834 declare on Cygwin as on other win32.
4835 * mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
4836 !NO_DEBUGGING, as on other win32 targets.
4837 * mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
4838 Cygwin as for other win32 targets.
4839 * os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
4840 * os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
4841 other win32.
4842 * os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
4843 * os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
4844 Win32, but call GC_unix_get_mem instead of GlobalAlloc.
4845 * os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
4846 * ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
4847 as on other win32 platforms.
4848 * win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
4849 for dynamic loading targets.
4850 * include/private/gc_priv.h (GC_INNER): Don't try to use
4851 visibility on Cygwin which does not support it.
4852 * include/private/gc_priv.h (struct roots): Don't declare r_next
4853 member on Cygwin as on other windows hosts.
4854 * include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
4855 likewise.
4856 * include/private/gc_priv.h (struct _GC_arrays): Do declare
4857 _heap_bases[] member and don't declare _root_index likewise.
4858 * include/private/gc_priv.h (GC_heap_bases): Do define likewise.
4859 * include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
4860 likewise.
4861 * include/private/gc_priv.h (GC_sysinfo): Do declare extern
4862 likewise.
4863 * include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
4864 prototype on Cygwin as other win32 platforms.
4865
4866 * os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
4867 pthread_attr_getstack() instead of GC_get_stack_base() (and check
4868 returned stackaddr for NULL); output a warning on failure.
4869
4870 * alloc.c (GC_start_call_back): Replace the definition type to
4871 GC_start_callback_proc.
4872 * alloc.c (GC_set_start_callback, GC_get_start_callback): New
4873 setter/getter function.
4874 * alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
4875 unconditionally (because GC_try_to_collect_inner always does full
4876 GC).
4877 * include/gc_mark.h (GC_start_callback_proc): New type.
4878 * include/gc_mark.h (GC_set_start_callback,
4879 GC_get_start_callback): New API function declaration.
4880
4881 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
4882 * os_dep.c (GC_get_main_stack_base): Recognize
4883 USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
4884 and use GC_get_stack_base() in this case.
4885
4886 * os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
4887 GC_find_limit_with_bound() should be called with the lock held).
4888 * backgraph.c (FOR_EACH_PRED): Fix a typo.
4889
4890 * alloc.c (GC_set_stop_func, GC_get_stop_func): Add
4891 DCL_LOCK_STATE.
4892 * finalize.c (GC_notify_or_invoke_finalizers): Likewise.
4893 * gc_dlopen.c (disable_gc_for_dlopen): Likewise.
4894 * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
4895 * mark.c (GC_print_trace): Likewise.
4896 * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
4897 GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
4898 GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
4899 GC_get_finalizer_notifier): Likewise.
4900 * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
4901 * pthread_support.c (GC_is_thread_tsd_valid,
4902 GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
4903 GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
4904 pthread_detach, GC_register_my_thread, GC_inner_start_routine,
4905 pthread_create): Likewise.
4906 * reclaim.c (GC_print_all_errors): Likewise.
4907 * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
4908 GC_unregister_my_thread, GC_do_blocking_inner,
4909 GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
4910 GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
4911 GC_init_parallel): Likewise.
4912
4913 * doc/README.darwin: Update.
4914
4915 * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
4916 usable on Mac OS X).
4917 * doc/README.cmake: Update.
4918
4919 * CMakeLists.txt: New file (adding CMake support).
4920 * tests/CMakeLists.txt: Likewise.
4921 * doc/README.cmake: Likewise.
4922
4923 * configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
4924 macros.
4925 * include/private/gc_priv.h (THREAD_FLD): Recognize
4926 __DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
4927
4928 * pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
4929 OpenBSD.
4930 * pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
4931 OpenBSD.
4932 * pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
4933 NetBSD and OpenBSD.
4934
4935 * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
4936 if THREADS is undefined.
4937 * include/gc.h (GC_malloc_many): Update the comment.
4938
4939 * include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
4940 (formerly known as Borland) C++ compiler v6.21+.
4941 * include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
4942 VC++ compilers.
4943
4944 * win32_threads.c (GC_register_my_thread_inner,
4945 GC_pthread_start_inner): Undo the previous commit changes for
4946 the thread flags and DETACHED state (since the state is only
4947 tested in GC_thread_exit_proc).
4948
4949 * include/gc.h (GC_unregister_my_thread): Fix a typo; update the
4950 comment.
4951 * pthread_support.c (GC_delete_thread): Allow to delete the main
4952 thread (don't call GC_INTERNAL_FREE for it); update the comment.
4953 * win32_threads.c (GC_delete_thread): Likewise.
4954 * pthread_support.c (GC_unregister_my_thread): Add an assertion
4955 for FINISHED flag is unset.
4956 * tests/test.c (check_heap_stats): Test the main thread
4957 unregistering (only if THREADS).
4958 * win32_threads.c (GC_register_my_thread_inner): Set flags to
4959 DETACHED (only if GC_PTHREADS).
4960 * win32_threads.c (GC_unregister_my_thread): Add FIXME (for
4961 GC_wait_for_gc_completion).
4962 * win32_threads.c (GC_pthread_start_inner): Clear flags detached
4963 state if needed; set pthread_id and flags while holding the lock.
4964
4965 * include/private/gc_priv.h (SIG_SUSPEND): Don't define for
4966 OpenBSD and Darwin.
4967
4968 * include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
4969
4970 * test.c (main, WinMain): Consistently don't invoke
4971 GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
4972 do invoke it even if parallel marking is enabled.
4973
4974 * tests/test.c (reverse_test): Comment out a check for MSWIN32
4975 (when determining BIG value) assuming outdated win32s.
4976 * tests/test.c (reverse_test): Rename to reverse_test_inner;
4977 change the declaration (to be of GC_fn_type); call itself thru
4978 GC_call_with_gc_active() if the argument is zero.
4979 * tests/test.c (reverse_test): New function added calling
4980 reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
4981 GC_call_with_gc_active).
4982
4983 * doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
4984 Document.
4985 * dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
4986 * dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
4987 PLATFORM_ANDROID.
4988 * include/private/gcconfig.h (LINUX): Define also if
4989 PLATFORM_ANDROID (for the windows-based toolkit).
4990 * include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
4991 define for Android/x86 platform.
4992 * include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
4993 new macro (undefine DYNAMIC_LOADING in this case).
4994 * include/private/gcconfig.h (CANCEL_SAFE): Don't define if
4995 PLATFORM_ANDROID.
4996 * include/private/gcconfig.h (IF_CANCEL): Fix definition for the
4997 explicitly defined CANCEL_SAFE.
4998
4999 * allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
5000 if GC_DISABLE_INCREMENTAL.
5001 * reclaim.c (GC_reclaim_generic): Likewise.
5002 * checksums.c (GC_page_was_ever_dirty): Add prototype.
5003 * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
5004 unless PARALLEL_MARK.
5005 * include/private/gc_priv.h (GC_dirty_maintained,
5006 GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
5007 declare if GC_DISABLE_INCREMENTAL.
5008 * include/private/gc_priv.h (GC_print_finalization_stats): Don't
5009 declare if SMALL_CONFIG.
5010 * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
5011 GC_DISABLE_INCREMENTAL (since nothing to check).
5012 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
5013 GC_DISABLE_INCREMENTAL.
5014 * os_dep.c (GC_dirty_maintained): Likewise.
5015 * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
5016 GC_DISABLE_INCREMENTAL.
5017 * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
5018 Uncomment; define only if CHECKSUMS.
5019
5020 * darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
5021 GC_push_all_stack() instead of GC_push_all_stack_frames()).
5022 * include/private/gc_priv.h (GC_push_all_stack_frames,
5023 GC_push_all_register_frames): Rename to
5024 GC_push_all_stack_sections and GC_push_all_register_sections,
5025 respectively.
5026 * mark_rts.c (GC_push_all_stack_frames,
5027 GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
5028 GC_push_current_stack): Likewise.
5029 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5030 * win32_threads.c (GC_push_stack_for): Likewise.
5031 * misc.c (GC_call_with_gc_active): Rename "frame" local variable
5032 to "stacksect".
5033 * pthread_support.c (GC_call_with_gc_active): Likewise.
5034 * win32_threads.c (GC_call_with_gc_active): Likewise.
5035 * pthread_support.c (GC_call_with_gc_active): Update FIXME for
5036 Darwin.
5037 * win32_threads.c (GC_Thread_Rep): Update the comment for
5038 traced_stack_sect.
5039
5040 * darwin_stop_world.c (GC_push_all_stacks): Rename
5041 activation_frame to traced_stack_sect.
5042 * include/private/gc_priv.h (GC_push_all_stack_frames,
5043 GC_push_all_register_frames): Likewise.
5044 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
5045 * mark_rts.c (GC_push_all_register_frames,
5046 GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
5047 GC_push_current_stack): Likewise.
5048 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5049 * pthread_support.c (GC_call_with_gc_active): Likewise.
5050 * win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
5051 GC_push_stack_for): Likewise.
5052 * include/private/gc_priv.h (GC_activation_frame_s): Rename to
5053 GC_traced_stack_sect_s.
5054 * include/private/gc_priv.h (GC_activation_frame): Rename to
5055 GC_traced_stack_sect.
5056 * misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
5057 * doc/README.macros (UNICODE): Document.
5058
5059 * doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
5060 * include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
5061 declare and use GC_envfile_getenv().
5062 * misc.c (GC_envfile_content, GC_envfile_length): New static
5063 variable (only if GC_READ_ENV_FILE).
5064 * misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
5065 * misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
5066 if GC_READ_ENV_FILE).
5067 * misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
5068 if GC_READ_ENV_FILE.
5069 * misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
5070 calls to be just before GC_envfile_init() one (since the latter
5071 uses GET_MEM).
5072 * misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
5073 WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
5074 * mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
5075 from the ABORT message.
5076 * misc.c (GC_init): Likewise.
5077 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
5078 Likewise.
5079 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5080 * pthread_support.c (GC_init_real_syms, start_mark_threads):
5081 Likewise.
5082
5083 * win32_threads.c (GC_get_next_stack): Don't define for Cygwin
5084 (since unused for now).
5085
5086 * dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
5087 GC_register_main_static_data() is defined.
5088 * dyn_load.c (GC_register_dynamic_libraries): Define only if used
5089 (if DYNAMIC_LOADING or PCR or Win32/CE).
5090 * dyn_load.c (GC_register_main_static_data): Define the default
5091 one only if DYNAMIC_LOADING.
5092 * include/private/gc_priv.h (GC_register_dynamic_libraries):
5093 Declare only if used (to prevent compiler warning).
5094
5095 * mark_rts.c (GC_approx_sp): Add a comment (for GCC).
5096
5097
5098 == [7.2alpha4] 2009-12-01 ==
5099
5100 * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
5101
5102 * include/gc.h (GC_get_suspend_signal): New function declaration.
5103 * misc.c (GC_get_suspend_signal): New API function (only if
5104 THREADS).
5105
5106 * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
5107 two if GC_incremental (instead of TRUE_INCREMENTAL).
5108
5109 * sparc_mach_dep.S (GC_push_regs): Remove the reference.
5110
5111 * os_dep.c (SIZE_T, PULONG_PTR): Remove.
5112 * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
5113 "word"); add the comment.
5114 * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
5115 GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
5116
5117 * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
5118 const value (for speed).
5119 * win32_threads.c (THREAD_TABLE_INDEX): New macro.
5120 * win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
5121 GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
5122 THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
5123 * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
5124
5125 * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
5126
5127 * backgraph.c: Remove apostrophe char from "#error".
5128
5129 * doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
5130 * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
5131 new macro; implicitly define it if SMALL_CONFIG.
5132 * alloc.c (GC_incremental, GC_timeout_stop_func): Check for
5133 GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
5134 * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
5135 GC_push_conditional): Likewise.
5136 * mark.c (GC_push_next_marked_dirty, GC_push_selected,
5137 GC_push_conditional, GC_block_was_dirty): Likewise.
5138 * misc.c (GC_enable_incremental): Likewise.
5139 * misc.c (GC_init): Likewise.
5140
5141 * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
5142 * misc.c (WIN32_LEAN_AND_MEAN): Likewise.
5143 * os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
5144 * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
5145 in a comment.
5146 * backgraph.c: Likewise.
5147 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
5148 * extra/threadlibs.c (main): Likewise.
5149 * pthread_support.c (pthread_join): Likewise.
5150 * tests/test.c (main): Likewise.
5151
5152 * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
5153 a duplicate symbol definition linker error).
5154 * misc.c (GC_clear_stack_inner): Likewise.
5155 * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
5156
5157 * include/private/gc_priv.h (GC_write_disabled): New variable
5158 declaration (only if GC_ASSERTIONS and Win32 threads).
5159 * misc.c (GC_write): Add assertion for GC_write_disabled value is
5160 not on (only if THREADS).
5161 * win32_threads.c (GC_write_disabled): New variable (only if
5162 GC_ASSERTIONS and not Cygwin).
5163 * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
5164 (while holding GC_write_cs).
5165
5166 * win32_threads.c (GC_please_stop): If DllMain-based thread
5167 registration is not compiled in then define GC_please_stop as
5168 a non-volatile variable for assertion only.
5169 * win32_threads.c (GC_stop_world): Set and clear only if defined.
5170 * win32_threads.c (GC_stop_world): Add the comment for GC_printf()
5171 usage (while holding GC_write_cs).
5172 * win32_threads.c (GC_delete_gc_thread): Likewise.
5173 * os_dep.c (GC_remove_protection): Likewise.
5174
5175 * pthread_support.c (GC_inner_start_routine): Join 3 sequential
5176 GC_printf() calls into a single one (for DEBUG_THREADS).
5177
5178 * include/private/gc_priv.h (GC_total_stacksize): New variable
5179 declaration (only if THREADS).
5180 * alloc.c (GC_total_stacksize): New variable (only if THREADS).
5181 * alloc.c (min_bytes_allocd): Calculate stack_size using
5182 GC_stackbottom only in the single-threaded case; otherwise use
5183 GC_total_stacksize; print GC_total_stacksize value if
5184 DEBUG_THREADS.
5185 * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
5186 specifier for lo/hi values (instead of "%lx").
5187 * darwin_stop_world.c (GC_push_all_stacks): Use
5188 GC_push_all_stack_frames() instead of GC_push_all_stack().
5189 * darwin_stop_world.c (GC_push_all_stacks): Recalculate
5190 GC_total_stacksize value.
5191 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5192 * win32_threads.c (GC_push_all_stacks): Likewise.
5193 * win32_threads.c (GC_push_stack_for): Pass "me" argument; return
5194 stack size; don't check for non-zero value of thread->stack_base.
5195 * win32_threads.c (GC_push_all_stacks): Don't call
5196 GC_push_stack_for() and don't check for "t->id == me" if
5197 thread->stack_base is zero.
5198
5199 * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
5200 with "0x".
5201 * os_dep.c (PROTECT): Likewise.
5202 * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
5203 int (to match printf type specifier).
5204
5205 * tests/test.c (check_heap_stats): Take into account the unmapped
5206 memory size when checking for "Unexpected heap growth"; remove
5207 FIXME.
5208
5209 * alloc.c: Revert last change.
5210
5211 * include/private/gcconfig.h (STACKBOTTOM): Add a presence check
5212 for eCos/NOSYS.
5213 * misc.c (GC_write): Comment out _Jv_diag_write() call (since no
5214 longer defined in GCJ).
5215
5216 * os_dep.c (brk): Rename to ecos_gc_brk.
5217
5218 * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
5219 stack_size even if THREADS.
5220 * doc/README.macros (DEBUG_THREADS): Document.
5221 * pthread_support.c (DEBUG_THREADS): Remove the commented out
5222 definition.
5223 * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
5224 definition.
5225 * win32_threads.c: Include errno.h (except for WinCE).
5226 * win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
5227 to local variables, and free "arg" parameter before "start"
5228 invocation.
5229 * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
5230 (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
5231 * win32_threads.c (GC_beginthreadex): Return 0 on error (instead
5232 of -1).
5233
5234 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
5235 Use GC_INNER for the function definition.
5236 * include/private/darwin_stop_world.h
5237 (GC_darwin_register_mach_handler_thread): Remove the prototype.
5238 * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
5239 for the function prototype.
5240 * include/private/gc_priv.h (NDEBUG): Explicitly define if
5241 NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
5242 inclusion).
5243
5244 * include/private/gcconfig.h: Move DebugBreak() workaround (for
5245 x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
5246
5247 * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
5248 GC_freehblk): Use GC_INNER for the function definition.
5249 * alloc.c (GC_never_stop_func, GC_should_collect,
5250 GC_try_to_collect_inner, GC_collect_a_little_inner,
5251 GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
5252 GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
5253 * backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
5254 Likewise.
5255 * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
5256 GC_promote_black_lists, GC_unpromote_black_lists,
5257 GC_add_to_black_list_normal, GC_add_to_black_list_stack,
5258 GC_is_black_listed): Likewise.
5259 * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
5260 GC_stop_init, GC_stop_world, GC_start_world): Likewise.
5261 * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
5262 GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
5263 GC_store_debug_info, GC_start_debugging,
5264 GC_debug_generic_malloc_inner,
5265 GC_debug_generic_malloc_inner_ignore_off_page,
5266 GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
5267 * dyn_load.c (GC_register_dynamic_libraries,
5268 GC_register_main_static_data, GC_init_dyld): Likewise.
5269 * finalize.c (GC_push_finalizer_structures, GC_finalize,
5270 GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
5271 Likewise.
5272 * gcj_mlc.c (GC_core_gcj_malloc): Likewise.
5273 * headers.c (GC_find_header, GC_header_cache_miss,
5274 GC_scratch_alloc, GC_init_headers, GC_install_header,
5275 GC_install_counts, GC_remove_header, GC_remove_counts,
5276 GC_next_used_block, GC_prev_block): Likewise.
5277 * mach_dep.c (GC_with_callee_saves_pushed): Likewise.
5278 * malloc.c (GC_collect_or_expand, GC_alloc_large,
5279 GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
5280 GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
5281 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
5282 * mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
5283 GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
5284 GC_clear_marks, GC_initiate_gc, GC_mark_some,
5285 GC_mark_stack_empty, GC_invalidate_mark_state,
5286 GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
5287 GC_mark_init, GC_push_all, GC_push_conditional,
5288 GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
5289 Likewise.
5290 * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
5291 GC_exclude_static_roots_inner, GC_push_all_register_frames,
5292 GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
5293 GC_push_roots): Likewise.
5294 * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
5295 Likewise.
5296 * new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
5297 * obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
5298 GC_initialize_offsets): Likewise.
5299 * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
5300 GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
5301 GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
5302 GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
5303 GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
5304 GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
5305 GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
5306 GC_page_was_ever_dirty, GC_remove_protection,
5307 GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
5308 GC_save_callers, GC_print_callers): Likewise.
5309 * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
5310 GC_start_world, GC_stop_init): Likewise.
5311 * pthread_support.c (GC_mark_thread_local_free_lists,
5312 GC_lookup_thread, GC_reset_finalizer_nested,
5313 GC_check_finalizer_nested, GC_segment_is_thread_stack,
5314 GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
5315 GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
5316 GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
5317 GC_wait_marker, GC_notify_all_marker): Likewise.
5318 * reclaim.c (GC_print_all_errors, GC_block_empty,
5319 GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
5320 GC_reclaim_all): Likewise.
5321 * thread_local_alloc.c (GC_init_thread_local,
5322 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
5323 * win32_threads.c (GC_reset_finalizer_nested,
5324 GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
5325 GC_start_world, GC_push_all_stacks, GC_get_next_stack,
5326 GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
5327 GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
5328 GC_thr_init, GC_init_parallel, GC_lock,
5329 GC_mark_thread_local_free_lists): Likewise.
5330 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
5331 GC_traverse_back_graph): Use GC_INNER for the function prototype.
5332 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
5333 Likewise.
5334 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
5335 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
5336 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
5337 GC_get_next_stack): Likewise.
5338 * finalize.c (GC_reset_finalizer_nested,
5339 GC_check_finalizer_nested): Likewise.
5340 * gcj_mlc.c (GC_start_debugging): Likewise.
5341 * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
5342 GC_has_other_debug_info, GC_store_debug_info): Likewise.
5343 * include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
5344 * include/private/gc_locks.h (GC_lock): Likewise.
5345 * include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
5346 GC_mark_from): Likewise.
5347 * include/private/pthread_support.h (GC_lookup_thread,
5348 GC_stop_init): Likewise.
5349 * include/private/thread_local_alloc.h (GC_init_thread_local,
5350 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
5351 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
5352 * mark.c (GC_page_was_ever_dirty): Likewise.
5353 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
5354 * misc.c (GC_register_main_static_data, GC_init_win32,
5355 GC_setpagesize, GC_init_linux_data_start,
5356 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
5357 GC_do_blocking_inner): Likewise.
5358 * os_dep.c (GC_greatest_stack_base_below): Likewise.
5359 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
5360 Likewise.
5361 * include/private/gc_priv.h: Likewise.
5362 * include/private/gc_priv.h (GC_INNER): Update the comment.
5363 * doc/README.macros (GC_DLL): Update.
5364
5365 * alloc.c (GC_collection_in_progress): Move the prototype to
5366 gc_priv.h.
5367 * gc_dlopen.c (GC_collection_in_progress): Likewise.
5368 * pthread_support.c (GC_collection_in_progress): Likewise.
5369 * misc.c (GC_init_parallel): Likewise.
5370 * pthread_support.c (GC_init_parallel): Likewise.
5371 * win32_threads.c (GC_init_parallel): Likewise.
5372 * darwin_stop_world.c (GC_thr_init): Likewise.
5373 * misc.c (GC_thr_init): Likewise.
5374 * pthread_stop_world.c (GC_thr_init): Likewise.
5375 * pthread_support.c (GC_thr_init): Likewise.
5376 * blacklst.c (GC_clear_bl, GC_copy_bl,
5377 GC_number_stack_black_listed): Make STATIC.
5378 * dbg_mlc.c (GC_print_obj, GC_make_closure,
5379 GC_debug_invoke_finalizer): Likewise.
5380 * malloc.c (GC_alloc_large_and_clear): Likewise.
5381 * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
5382 GC_push_marked4, GC_push_marked, GC_push_next_marked,
5383 GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
5384 Likewise.
5385 * misc.c (GC_clear_stack_inner): Likewise.
5386 * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
5387 * darwin_stop_world.c (FindTopOfStack): Make static; define only
5388 if not DARWIN_DONT_PARSE_STACK.
5389 * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
5390 * dyn_load.c (GC_repeat_read): Remove unused prototype.
5391 * include/private/gc_pmark.h (GC_find_start): Likewise.
5392 * misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
5393 * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
5394 THREADS).
5395 * dyn_load.c (GC_register_main_static_data): Define only if
5396 DYNAMIC_LOADING.
5397 * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
5398 "return" statement.
5399 * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
5400 GC_PTHREADS).
5401 * include/gc.h: Fix a typo.
5402 * include/gc_inline.h (GC_ASSERT): Define (if not defined) since
5403 the header is public.
5404 * include/gc_inline.h (GC_generic_malloc_many): New public
5405 function declaration.
5406 * mallocx.c (GC_generic_malloc_many): Make public.
5407 * include/private/gc_priv.h (GC_INNER): Use visibility attribute
5408 (if available).
5409 * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
5410 * include/private/gc_priv.h: Include atomic_ops.h if THREADS and
5411 MPROTECT_VDB.
5412 * os_dep.c: Don't include atomic_ops.h
5413 * win32_threads.c: Likewise.
5414 * include/private/gc_priv.h (GC_push_selected, GC_push_regs,
5415 GC_push_marked, GC_number_stack_black_listed,
5416 GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
5417 GC_generic_malloc_many, GC_make_closure,
5418 GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
5419 Remove the prototype.
5420 * mark.c (GC_page_was_ever_dirty): Add prototype (only if
5421 PROC_VDB).
5422 * include/private/gc_priv.h (GC_push_next_marked_dirty,
5423 GC_push_next_marked, GC_push_next_marked_uncollectable): Move
5424 the prototype to mark.c.
5425 * include/private/gc_priv.h (GC_is_static_root): Declare only if
5426 not THREADS.
5427 * include/private/gc_priv.h (GC_free_inner): Declare only if
5428 THREADS.
5429 * include/private/gc_priv.h (GC_debug_free_inner): Declare only if
5430 THREADS and DBG_HDRS_ALL.
5431 * include/private/gc_priv.h (GC_markers): Declare GC_markers only
5432 if PARALLEL_MARK.
5433 * include/private/gc_priv.h (GC_register_main_static_data): Move
5434 the prototype to misc.c.
5435 * mach_dep.c (GC_push_regs): Make STATIC; define only along with
5436 HAVE_PUSH_REGS definition.
5437 * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
5438 definition with the ANSI C one.
5439 * mark.c (GC_started_thread_while_stopped): Declared only if not
5440 GNU C.
5441 * win32_threads.c (GC_started_thread_while_stopped): Don't define
5442 if GNU C.
5443 * mark.c (GC_mark_from): Avoid unbalanced brackets in
5444 #if-#else-#endif blocks.
5445 * mark_rts.c (GC_is_static_root): Define only if not THREADS.
5446 * os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
5447 * os_dep.c (GC_page_was_ever_dirty): Comment out the function
5448 except for PROC_VDB.
5449 * tests/test.c (main): Don't reference GC_print_obj,
5450 GC_make_closure, GC_debug_invoke_finalizer,
5451 GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
5452 * thread_local_alloc.c: Don't include "gc_inline.h".
5453 * win32_threads.c (GC_write_fault_handler): Declare only if
5454 MPROTECT_VDB.
5455
5456 * allchblk.c (DEBUG): Remove macro (since unused).
5457 * allchblk.c: Include private/gc_priv.h before other includes and
5458 definitions.
5459 * alloc.c: Likewise.
5460 * gc_dlopen.c: Likewise.
5461 * headers.c: Likewise.
5462 * mallocx.c: Likewise.
5463 * mark_rts.c: Likewise.
5464 * new_hblk.c: Likewise.
5465 * reclaim.c: Likewise.
5466 * mark.c: Include private/gc_pmark.h before other includes.
5467 * misc.c: Likewise.
5468 * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
5469 * pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
5470 * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
5471 already defined in gc_config_macros.h).
5472 * dyn_load.c (GC_init_dyld): Remove parameter cast for
5473 _dyld_register_func_for_add_image() and
5474 _dyld_register_func_for_remove_image(); add the comment about
5475 possible warnings; add FIXME for the deprecated
5476 _dyld_bind_fully_image_containing_address().
5477 * include/private/gc_priv.h: Include gc.h before the standard
5478 headers inclusion.
5479 * tests/test.c: Likewise.
5480 * include/private/gcconfig.h (DebugBreak): Update the comment.
5481 * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
5482
5483 * configure.ac (openbsd): Define GC_OPENBSD_THREADS.
5484 * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
5485 * configure.ac: Add sparc-openbsd case.
5486 * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
5487 Document.
5488 * tests/test.c (main): Handle OpenBSD case.
5489 * include/private/pthread_stop_world.h: Likewise.
5490 * extra/threadlibs.c (main): Replace K&R-style function definition
5491 with the ANSI C one.
5492 * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
5493 * dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
5494 * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
5495 define it for OpenBSD.
5496 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
5497 pthread_sigmask): Don't declare and redefine for OpenBSD.
5498 * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, x86,
5499 x64, powerpc).
5500 * mach_dep.c (NO_GETCONTEXT): Likewise.
5501 * include/private/pthread_stop_world.h (thread_stop_info): Don't
5502 define last_stop_count field if OpenBSD.
5503 * misc.c (GC_init_dyld): Add declaration (if NetBSD).
5504 * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
5505 * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
5506 * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
5507 (only if OpenBSD).
5508 * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
5509 GC_skip_hole_openbsd): New static function (only if OpenBSD).
5510 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
5511 GC_register_data_segments): Define specially for OpenBSD case.
5512 * os_dep.c (GC_fault_handler_lock): Initialize to
5513 AO_TS_INITIALIZER (instead of 0).
5514 * pthread_support.c (GC_allocate_lock): Likewise.
5515 * pthread_stop_world.c (NSIG, GC_print_sig_mask,
5516 GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
5517 GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
5518 GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
5519 GC_restart_handler): Don't define and use if OpenBSD.
5520 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
5521 GC_start_world): Handle OpenBSD case.
5522 * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
5523 * pthread_support.c (pthread_sigmask): Don't undefine the macro and
5524 don't define the wrapper function if OpenBSD.
5525 * pthread_support.c (GC_thr_init): Handle OpenBSD case.
5526
5527 * dyn_load.c: Move the inclusion of private/gc_priv.h below
5528 definition of a feature macro (_GNU_SOURCE).
5529
5530 * include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
5531 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
5532 (only if GC_I_HIDE_POINTERS).
5533 * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
5534 * dbg_mlc.c (GC_get_back_ptr_info): Likewise.
5535 * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
5536 GC_enqueue_all_finalizers): Likewise.
5537 * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
5538 * finalize.c (GC_general_register_disappearing_link,
5539 GC_unregister_disappearing_link, GC_register_finalizer_inner,
5540 GC_finalize): Likewise.
5541 * include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
5542 * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
5543 of I_HIDE_POINTERS.
5544 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
5545 * include/gc.h (_GC_H): Strip leading underscore.
5546 * include/gc_backptr.h (_GC_H): Likewise.
5547 * include/gc_gcj.h (_GC_H): Likewise.
5548 * include/gc_mark.h (_GC_H): Likewise.
5549 * include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
5550 * include/javaxfc.h (_GC_H): Likewise.
5551 * include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
5552 * include/private/dbg_mlc.h (_GC_H): Likewise.
5553 * include/private/gc_priv.h (_GC_H): Likewise.
5554
5555 * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
5556
5557 * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
5558 variable definitions).
5559 * include/private/gc_priv.h (GC_EXTERN): Update the comment.
5560 * allchblk.c (GC_unmap_threshold): Define as GC_INNER.
5561 * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
5562 GC_n_memory, GC_fail_count): Likewise.
5563 * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
5564 * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
5565 * mach_dep.c (GC_save_regs_ret_val): Likewise.
5566 * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
5567 GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
5568 GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
5569 GC_mark_no, GC_markers): Likewise.
5570 * mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
5571 * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
5572 GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
5573 GC_backtraces, GC_force_unmap_on_gcollect,
5574 GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
5575 GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
5576 * os_dep.c (GC_page_size, GC_dont_query_stack_min,
5577 GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
5578 GC_dirty_maintained, GC_fault_handler_lock): Likewise.
5579 * pthread_support.c (GC_allocate_ml, GC_lock_holder,
5580 GC_need_to_lock, GC_thr_initialized, GC_threads,
5581 GC_in_thread_creation, GC_collecting, GC_allocate_lock,
5582 GC_mark_lock_holder): Likewise.
5583 * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
5584 Likewise.
5585 * win32_threads.c (GC_allocate_ml, GC_lock_holder,
5586 GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
5587 * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
5588 * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
5589
5590 * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
5591 GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
5592 case (since they are not defined inside GC at present).
5593 * include/private/gc_priv.h (GC_objects_are_marked): Remove the
5594 declaration (since made static).
5595 * mark.c (GC_objects_are_marked): Define as STATIC.
5596 * win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
5597 Likewise.
5598 * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
5599 to initialize GC_n_kinds).
5600 * win32_threads.c (start_mark_threads): Adjust the comment.
5601
5602 * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
5603 function.
5604 * backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
5605 * mark_rts.c (add_roots_to_index): Likewise.
5606
5607 * extra/gc.c: New file.
5608 * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
5609
5610 * misc.c (GC_log): Remove the declaration; move the definition (to
5611 the place where it is used); make STATIC.
5612 * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
5613 to print open log failure.
5614 * misc.c (GC_write): Don't abort on open log failure if the GC is
5615 compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
5616
5617 * include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
5618
5619 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
5620 the variable declaration to gc_priv.h.
5621 * alloc.c (GC_bytes_found, GC_unmap_threshold,
5622 GC_force_unmap_on_gcollect): Likewise.
5623 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
5624 * finalize.c (GC_fail_count): Likewise.
5625 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
5626 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
5627 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
5628 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
5629 GC_mark_stack_too_small, GC_mark_state): Likewise.
5630 * include/private/pthread_support.h (GC_threads,
5631 GC_thr_initialized, GC_in_thread_creation): Likewise.
5632 * mallocx.c (GC_bytes_found): Likewise.
5633 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
5634 * misc.c (GC_unmap_threshold): Likewise.
5635 * os_dep.c (GC_unmap_threshold): Likewise.
5636 * pthread_support.c (GC_markers): Likewise.
5637 * thread_local_alloc.c (GC_gcjobjfreelist,
5638 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5639 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
5640 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
5641 * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
5642 a tag for now); defined after "gcconfig.h" inclusion.
5643 * include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
5644 keyword for most global variables.
5645 * alloc.c (GC_copyright): Add the comment about the symbol
5646 visibility.
5647 * finalize.c (GC_fo_entries): Likewise.
5648 * include/private/gc_priv.h (GC_print_stats): Likewise.
5649 * misc.c (GC_quiet): Likewise.
5650 * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
5651 STATIC.
5652 * pthread_support.c (GC_threads): Add explicit zero initializer
5653 (to make the variable definition differ from the declaration).
5654
5655 * backgraph.c (GC_quiet): Remove the declaration (not needed
5656 anymore since gc_priv.h is always included).
5657 * checksums.c (GC_quiet): Likewise.
5658 * gcj_mlc.c (GC_quiet): Likewise.
5659 * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
5660 comment.
5661 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
5662 GC_hdr_cache_misses): Likewise.
5663 * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
5664 * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
5665 Likewise.
5666 * win32_threads.c (GC_please_stop, GC_max_thread_index,
5667 GC_mark_mutex_waitcnt): Likewise.
5668
5669 * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
5670 'D') in the name.
5671
5672 * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
5673 redirection is turned off; turn it on later when dlopen real
5674 symbol is no longer needed (according to the comment and the same
5675 as in dyn_load.c).
5676 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
5677 REAL_DLFUNC, respectively (to have unique names since the
5678 definitions may differ from that of the similar ones in
5679 pthread_support.c).
5680 * mark.c (source): Undefine the macro when no longer needed.
5681 * os_dep.c (handler): Rename the type to GC_fault_handler_t (to
5682 have the unique name across the project).
5683 * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
5684 comment.
5685 * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
5686 * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
5687 longer needed.
5688
5689 * pthread_stop_world.c (pthread_sigmask): Undefine before using
5690 in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
5691 * win32_threads.c (dlopen, _beginthread): Don't undefine (since
5692 neither redirected nor used here).
5693 * win32_threads.c (GC_Thread_Rep): Rename "table_management" to
5694 "tm" for short; remove "tm_" prefix.
5695 * win32_threads.c (in_use, next): Don't define the macros; use
5696 tm.in_use and tm.next fields, respectively (to ease debugging).
5697 * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
5698 unique name across the project).
5699
5700 * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
5701 inclusion.
5702 * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
5703 not included yet.
5704 * finalize.c (I_HIDE_POINTERS): Don't define.
5705 * include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
5706 * misc.c (I_HIDE_POINTERS): Likewise.
5707 * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
5708 GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
5709 * include/private/gc_pmark.h: Remove the comment about gc_priv.h
5710 inclusion order.
5711
5712 * dyn_load.c: Include gc_priv.h before using configuration
5713 information (MACOS).
5714 * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
5715 GC_MUST_RESTORE_REDEFINED_DLOPEN.
5716
5717 * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
5718 properly.
5719 * darwin_stop_world.c: Replace "if DEBUG_THREADS" with
5720 "ifdef DEBUG_THREADS".
5721 * pthread_stop_world.c: Likewise.
5722 * pthread_support.c: Likewise.
5723 * include/gc_inline.h: Guard with GC_INLINE_H.
5724
5725 * alloc.c (GC_copyright): Define as const.
5726 * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
5727 (since the name starts with "GC_" prefix).
5728 * dbg_mlc.c (GC_describe_type_fns): Likewise.
5729 * dyn_load.c (GC_FirstDLOpenedLinkMap,
5730 GC_register_dynlib_callback, GC_dyld_sections,
5731 GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
5732 Likewise.
5733 * malloc.c (GC_libpthread_start, GC_libpthread_end,
5734 GC_libld_start, GC_libld_end): Likewise.
5735 * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
5736 Likewise.
5737 * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
5738 GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
5739 GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
5740 GC_forward_exception): Likewise.
5741 * pthread_support.c (GC_syms_initialized): Likewise.
5742 * typd_mlc.c (GC_push_typed_structures_proc): Likewise.
5743 * win32_threads.c (GC_win32_dll_threads,
5744 GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
5745 GC_waitForSingleObjectInfinite): Likewise.
5746 * darwin_stop_world.c (GC_use_mach_handler_thread,
5747 GC_use_mach_handler_thread, GC_mach_threads_count): Replace
5748 "static" with "STATIC" and add zero initializer.
5749 * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
5750 GC_sigbus_count): Likewise.
5751 * headers.c (free_hdr): Replace "static" with GC_INLINE.
5752 * misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
5753 * os_dep.c (memory): Rename static variable to ecos_gc_memory.
5754 * os_dep.c (async_set_pht_entry_from_index): Make static (for
5755 MPROTECT_VDB case).
5756 * pthread_support.c (GC_real_pthread_create,
5757 GC_real_pthread_sigmask, GC_real_pthread_join,
5758 GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
5759 for static GC_real_XXX symbols.
5760 * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
5761
5762 * alloc.c (GC_finish_collection): Replace getenv() with GETENV().
5763 * dyn_load.c (GC_init_dyld): Likewise.
5764 * os_dep.c (GC_print_callers): Likewise.
5765 * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
5766 result (since it's always of "struct mach_header" type).
5767 * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
5768 GC_dyld_image_remove (to always have the first argument of
5769 "struct mach_header" pointer type).
5770
5771 * configure.ac: Add threads support for OpenBSD case (threads may
5772 not work correctly for it).
5773
5774 * acinclude.m4: Rename to m4/gc_set_version.m4.
5775 * m4/libtool.m4: Delete the file.
5776 * m4/lt~obsolete.m4: Likewise.
5777 * m4/ltoptions.m4: Likewise.
5778 * m4/ltsugar.m4: Likewise.
5779 * m4/ltversion.m4: Likewise.
5780
5781 * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
5782 x86mingw32ce toolchain to workaround the incorrect DebugBreak()
5783 declaration in winbase.h (the workaround would turn into a no-op
5784 when DebugBreak() will be defined as a macro in the toolchain).
5785
5786 * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
5787 x86mingw32ce toolchain).
5788 * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
5789 toolchain (or if already defined).
5790 * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
5791 defined for WinCE or if NO_GETENV is defined).
5792 * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
5793 NO_GETENV one.
5794
5795 * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
5796 * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
5797 * libtool.m4: Remove.
5798 * m4/libtool.m4: New file (generated).
5799 * m4/lt~obsolete.m4: Likewise.
5800 * m4/ltoptions.m4: Likewise.
5801 * m4/ltsugar.m4: Likewise.
5802 * m4/ltversion.m4: Likewise.
5803
5804 * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
5805 prefix GC_CreateThread and GC_ExitThread with '_' if defined.
5806 * doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
5807
5808 * alloc.c (GC_collect_or_expand): Add "retry" argument; add the
5809 comments; don't use "default" stop_func on a retry if
5810 GC_dont_expand.
5811 * alloc.c (GC_allocobj): Pass "retry" argument to
5812 GC_collect_or_expand().
5813 * malloc.c (GC_alloc_large): Likewise.
5814 * include/private/gc_priv.h (GC_collect_or_expand): Move the
5815 declaration to malloc.c; add "retry" argument.
5816
5817 * alloc.c (GC_start_call_back): Move the variable definition from
5818 misc.c.
5819 * include/private/gc_priv.h (GC_start_call_back): Remove the
5820 declaration.
5821 * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
5822 * alloc.c (GC_try_to_collect_inner): Also call stop_func at the
5823 beginning of the function.
5824 * include/gc.h (GC_try_to_collect): Refine the comment about
5825 stop_func.
5826
5827 * alloc.c (GC_default_stop_func, GC_try_to_collect_general,
5828 GC_gcollect): Add the comment.
5829 * alloc.c (GC_try_to_collect_general): Move the assertion on
5830 stop_func != 0 to GC_try_to_collect().
5831 * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
5832 GC_default_stop_func instead (holding the lock).
5833 * alloc.c (GC_gcollect): Pass 0 as stop_func instead of
5834 GC_default_stop_func (to prevent data races).
5835
5836 * Makefile.direct: Move "define arguments" documentation to
5837 doc/README.macros; add reference to doc/README.macros.
5838 * Makefile.dj: Change the documentation reference to
5839 doc/README.macros.
5840 * README.QUICK: Likewise.
5841 * configure.ac: Likewise.
5842 * allchblk.c: Remove unnecessary "-D" from the comment.
5843 * doc/README.macros: Likewise.
5844 * README.environment: Likewise.
5845 * include/gc.h: Likewise.
5846 * include/gc_inline.h: Likewise.
5847 * include/private/gcconfig.h: Likewise.
5848 * README.QUICK: Fix a typo.
5849
5850 * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
5851 CreateFile(); don't immediately flush every write if very verbose.
5852
5853 * doc/README.win32: Replace ".exe.log" to ".gc.log".
5854 * doc/README.win64: Likewise.
5855 * doc/README.win64: Fix a typo.
5856 * misc.c (GC_CreateLogFile): Strip executable file extension for
5857 the log file; use ".gc.log" extension (instead of ".log").
5858
5859 * include/gc_config_macros.h: Avoid the redefinition of
5860 GC_xxx_THREADS macros.
5861
5862 * alloc.c (GC_try_to_collect_general): Change the type of "result"
5863 local variable to GC_bool.
5864
5865 * include/gc_config_macros.h: Use old behavior for FreeBSD and
5866 NetBSD platform detection code (check that other GC_xxx_THREADS
5867 are undefined); add FIXME.
5868
5869 * include/gc_config_macros.h: Rearrange the platform detection
5870 code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
5871 GC_THREADS first if GC_XXX_THREADS already set; define proper
5872 GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
5873 place; define _REENTRANT if posix threads except for Win32).
5874
5875 * alloc.c (GC_try_to_collect_general): New function (move the code
5876 from GC_try_to_collect, pass force_unmap argument).
5877 * alloc.c (GC_try_to_collect, GC_gcollect): Call
5878 GC_try_to_collect_general().
5879 * alloc.c (GC_gcollect_and_unmap): New public function.
5880 * include/gc.h (GC_gcollect_and_unmap): New function declaration.
5881 * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
5882 WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
5883 and GC_gcollect()).
5884
5885 * include/gc.h (GC_allow_register_threads, GC_register_my_thread,
5886 GC_unregister_my_thread, GC_malloc_many): Refine the comment.
5887 * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
5888 (that is, don't depend on GC_THREADS macro).
5889 * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
5890 with a check for GC_PTHREADS (since the former implies the
5891 latter).
5892
5893 * include/gc.h (GC_SOLARIS_THREADS): Don't check for.
5894 * include/gc.h (GC_MIN, GC_MAX): Don't define.
5895 * mallocx.c (GC_malloc_many): Add comment to #endif.
5896
5897 * configure.ac: Drop the subdir-objects Automake option, since
5898 it's incompatible with picking source files from libatomic_ops.
5899
5900 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
5901 "extern" keyword to a global variable declaration (some compilers
5902 require it).
5903 * alloc.c (GC_bytes_found, GC_unmap_threshold,
5904 GC_force_unmap_on_gcollect): Likewise.
5905 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
5906 * finalize.c (GC_fail_count): Likewise.
5907 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
5908 GC_hdr_cache_misses): Likewise.
5909 * mallocx.c (GC_bytes_found): Likewise.
5910 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
5911 * misc.c (GC_unmap_threshold): Likewise.
5912 * os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
5913 * pthread_support.c (GC_markers): Likewise.
5914 * thread_local_alloc.c (GC_gcjobjfreelist,
5915 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5916 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
5917 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
5918
5919 * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
5920 suppress misleading GC "Out of Memory!" warning printed on every
5921 GC_MALLOC(LONG_MAX) call.
5922 * tests/huge_test.c: Include "gc.h" instead of <gc.h>.
5923 * tests/huge_test.c (main): Replace K&R-style function definition
5924 with the ANSI C one.
5925
5926 * dyn_load.c (GC_register_dynamic_libraries): Always use
5927 lpMaximumApplicationAddress value for WinCE (even for old
5928 versions).
5929 * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
5930 * os_dep.c (GC_dont_query_stack_min): New global variable (only if
5931 WinCE and THREADS).
5932 * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
5933 for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
5934 GC_dont_query_stack_min for older WinCE (prior to version 5).
5935 * win32_threads.c (GC_dont_query_stack_min): Declare.
5936 * win32_threads.c (GC_get_stack_min): Rename the macro to
5937 GC_wince_evaluate_stack_min for WinCE; update the comment.
5938 * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
5939 GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
5940 WinCE and don't update thread's last_stack_min value (only if
5941 GC_dont_query_stack_min).
5942 * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
5943 GC_dont_query_stack_min (since the evaluated stack_min value may
5944 be incorrect if the stack is bigger than 64 KiB).
5945
5946 * gc_dlopen.c (GC_dlopen): Add function redirector (only if
5947 GC_USE_LD_WRAP).
5948 * include/gc.h: Include "gc_pthread_redirects.h" even if
5949 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
5950 * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
5951 define and check for (since included only from gc.h).
5952 * include/gc_pthread_redirects.h: Declare "GC_" symbols even if
5953 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
5954 * include/gc_pthread_redirects.h: Include signal.h only to get
5955 sigset_t definition.
5956
5957 * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
5958 * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
5959 NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
5960 * os_dep.c (GC_sysinfo): Remove explicit global variable
5961 initialization to "{0}" (revert back the previous change) since it
5962 might produce a warning.
5963
5964 * allchblk.c (GC_large_alloc_warn_interval): Move declaration from
5965 gc_priv.h.
5966 * allchblk.c (GC_large_alloc_warn_suppressed): Move definition
5967 from misc.c; define as STATIC.
5968 * include/private/gc_priv.h (GC_large_alloc_warn_interval,
5969 GC_large_alloc_warn_suppressed): Remove declaration.
5970 * alloc.c (GC_bytes_found): Add "defined in" comment.
5971 * mallocx.c (GC_bytes_found): Likewise.
5972 * misc.c (GC_unmap_threshold): Likewise.
5973 * os_dep.c (GC_old_allocator): Likewise.
5974 * pthread_support.c (GC_markers): Likewise.
5975 * thread_local_alloc.c (GC_gcjobjfreelist,
5976 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5977 * win32_threads.c (GC_markers): Likewise.
5978 * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
5979 be distinctive from a variable declaration).
5980 * backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
5981 * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
5982 GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
5983 * checksums.c (GC_faulted, GC_n_dirty_errors,
5984 GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
5985 GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
5986 * dbg_mlc.c (GC_smashed): Likewise.
5987 * finalize.c (GC_old_dl_entries): Likewise.
5988 * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
5989 GC_gcjdebugobjfreelist): Likewise.
5990 * mach_dep.c (GC_save_regs_ret_val): Likewise.
5991 * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
5992 GC_mark_stack_top): Likewise.
5993 * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
5994 Likewise.
5995 * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
5996 GC_old_segv_handler, GC_old_bus_handler,
5997 GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
5998 GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
5999 * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
6000 * reclaim.c (GC_leaked): Likewise.
6001 * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
6002 GC_typed_mark_proc_index, GC_array_mark_proc_index,
6003 GC_eobjfreelist, GC_arobjfreelist): Likewise.
6004 * win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
6005 GC_marker_Id): Likewise.
6006 * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
6007 * gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
6008 * os_dep.c (GC_vd_base): Likewise.
6009 * pthread_support.c (GC_mark_threads): Likewise.
6010 * reclaim.c (GC_leaked): Likewise.
6011 * typd_mlc.c (GC_bm_table): Likewise.
6012 * mark_rts.c (GC_save_regs_ret_val): Change declaration type to
6013 that of definition; add "defined in" comment.
6014 * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
6015 GC_save_regs_ret_val.
6016 * misc.c (GC_check_heap, GC_print_all_smashed,
6017 GC_start_call_back): Remove unnecessary cast (of 0).
6018 * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
6019 * misc.c (GC_large_alloc_warn_interval): Initialize to
6020 GC_LARGE_ALLOC_WARN_INTERVAL value.
6021 * misc.c (GC_tmp): Change to "static".
6022 * os_dep.c (GC_mprotect_state): Define as static.
6023 * pthread_support.c (dummy_thread_local): Prefix with "GC_".
6024 * win32_threads.c (WinMain): Remove FIXME for WinCE.
6025
6026 * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
6027
6028 * configure.ac: Rewrite the tests for external or internal
6029 libatomic_ops.
6030 * configure.ac: In particular, drop the symbolic links. Add option
6031 --with-libatomic-ops for forced selection.
6032 * Makefile.am: Adjust the path of source files from libatomic_ops
6033 to not use the links.
6034 * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
6035 be empty if we use the bundled AO sources.
6036
6037 * Makefile.am: Strip version suffix for libatomic_ops directory.
6038 * build_atomic_ops.sh: Likewise.
6039 * build_atomic_ops.sh.cygwin: Likewise.
6040 * configure_atomic_ops.sh: Likewise.
6041 * Makefile.direct: Remove AO_VERSION definition; strip version
6042 suffix for libatomic_ops directory.
6043 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6044 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6045 * NT_X64_THREADS_MAKEFILE: Likewise.
6046 * gc.mak: Likewise.
6047
6048 * libatomic_ops: Rename from "libatomic_ops-1.2".
6049
6050 * alloc.c (GC_version): Add "const" keyword.
6051 * alloc.c (GC_get_version): New public function.
6052 * include/gc.h (GC_get_version): New function declaration; update
6053 the comment for the GC version.
6054
6055 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
6056 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
6057 (for the global variable declaration) again.
6058 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
6059 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
6060 GC_mark_stack_too_small, GC_mark_state): Likewise.
6061 * include/private/gcconfig.h (GC_register_stackbottom): Likewise.
6062 * include/private/pthread_support.h (GC_threads,
6063 GC_thr_initialized, GC_in_thread_creation): Likewise.
6064 * include/private/gc_priv.h: Likewise.
6065
6066 * real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
6067
6068 * allchblk.c (GC_hblkfreelist): Define as STATIC.
6069 * blacklst.c (GC_total_stack_black_listed): Likewise.
6070 * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
6071 GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
6072 declaration.
6073 * mark_rts.c (GC_stopped_mark): Add declaration (only if
6074 THREAD_LOCAL_ALLOC).
6075 * allchblk.c (GC_fail_count): Move the declaration out of
6076 GC_allochblk_nth(); remove "extern".
6077 * alloc.c (IF_THREADS): Remove unused macro.
6078 * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
6079 * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
6080 THREAD_LOCAL_ALLOC.
6081 * alloc.c (GC_bytes_found, GC_collection_in_progress,
6082 GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
6083 Remove K&R-style "extern" for the declaration.
6084 * dbg_mlc.c (GC_free_inner): Likewise.
6085 * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
6086 GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
6087 * finalize.c (GC_fail_count): Likewise.
6088 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
6089 GC_hdr_cache_misses): Likewise.
6090 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
6091 GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
6092 Likewise.
6093 * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
6094 GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
6095 GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
6096 * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
6097 GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
6098 GC_page_size, GC_sysinfo, GC_black_list_spacing,
6099 GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
6100 GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
6101 GC_large_alloc_warn_suppressed, GC_blocked_sp,
6102 GC_activation_frame, GC_push_other_roots,
6103 GC_push_finalizer_structures, GC_push_thread_structures,
6104 GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
6105 GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
6106 GC_print_heap_obj, GC_have_errors, GC_print_stats,
6107 GC_dump_regularly, GC_backtraces, GC_print_back_height,
6108 GC_debug_generic_malloc_inner,
6109 GC_debug_generic_malloc_inner_ignore_off_page,
6110 GC_fl_builder_count, GC_mark_no, GC_help_marker,
6111 GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
6112 * include/private/gcconfig.h (GC_SysVGetDataStart,
6113 GC_FreeBSDGetDataStart, GC_register_stackbottom,
6114 GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
6115 * include/private/pthread_support.h (GC_threads,
6116 GC_thr_initialized, GC_in_thread_creation): Likewise.
6117 * malloc.c (GC_text_mapping): Likewise.
6118 * mallocx.c (GC_bytes_found): Likewise.
6119 * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
6120 * mark_rts.c (GC_save_regs_ret_val): Likewise.
6121 * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
6122 GC_setpagesize, GC_init_linux_data_start,
6123 GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
6124 * os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
6125 GC_darwin_register_mach_handler_thread): Likewise.
6126 * pthread_support.c (GC_markers, GC_collection_in_progress):
6127 Likewise.
6128 * tests/test.c (GC_amiga_free_all_mem): Likewise.
6129 * thread_local_alloc.c (GC_gcjobjfreelist,
6130 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
6131 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
6132 GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
6133 * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
6134 Move the declaration out of GC_init(); remove "extern".
6135 * os_dep.c (GC_abort): Add the comment; add workaround to suppress
6136 compiler "unreachable code" warnings for ABORT callers (where
6137 ABORT is followed by a dummy return statement).
6138 * os_dep.c (GC_old_allocator): Move the declaration out of
6139 GC_default_push_other_roots(); remove "extern".
6140 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
6141 Move the declaration out of GC_stop_world() and GC_start_world()
6142 (only if MPROTECT_VDB); remove "extern".
6143
6144 * win32_threads.c (GC_get_stack_min, GC_push_stack_for,
6145 GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
6146 WinCE emulation and for custom WinCE 6 devices); add the comment.
6147 * win32_threads.c (GC_get_stack_min): Cast pointer to word instead
6148 of DWORD.
6149 * win32_threads.c (GC_get_next_stack): Don't use and maintain the
6150 latest known stack_min value for WinCE (if GC_get_stack_min is
6151 defined as a macro); update the comments.
6152 * win32_threads.c (GC_wnt): Don't declare for WinCE.
6153
6154 * Makefile.direct: Document EMPTY_GETENV_RESULTS.
6155 * gcj_mlc.c (GC_clear_stack): Remove declaration.
6156 * malloc.c (GC_clear_stack): Likewise.
6157 * mallocx.c (GC_clear_stack): Likewise.
6158 * typd_mlc.c (GC_clear_stack): Likewise.
6159 * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
6160 GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
6161 remove "lb" unnecessary cast to word.
6162 * include/private/gc_priv.h (GC_clear_stack): Add declaration.
6163 * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
6164 Move common declaration from typd_mlc.c and malloc.c; remove
6165 unnecessary result and "lb" parameter casts.
6166 * include/private/thread_local_alloc.h: Guard against duplicate
6167 header file inclusion.
6168 * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
6169 the case when USE_MMAP is not defined.
6170 * pthread_support.c (GC_is_thread_tsd_valid): New internal
6171 function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
6172 code from thread-local GC_malloc(); add FIXME for the condition.
6173 * win32_threads.c (GC_is_thread_tsd_valid): Likewise.
6174 * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
6175 match that of its definition).
6176 * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
6177 GC_gcjobjfreelist.
6178 * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
6179 Remove unused declaration; don't include pthread.h.
6180 * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
6181 (only if GC_ASSERTIONS).
6182 * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
6183 instead of GC_lookup_thread().
6184 * win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
6185 * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
6186 id different from that in os_dep.c).
6187
6188 * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
6189 with GC_INLINE.
6190 * include/private/gc_priv.h (fixed_getenv): Likewise.
6191 * alloc.c (GC_max, GC_min): Replace "static INLINE" with
6192 GC_INLINE.
6193 * mark_rts.c (rt_hash): Likewise.
6194 * win32_threads.c (GC_get_max_thread_index): Likewise.
6195 * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
6196 "static"; define for Sun CC; define for VC++ (and other
6197 compilers).
6198 * pthread_support.c: Don't define __inline__ for non-GNU compilers
6199 (not needed anymore).
6200
6201 * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
6202 * Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
6203 * Makefile.am: Likewise.
6204 * Makefile.dj: Likewise.
6205 * Makefile.direct: Likewise.
6206 * doc/README.win32: Add reference to gc.mak.
6207 * NT_X64_THREADS_MAKEFILE: Likewise.
6208
6209 * Makefile.direct: Remove references to acinclude.m4, libtool.m4.
6210
6211 * autogen.sh: Update.
6212
6213 * Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
6214 * acinclude.m4: Fix underquoting of GC_SET_VERSION.
6215 * README.QUICK: Update information for Makefile.
6216 * Makefile.am: Do not distribute the substituted bdw-gc.pc.
6217 * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
6218 * tests/tests.am: Use it here to conditionally enable tracetest
6219 when possible.
6220
6221 * dyn_load.c (GC_wnt): Update the comment.
6222 * dyn_load.c (GC_register_dynamic_libraries): Add the comment for
6223 _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
6224 macro); call GC_is_heap_base() only if check for Type succeeded.
6225
6226 * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
6227 update the comment.
6228 * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
6229
6230 * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
6231 * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
6232 ASSERT_CANCEL_DISABLED): New macros.
6233 * alloc.c (GC_maybe_gc): Assert cancellation disabled.
6234 (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
6235 Disable cancellation.
6236 (GC_add_to_our_memory): Check for overflow.
6237 * misc.c (GC_cancel_disable_count): declare.
6238 (GC_init, GC_write): Disable cancellation.
6239 (GC_init): Remove redundant GC_is_initialized test.
6240 * os_dep.c (GC_repeat_read): Assert cancellation disabled.
6241 (GC_get_stack_base): Disable cancellation.
6242 * pthread_stop_world.c (GC_suspend_handler_inner): Disable
6243 cancellation.
6244 * pthread_support.c (GC_mark_thread): Permanently disable
6245 cancellation.
6246 (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
6247 Assert cancellation disabled.
6248 (fork handling): Disable cancellation, fix comment.
6249 (GC_pthread_create): Disable cancellation.
6250 (GC_unregister_my_thread): Disable cancellation.
6251 * Makefile.direct: Document NO_CANCEL_SAFE.
6252
6253 * Makefile: Remove outdated file (Makefile.direct should be used
6254 instead).
6255
6256 * include/gc.h (GC_use_DllMain): Refine the comment.
6257
6258 * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
6259 EMPTY_GETENV_RESULTS.
6260 * configure.ac: Fix a typo.
6261 * Makefile.am: Likewise.
6262
6263 * checksums.c (GC_checksum, GC_update_check_page): Remove
6264 "register" keyword in local variable declarations (for the code
6265 used only for debugging or which is not time-critical).
6266 * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
6267 GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
6268 GC_print_smashed_obj, GC_debug_end_stubborn_change,
6269 GC_debug_invoke_finalizer): Likewise.
6270 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
6271 * mallocx.c (GC_realloc): Likewise.
6272 * mark_rts.c (GC_print_static_roots, GC_is_static_root,
6273 GC_clear_roots): Likewise.
6274 * misc.c (GC_write): Likewise.
6275 * os_dep.c (GC_print_callers): Likewise.
6276 * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
6277 variable to "j" for the nested loop (just not to hide the similar
6278 variable in the outer one).
6279 * mark_rts.c (GC_print_static_roots): Output an error message
6280 using GC_err_printf() (instead of GC_printf()).
6281
6282 * configure.ac: Move include flag from ${INCLUDE} ...
6283 * Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
6284 * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
6285 * configure.ac: Add documentation to all AC_DEFINE either directly
6286 or using AH_TEMPLATE.
6287
6288 * win32_threads.c (GC_waitForSingleObjectInfinite): New static
6289 function (only if GC_WINMAIN_REDIRECT).
6290 * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
6291 thru GC_do_blocking() instead of calling WaitForSingleObject()
6292 directly.
6293
6294 * pthread_support.c (start_mark_threads): Refine printed message.
6295 * win32_threads.c (GC_thr_init): Likewise.
6296
6297 * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
6298 * Makefile.direct (NO_GETENV): Update the comment.
6299 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
6300 * include/gc.h (GC_WinMain): Remove declaration.
6301 * include/gc.h (WinMain): Define (as GC_WinMain) if and only if
6302 GC_WINMAIN_REDIRECT.
6303 * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
6304 WinCE target unless GC_WINMAIN_REDIRECT is defined.
6305 * tests/test.c (WINMAIN_LPTSTR): New macro.
6306 * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
6307 and GC_WINMAIN_WINCE_LPTSTR.
6308 * win32_threads.c (start_mark_threads): Add the comment for
6309 MARK_THREAD_STACK_SIZE.
6310 * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
6311 * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
6312 macro (only if GC_WINMAIN_REDIRECT).
6313 * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
6314 * win32_threads.c (GC_WinMain): Add prototype (only if
6315 GC_WINMAIN_REDIRECT).
6316 * win32_threads.c (main_thread_args, WinMain): Rename
6317 GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
6318 * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
6319 use WINMAIN_THREAD_STACK_SIZE.
6320 * win32_threads.c (WinMain): Call GC_deinit() and
6321 DeleteCriticalSection() only if WinCE; add FIXME.
6322
6323 * os_dep.c (GC_get_main_stack_base): add assertion for mem_base
6324 value returned by GC_get_stack_base().
6325
6326 * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
6327 Add the comment for.
6328 * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
6329 Declare external variable (only if USE_MUNMAP).
6330 * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
6331 value to 1 if GC_force_unmap_on_gcollect and restore it before
6332 unlocking (only if USE_MUNMAP).
6333 * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
6334 information for.
6335 * include/gc.h (GC_set_force_unmap_on_gcollect,
6336 GC_get_force_unmap_on_gcollect): New public function prototype.
6337 * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
6338 recognized.
6339 * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
6340 * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
6341 internal macro (used by GC_INIT only).
6342 * misc.c (GC_force_unmap_on_gcollect): New global variable.
6343 * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
6344 environment variable (and set GC_force_unmap_on_gcollect).
6345 * misc.c (GC_set_force_unmap_on_gcollect,
6346 GC_get_force_unmap_on_gcollect): New public function.
6347 * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
6348 to force the mode on if WM_HIBERNATE; restore the mode after
6349 GC_gcollect().
6350
6351 * Makefile.direct (LARGE_CONFIG): Update information.
6352 * include/gc.h (GC_stop_func): Refine the comment.
6353
6354 * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
6355 Win32 (workaround for Wine bug).
6356
6357 * allchblk.c (GC_freehblk): Adjust local variables indentation.
6358 * mallocx.c (GC_generic_malloc_many): Likewise.
6359 * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
6360 GC_calloc_explicitly_typed): Likewise.
6361 * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
6362 brackets.
6363
6364 * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
6365 * configure.ac: Process enable_parallel_mark option for Cygwin and
6366 Win32; define THREAD_LOCAL_ALLOC for Win32.
6367
6368 * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
6369 PARALLEL_MARK (required for VC++ x86).
6370
6371 * dbg_mlc.c (GC_generate_random_backtrace): Call
6372 GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
6373 if GC is disabled then print error message and return.
6374 * include/gc.h (GC_try_to_collect): Refine the comment.
6375 * include/private/gc_priv.h (GC_never_stop_func): Fix return type;
6376 refine the comment.
6377
6378 * add_gc_prefix.c: Move the file to the new "extra" directory.
6379 * AmigaOS.c: Likewise.
6380 * gcname.c: Likewise.
6381 * if_mach.c: Likewise.
6382 * if_not_there.c: Likewise.
6383 * MacOS.c: Likewise.
6384 * msvc_dbg.c: Likewise.
6385 * setjmp_t.c: Likewise.
6386 * threadlibs.c: Likewise.
6387 * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
6388 * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
6389 if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
6390 with "extra" directory.
6391 * Makefile.am: Likewise.
6392 * Makefile.direct: Likewise.
6393 * Makefile.dj: Likewise.
6394 * Makefile.in: Likewise.
6395 * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
6396 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6397 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6398 * NT_X64_THREADS_MAKEFILE: Likewise.
6399 * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
6400 * gc.mak: Likewise.
6401 * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
6402 directory.
6403 * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
6404 directory.
6405 * doc/simple_example.html: Update for threadlibs.c.
6406 * os_dep.c: Prepend included AmigaOS.c with "extra" directory.
6407
6408 * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
6409 function prototype.
6410 * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
6411 single-threaded case) with an assertion check for the state to be
6412 not a "do-blocking" one.
6413 * include/private/gc_priv.h (blocking_data): Move the structure
6414 definition from pthread_support.c; change "fn" return type to void
6415 pointer.
6416 * include/private/gc_priv.h (GC_activation_frame_s): New structure
6417 type.
6418 * include/private/gc_priv.h (GC_push_all_stack_frames): New
6419 function declaration (only if THREADS).
6420 * include/private/gc_priv.h (GC_world_stopped): Don't declare
6421 unless THREADS.
6422 * include/private/gc_priv.h (GC_blocked_sp,
6423 GC_activation_frame_s): New declaration (only if not THREADS).
6424 * include/private/gc_priv.h (GC_push_all_register_frames): New
6425 function declaration (only for IA-64).
6426 * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
6427 obsolete (unused) symbols.
6428 * include/private/gc_priv.h (GC_push_all_stack_partially_eager):
6429 Remove declaration (since it is static now).
6430 * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
6431 (for code locality) and make STATIC.
6432 * mark_rts.c (GC_push_all_register_frames): New function (only for
6433 IA-64).
6434 * mark_rts.c (GC_push_all_stack_frames): New function (only if
6435 THREADS).
6436 * mark_rts.c (GC_add_trace_entry): New function prototype (used by
6437 GC_push_all_stack_partially_eager(), only if TRACE_BUF).
6438 * mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
6439 * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
6440 function body (only for IA-64).
6441 * mark_rts.c (GC_push_current_stack): Call
6442 GC_push_all_stack_part_eager_frames() instead of
6443 GC_push_all_stack_partially_eager().
6444 * mark_rts.c (GC_push_current_stack): Call
6445 GC_push_all_register_frames() instead of GC_push_all_eager() for
6446 IA-64 backing store.
6447 * misc.c (GC_do_blocking_inner): Declare function (if THREADS
6448 only).
6449 * misc.c (GC_blocked_sp, GC_blocked_register_sp,
6450 GC_activation_frame): New global variables (only if not THREADS).
6451 * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
6452 function (only if not THREADS).
6453 * misc.c (GC_do_blocking): Move the function from
6454 pthread_support.c.
6455 * include/private/pthread_support.h (GC_Thread_Rep): Add
6456 "activation_frame" field.
6457 * pthread_stop_world.c (GC_push_all_stacks): Call
6458 GC_push_all_stack_frames() and GC_push_all_register_frames instead
6459 of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
6460 STACK_GROWS_UP here.
6461 * pthread_support.c (GC_do_blocking_inner): Remove "static"; store
6462 "fn" result back to "client_data" field.
6463 * pthread_support.c (GC_call_with_gc_active): New API function.
6464 * win32_threads.c (GC_call_with_gc_active): Likewise.
6465 * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
6466 "activation_frame" fields.
6467 * win32_threads.c (GC_new_thread): Add assertion checking for
6468 thread_blocked_sp is NULL.
6469 * win32_threads.c (GC_do_blocking_inner): New function.
6470 * win32_threads.c (GC_stop_world): Don't suspend a thread if its
6471 thread_blocked_sp is non-NULL.
6472 * win32_threads.c (GC_push_stack_for): Use thread
6473 "activation_frame" (if non-NULL); use "thread_blocked_sp" if
6474 non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
6475 thread before modifying its last_stack_min; call
6476 GC_push_all_stack_frames() instead of GC_push_all_stack(); update
6477 the comments.
6478
6479 * alloc.c (GC_default_stop_func): New static variable (initialized
6480 to GC_never_stop_func).
6481 * alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
6482 * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
6483 (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
6484 else call GC_default_stop_func() before getting "current_time".
6485 * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
6486 FIXME comment).
6487 * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
6488 replacing GC_never_stop_func with GC_default_stop_func (if
6489 possible).
6490 * alloc.c (GC_gcollect): Use GC_default_stop_func.
6491 * alloc.c (GC_collect_or_expand): Use GC_default_stop_func
6492 (instead of GC_never_stop_func) unless it is triggered due to out of
6493 memory; don't increment GC_fail_count and don't output warning
6494 (before trying to collect again) in case the collection has been
6495 interrupted (by GC_default_stop_func) and the heap expansion has
6496 failed too.
6497 * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
6498 prototypes.
6499
6500 * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
6501 GC_get_writable_length() result.
6502
6503 * configure.ac: Don't use -lpthread -ldl for Cygwin.
6504
6505 * NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
6506
6507 * include/private/gcconfig.h (GWW_VDB): Undefine if
6508 USE_GLOBAL_ALLOC (since incompatible).
6509 * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
6510 is defined.
6511 * os_dep.c (GC_unmap_threshold): Declare (for use in
6512 GC_init_win32) if USE_MUNMAP.
6513 * os_dep.c (GC_init_win32): Turn off memory unmapping if
6514 GlobalAlloc() is used.
6515 * os_dep.c (GC_win32_get_mem): Define and use new
6516 VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless
6517 MPROTECT_VDB is in use.
6518
6519 * Makefile: Replace "version.h" with "include/gc_version.h".
6520 * include/gc_version.h: Likewise.
6521
6522 * alloc.c (GC_collect_or_expand): Output heap size in WARN()
6523 (before returning FALSE) for convenience.
6524
6525 * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
6526 string.
6527 * pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
6528 * win32_threads.c (GC_delete_thread): Likewise.
6529 * include/private/gc_priv.h (GC_PRIdPTR): New macro.
6530 * pthread_stop_world.c (GC_suspend_handler_inner): Remove
6531 unnecessary cast for WARN argument.
6532 * pthread_support.c (start_mark_threads): if pthread_create()
6533 failed then don't try to create other marker threads and (after
6534 printing a warning) adjust GC_markers and GC_parallel values; log
6535 GC_markers value (possibly adjusted) after that.
6536
6537 * win32_threads.c (start_mark_threads): if pthread_create() is
6538 failed then don't try to create other marker threads and (after
6539 printing a warning) adjust GC_markers and GC_parallel values.
6540 * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
6541 the definition upper (to be visible in start_mark_threads()).
6542 * win32_threads.c (start_mark_threads): if CreateThread() or
6543 _beginthreadex() is failed then don't try to create other marker
6544 threads and (after printing a warning) adjust GC_markers,
6545 GC_parallel values, and destroy the event objects (either only
6546 some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
6547 not a single thread is created).
6548 * win32_threads.c (GC_thr_init): Log GC_markers value (possibly
6549 adjusted) after start_mark_threads() call.
6550
6551 * Makefile.am: Back remove "GC_" prefix for PTHREADS,
6552 DARWIN_THREADS, WIN32_THREADS (for configure.ac).
6553
6554 * include/private/gc_priv.h: Change include of config.h to
6555 private/config.h.
6556 * include/private/gc_pmark.h: Likewise.
6557 * gc_cpp.cc: Likewise.
6558 * tests/test.c: Likewise.
6559 * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
6560 undefine GC_BUILD.
6561
6562 * finalize.c (GC_general_register_disappearing_link): Return
6563 GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
6564 respectively).
6565 * include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
6566 * include/gc.h (GC_register_disappearing_link,
6567 GC_general_register_disappearing_link): Update the comment.
6568 * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
6569 * finalize.c (GC_general_register_disappearing_link,
6570 GC_register_finalizer_inner): Recalculate the hash table index
6571 after GC_oom_fn succeeded (since the table may grow while not
6572 holding the lock) and check again that the entry is still not in
6573 the table (free the unused entry otherwise unless DBG_HDRS_ALL).
6574 * finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
6575 local variable (to prevent a compiler warning).
6576 * finalize.c (GC_register_finalizer_inner): Don't modify the data
6577 pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
6578 (due to out of memory).
6579
6580 * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
6581 suppress compiler "variable might be uninitialized" warnings.
6582
6583 * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
6584 * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
6585 WinCE.
6586 * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
6587 HANDLE thru word type (to avoid a compiler warning) for WinCE.
6588 * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
6589 (only if DONT_USE_SIGNALANDWAIT).
6590 * win32_threads.c (start_mark_threads): Initialize GC_marker_Id
6591 and GC_marker_cv for each helper thread (only if
6592 DONT_USE_SIGNALANDWAIT).
6593 * win32_threads.c (GC_mark_mutex_state): New static variable (only
6594 if DONT_USE_SIGNALANDWAIT).
6595 * win32_threads.c (GC_mark_mutex_waitcnt,
6596 signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
6597 * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
6598 Use InterlockedExchange() over GC_mark_mutex_state (instead of
6599 AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
6600 * win32_threads.c (GC_wait_marker, GC_notify_all_marker):
6601 Implement wait/broadcast primitives using Win32 multiple events
6602 (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
6603 using Win32 SignalObjectAndWait).
6604 * win32_threads.c (GC_thr_init): Don't declare hK32 local
6605 variable, don't check for GC_wnt, and don't initialize
6606 signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
6607
6608 * alloc.c (GC_finish_collection): Call GC_print_finalization_stats
6609 if GC_print_stats (after getting "done_time").
6610 * finalize.c (GC_old_dl_entries): New static variable (only if not
6611 SMALL_CONFIG).
6612 * finalize.c (GC_finalize): Save current GC_dl_entries value (only
6613 if not SMALL_CONFIG).
6614 * finalize.c (GC_print_finalization_stats): Define if and only if
6615 not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
6616 instead of GC_printf(); use "%lu" (instead of "%u") print format
6617 specifier; use unsigned long type for "ready" counter (for LP64
6618 targets).
6619 * misc.c (GC_dump): No longer call GC_print_finalization_stats()
6620 here (since it is called from GC_finish_collection()).
6621 * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
6622 ECOS).
6623
6624 * alloc.c (GC_expand_hp): Replace GC_init_inner() call with
6625 GC_init() one.
6626 * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
6627 * mallocx.c (GC_generic_malloc_many): Likewise.
6628 * misc.c (GC_enable_incremental): Likewise.
6629 * alloc.c (GC_expand_hp): Update the comment.
6630 * mark.c (GC_obj_kinds): Likewise.
6631 * win32_threads.c (GC_allow_register_threads): Likewise.
6632 * private/gc_priv.h (GC_init_inner): Remove function declaration.
6633 * misc.c (GC_init_inner): Replace with public GC_init().
6634
6635 * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
6636 * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
6637 GC_gcj_fake_mark_proc (aborting with the appropriate message)
6638 instead.
6639
6640 * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
6641 to out of memory) then don't increment GC_n_heap_bases and don't
6642 call VirtualAlloc() again (with MEM_COMMIT).
6643 * os_dep.c (GC_remap): Abort with a more informatory message if
6644 VirtualAlloc() fails due to out of memory; update FIXME.
6645
6646 * Makefile: Fix typo for msvc_dbg.c.
6647 * Makefile.direct: Likewise.
6648 * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
6649 "GC_".
6650 * Makefile.dj: Don't reference remove files (nursery.c,
6651 gc_nursery.h, gc_copy_descr.h).
6652 * NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
6653 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6654 * NT_THREADS_MAKEFILE: Likewise.
6655 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6656 * NT_X64_THREADS_MAKEFILE: Likewise.
6657 * gc.mak: Likewise.
6658 * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
6659 defined in the source files).
6660 * NT_THREADS_MAKEFILE: Likewise.
6661 * NT_X64_THREADS_MAKEFILE: Likewise.
6662 * gc.mak: Likewise.
6663 * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
6664 * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
6665 GC_THREADS.
6666 * NT_THREADS_MAKEFILE: Likewise.
6667 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6668 * NT_X64_THREADS_MAKEFILE: Likewise.
6669 * gc.mak: Likewise.
6670 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
6671 compiler warnings.
6672 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6673 * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
6674 before "$*.C" (and "$*.CPP").
6675 * NT_X64_THREADS_MAKEFILE: Likewise.
6676
6677 * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
6678 * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
6679 * doc/README.win64: Add info about mingw-w64; add note for VC++
6680 warnings suppression.
6681
6682 * os_dep.c (GC_forward_exception): Fix logic in several places.
6683 (OSX-specific)
6684
6685 * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
6686
6687 * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
6688 from Makefile.
6689 * Makefile: Remove the information about "define arguments" (which
6690 is incomplete and outdated compared to that in Makefile.direct);
6691 add help reference to Makefile.direct.
6692 * Makefile.dj: Likewise.
6693
6694 * alloc.c (world_stopped_total_time, world_stopped_total_divisor):
6695 Replace "STATIC" with "static" in the definition (since the
6696 symbols aren't prefixed with "GC_").
6697 * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
6698 start_mark_threads, mark_mutex, builder_cv, mark_cv,
6699 mark_mutex_event, signalObjectAndWait_func, main_thread_start):
6700 Likewise.
6701 * pthread_support.c (GC_wait_builder): Define as STATIC.
6702 * win32_threads.c (GC_wait_builder): Likewise.
6703
6704 * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
6705 API function.
6706 * include/gc_pmark.h (GC_get_heap_size_inner,
6707 GC_get_free_bytes_inner): New function declaration.
6708
6709 * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
6710 * include/gc_config_macros.h: Likewise.
6711 * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
6712 * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
6713 internal use).
6714 * include/gc_config_macros.h: Always include stddef.h if GCC.
6715 * include/gc_config_macros.h (GC_API): Define for CeGCC in the
6716 same way as for MinGW.
6717 * include/gc_config_macros.h (GC_API): Group the definition for
6718 all cases together (check for GC_DLL only once).
6719 * include/gc_pthread_redirects.h: Group non-Darwin code together.
6720 * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
6721
6722 * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
6723 GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
6724 GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
6725 comment for.
6726 * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
6727 macro).
6728 * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
6729 FIXME and the comment for WinCE.
6730 * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
6731 (new macro).
6732 * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
6733 WinCE (since backtrace() is unimplemented).
6734 * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
6735 (since static).
6736 * os_dep.c (GC_n_heap_bases): Define as STATIC; move the
6737 definition to be above GC_is_heap_base().
6738 * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
6739 (both for MinGW and CeGCC toolchains).
6740 * include/private/gcconfig.h: Recognize __CEGCC__ and
6741 __MINGW32CE__ (as synonyms for __WIN32_WCE).
6742 * include/private/gcconfig.h: If SH4 then don't set config
6743 parameters for SH.
6744 * include/private/thread_local_alloc.h (GC_key_create): Don't
6745 abort on failures, just return -1 in these cases (this also
6746 prevents compilation error for targets where ABORT is defined
6747 indirectly as an inline assembler sequence).
6748 * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
6749 the GCC-based cross-compiler.
6750 * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
6751 WRAP_MARK_SOME is defined; define also for WinCE case; don't
6752 check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
6753 * mark.c (GC_mark_some): Use __try/__except also for WinCE; update
6754 the comment.
6755 * misc.c: Include signal.h after gc_pmark.h included; check for
6756 MSWINCE instead of _WIN32_WCE.
6757 * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
6758 * misc.c: Don't include <crtdbg.h> for WinCE targets.
6759 * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
6760 CeGCC toolchain).
6761 * misc.c (GC_write): Use OutputDebugStringW() instead of
6762 _CrtDbgReport() for WinCE targets.
6763 * os_dep.c (GC_least_described_address): Define as STATIC.
6764 * os_dep.c (GC_register_data_segments): Fix code indentation.
6765 * os_dep.c (GC_wince_get_mem): Initialize "result" local variable
6766 (to prevent a compiler warning).
6767 * os_dep.c (GC_dirty_init): Add comment for WinCE target.
6768 * tests/test.c: Don't include winbase.h directly if GCC for WinCE,
6769 include assert.h instead.
6770 * tests/test.c (tiny_reverse_test): Define and use
6771 TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
6772 useful for WinCE.
6773 * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
6774 for WinCE (since thread Id is used as a "real" thread handle).
6775 * win32_threads.c (THREAD_HANDLE): New macro.
6776 * win32_threads.c (GC_register_my_thread_inner): Don't recognize
6777 DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
6778 WinCE.
6779 * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
6780 * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
6781 for MSWINCE.
6782 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
6783 close thread handle on WinCE (since it's a thread Id).
6784 * win32_threads.c (GC_suspend): Don't check for MSWINCE in the
6785 MPROTECT-related code (for the case if MPROTECT_VDB would be
6786 implemented for WinCE).
6787 * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
6788 Use THREAD_HANDLE(t) to obtain thread handle.
6789 * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
6790 implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
6791 pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
6792 GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
6793 parallel mark support).
6794 * win32_threads.c (start_mark_threads): Use int type for "i" local
6795 variable (instead of "unsigned") to prevent a compiler warning.
6796 * win32_threads.c (start_mark_threads): Don't check CreateThread()
6797 result for -1; call CloseHandle() for the handle created by
6798 CreateThread() (on WinCE); don't use errno (since errno.h is
6799 missing on some targets like WinCE) when printing warning on a
6800 marker thread creation failure.
6801 * win32_threads.c (signalObjectAndWait_func): Define for WinCE.
6802 * win32_threads.c (GC_wait_marker): Remove unnecessary assertion
6803 for non-zero signalObjectAndWait_func (to make the code compilable
6804 for WinCE).
6805 * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
6806 use GC_sysinfo to get processors count if WinCE; don't check for
6807 SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
6808 GC_PTHREADS_PARAMARK.
6809 * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
6810 macro (useful for testing parallel marking on WinCE).
6811 * win32_threads.c (GC_win32_start, main_thread_start): Define as
6812 STATIC.
6813 * win32_threads.c: Don't define main_thread_args,
6814 main_thread_start(), WinMain() for WinCE if GC_DLL.
6815 * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
6816 (since the stack size parameter is ignored on WinCE).
6817 * win32_threads.c (main_thread_start): Remove forward declaration;
6818 place its definition before WinMain() one.
6819 * win32_threads.c (WinMain): Abort if GC_CreateThread() or
6820 WaitForSingleObject() failed (for the main thread).
6821
6822 * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
6823 a function.
6824 * allchblk.c (GC_unmap_threshold): New global variable definition
6825 (initialized to MUNMAP_THRESHOLD).
6826 * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
6827 MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
6828 * doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
6829 * misc.c (GC_unmap_threshold): New variable declaration.
6830 * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
6831 environment variable to set GC_unmap_threshold value (only if
6832 USE_MUNMAP).
6833
6834 * dbg_mlc.c (OFN_UNSET): New macro (to detect
6835 GC_register_finalizer() failures).
6836 * dbg_mlc.c (store_old): Add a check for register_finalizer()
6837 failure caused by an out-of-memory event (leave *ofn and *ocd
6838 unmodified in that case).
6839 * dbg_mlc.c (GC_debug_register_finalizer,
6840 GC_debug_register_finalizer_no_order,
6841 GC_debug_register_finalizer_unreachable,
6842 GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
6843 to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
6844 as in GC_register_finalizer_inner()).
6845
6846 * Makefile.direct (GC_DLL): Add the comment for.
6847 * doc/README.macros: Fix a typo.
6848 * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
6849 * doc/README.macros (__STDC__): Remove info.
6850 * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
6851 GC_generate_random_valid_address, GC_print_backtrace,
6852 GC_generate_random_backtrace, GC_register_describe_type_fn): Add
6853 GC_API and GC_CALL to function definition.
6854 * malloc.c (GC_generic_malloc): Likewise.
6855 * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
6856 * mark.c (GC_mark_and_push): Likewise.
6857 * misc.c (GC_new_free_list_inner, GC_new_free_list,
6858 GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
6859 Likewise.
6860 * include/gc_backptr.h (GC_get_back_ptr_info,
6861 GC_generate_random_heap_address, GC_generate_random_valid_address,
6862 GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
6863 GC_CALL to function prototype.
6864 * include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
6865 GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
6866 GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
6867 GC_register_describe_type_fn): Likewise.
6868 * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
6869 GC_generic_malloc_words_small): Likewise.
6870 * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
6871 * include/private/gc_pmark.h: Likewise.
6872 * include/private/gc_priv.h: Likewise.
6873 * tests/test.c: Likewise.
6874 * gc_cpp.cc: Define GC_BUILD.
6875 * include/private/gc_pmark.h: Likewise.
6876 * include/private/gc_priv.h: Likewise.
6877 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
6878 * gc_dlopen.c (dlopen): Add GC_API to the wrapper function
6879 definition.
6880 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
6881 GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
6882 pthread_detach, pthread_create): Likewise.
6883 * win32_threads.c (GC_pthread_join, GC_pthread_create,
6884 GC_pthread_sigmask, GC_pthread_detach): Likewise.
6885 * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
6886 * include/gc_backptr.h: Include "gc.h".
6887 * include/gc_backptr.h: Use extern "C" for the exported functions.
6888 * include/gc_mark.h: Likewise.
6889 * include/gc_config_macros.h (GC_THREADS): Define the macro if any
6890 GC_XXX_THREADS is defined.
6891 * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
6892 Move the definitions below the place where GC_NETBSD_THREADS and
6893 GC_DGUX386_THREADS are defined.
6894 * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
6895 is defined) for GCC.
6896 * include/gc_config_macros.h (GC_API): Define for Cygwin (in the
6897 same way as for VC++); define for GCC v4+ (other than already
6898 recognized MinGW/Cygwin) as a "default" visibility attribute if
6899 GC_DLL is defined.
6900 * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
6901 New macro.
6902 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
6903 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
6904 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
6905 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
6906 GC_debug_malloc_atomic, GC_debug_strdup,
6907 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
6908 GC_debug_malloc_ignore_off_page,
6909 GC_debug_malloc_atomic_ignore_off_page,
6910 GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
6911 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
6912 GC_gcj_malloc_ignore_off_page): Likewise.
6913 * include/gc.h (GC_malloc, GC_malloc_atomic,
6914 GC_malloc_uncollectable, GC_malloc_stubborn,
6915 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
6916 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
6917 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
6918 GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
6919 GC_debug_malloc_atomic_ignore_off_page,
6920 GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
6921 (for the first argument).
6922 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
6923 GC_gcj_malloc_ignore_off_page): Likewise.
6924 * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
6925 GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
6926 (for the second argument).
6927 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
6928 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
6929 GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
6930 GC_realloc, GC_expand_hp, GC_set_max_heap_size,
6931 GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
6932 GC_register_displacement, GC_debug_register_displacement,
6933 GC_try_to_collect, GC_malloc_ignore_off_page,
6934 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
6935 GC_debug_malloc_atomic, GC_debug_strdup,
6936 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
6937 GC_debug_malloc_ignore_off_page,
6938 GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
6939 GC_debug_realloc, GC_debug_malloc_replacement,
6940 GC_debug_realloc_replacement, GC_finalization_proc,
6941 GC_register_finalizer, GC_debug_register_finalizer,
6942 GC_register_finalizer_ignore_self,
6943 GC_debug_register_finalizer_ignore_self,
6944 GC_register_finalizer_no_order,
6945 GC_debug_register_finalizer_no_order,
6946 GC_register_finalizer_unreachable,
6947 GC_debug_register_finalizer_unreachable,
6948 GC_register_disappearing_link,
6949 GC_general_register_disappearing_link,
6950 GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
6951 GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
6952 GC_call_with_alloc_lock, GC_stack_base_func,
6953 GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
6954 GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
6955 GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
6956 GC_malloc_many, GC_CreateThread, GC_beginthreadex,
6957 GC_endthreadex): Comment out (or remove if single and meaningless)
6958 function argument names (to avoid identifiers out of the name
6959 space).
6960 * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
6961 GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
6962 * include/gc.h (GC_try_to_collect): Update the comment.
6963 * include/gc.h (GC_size, GC_register_my_thread): Add const
6964 qualifier for the argument referent.
6965 * misc.c (GC_size): Likewise.
6966 * pthread_support.c (GC_register_my_thread_inner,
6967 GC_register_my_thread): Likewise.
6968 * win32_threads.c (GC_register_my_thread_inner,
6969 GC_register_my_thread): Likewise.
6970 * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
6971 (define instead of GC_INIT() for Cygwin and AIX).
6972 * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
6973 GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
6974 GC_INITIAL_HEAP_SIZE): Recognize new macro.
6975 * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
6976 GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
6977 GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
6978 GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
6979 * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
6980 * include/gc_mark.h: Prefix GC_H with '_'.
6981 * include/gc_mark.h (GC_least_plausible_heap_addr,
6982 GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
6983 for the public variable declaration.
6984 * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
6985 GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
6986 * include/gc_pthread_redirects.h (GC_pthread_create,
6987 GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
6988 Use GC_API for the wrapper prototype.
6989 * include/gc_pthread_redirects.h (pthread_create, pthread_join,
6990 pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
6991 before redirecting.
6992 * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
6993 GC_incr_bytes_freed(); remove FIXME.
6994 * include/private/gc_priv.h (GC_make_closure,
6995 GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
6996 function.
6997 * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
6998 the target.
6999
7000 * finalize.c (GC_general_register_disappearing_link,
7001 GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
7002 guard for LOCK/UNLOCK().
7003 * finalize.c (GC_general_register_disappearing_link,
7004 GC_register_finalizer_inner): Get GC_oom_fn value before releasing
7005 the lock (to prevent data races).
7006 * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
7007 GC_gcj_malloc_ignore_off_page): Likewise.
7008 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
7009 * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
7010 instead of GC_oom_fn (to prevent data races).
7011 * malloc.c (GC_generic_malloc): Likewise.
7012 * mallocx.c (GC_memalign): Likewise.
7013 * pthread_support.c (pthread_create): Likewise.
7014 * gcj_mlc.c (maybe_finalize): Acquire the lock before setting
7015 last_finalized_no value to prevent data races.
7016 * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
7017 GC_set_find_leak, GC_set_finalize_on_demand,
7018 GC_set_java_finalization, GC_set_finalizer_notifier,
7019 GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
7020 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
7021 GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
7022 the comment.
7023 * misc.c (GC_set_oom_fn): Likewise.
7024 * include/gc.h (GC_general_register_disappearing_link): Refine the
7025 comment (replace "soft" word with "weak").
7026 * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
7027 GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
7028 * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
7029 GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
7030
7031 * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
7032 "private/dbg_mlc.h" before it.
7033 * malloc.c: Likewise.
7034 * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
7035 for WinCE (since deprecated); evaluate strlen() only once; don't
7036 set errno for WinCE.
7037 * malloc.c (GC_strdup): Likewise.
7038 * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
7039 * include/gc.h (GC_unregister_my_thread): Refine the comment.
7040 * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
7041 Don't declare for WinCE.
7042 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
7043 * include/gc.h (GC_WinMain): Remove GC_API.
7044 * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
7045 lpCmdLine.
7046 * tests/test.c (GC_WinMain): Likewise.
7047 * win32_threads.c (main_thread_args, GC_WinMain): Likewise.
7048 * include/gc_config_macros.h (ptrdiff_t): Guard with
7049 ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
7050 * include/private/gc_locks.h: Guard include "atomic_ops.h" with
7051 ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
7052 * mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
7053 * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
7054 * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
7055 * include/private/gc_locks.h: Use include "atomic_ops.h" instead
7056 of include <atomic_ops.h>.
7057 * include/private/gc_priv.h: Likewise.
7058 * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
7059 Don't export (replace GC_API to "extern").
7060 * win32_threads.c (GC_allocate_ml): Don't export.
7061 * include/private/gc_priv.h (DebugBreak): Define as macro for
7062 WinCE (if not UNDER_CE and DebugBreak is not defined yet).
7063 * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
7064 (since "UNALIGNED" is defined in winnt.h of WinCE).
7065 * mark.c (UNALIGNED): Likewise.
7066 * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
7067 * include/private/gcconfig.h (ALIGNMENT): Check always defined.
7068 * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
7069 * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
7070 for WinCE (since __declspec(thread) is unsupported).
7071 * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
7072 Define for WinCE (if undefined).
7073 * malloc.c (GC_malloc): Remove outdated comment about disabling
7074 signals.
7075 * misc.c: Don't include <tchar.h> (since not used anymore and may
7076 break TEXT() macro defined in winnt.h).
7077 * misc.c (GC_init_inner): Don't use GetModuleHandle() and
7078 InitializeCriticalSectionAndSpinCount() for WinCE.
7079 * misc.c (GC_init_inner): Replace GetModuleHandleA() with
7080 GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
7081 * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
7082 * misc.c (GC_CreateLogFile): New static function (Win32/WinCE
7083 only); move the code from GC_write(); replace GETENV() with
7084 GetEnvironmentVariable(); replace CreateFileA() with
7085 CreateFile(); use TEXT() macro (for Unicode support); replace
7086 strcat() with memcpy() (since deprecated in WinCE).
7087 * misc.c (GC_write): Define as STATIC.
7088 * win32_threads.c (GC_attached_thread): Likewise.
7089 * misc.c (GC_write): Use GC_CreateLogFile().
7090 * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
7091 * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
7092 (Win32 only) if DONT_USE_USER32_DLL is defined.
7093 * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
7094 WinCE).
7095 * misc.c (GC_abort): Use a more user-friendly abort if
7096 NO_DEBUGGING (Win32 only).
7097 * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
7098 THREADS).
7099 * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
7100 (for Unicode support); check GetModuleHandle() result.
7101 * tests/test.c: Don't define assert for WinCE (since may be
7102 redefined by "assert.h" included from libatomic_ops).
7103 * tests/test.c (FAIL): Define as ABORT for all targets (except
7104 for PCR).
7105 * tests/test.c (n_tests): Don't use AO_t.
7106 * tests/test.c (check_heap_stats): Don't cast n_tests.
7107 * tests/test.c (inc_int_counter): New function (for n_tests atomic
7108 incrementation).
7109 * tests/test.c (run_one_test): Test GC_memalign() for all targets.
7110 * tests/test.c (run_one_test): Avoid unbalanced brackets in
7111 #if-#else-#endif blocks.
7112 * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
7113 private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
7114 * tests/test.c (check_heap_stats): Replace
7115 "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
7116 "unreachable code" compiler warning.
7117 * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
7118 "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
7119 * tests/test.c (thr_window): Replace "L" string prefix with
7120 TEXT().
7121 * thread_local_alloc.c: Check THREADS is defined (to prevent other
7122 compiler errors and warnings otherwise).
7123 * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
7124 GC_use_DllMain()).
7125 * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
7126 the comments for.
7127 * win32_threads.c (GC_register_my_thread_inner): Recognize
7128 DONT_IMPORT_GETCURTHREAD macro.
7129 * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
7130 DllMain support if needed).
7131 * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
7132 thread registration is unsupported for a given configuration.
7133 * win32_threads.c (GC_use_DllMain): Update the comment; refine
7134 ABORT message.
7135 * win32_threads.c (GC_use_DllMain,
7136 GC_started_thread_while_stopped, GC_register_my_thread_inner,
7137 GC_lookup_thread_inner, GC_delete_gc_thread,
7138 GC_allow_register_threads, GC_lookup_pthread,
7139 GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
7140 Check for GC_NO_DLLMAIN.
7141 * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
7142 DllMain): Don't define if GC_NO_DLLMAIN.
7143 * win32_threads.c (GC_stop_world): Declare "i" and "max" local
7144 variables only if not GC_NO_DLLMAIN (to suppress compiler
7145 warning).
7146 * win32_threads.c (GC_mark_thread, start_mark_threads): Use
7147 CreateThread() instead of _beginthreadex() for WinCE.
7148 * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
7149 New macros defined (used by start_mark_threads(), WinMain()).
7150 * win32_threads.c (GC_thr_init): Exclude parallel-specific code on
7151 WinCE for now (since getenv(), GetProcessAffinityMask() and
7152 SignalObjectAndWait() are missing on WinCE).
7153 * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
7154 GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
7155 TEXT() macro (for Unicode support).
7156
7157 * include/gc.h (GC_has_static_roots_func): New typedef (user filter
7158 callback).
7159 * include/gc.h (GC_register_has_static_roots_callback): Use
7160 GC_has_static_roots_func type.
7161 * dyn_load.c (GC_has_static_roots,
7162 GC_register_has_static_roots_callback): Likewise.
7163 * dyn_load.c (GC_has_static_roots,
7164 GC_register_has_static_roots_callback): Define on all platforms.
7165 * dyn_load.c (GC_register_dynlib_callback,
7166 GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
7167 functions definition with the ANSI C one.
7168 * dyn_load.c (GC_register_dynlib_callback): Use new local variable
7169 "callback" (initialized from GC_has_static_roots) to minimize data
7170 races.
7171 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
7172 GC_cond_add_roots): Define as STATIC.
7173 * mark_rts.c (GC_remove_roots_inner): Likewise.
7174 * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
7175 sections smaller than pointer size (just to avoid acquiring the
7176 lock unnecessarily).
7177 * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
7178 only for DARWIN_DEBUG).
7179 * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
7180 LOCK + GC_add_roots_inner() + UNLOCK.
7181 * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
7182 callback (if set) holding the lock; if it returns 0 then don't call
7183 GC_add_roots_inner() for that region.
7184 * dyn_load.c (GC_register_has_static_roots_callback): Put
7185 "callback" value to GC_has_static_roots on all platforms.
7186 * dyn_load.c (GC_has_static_roots): Update the comments.
7187 * include/gc.h (GC_exclude_static_roots, GC_add_roots,
7188 GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
7189 * include/private/gc_priv.h (struct roots): Likewise.
7190 * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
7191 to mark_rts.c and declare it as STATIC.
7192 * include/private/gc_priv.h (GC_exclude_static_roots_inner): New
7193 prototype.
7194 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
7195 GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
7196 * misc.c (GC_init_inner): Likewise.
7197 * mark_rts.c (GC_exclude_static_roots_inner): New function (move
7198 all the code from GC_exclude_static_roots(); add the comment.
7199 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
7200 add alignment assertion for the lower bound; add assertion for the
7201 lower bound to be less than the upper one.
7202 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
7203 the upper bound (round down to be of a pointer-aligned value);
7204 return in case of an empty range.
7205 * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
7206 GC_exclude_static_roots_inner().
7207 * mark_rts.c (GC_remove_roots): Quickly check the bounds and return
7208 in case of a do-nothing case (before acquiring the lock).
7209
7210 * finalize.c (GC_fail_count): New external variable declaration.
7211 * finalize.c (GC_reset_finalizer_nested,
7212 GC_check_finalizer_nested): New function declarations (if THREADS
7213 only).
7214 * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
7215 static global variables (used internally by GC_finalize() and
7216 GC_check_finalizer_nested()).
7217 * finalize.c (GC_check_finalizer_nested): New static function
7218 definition (only if not THREADS, used internally by
7219 GC_notify_or_invoke_finalizers() to minimize the probability of
7220 a deep recursion when a client finalizer tries to allocate GC
7221 memory).
7222 * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
7223 call GC_reset_finalizer_nested()) if last heap expansion failed.
7224 * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
7225 GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
7226 last_finalizer_notification variables holding the lock (to avoid
7227 data races).
7228 * finalize.c (GC_finalizer_notifier): Add comment.
7229 * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
7230 for an empty finalization queue (only if THREADS and not
7231 KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
7232 * finalize.c (GC_notify_or_invoke_finalizers): Call
7233 GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
7234 if appropriate.
7235 * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
7236 finalizer_nested and finalizer_skipped fields (for internal use
7237 by the multi-threaded GC_check_finalizer_nested()).
7238 * win32_threads.c (GC_Thread_Rep): Likewise.
7239 * pthread_support.c (GC_reset_finalizer_nested,
7240 GC_check_finalizer_nested): New function definitions (the
7241 multi-threaded variants of that in finalize.c).
7242 * win32_threads.c (GC_reset_finalizer_nested,
7243 GC_check_finalizer_nested): Likewise.
7244
7245 * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
7246 anymore and GCC produces a warning for it).
7247 * alloc.c (GC_stopped_mark): Adjust printf argument type
7248 specifier.
7249 * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
7250 the case when the configuration information comes from a config.h
7251 file).
7252 * checksums.c: Likewise.
7253 * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
7254 keyword instead of "unused".
7255 * include/gc_allocator.h: Fix typos in comments.
7256 * thread_local_alloc.c: Likewise.
7257 * include/javaxfc.h (GC_finalize_all): Update comment.
7258 * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
7259 GC_API and serves only as a marker for the private but exported
7260 symbols used by test.c only).
7261 * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
7262 GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
7263 GC_API_PRIV one.
7264 * include/private/gc_priv.h (GC_fo_entries): Don't export it
7265 outside a DLL.
7266 * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
7267 designated to check the arguments correctness of printf-like
7268 functions (currently works only for GCC v3+).
7269 * include/private/gc_priv.h (GC_printf, GC_err_printf,
7270 GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
7271
7272 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
7273 Define for FreeBSD 7.0+.
7274
7275 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
7276
7277 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
7278 comment.
7279
7280 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent
7281 free blocks have different mapping status. Correctly handle gap
7282 between blocks.
7283 (GC_split_block): Remove dead code setting hb_flags. Add comment.
7284 (GC_allochblk): Split blocks also in generational-only mode.
7285 * os_dep.c (GC_unmap_gap): Don't really use munmap.
7286
7287 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
7288 not USE_MUNMAP case.
7289
7290 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
7291 USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
7292 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
7293 PARALLEL_MARK, STATIC): Update the comments.
7294 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
7295 recognized (only if MPROTECT_VDB).
7296 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
7297 Add the comments for.
7298 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
7299 environment variable (only if MPROTECT_VDB, if the variable is
7300 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
7301 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
7302 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
7303 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
7304 the future).
7305 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
7306 space returned to OS (GC_unmapped_bytes).
7307 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
7308 comments.
7309 * misc.c (GC_get_unmapped_bytes): New API function.
7310 * include/gc.h (GC_get_unmapped_bytes): New API prototype.
7311 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
7312 "ifdef MSWIN32" one (for Cygwin).
7313
7314 * pthread_support.c (GC_allow_register_threads): New API function.
7315 * win32_threads.c (GC_allow_register_threads): Likewise.
7316 * include/gc.h (GC_allow_register_threads): New API prototype.
7317 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
7318 Update the comments.
7319 * pthread_support.c (GC_register_my_thread): Check the collector
7320 is in the multi-threaded mode.
7321 * win32_threads.c (GC_register_my_thread): Likewise.
7322
7323 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
7324 instead, following Ivan's original patch.
7325
7326 * allchblk.c (GC_allochblk_nth): Add assertion.
7327 * checksums.c: Add GC_record_fault, GC_was_faulted,
7328 CC_n_faulted_dirty_errors.
7329 (GC_check_dirty): Remove register declarations, print
7330 dirty bit errors on faulted pages.
7331 * os_dep.c (GC_write_fault_handler): Call GC_record_fault().
7332 * os_dep.c (GC_remove_protection): Compute index correctly.
7333
7334
7335 == [7.2alpha2] 2009-06-12 ==
7336
7337 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
7338 calls into a single one (for output atomicity).
7339 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
7340 GC_finalization_failures variable; check the result of
7341 GC_general_register_disappearing_link() (for lack of memory)
7342 instead.
7343 * finalize.c (GC_finalization_failures): Remove unused global
7344 variable.
7345 * finalize.c (GC_general_register_disappearing_link,
7346 GC_general_register_disappearing_link): Don't update the value of
7347 GC_finalization_failures (since unused).
7348 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
7349 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
7350 word type now (as FIXUP_POINTER requires numeric argument).
7351 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
7352 requires the first parameter of word type.
7353 * mark.c (PUSH_GRANULE): Likewise.
7354 * mark.c (GC_push_one, GC_push_all_eager): Likewise.
7355 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
7356 GC_finalizer_notifier directly, instead
7357 of GC_INVOKE_FINALIZERS() to prevent infinite looping.
7358 * include/javaxfc.h: Clarify GC_finalize_all comment.
7359 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
7360 after) for configuration information.
7361 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
7362 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
7363 variable for NULL before dereferencing it, return GC_oom_fn() in
7364 this case.
7365 * typd_mlc.c (GC_malloc_explicitly_typed,
7366 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
7367 suppress compiler warning (for uninitialized "lg" variable).
7368
7369 * win32_threads.c (GC_unregister_my_thread): add false assertion
7370 in unreachable code.
7371
7372 * pthread_support.c (GC_inner_start_routine): Don't release the
7373 GC lock between GC_register_my_thread_inner() and
7374 GC_init_thread_local() calls (post the "registered" even after
7375 calling GC_init_thread_local()).
7376 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
7377 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
7378 acquire the GC lock only once.
7379 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
7380 directly instead of GC_register_my_thread() since I_HOLD_LOCK
7381 and our (main) thread is not registered yet (add assertion for it).
7382 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
7383 directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
7384 * win32_threads.c (GC_lookup_thread): Remove unused function.
7385 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
7386 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
7387 also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
7388 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
7389 (for Cygwin).
7390 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
7391 (inside GC_ASSERT) to prevent compiler warning.
7392 * win32_threads.c (GC_push_all_stacks): Remove FIXME for
7393 PARALLEL_MARK.
7394 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
7395 to a place before GC_get_next_stack().
7396 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
7397 as in pthread_support.c).
7398 * win32_threads.c (marker_last_stack_min): New static arrays (the
7399 same semantics as for last_stack_min of GC_Thread_Rep).
7400 * win32_threads.c (GC_get_next_stack): Handle marker threads.
7401 * win32_threads.c (GC_mark_thread): Save the current stack pointer
7402 to marker_[b]sp.
7403 * win32_threads.c (start_mark_threads): Initialize
7404 marker_last_stack_min elements (to "unset" value).
7405
7406 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
7407 GC_set_finalize_on_demand, GC_set_java_finalization,
7408 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
7409 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
7410 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
7411 Change return type to void (these API functions no longer return
7412 the old value).
7413 * include/gc.h: Likewise.
7414 * tests/test.c (main, WinMain, test): Remove explicit cast to void
7415 for GC_set_warn_proc().
7416 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
7417 GC_get_finalize_on_demand, GC_get_java_finalization,
7418 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
7419 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
7420 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
7421 API functions (to get the current value of the corresponding R/W
7422 public variables).
7423 * include/gc.h: Likewise.
7424 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
7425 Update the comment.
7426 * misc.c (GC_ignore_warn_proc): New API call-back function.
7427 * include/gc.h (GC_ignore_warn_proc): Likewise.
7428 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
7429 GC_get_non_gc_bytes): New API setter and getter functions (for the
7430 public GC_find_leak and GC_non_gc_bytes variables, respectively).
7431 * include/gc.h: Likewise.
7432 * include/gc.h (GC_memalign): Add proto to GC API.
7433 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
7434 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
7435 remove GC_memalign() proto.
7436 * misc.c (GC_write): Use multi-byte (A) variants of Win32
7437 GetModuleFileName() and CreateFile().
7438 * tests/test.c (main): Replace K&R-style function definition with the
7439 ANSI C one.
7440
7441 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
7442 recognized (for Linux on ARM32 without glibc).
7443 * include/private/gcconfig.h (STRTOULL): Define for all targets
7444 (define as "strtoul" for most targets except for LLP64/Win64).
7445 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
7446 (cast the result to word type) to decode values of "GC_TRACE",
7447 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
7448 variables.
7449
7450 * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
7451 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
7452
7453 * win32_threads.c (GC_release_mark_lock): Correct misspelling of
7454 AO_load in assertion.
7455
7456 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
7457 is defined as FALSE (otherwise the size of dll_thread_table is near
7458 200 KiB for 32-bit).
7459 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
7460 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
7461 backing_store_ptr fields for IA64 support.
7462 * win32_threads.c (GC_register_my_thread_inner): Set
7463 backing_store_end field to reg_base value for IA64 (same as in
7464 pthread_support.c).
7465 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
7466 "right" places, remove ';'.
7467 * win32_threads.c (GC_fault_handler_lock): Declare only
7468 if MPROTECT_VDB (and not WinCE).
7469 * win32_threads.c (GC_suspend): Acquire and release
7470 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
7471 * win32_threads.c (GC_suspend): Define as STATIC.
7472 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
7473 (should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
7474 * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
7475 calls into a single one (for output atomicity).
7476 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
7477 before altering its last_stack_min ("thread" variable is added).
7478 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
7479 "s" is non-NULL.
7480 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
7481 if WinCE.
7482 * win32_threads.c (GC_get_next_stack): Pass current_min value to
7483 GC_get_stack_min as-is (without -1).
7484 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
7485 version of AO_fetch_and_sub1().
7486 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
7487 to pointer (and vice versa) thru word type to suppress warnings.
7488 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
7489 access atomically.
7490 * misc.c: Change GC_THREADS tests back to THREADS.
7491
7492 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
7493 a group of printf() calls into a single one (for output atomicity).
7494 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
7495 GC_set_time_limit): New prototypes.
7496 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
7497 GC_set_time_limit): New public setter/getter functions.
7498 * include/gc.h: Fix (and remove outdated) comments for thread-local
7499 allocation.
7500 * include/gc.h: Fix typos in comments.
7501 * misc.c (GC_init_inner, GC_printf): Likewise.
7502 * include/gc.h (GC_unregister_disappearing_link): Refine comment.
7503 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
7504 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
7505 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
7506 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
7507 GC_bytes_allocd_at_reset): Define as STATIC.
7508 * misc.c (GC_get_heap_size, GC_get_free_bytes,
7509 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
7510 avoid data races.
7511 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
7512 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
7513 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
7514 set the default initial value of initial_heap_sz.
7515 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
7516 * misc.c (GC_init_inner): Fix WARN() format specifier (should be
7517 word-compliant, "%p" is used w/o "0x").
7518 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
7519 environment variable if SMALL_CONFIG.
7520 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
7521 variable to set initial GC_full_freq value (if not SMALL_CONFIG).
7522 * doc/README.environment (GC_FULL_FREQUENCY): Add information.
7523 * doc/README.environment (GC_MARKERS): Refine information.
7524 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
7525 possible.
7526 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
7527 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
7528 * misc.c (GC_abort): Don't define if SMALL_CONFIG.
7529 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
7530 (to prevent possible infinite recursion).
7531
7532 * finalize.c (finalization_mark_proc): Replace K&R-style declaration
7533 with ANSI C one.
7534 * finalize.c (GC_grow_table, GC_register_finalizer_inner,
7535 GC_enqueue_all_finalizers): Remove outdated comments about disabling
7536 signals.
7537 * finalize.c (GC_general_register_disappearing_link): Fix assertion
7538 to catch NULL "obj" value.
7539 * finalize.c (GC_unregister_disappearing_link): Check "link"
7540 alignment before gaining the lock.
7541 * finalize.c (GC_finalize): Refine comment.
7542 * finalize.c (GC_finalize): Fix WARN() format specifier (should be
7543 word-compliant, "%p" is used w/o "0x").
7544 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
7545 variable (to 0) to suppress compiler warning.
7546 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
7547 * include/gc_gcj.h: add "extern C" header and tail.
7548 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
7549 GC_help_wanted, GC_helper_count, GC_active_count declarations (move
7550 the comments to the place where these symbols are defined in mark.c).
7551 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
7552 GC_mark_some_inner, if PARALLEL_MARK only).
7553 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
7554 GC_active_count, GC_do_parallel_mark): Define as STATIC.
7555 * pthread_support.c (GC_mark_thread): Likewise.
7556 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
7557 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
7558 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
7559 GC_arobjfreelist): Likewise.
7560 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
7561 for HBLKSIZE to GC_STATIC_ASSERT.
7562 * mark.c (GC_noop): Define for Borland C the same as for Watcom.
7563 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
7564 * pthread_support.c (GC_do_blocking_inner): Likewise.
7565 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
7566 switch branch to suppress compiler warning.
7567 * mark.c (GC_return_mark_stack): Append new-line to printf message.
7568 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
7569 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
7570 suppress compiler warning.
7571 * pthread_support.c (start_mark_threads): Move the code limiting
7572 "GC_markers" value (and printing a warning) to GC_thr_init().
7573 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
7574 if based on the number of CPUs.
7575 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
7576 values as one.
7577 * pthread_support.c (GC_register_my_thread_inner): Add a check for
7578 "stack_end" is non-NULL (the same as in win32_threads.c).
7579 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
7580 with ENOMEM.
7581 * thread_local_alloc.c (return_single_freelist): Convert "for" loop
7582 to "while" one to suppress "possible extraneous ';'" warning.
7583
7584 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
7585 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
7586 (Darwin only).
7587 * include/private/gcconfig.h: Add machine-specific part for DARWIN.
7588 * include/private/gcconfig.h (ARM32): Define config parameters for
7589 DARWIN (iPhone).
7590
7591 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
7592 GC_TIME_LIMIT): New macros (used to control the default initial
7593 values of GC_full_freq variable, GC_dont_expand,
7594 GC_free_space_divisor, GC_time_limit respectively).
7595 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
7596 with GC_TIME_LIMIT in alloc.c).
7597 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
7598 Define as STATIC.
7599 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
7600 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
7601 Move the prototypes to alloc.c, make STATIC.
7602 * include/private/gc_priv.h (GC_push_current_stack,
7603 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
7604 (move the comments to the places where these functions are defined).
7605 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
7606 as STATIC.
7607 * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
7608 GC_print_heap_sects): Convert a group of printf() calls into
7609 a single one (for output atomicity).
7610 * mark_rts.c (GC_print_static_roots): Likewise.
7611 * alloc.c (GC_stopped_mark): Output blank line (when logging) for
7612 convenience to delimit collections.
7613 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
7614 make "frames" local variable volatile (to prevent optimization).
7615 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
7616 GC_finish_collection, GC_allocobj): Remove outdated comments about
7617 disabling signals.
7618 * include/private/gc_priv.h (GC_register_displacement_inner,
7619 GC_gcollect_inner): Likewise.
7620 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
7621 GC_finish_collection): Initialize "start_time" local variable (to 0)
7622 to suppress compiler warning.
7623 * mark_rts.c (GC_add_roots_inner): Likewise.
7624 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
7625 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
7626 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
7627 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
7628 K&R-style function prototypes with ANSI C one.
7629 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
7630 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
7631 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
7632 macros.
7633 * include/private/gc_priv.h (GC_noop): Declare for Borland C the
7634 same as for Watcom.
7635 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
7636
7637 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
7638 outdated comment about disabling signals.
7639 * mallocx.c (GC_malloc_uncollectable,
7640 GC_malloc_atomic_uncollectable): Likewise.
7641 * os_dep.c: Likewise.
7642 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
7643 Add ARGSUSED tag.
7644 * pthread_stop_world.c (GC_suspend_handler,
7645 GC_suspend_handler_inner): Likewise.
7646 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
7647 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
7648 switch branch to suppress compiler warning.
7649 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
7650 * include/private/darwin_semaphore.h (sem_init): Likewise.
7651 * include/javaxfc.h: Replace "GC_H" with "_GC_H".
7652 * include/private/dbg_mlc.h (GC_has_other_debug_info,
7653 GC_store_debug_info): Replace K&R-style function prototypes with ANSI
7654 C one.
7655 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
7656 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
7657 * include/private/pthread_support.h (GC_stop_init): Likewise.
7658 * include/private/gcconfig.h: Refine comment about setting
7659 GC_stackbottom.
7660 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
7661 "right" places.
7662 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
7663 for "stack_end" field.
7664 * mallocx.c (GC_malloc_uncollectable,
7665 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
7666 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
7667 GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
7668 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
7669 format specifier (should be word-compliant, "%p" is used w/o "0x").
7670 * pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
7671 * os_dep.c (GC_dirty_init): Append new-line to printf messages.
7672 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
7673 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
7674 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
7675 as STATIC.
7676 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
7677 "thread_blocked" is not set for the current thread.
7678 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
7679 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
7680 suppress compiler warning.
7681
7682 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
7683
7684 * win32_threads.c: restructure parallel marking mutex initialization.
7685 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
7686 pthread_stop_world.c, pthread_support.c: Add runtime conditions
7687 on GC_parallel were appropriate.
7688 * pthread_support.c: Condition marker_bsp on ia64.
7689 (GC_segment_is_thread_stack): Fix loop upper bound.
7690 * reclaim.c: Limit some assertions to PARALLEL_MARK.
7691 * pthread_support.c: Don't acquire mark lock for thread-local
7692 allocation.
7693 * include/private/gc_priv.h: Don't define parallel mark sync
7694 support just for THREAD_LOCAL_ALLOC.
7695
7696 * include/private/gcconfig.h: refine MINGW32 test.
7697 * mark.c: Add win64/gcc tests.
7698
7699 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
7700 typed_test, run_one_test, check_heap_stats, main, test): Replace
7701 all K&R-style function definitions with ANSI C ones.
7702 * trace_test.c (main): Likewise.
7703 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
7704 THREAD_LOCAL_ALLOC.
7705 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
7706 or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
7707 * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
7708 local variables (to suppress "assigned value is never used"
7709 compiler warning).
7710 * test.c (tree_test): Use public GC_noop1() instead of private
7711 GC_noop().
7712 * test.c (typed_test): Likewise.
7713 * test.c (check_heap_stats): Define and assign value to
7714 "late_finalize_count" local variable only if its value is used
7715 (if FINALIZE_ON_DEMAND defined).
7716 * test.c (main): Remove DJGPP-specific initialization of
7717 GC_stackbottom (not needed anymore, handled in gcconfig.h).
7718 * trace_test.c: Guard #define GC_DEBUG with #ifndef.
7719 * trace_test.c: Include "gc_backptr.h".
7720 * trace_test.c (main): Call GC_INIT().
7721 * trace_test.c (main): Add "return 0" statement.
7722
7723 * dyn_load.c (GC_register_dynlib_callback): Use new index j
7724 instead of i in the inner loop.
7725
7726 * tests/test.c: Increment n_tests with fetch_and_add when possible,
7727 avoiding need to export lock.
7728
7729 * include/gc_pthread_redirects.h:
7730 - dlfcn.h is included for dlopen() proto before undefining
7731 "dlopen" (so, it's possible now to include dlfcn.h after
7732 gc.h from user code);
7733 - GC_dlopen() proto is added (except for Darwin as
7734 it's missing there);
7735 - "dlopen" is explicitly undefined (before its redefinition).
7736 * include/gc.h:
7737 - "process.h" is included besides "windows.h"
7738 (for _beginthreadex/_endthreadex); win32 only.
7739 - GC_NO_THREAD_DECLS is moved to the right place
7740 (before closing "extern C").
7741 * pthread_support.c: Fix out of memory handling for Thread_Reps.
7742 * win32_threads.c: Don't include process.h on winCE,
7743 improve out of memory handling for thread structures, don't
7744 define GC_beginthreadex and GC_endthreadex for winCE.
7745
7746 * tests/test.c: Change gcj vtable decriptor type from size_t to
7747 GC_word.
7748
7749 * gcj_mlc.c: Add comment.
7750 * tests/test.c: Change NTEST to NTHREADS. Fork 5 threads by default.
7751 Run reverse_test a second time in each thread.Add comments.
7752 Don't rely on AO_fetch_and_add.
7753
7754 * dyn_load.c (GC_register_dynlib_callback,
7755 GC_register_dynamic_libraries_dl_iterate_phdr): Add support
7756 for GNU_PT_RELRO relocations.
7757
7758 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
7759 by GC_SOLARIS_THREADS.
7760 * include/gc.h: Improve finalizer documentation.
7761 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
7762 * pthread_stop_world.c, Makefile.dj: Fix typos.
7763
7764 * win32_threads.c (GC_new_thread): Make first_thread
7765 visible to the whole file.
7766 (UNPROTECT): New macro.
7767 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect
7768 thread structures before writing.
7769 (GC_suspend): Acquire GC_fault_handler_lock before suspending
7770 thread.
7771 * os_dep.c: export GC_fault_handler_lock.
7772 (GC_remove_protection): Check if already unprotected.
7773
7774 * doc/README.win32: Add OpenWatcom warning.
7775 * include/private/gcconfig.h: Really check it in.
7776
7777 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
7778 code from gcc version.
7779 * os_dep.c: make gc compilable (optionally) for Cygwin with
7780 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
7781 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
7782 * mark.c (GC_noop): fix declaration definition mismatch for DMC.
7783 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
7784 Watcom (Win32 only). It works.
7785
7786 * mach_dep.c: Don't use __builtin_unwind_init for register
7787 state on PowerPC/Darwin.
7788
7789 * doc/gcdescr.html: Improve description of object freelist
7790 structure.
7791 * include/private/gc_priv.h: Fix comment for _size_map.
7792
7793 * os_dep.c (GC_linux_stack_base): Relax sanity test.
7794
7795 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
7796 MARK_BIT_PER_OBJ): Add missing backslash before eoln.
7797
7798 * misc.c (GC_set_warn_proc): Implicitly initialize GC on
7799 non-Cygwin win32.
7800
7801 * configure.ac: Enable thread-local allocation for sparc-linux.
7802
7803 * alloc.c (GC_try_to_collect): Remove duplicate initialization
7804 check.
7805 * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
7806 threaded warnings.
7807 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
7808
7809 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
7810 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
7811 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
7812 thread_local_alloc.c.
7813 * misc.c: Refine comment.
7814
7815 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently. Add FIXME
7816 comment.
7817
7818 * win32_threads.c (GC_push_stack_for): Yet another attempt
7819 at the stack_min finding logic. Try to clean up the existing code
7820 while minimizing VirtualQuery calls.
7821 (GC_win32_start_inner): Register thread before GC_printf.
7822 Produce more output with DEBUG_THREADS.
7823 *include/gc.h: Update obsolete comments.
7824
7825 * tests/test.c:
7826 (gcj_class_struct2): Use cast instead of l suffix.
7827 Cast GetLastError to int in various places.
7828 Avoid unused result warning from incr/decr macros.
7829 Add cast for fake_gcj_mark_proc.
7830 Cast GC_gc_no to unsigned in printf.
7831
7832 * include/gc.h: Fix two typos in comments.
7833
7834 * finalize.c: Fix typo in comment.
7835
7836 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
7837 with lock.
7838
7839 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
7840 if we are checking for leaks.
7841
7842 * win32_threads.c: Remove mark lock spinning.
7843 * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
7844 GC_spin_count, and GC_block_count using atomic operations.
7845 * tests/test.c: Declare n_tests as AO_t only if we have threads.
7846
7847 * win32_threads.c: Support PARALLEL_MARK. Make printf arg
7848 types agree with format specifiers.
7849 Add STATIC for GC_threads.
7850 * include/private/gcconfig.h: Add FIXME comment.
7851 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
7852 AO_fetch_and_add1_full. Declare n_tests as AO_t.
7853 (WinMain): Don't call GC_use_DllMain.
7854 with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
7855
7856 * alloc.c (GC_try_to_collect_inner): Don't print redundant
7857 GC_bytes_allocd and GC_gc_no.
7858 (GC_stopped_mark): Print average world stop time.
7859 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
7860
7861 * misc.c, doc/README.environment: Add support for
7862 GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
7863 * include/gc.h: Make GC_set_free_space_divisor correspond to
7864 (somewhat unfortunate) reality.
7865
7866 (Mostly improves LLP64 support.)
7867 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
7868 misc.c, reclaim.c: Changed some int and long type to word or size_t
7869 (and vice versa where appropriate)
7870 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
7871 include/private/thread_local_alloc.h, mark.c,
7872 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
7873 casts to word type when casting from int to pointer (or pointer
7874 to int, or data pointer to code pointer) - just to remove the
7875 corresponding compiler warning.
7876 * ptr_chck.c (GC_is_visible): cast int const to word type to
7877 prevent left shift overflow.
7878 * os_dep.c: change the type of GC_mem_top_down global variable
7879 (containing a flag) to DWORD.
7880 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
7881 is defined on SunOS/x64.
7882 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
7883 for VC++ 2008 x64 (v15.00.21022.08 for x64) compiler bug
7884 (the compiler gets hung if invoked with -Ox -D
7885 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
7886 * backgraph.c: cast GC_gc_no value to unsigned short when
7887 assigned/compared to height_gc_no field of back_edges.
7888 * os_dep.c (GC_remove_protection): Add ARGSUSED.
7889 * win32_threads.c (GC_thread_exit_proc): Remove unused local
7890 variable.
7891 * mark.c (GC_check_dirty): Move declaration out of func body.
7892
7893 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
7894 * include/gc.h (GC_register_my_thread): Improve comment.
7895
7896 * Makefile.direct: Add comment for -DCHECKSUMS.
7897
7898 * thread_local_alloc.c, include/private/thread_local_alloc.h:
7899 Fix typos in comments.
7900 * finalize.c: Declare mark_procs and GC_register_finalizer_inner
7901 STATIC.
7902 * malloc.c (GC_free): Move size calculation below assertion.
7903
7904 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
7905 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
7906 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
7907
7908 * finalize.c (GC_general_register_disappearing_link): Add
7909 assertion.
7910 * malloc.c (GC_generic_malloc): Round lb to granules, not words.
7911 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
7912 granules, not words.
7913
7914 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
7915 * configure.ac: Define mach_dep for sparc-linux.
7916
7917 * mark_rts.c (GC_approx_sp): Use volatile to avoid common
7918 warning.
7919
7920 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
7921 order.
7922
7923 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
7924 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
7925 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
7926 include/javaxfc.h, include/private/gc_locks.h,
7927 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
7928 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
7929 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
7930 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
7931 * test.c: Remove some old K&R code.
7932
7933 * win32_threads.c (GC_may_be_in_stack): New. (GC_Thread_Rep):
7934 Add last_stack_min. (GC_push_stack_for): Use last_stack_min.
7935 (GC_get_next_stack): Add limit argument, use_last_stack_min.
7936 (GC_suspend): make stack_base assignment conditional.
7937 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to
7938 GC_get_next_stack.
7939 * configure_atomic_ops.sh: Remove.
7940 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
7941 Makefile.direct: Partially support build directories whose path
7942 name contains blanks.
7943 * Makefile.am: Support new files (build_atomic_ops.sh,
7944 build_atomic_ops.sh.cygwin)
7945
7946 * include/private/gc_locks.h, include/private/gc_pmark.h,
7947 include/private/gc_priv.h, include/private/gcconfig.h,
7948 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
7949 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
7950 Fix comments.
7951
7952 * pthread_support.c: Comment out LOCK_STATS.
7953 * include/gc.h: Fix comments.
7954
7955 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
7956 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
7957 * os_dep.c (GC_get_main_stack_base): Use alternate definition
7958 with USE_MMAP.
7959 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
7960
7961 * doc/README: Make it clearer when Makefile.direct is assumed.
7962 * cord/cord.am: install include/cord.h.
7963
7964 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
7965 Remove unused variables.
7966 * darwin_stop_world.c: Always declare GC_thr_init().
7967 * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
7968 SHORT_DBG_HDRS is defined.
7969 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
7970 mark, USE_MARK_BITS version): Refer to correct parameter name.
7971
7972 * finalize.c (GC_general_register_disappearing_link): Remove
7973 redundant code.
7974 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
7975 * os_dep.c: (GC_write_fault_handler): Remove remaining
7976 references to deleted variable "code". Remove redundant
7977 FREEBSD definitions.
7978 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
7979 defined for x86. (STATIC): Define as "static" with NO_DEBUGGING.
7980
7981 * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
7982
7983 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
7984 smashed string, (GC_debug_free_inner): Mark as free.
7985 * mallocx.c (GC_malloc_many): Always clear new block if
7986 GC_debugging_started.
7987 * reclaim.c: Move GC_debugging_started from
7988 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
7989 which is also called directly.
7990 * doc/README: Fix spelling error. Update license summary.
7991 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
7992 * tests/test.c: Don't define GC_DEBUG if already defined.
7993
7994 * doc/simple_example.html: update --enable-full-debug reference,
7995 Make HTML formatting standards compliant.
7996 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
7997 * doc/gcinterface.html: specify encoding.
7998
7999 * doc/simple_example.html: Update thread-local allocation
8000 description.
8001
8002 * configure.ac: Check for gc-debug earlier; replace remaining
8003 full-debug tests.
8004 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
8005 Use signed offset type. Use ptr_t internally.
8006 * doc/gcinterface.html: Update LOCAL_MALLOC description.
8007 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
8008 Fix full-debug reference.
8009 * include/gc.h: Rewrite GC_..._INCR and friends.
8010 * tests/test.c: Minimally test GC_..._INCR and friends.
8011
8012 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
8013 GC_push_next_marked_uncollectable): Never invoke GC_push_marked
8014 on free hblk.
8015 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
8016 (GC_header_cache_miss): Always blacklist pointers for free
8017 hblks. Add assertion and comment.
8018 * pthread_support.c (GC_register_my_thread): Fix #if indentation.
8019 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
8020 Delete it.
8021 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
8022
8023 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
8024
8025 * configure.ac: Set win32_threads on MinGW.
8026
8027 Ivan's description of the patch follows. Note that a few pieces like
8028 the GC_malloc(0) patch, were not applied since an alternate had been
8029 previously applied. A few differed stylistically from the rest of
8030 the code (mostly casts to void * instead of target type),
8031 or were classified as too minor to bother. Note that
8032 all of Ivan's static declarations which did not correct outright
8033 naming bugs (as a few did), where replaced by STATIC, which is
8034 ignored by default.
8035
8036 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
8037 GC_malloc(0));
8038 - addition of missing getter/setter functions for public variables
8039 (may be useful if compiled as Win32 DLL);
8040 - addition of missing GC_API for some exported functions;
8041 - addition of missing "static" declarator for internal functions
8042 and variables (where possible);
8043 - replacement of all remaining K&R-style definitions with ANSI
8044 C ones (__STDC__ macro is not used anymore);
8045 - addition of some Win32 macro definitions (that may be missing in
8046 the standard headers supplied with a compiler) for GWW_VDB mode;
8047 - elimination of most compiler warnings (except for
8048 "uninitialized data" warning);
8049 - several typos correction;
8050 - missing parenthesis addition in macros in some header files of
8051 "libatomic_ops" module.
8052
8053 My highlights based on reading the patch:
8054
8055 * allchblk.c: Remove GC_freehblk_ptr decl.
8056 Make free_list_index_of() static.
8057 * include/gc.h: Use __int64 on Win64, define GC_oom_func,
8058 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
8059 add getter and setters: GC_get_gc_no, GC_get_parallel,
8060 GC_set_oom_fn, GC_set_finalize_on_demand,
8061 GC_set_java_finalization, GC_set_dont_expand,
8062 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
8063 GC_set_finalizer_notifier. Always define GC_win32_free_heap.
8064 gc_config_macros.h: Define _REENTRANT after processing
8065 GC_THREADS.
8066 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
8067 handling of operator new[] for old Windows compilers.
8068 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
8069 around arguments.
8070 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
8071 * mark.c (GC_mark_and_push_stack): Fix source argument for
8072 blacklist printing.
8073 * misc.c: Fix log file naming based on environment variable
8074 for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor
8075 just return current value with 0 argument. Add DONT_USE_USER32_DLL.
8076 Add various getters and setters as in gc.h.
8077 * os_dep.c: Remove no longer used GC_disable/enable_signals
8078 implementations. (GC_get_stack_base): Add pthread_attr_destroy
8079 call. No longer set GC_old_bus_handler in DARWIN workaround.
8080 * pthread_support.c: GC_register_my_thread must also
8081 call GC_init_thread_local.
8082
8083 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
8084 * mach_dep.c: Include signal.h.
8085 * gc_priv.h: Factor out INLINE declaration.
8086
8087 * include/private/gcconfig.h: Update MIPS/LINUX config.
8088 * doc/gcdescr.html: Fix typo.
8089 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
8090 for MIPS/LINUX.
8091
8092 * configure.ac: SPARC fixes.
8093 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
8094 size 0, except for gcj.
8095 * doc/gc.man: Expand C++ cautions.
8096 * include/gc_inline.h: Fix comments.
8097
8098
8099 == [7.1] 2008-05-03 ==
8100
8101 * doc/gcinterface.html: Improve C++ interface documentation.
8102
8103 * allchblk.c (GC_allochblk): Check for overflow during size
8104 rounding.
8105 * tests/huge_test.c: New.
8106 * Makefile.direct, tests/tests.am: Add huge_test.c
8107
8108 * pthread_support.c: Fix typo in comment.
8109 * os_dep.c (GC_win32_get_mem): Add heap section only if
8110 allocation succeeded.
8111
8112 * malloc.c: (free replacement) Fix caller address space check.
8113
8114 * finalize.c (GC_grow_table): Dereference table in null-check.
8115
8116 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
8117 Consistently call CloseHandle. (GC_suspend): Call
8118 GC_delete_gc_thread.
8119 * tests/test.c: Don't reference GC_print_stats if not exported.
8120
8121 * tests/test.c (run_one_test): Don't mention pthread_self().
8122 * misc.c: Declare GC_thr_init().
8123
8124 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
8125 and refine assertions to handle huge unmergeable blocks.
8126 (GC_allochblk_nth): Add comment.
8127
8128 * include/private/gcconfig.h: Add missing FREEBSD macro
8129 consistency test.
8130
8131 * allchblk.c (GC_enough_large_bytes_left): No longer take
8132 parameters; return free list index bound.
8133 (GC_merge_unmapped): Don't access nexthdr until after null test.
8134 (Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate
8135 when splitting is allowable only once here, not when considering each
8136 block. (GC_allochblk_nth): Accept new may_split parameter.
8137 Avoid some redundant tests for exact size matches.
8138 * alloc.c (GC_should_collect): Cache min_bytes_allocd.
8139 (GC_maybe_gc): Make locking assertion testable.
8140 * mark_rts.c: Fix indentation.
8141 * pthread_stop_world.c: Replace old GC_err_printf1 reference.
8142 * tests/test.c: Remove (void) casts. Optionally print some
8143 timing information.
8144
8145 * windows-untested/gc.def: Remove CreateThread line.
8146 * windows-untested/README: New file.
8147 * win32_threads.c (GC_use_DllMain): Force collector initialization.
8148 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
8149 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
8150 * include/gc_cpp.h: Add matching placement delete overloads
8151 everywhere.
8152 * include/private/gc_locks.h (NO_THREAD): Add cast.
8153 * include/private/gcconfig.h: Add test for __HP_aCC.
8154 * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX.
8155
8156 * doc/README.win32: Fix typo.
8157 * configure.ac: Fix printing of enable-shared result.
8158
8159 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when
8160 defined. (GC_call_with_stack_base): Add GC_API.
8161 * os_dep.c (GC_get_stack_base): Add GC_API.
8162 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
8163 Add GC_API.
8164 * include/gc.h: Add GC_API annotations.
8165 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
8166 PCR.
8167 * include/private/gc_pmark.h: Fix comments.
8168
8169 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
8170 Add GC_push_typed_structures() to push GC_ext_descriptors.
8171
8172 * tests/test.c: Call GC_INIT for DARWIN; test system type using
8173 gcconfig.h-defined macros.
8174
8175 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
8176 blocks large enough that their size, when interpreted as a signed
8177 value, would be negative.
8178 * include/private/gc_priv.h: Comment hb_sz range limit.
8179
8180 * mark.c (GC_push_next_marked): correct comment.
8181 * Makefile.direct: document NO_PROC_STAT.
8182 * include/private/gcconfig.h: Accommodate NO_PROC_STAT.
8183
8184
8185 == [7.1alpha2] 2008-01-10 ==
8186
8187 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
8188 again. Refer to build directory as ".".
8189
8190 * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
8191 * darwin_stop_world.c: Add FIXME comment for parallel marker.
8192
8193 * include/private/gc_priv.h: Update MAX_ROOT_SETS
8194 and LOG_PHT_ENTRIES to handle larger heaps.
8195
8196 * include/gc.h (GC_INIT,GC_init): Update comments.
8197
8198 * allchblk.c, alloc.c, include/private/gc_priv.h:
8199 Track GC_bytes_dropped and use in GC triggering decisions.
8200 * alloc.c (min_bytes_allocd): Weight atomic blocks less.
8201
8202 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
8203 adjusting p.
8204
8205 * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
8206
8207 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
8208 * alloc.c: Add declaration for GC_add_current_malloc_heap.
8209 * win32_threads.c (GC_beginthreadex): Clean up error
8210 return code.
8211 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
8212 Add NT_X64_THREADS_MAKEFILE.
8213
8214 * alloc.c: Define GC_version instead of in version.h.
8215 * version.h: Remove.
8216 * include/gc_version.h: Move most of version.h here.
8217 * include/gc.h: Include gc_version.h.
8218 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
8219 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
8220 Adjust for version.h rename.
8221
8222 * configure.ac: Put libatomic_ops links in build directory.
8223 * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
8224 as nodist sources.
8225
8226 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
8227 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
8228
8229 * alloc.c: Deal correctly with address wrapping for
8230 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
8231 * finalize.c, include/gc.h (GC_register_disappearing_link,
8232 GC_register_finalizer_inner): Improve out-of-memory handling.
8233 * include/private/gc_pmark.h: Fix comment spelling.
8234
8235 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
8236 in other contexts.
8237
8238 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
8239
8240 * gc_cpp.cc: Don't include gc_cpp.h from local directory.
8241
8242 * allchblk.c, configure.ac (add --enable-munmap)
8243
8244 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
8245 GC_GETSECTBYNAME instead.
8246 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
8247 architecture (Darwin).
8248
8249 * reclaim.c (GC_bytes_found): Expand comment.
8250 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
8251 granules, not bytes, to GC_FAST_MALLOC_GRANS.
8252 * include/gc.h: Never include gc_local_alloc.h.
8253 * tests/test.c: Add size zero allocation tests.
8254
8255 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
8256 * allchblk.c: Sanity check GC_max_large_allocd_bytes.
8257
8258 * Makefile.direct: Invoke $(MAKE) instead of make.
8259
8260 * doc/scale.html: Reflect gc7 thread local allocation behavior.
8261
8262 * include/extra/gc.h, include/extra/gc_cpp.h: New.
8263 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
8264 again.
8265
8266 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
8267 for HURD.
8268
8269 * include/private/gcconfig.h: Add Linux/mips-64 support.
8270
8271 * dbg_mlc.c: Use random() on all glibc systems.
8272 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
8273 HURD. Add comment.
8274 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
8275 systems without SA_SIGINFO.
8276
8277 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
8278 * tests/test.c (run_one_test): Add GC_PTR_STORE test.
8279 No longer test for RS6000.
8280
8281 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
8282 Maintain GC_our_memory and GC_n_memory.
8283 * dbg_mlc.c (GC_print_smashed_obj): Improve message.
8284 (GC_print_all_smashed_proc): Pass client object address instead of
8285 base.
8286 * dyn_load.c (sort_heap_sects): New. (GC_register_map_entries):
8287 Register sections that are contiguous and merged with our heap.
8288 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name
8289 of libraries.
8290 * malloc.c (calloc): Check for special callers even with
8291 USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary
8292 malloc/free tracing.
8293 * misc.c: No longer call GC_init_lib_bounds explicitly.
8294 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
8295 initialize on demand.
8296 * tests/test.c: Call GC_INIT only when required.
8297
8298 * Makefile.direct: Remove comment fragment.
8299 * tests/tests.am: Add smashtest.
8300 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
8301 * pthread_support.c: Fix comment spelling.
8302 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
8303 GC_LINUX_THREADS and REDIRECT_MALLOC.
8304 * tests/smash_test.c: Initial check-in.
8305 * obj_map.c: Print log entry to correct file.
8306 * include/private/thread_local_alloc.h: Add TlsAlloc error check.
8307
8308 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
8309 while world is still running.
8310 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
8311 with world stopped.
8312 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
8313 * misc.c (GC_init/GC_init_inner): Perform all work in
8314 GC_init_inner.
8315 * Makefile.direct: Expand -DUSE_MUNMAP comment.
8316
8317 * include/gc.h: Define uintptr_t explicitly for VC++6.
8318 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
8319 exist.
8320
8321
8322 == [7.0] 2007-07-02 ==
8323
8324 * include/gc_config_macros.h: Also check for IA64 when setting
8325 GC_HPUX_THREADS.
8326 * mallocx.c: Change my_bytes_allocd to signed_word.
8327 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads
8328 (as opposed to pthreads) support.
8329
8330 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
8331 on ARM/Linux. Check getcontext() return value.
8332
8333 * backgraph.c (per_object_func): Make argument types consistent.
8334 (GC_traverse_back_graph): Mark GC_deepest_obj.
8335
8336 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
8337 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
8338
8339 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst
8340 anachronisms.
8341 * dyn_load.c: Partially support cygwin, but don't enable it yet.
8342
8343 * Makefile.am: Use -no-undefined for libgc.
8344 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
8345 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
8346 consistently.
8347 * misc.c: Fix some WARN calls. Move GC_is_initialized setting and
8348 GC_thr_init() call.
8349 * os_dep.c: Consistently use WARN where appropriate.
8350 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
8351 remove inappropriate pthread.h include.
8352 * doc/README.linux: Remove some anachronisms.
8353
8354 * alloc.c: Also use GC_check_tls on non-Linux systems.
8355 * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
8356 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
8357 with prototype.
8358
8359 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
8360 (GC_print_heap_sects): Use size_t instead of unsigned long.
8361 * thread_local_alloc.c (GC_lookup_thread): Define in the correct
8362 context.
8363 * win32_threads.c, include/gc_config_macros.h: The last of Romano
8364 Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h.
8365 * include/gc_inline.h: Avoid gc_priv.h dependencies.
8366 * tests/test.c (check_heap_stats): Replace unsigned long with size_t.
8367
8368 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
8369 * mark_rts.c (GC_push_roots): Fix kind type.
8370
8371 * doc/README.win64: New file.
8372 * doc/doc.am, Makefile.direct: Add README.win64.
8373
8374 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
8375 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
8376 * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
8377 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
8378 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
8379 win32_threads.c, cord/de_win.c, include/gc_mark.h,
8380 include/private/gc_hdrs.h, include/private/gc_pmark.h,
8381 include/private/gc_priv.h, tests/test_cpp.cc:
8382 Replace old style function declarations. Clean up integral types.
8383 Remove register declarations. The change in malloc.c and the
8384 "int descr" declaration in mark.c are the most likely to have
8385 been real bugs outside of Win64.
8386 * msvc_dbg.c: Disable on Win64.
8387 * win32_threads.c: Add x64 support.
8388 * include/gc.h: no backtrace on x64 for now.
8389
8390 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
8391
8392 * include/gc.h: (GC_word, GC_signed_word): Fix Win64 definitions.
8393 Don't include windows.h in an extern "C" context.
8394 * include/private/gcconfig.h: Fix Win64 configuration.
8395 * tests/test.c: Eliminate more old style function definitions.
8396 Cleanup pointer and integer casts for Win64.
8397 * tests/test_cpp.cc: Don't include gc_priv.h.
8398 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
8399 * NT_X64_STATIC_THREADS_MAKEFILE: New.
8400
8401 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore
8402 FINISHED threads for suspension. (GC_pthread_join): Add
8403 pthread_self() cast. (GC_pthread_start_inner): Execute cleanup
8404 handler when popping it.
8405 * include/private/gc_locks.h: Inline THREAD_EQUAL for
8406 GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have
8407 pthreads.
8408
8409 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
8410 tests/test.c: Accommodate GC_WIN32_PTHREADS.
8411 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
8412 * include/gc_config_macros.h: Define both PTHREADS and
8413 GC_WIN32_THREADS.
8414 * include/private/gc_locks.h: Nonstandard definitions of
8415 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
8416 * doc/README.win32, Makefile.direct: Include documentation
8417 for GC_WIN32_PTHREADS.
8418 * Makefile.direct: Remove some anachronisms in the documentation.
8419
8420 * Makefile.am: Move includes to bottom. Add better library
8421 dependencies. Increment library version. Remove "SUBDIRS += .".
8422 * cord/cord.am, tests/tests.am: Add better library dependencies.
8423 Remove now unnecessary dependencies.
8424 * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
8425 Move to define on all Windows platforms. (_beginthread): define
8426 to generate error if used.
8427
8428 * include/private/gc_locks.h: Format to 80 columns.
8429
8430 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
8431 * NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars
8432 rc.
8433 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
8434 case.
8435 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
8436 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
8437 * include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API.
8438 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
8439 * tests/test.c: Add GC_reachable_here() call.
8440
8441 * alloc.c (GC_try_to_collect): Call GC_init if necessary.
8442 * tests/thread_leak_test.c: Don't unconditionally define
8443 GC_LINUX_THREADS.
8444
8445 * Makefile.am: Remove extra_ldflags_libgc definition.
8446
8447 * include/private/gc_priv.h: Define AO_REQUIRE_CAS.
8448
8449 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
8450 value.
8451
8452
8453 == [7.0alpha9] 2007-05-15 ==
8454
8455 * Some gc6.9 changes.
8456 * Change FindTopOfStack decl in darwin_stop_world.c.
8457 * Move some static tests from misc.c to gcconfig.h. Use #error.
8458 * Add GC_print_free_list() function (thanks to Bruce Hoult).
8459 * Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
8460 Barry DeFreese, and possibly other Debian maintainers).
8461 * __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
8462 Peter Wang).
8463 * Integrated various MacOSX patches and tried to reconcile them (thanks to
8464 Allan Hsu, several contributors at Apple, and probably others).
8465 * Added some casts to powerpc.h in libatomic_ops to silence warnings.
8466
8467 * Makefile.am: Include NT_STATIC_THREADS_MAKEFILE in dist.
8468 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
8469 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now
8470 unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
8471 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
8472 NUMERIC_THREAD_ID, THREAD_EQUAL.
8473 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
8474 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
8475 ARM.
8476
8477 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
8478 GC_debug_register_finalizer_unreachable() patch from gcc tree.
8479 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
8480 to check GC has been initialized.
8481
8482 * include/gc_cpp.h: Documentation updates.
8483 * include/gc_config_macros.h: Don't check for __ppc__ to set
8484 DARWIN_THREADS.
8485 * Makefile.am: Include configure_atomic_ops.sh in dist.
8486
8487 * Makefile.am: Don't distribute copied atomic_ops files. Include
8488 libatomic_ops with "make dist".
8489 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
8490 * win32_threads.c: Report error for Cygwin + GC_DLL.
8491
8492 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
8493 * cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove
8494 MakeProcInstance anachronism.
8495 * doc/README.macros: Officially remove elif prohibition.
8496 Remove documentation for defunct SRC_M3 support.
8497 * include/gc.h: Remove more SRC_M3 references.
8498 * include/private/gcconfig.h: Remove still more SRC_M3 references.
8499 GC_SOLARIS_THREADS no longer needs to be checked separately.
8500
8501 * thread_local_alloc.c, include/private/thread_local_alloc.h:
8502 Spell __declspec correctly.
8503 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
8504
8505 * doc/README.win32: Adjust GC_win32_dll_threads rules again.
8506
8507 * mark.c (GC_mark_some wrapper): Restructure for readability, handle
8508 GC_started_thread_while_stopped.
8509 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
8510 * win32_threads.c: (client_has_run): remove,
8511 GC_started_thread_while_stopped, GC_attached_thread: add.
8512 (GC_push_all_stacks): Add verbose output.
8513 (DllMain): Avoid initializing collector or the like.
8514 Never update both thread tables.
8515 * doc/README.win32: Adjust GC_win32_dll_threads rules.
8516
8517 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
8518 GC_PRINT_VERBOSE_STATS.
8519
8520 * configure.ac: Comment out redundant
8521 AC_DEFINE(NO_EXECUTE_PERMISSION).
8522 * sparc_mach_dep.S: Remove single quote in comment.
8523 * include/private/gcconfig.h: Fix DATAEND for NONSTOP.
8524 * win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain.
8525 (GC_use_DllMain): Fix assertion.
8526
8527 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
8528 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
8529 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
8530 targets. Remove comments.
8531 Prepare ppc64 support for Darwin.
8532
8533 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
8534 Make i unsigned.
8535 (GC_stop_world): Likewise. Remove unused GC_thread p.
8536 (GC_start_world): Likewise.
8537
8538 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
8539 Remove double SIG_HNDLR_PTR definition.
8540 (GC_forward_exception): Fix compiler warnings, make i unsigned.
8541 Initialize thread_state to NULL.
8542 (catch_exception_raise): Fix compiler warnings, make i unsigned.
8543
8544 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
8545 also define for X86_64.
8546 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
8547 * README.changes: Point to ChangeLog.
8548
8549 * darwin_stop_world.c: Move THREAD_FLD defines to ...
8550 * include/private/gc_priv.h: ... here.
8551 Fix THREAD_STATE definitions for ppc64.
8552 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
8553 access.
8554
8555 * configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
8556 HAS_X86_THREAD_STATE32_*.
8557 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
8558 HAS_X86_THREAD_STATE64_*.
8559 Added value 1 in the above AC_DEFINE's. Important for the upcoming
8560 Leopard.
8561 * include/private/gcconfig.h: Modified X86_64 define for Darwin.
8562 Removed __x86_64__ check in POWERPC section. Added base definitions
8563 for the X86_64 Darwin port.
8564 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
8565 to distinguish between 32 and 64-bit applications. Added definitions
8566 for X86_64 Darwin.
8567 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
8568 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
8569 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
8570 !DARWIN_DONT_PARSE_STACK. Maybe obsolete.
8571 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
8572 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
8573 Distinguish between getsectbynamefromheader_64 and
8574 getsectbynamefromheader.
8575 * os_dep.c (catch_exception_raise): Introduce exception definition for
8576 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
8577 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
8578
8579
8580 == [7.0alpha7] 2006-09-19 ==
8581
8582 * More 6.7 changes.
8583 * Declare GC_dump() in gc.h.
8584 * Add --enable-large-config, which just defines the LARGE_CONFIG macro.
8585 * Make GlobalAlloc address alignment a bit more intuitive (thanks to
8586 Charles Mills).
8587 * Use #elif in the definitions of GET_MEM.
8588 * Overhaul porting.html. Remove corresponding text from README.
8589 * Fix typo in DARWIN section of gcconfig.h.
8590 * Fix Darwin thread memory leak (thanks to Bruce Mitchener).
8591 * Update x86 AO_test_and_set implementation to use "=q".
8592 * Add $(EXEEXT) to many tests in tests/tests.am. (Corresponds to a
8593 6.7 fix, which no longer applied.)
8594 * Fix Darwin/PPC port.
8595 * Fix Cygwin/threads port.
8596 * Fix gcj malloc support.
8597 * For GNU-style make, don't build libatomic_ops unless threads are requested.
8598 This should allow single-threaded builds on platforms which do not
8599 currently support libatomic_ops.
8600 * Clean up and hopefully fix the CFLAGS calculation for GNU build.
8601 (Substantially improves things on HP/UX.)
8602 * Integrated Andrei Polushin's Visual C++ patches. These provide for
8603 stack traces, better C++ debug support, and better log file handling.
8604 Note that these change the location of the log file to a the path of the
8605 executable with a .log extension. To get the old behavior back, define
8606 OLD_WIN32_LOG_FILE. For the time being, I'm checking his project
8607 files and the like into a windows-untested subdirectory. They
8608 are almost certainly already out of date, but better than what we had
8609 before.
8610 * Fixed some win32 threads bugs, and added support for _beginthreadex.
8611 * Fix zero size thread local allocation so that explicit deallocation
8612 works correctly.
8613 * Removed serious bug in GC_malloc_uncollectable(large size).
8614 * Do not try to do thread-local gcj allocation in incremental mode. There
8615 are races in setting up the descriptor.
8616 * Add GC_INIT() to middle.c, fix some more GC_printfn calls.
8617 * Some assertions erroneously used I_HOLD_LOCK() negatively, even though
8618 it can now spuriously return TRUE.
8619 * Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
8620 * On Linux and some Un*x variants, allocate memory by first trying sbrk,
8621 and then switching to mmap if that fails.
8622 * Fixed /proc/x/maps reading to deal with asynchronous deletions.
8623 * Fix REDIRECT_MALLOC with threads on Linux. It now usually seems to work
8624 with ugly hacks that include having calloc behave differently when it is
8625 called from ld.so or the pthreads library. A reasonable amount of
8626 infrastructure was added to support some of this. (Thanks to Roland McGrath
8627 for ideas and information.)
8628 * Import various updated build scripts.
8629 * Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
8630 * Fix serious bugs in GC_malloc_atomic_uncollectable().
8631 * Return GC_SUCCESS form GC_get_stack_base().
8632 * Fix several atomic_ops problems on IA64 with HP Compiler.
8633 * Update to atomic_ops-1.2.
8634 * Fix hb_n_marks description and reclaim.c assertion.
8635 * Various additional win32 threads fixes.
8636 * Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
8637
8638
8639 == [7.0alpha5] 2005-09-29 ==
8640
8641 * More 6.6, 6.7 changes.
8642 * Some Solaris fixes, including some more general changes in how
8643 the assembly pieces of mach_dep.c are handled.
8644 * Removed a lot of SOLARIS_THREADS-specific code that was only
8645 needed with the old implementation. This included many (mostly no-op)
8646 versions of GC_is_fresh.
8647 * Don't use atomic_ops in gc_locks.h unless we need threads.
8648 * Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
8649 * Removed Solaris GC_INIT hack. It's a workaround for a long dead bug,
8650 and it seemed to be wrong anyway.
8651 * Changed win32_threads.c to require preprocessor-based interception
8652 of thread routines by default. A client call to GC_use_DllMain is
8653 now required to get the old behavior in which DllMain is used to implicitly
8654 register threads. This was done for uniformity with other platforms, and
8655 because the DllMain solution seemed to require very tricky code which,
8656 at least in the past, imposed hard bounds on the number of threads.
8657 * Many small changes to make thread support work again on Cygwin.
8658 * Moved definition of allocator lock etc. to pthread_support.c and
8659 win32_threads.c for those two cases.
8660 * Got rid of the FASTLOCK() machinery. It doesn't seem useful on modern
8661 platforms.
8662 * Cleaned up the uncollectible allocation routines, speeding up the
8663 slower paths. The code did enough unnecessary work off the critical path
8664 that the underlying logic was getting hard to extract.
8665 * No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL. Indications
8666 are it just works, and I think the reasons for it not working disappeared
8667 a while ago.
8668 * Fixed bugs in hb_n_marks calculation and assertion.
8669 * Don't use __builtin_expect for pre-3.0 gcc.
8670 * Define GWW_VDB only for recent Microsoft tool chains.
8671 * Add overview.html to doc directory.
8672 * Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
8673 * Made thread local allocation sort of work with Cygwin. The code should
8674 be there to deal with other Windows variants, But non-Cygwin Windows
8675 threads need more bug fixes.
8676
8677
8678 == [7.0alpha4] 2005-08-02 ==
8679
8680 * Various 6.5, 6.6 changes.
8681 * Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
8682 (thanks to Ben Maurer).
8683 * Integrated build patches from Davide Angelocola and Petter Urkedal.
8684 * Fix dynamic-linker-based pthread call redirection.
8685 * Renamed RS6000 to POWERPC/AIX.
8686 * Allow recovery from SIGSEGV in marker on Linux. This works around
8687 a race in thread stack marking if /proc is used to find roots. We do
8688 that by default with malloc redirection and threads. This involved
8689 moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
8690 * Added doc/porting.html file.
8691 * Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
8692 memory overwrite errors.
8693 * Added trivial NO_INCREMENTAL flag to facilitate debugging.
8694 * Added GC_getattr_np-based GC_get_stack_base (untested).
8695 * Separated thread local allocation into a separate file and added the
8696 beginning of win32 support for that.
8697
8698
8699 == [7.0alpha3] 2005-04-28 ==
8700
8701 * Added support for dlopen-based interception of pthread functions.
8702 This is only half done. The gc.h redefinitions currently interfere.
8703 * Integrated major automake overhaul from Petter Urkedal.
8704
8705
8706 == [7.0alpha2] 2005-04-07 ==
8707
8708 * GC_bytes_allocd was incremented by a possibly uninitialized variable
8709 in GC_generic_malloc_inner. (Bug introduced in gc7.0alpha1. Thanks
8710 to Ben Hutchings for tracking it down.)
8711 * Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
8712 * Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
8713 implementation for win32.
8714 * Removed pc_gc.tar and floppy targets in Makefile.direct. Removed
8715 pc_excludes file.
8716 * No longer include GC_bytes_wasted when evaluating allocation progress.
8717 Since we are now counting live memory, it no longer makes sense.
8718 * Applied Davide Angelocola's configure patch. There are now separate
8719 Makefile.am's in the cord and tests subdirectory, more tests, etc.
8720 * Renamed configure.in to configure.ac.
8721 * Merged a very small number of Nathanael Nerode's configure.ac
8722 cleanups from the gcc tree. Unfortunately, that file is a bit
8723 different from ours.
8724 * Changed EINTR handling in sem_wait slightly.
8725 * Restructure the root marking code. Remove all traces of
8726 USE_GENERIC_PUSH_REGS, and effectively make it the default.
8727 Make it easier to pass a context pointer to the mark routine, in
8728 case we ever want to do precise stack marking.
8729 * Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
8730 This remains undocumented, and only implemented for pthreads. But it
8731 removes an otherwise unavoidable race with stores of callee-save
8732 registers.
8733 * Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case. This
8734 resulted in bogus complaints in heap dumps.
8735 * Upgrade to libatomic_ops-1.0, and update build structure to match.
8736 * Remove SRC_M3 support. Clean up lock initialization code in misc.c.
8737 * Removed gc_local_alloc.h. If THREAD_LOCAL_ALLOC is defined, the
8738 thread local allocation routines are now called automatically.
8739 * Renamed gc_inl.h back to gc_inline.h. Changed the interface appreciably
8740 since locking has turned into a dominant issue, and in-line allocation
8741 only makes sense if it's no worse than thread-local allocation.
8742 Gc_inline.h is now also used to implement thread-local allocation.
8743 * Finished replacing stubborn allocation with manual write barrier.
8744 Untested.
8745 * Use thread-local allocation code by default.
8746 * Added GC_register_my_thread and friends for Posix and win32.
8747 * Patch for GWW_VDB from Ben Hutchings.
8748 * Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
8749 redefines GC_malloc.
8750 * Removed now unused AIX memory allocation code.
8751 * Various minor fixes for bugs introduced in 7.0alpha1.
8752
8753
8754 == [7.0alpha1] 2004-11-09 ==
8755
8756 * Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler
8757 and use ANSI constructs unconditionally.
8758 * Introduce #elif and #error in some of the appropriate places.
8759 * Remove GC_printf cruft. Use stdargs.
8760 * Remove separate Solaris threads support. Use the more generic Posix
8761 implementation.
8762 * Use atomic_ops for atomic operations and memory barriers.
8763 * Clean up MPROTECT_VDB implementation. Use SA_SIGINFO wherever
8764 possible.
8765 * Remove broken SIGNALS stuff.
8766 * Use size_t instead of word, where appropriate.
8767 * Add .S.o rule to Makefile.am.
8768 * Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
8769 A/UX, HP), IBM PC/RTs and RISCOS/Irix4. (I doubt the old code worked.
8770 If anyone cares, these should be easy to resurrect.)
8771 * Add EXPECT() in some critical places.
8772 * Redefined hb_sz and hb_body to deal with bytes rather than words.
8773 This affected a great deal of code. I would like to consistently use
8774 byte offsets and sizes where there's not a convincing reason to do
8775 otherwise.
8776 * Redefined several other variables (GC_mem_found, GC_words_allocd)
8777 etc. to use units of bytes. Most of these were also renamed to
8778 reflect that fact.
8779 * Killed as many "register" declarations as possible.
8780 * Partially replaced stubborn allocation with manual write barrier.
8781 It's currently broken.
8782 * Restructured mark code, to allow mark bits to be kept either on
8783 a per allocation granule or per object basis. The emphasis is
8784 now on the -DUSE_MARK_BYTES option, since individual bits perform
8785 quite badly on hyper-threaded P4s, and are probably suboptimal on
8786 other architectures. -DUSE_MARK_BITS is currently broken, and may
8787 be resurrected only for the single-threaded case. This significantly
8788 reduced the cache footprint required by auxiliary GC data structures.
8789 It also reduces space overhead for small heaps. It probably slows
8790 things down slightly if interior pointers are very common.
8791 * As part of the above, we now maintain an approximate count of set
8792 mark bits in each heap block.
8793 * As part of the above, the semantics of hb_map changed drastically.
8794 For MARK_BIT_PER_OBJ, it doesn't exist. For MARK_BIT_PER_GRANULE,
8795 it is purely a way to replace a mod instruction with a table lookup.
8796 (Somewhat to my surprise, this still wins on modern hardware.)
8797 * Removed PRINTSTATS, GATHERSTATS, and SILENT macros. Everything is
8798 now controlled by GC_print_stats variable and GC_PRINT_STATS
8799 and new GC_PRINT_VERBOSE_STATS environment variables.
8800 * Add GC_log_printf and use it consistently for logging output.
8801 * Unconditionally count the objects we reclaim in the sweep phase.
8802 For thread local allocation, we need that anyway, and we expect
8803 that's increasingly the only case that matters. And it simplifies
8804 the code. In general expect minor performance hacks that benefit
8805 only the single-threaded case to disappear.
8806 * Remove GC_quiet from gc.h and elsewhere.
8807 * Changed the heap expansion heuristic, and the definition of
8808 GC_free_space_divisor, to refer to live data size, instead of total
8809 heap size. I believe this is much more robust. It wasn't previously
8810 possible, because we didn't have access to live data size.
8811 * Thread local allocation added the extra byte in twice: Once in
8812 thread_local_alloc, and once in malloc_many.
8813 * Removed GC_malloc_words_small and GC_gcj_fast_malloc. A new
8814 mechanism based on the thread local allocation data structures
8815 is expected to be added instead. This should allow inlined code
8816 that is both fast and doesn't rely on collector internals.
8817 * Changed both free lists and reclaim lists to be indexed by granules
8818 instead of words, norming halving their size.
8819 * MERGE_SIZE is now the only option, and the macro was removed.
8820 (Without it, we need a memory reference to GC_all_interior_pointers
8821 anyway. Thus it costs us nothing.)
8822 * Change GC_size_map to map to granules instead of words. Make sure
8823 that every possible size up to TINY_FREELISTS is present.
8824 * Split of macros need for fast inline allocation into gc_tiny_fl.h
8825 in anticipation of a new inline allocator that doesn't rely on GC
8826 internals.
8827 * Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
8828 in anticipation of a merge with the inline allocation code.
8829 * Removed ALIGN_DOUBLE. This is mostly handled by GRANULE_BYTES.
8830 * Make locking on most platforms conditional on GC_need_to_lock.
8831
8832
8833 == [6.9] ==
8834
8835 * Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
8836 * Fix M68K LINUX port (thanks to Debian packagers).
8837 * __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
8838 * Integrated Allan Hsu's patch for OS X VM deallocation problems.
8839 * Applied FreeBSD/X86_64 patch.
8840
8841
8842 == [6.8] 2006-07-08 ==
8843
8844 * Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
8845 Thomas Klausner).
8846 * Improvements to the HP/UX section of configure.in/configure.ac (thanks
8847 to Andreas Tobler).
8848 * GC_unix_get_mem could neglect to release the malloc lock on Irix, under
8849 extremely unlikely circumstances. (Thanks to Jean-Baptiste Nivois for
8850 some careful code inspection.)
8851 * Added support for kFreeBSD + glibc (thanks to Petr Salinger).
8852 * Fix more MacOS threads memory leaks (thanks to Allan Hsu).
8853 * Added initial Solaris/x64 support (thanks to Rainer Orth).
8854
8855
8856 == [6.7] 2006-03-03 ==
8857
8858 * Add "int" to Solaris "end" and "etext" declaration in gc.h. Declared
8859 the symbols with underscores and as arrays, since that's what's actually
8860 used. Perhaps this could all just be removed. (Thanks to John Bowman.)
8861 * Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
8862 * Added casts for assignments to hb_last_reclaimed, which truncate the
8863 value. Added a cast to GC_adj_words_allocd. Use GetModuleHandleA
8864 when retrieving a handle to kernel32.dll under win32.
8865 * Added Tandem S-Series support. (Thanks to Craig McDaniel. A modified
8866 version of his patch was applied, and hence breakage is probably not
8867 his fault.)
8868 * Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
8869 to Hanno Boeck).
8870 * Changed a test for LINUX in config_macros.h to one for __linux__.
8871 * Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
8872 David Ayers).
8873 * Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
8874 (thanks to Andreas Tobler).
8875 * Add support for Darwin/x86 (thanks to Geoff Norton and the Mono
8876 developers).
8877 * Merge in some recent gcc fixes. Add ppc64 asm code. (Thanks to
8878 Bryce McKinlay and other GCJ developers.)
8879 * Scan MEM_PRIVATE sections under Windows ME and predecessors.
8880 * Interior pointers with some largish offsets into large objects could
8881 be ignored, if GC_all_interior_pointers was set. (Oddly this worked
8882 correctly for stack references if it was not set. Otherwise it failed
8883 for both stack and heap references. Thanks to Andrew McKinlay for the
8884 critical test case.)
8885 * Integrated Tatsuya Bizenn's NETBSD threads support, with some
8886 untested changes.
8887 * Added GC_strdup and friends to make leak detection work correctly
8888 for strdup clients (thanks to Jon Moore). Fixed the existing strdup
8889 with malloc redirection to handle a null malloc return correctly.
8890
8891
8892 == [6.6] 2005-09-09 ==
8893
8894 * Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
8895 * Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
8896 * Integrated Andreas Tobler's FreeBSD/PowerPC patch.
8897 * Don't access the GC thread structure from the restart handler. It's
8898 unsafe, since the handler may run too late. (Thanks to Ben Maurer for
8899 tracking this down.)
8900 * Applied Christian Thalinger's patch to change comment syntax in
8901 alpha_mach_dep.S.
8902 * Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
8903 Juan Jose Garcia-Ripoll).
8904 * Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
8905 Sugioka Toshinobu and Christian Thalinger).
8906 * Rewrote GC_parse_map_entry. This assumed a fixed column layout of
8907 /proc/self/maps on Linux. This ceased to be true about 2 years ago.
8908 The old code is probably quite problematic with -DREDIRECT_MALLOC. It
8909 is also used by default for IA64, though I haven't seen actual failures
8910 there.
8911 * More consistently define HBLKSIZE to 4096 on 64 bit architectures with
8912 4K pages (thanks to Andrew Haley).
8913 * With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
8914 to Ben Hutchings for the observation and patch).
8915 * Move up struct callinfo declaration to make gcc 4.0.2 happy.
8916
8917
8918 == [6.5] 2005-05-22 ==
8919
8920 * Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
8921 * Make GC_approx_sp() write to dummy location to ensure that stack
8922 is grown here, when sp looks reasonable, rather than later, when
8923 it might look like a bad memory reference. (Problem was never
8924 observed that I know of. But on rereading the code it seemed
8925 dubious.)
8926 * Separate out GC_with_callee_saves_pushed and sometimes call
8927 it from GC_suspend_handler in pthread_stop_world.c. Callee-save
8928 register values sometimes failed to get traced under HP/UX on
8929 PA-RISC. Linux/IA64 had the same problem, though non-stacked
8930 callee-save registers seem to be so rarely used there that nobody
8931 ever noticed.
8932 * Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
8933 from Andreas Tobler, which I had lost.
8934 * Fix compare_and_exchange implementation for gcc/IA64 to deal with
8935 pickier compiler versions.
8936 * Fixed Itanium 32-bit ABI support (HP/UX). In particular, the
8937 compare_and_exchange implementation didn't consider that possibility.
8938 * Undefine GC_pthread_detach in win32_threads.c (thanks to
8939 Tommaso Tagliapietra).
8940 * Fixed inclusion of frame.h for NETBSD in os_dep.c.
8941 * Applied Dan Bonachea's patch to use mmap on AIX.
8942 * Several fixes to resurrect the Irix port on recent OS versions.
8943 * Change ALPHA to use LINUX_STACKBOTTOM.
8944 * Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential
8945 bad values of __libc_stack_end on that platform (thanks to David Miller).
8946 * Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
8947 (Unnecessary in 7.0)
8948 * Force a define of __STDC__=0 for the IBM compiler on AIX, so that
8949 we get prototypes. (Unnecessary in 7.0)
8950 * GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
8951 which are only defined in private include files.
8952 * Integrated some small gcconfig.h patches from Dan Bonachea. Also
8953 relaxed assertion about FreeBSD stack size in pthread_support.c.
8954 * Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
8955 support. This may need additional work.
8956 * Avoided potentially infinite recursion in GC_save_callers if
8957 the system backtrace calls malloc. The workaround currently requires
8958 __thread support if this code is used with threads.
8959 * Avoided another similar infinite recursion by conditionally
8960 invoking GC_save_callers in alloc.c (thanks to Matthias Andree
8961 for helping to track down both of these).
8962 * Removed all traces of aix_irix_threads.c. AIX and Irix now use
8963 pthread_support.c and pthread_stop_world.c. The old code appeared
8964 to be unreliable for AIX, and was not regularly maintained.
8965 * On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
8966 they're not always safe to read.
8967 * Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
8968 in GC_remove_from_fl.
8969 * Fix stack_size assertion in GC_pthread_create.
8970 * Fix assertion in GC_steal_mark_stack.
8971
8972
8973 == [6.4] 2004-12-21 ==
8974
8975 * Merge gcconfig.h changes from gcc tree.
8976 * Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
8977 aix_irix_threads.c, and solaris_threads.c to get thread definitions.
8978 * Start marker threads in GC_thr_init, so that they get started even
8979 if no other threads are ever started. (Oddly enough, the parallel
8980 collector worked correctly, though not well, with no helper threads.)
8981 * Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
8982 is set (thanks to Alexander Petrossian).
8983 * GC_PRINT_BACK_HEIGHT would deadlock with thread support.
8984 * Let in_progress_space in backgraph.s grow dynamically.
8985 * Fix README.solaris2. The GC_thr_init() hack doesn't work anymore.
8986 * Convert GC_finalizer_mem_freed to bytes in allchblk.c.
8987 * Add missing declaration for GC_generic_malloc_words_small_inner.
8988 Without it, s390x breaks. (Thanks to Ulrich Weigand.)
8989 * Applied several MacOSX patches to support older tool chains (thanks
8990 to Stefan Ring).
8991 * Bug fix for NetBSD/x64 (thanks to Marc Recht).
8992 * Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
8993 * Fixed an uninitialized variable in cordprnt.c.
8994 * Eliminated some, but not all, gcc -Wall warnings.
8995 * Changed some old style casts to reinterpret_cast in new_gc_alloc.h
8996 (thanks to Dan Grayson).
8997 * GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
8998 GC_DONT_ADD_BYTE_AT_END is set.
8999 * Changed some (long) casts to (word) in preparation for Win64 (thanks
9000 to Peter Colson).
9001 * Changed "int stack_size" declaration in pthread_support.c to use
9002 size_t. (Only mattered with GC_ASSERTIONS enabled.)
9003 * Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
9004 * Removed GC_IGNORE_FB frame buffer recognition, and replaced
9005 it with a check that the mapping type is MEM_IMAGE.
9006 In theory, this should work much better, but it is a high
9007 risk change for win32. (Thanks to Ashley Bone for the crucial
9008 experimental data behind this, and to Rutger Ovidius for
9009 some further experiments.)
9010 * GC_allochblk_nth incremented GC_words_wasted by bytes rather than
9011 words.
9012 * Consider GC_words_wasted in GC_adj_words_allocd only if it is within
9013 reason. (A hack to avoid some extremely unlikely scenarios in which
9014 we manage to allocate only "wasted" space. 7.0 has a better fix.)
9015 * Changed PowerPC GC_clear implementation to use lwsync instead of
9016 eieio, since the documentation recommends against eieio, and
9017 it seems to be incorrect if the preceding memory op is a load.
9018 * Fixed print_block_list to print the correct kind number for
9019 STUBBORN (thanks to Rutger Ovidius).
9020 * Have configure.in generate an error if it is asked to support
9021 pthreads, but doesn't know how to.
9022 * Added Kazuhiro Inaoka's patch for Renesas M32R support.
9023 * Have the GNU build mechanism link with -ldl. Rename THREADLIBS
9024 to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.)
9025 * Added Hannes Mehnert's patch for FreeBSD/SPARC support.
9026 * Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
9027 (Thanks to John Merryweather Cooper.)
9028 * Define MPROTECT_VDB on MACOSX only if threads are being used, since the
9029 dirty page tracking mechanism uses threads. (This avoids an undefined
9030 reference to _GC_darwin_register_mach_handler_thread.)
9031 * By popular demand, use __libc symbols only if we are built with
9032 USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
9033 * Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
9034 The GC itself will dirty lots of pages in this cases, probably making
9035 it counterproductive on all platforms. And the DARWIN port crashes.
9036
9037
9038 == [6.3] 2004-07-08 ==
9039
9040 * Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
9041 * Very large allocations could cause a collector hang. Correct
9042 calculation of GC_collect_at_heapsize.
9043 * GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
9044 was defined.
9045 * Include gc_config_macros.h in threadlibs.c.
9046 * Correct MacOSX thread stop code (thanks to Dick Porter).
9047 * SMALL_OBJ definition was off by one. This could cause crashes
9048 at startup. (Thanks to Zoltan Varga for narrowing this down to
9049 a trivial test case.)
9050 * Integrate Paolo Molaro's patch to deal with a race in the Darwin
9051 thread stopping code.
9052 * Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
9053 implementation. The old approach appears to have been broken by
9054 recent kernels.
9055 * Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
9056 to Andrew Begel).
9057 * Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
9058 * Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
9059
9060
9061 == [6.3alpha6] 2004-05-06 ==
9062
9063 * Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
9064 * Fixed the x64 PREFETCH macros to correctly handle ia32e (which uses
9065 different prefetch instructions on x64). (Thanks to H.J. Lu.)
9066 * GC_config_macros.h did not correctly define GC_WIN32_THREADS from
9067 GC_THREADS.
9068 * Added simple_example.html.
9069 * Merged Andrew Gray's patch to correctly restore signal handlers on
9070 FreeBSD.
9071 * Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
9072 on x86-64. Added some other casts so that the PREFETCH macros
9073 always get a ptr_t argument. Removed some casts in the PREFETCH
9074 implementations.
9075 * Added a header guard for gc_allocator.h and changed GC_debug_free to
9076 clobber contents of deallocated object (suggested by Jesse Jones).
9077 * The signal masking code in pthread_stop_world.c contained some errors.
9078 In particular SIGSEGV was masked in the handler, in spite of the fact that
9079 it wrote to the heap. This could lead to an uncaught SIGSEGV, which
9080 apparently became much more likely in Linux 2.6. Also fixed some
9081 typos, and reduced code duplication in the same area.
9082 * Remove ltconfig, clean up configure messages for DG/UX (thanks to
9083 Adrian Bunk for the patches).
9084 * Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
9085
9086
9087 == [6.3alpha5] 2004-03-30 ==
9088
9089 * Fix & vs && typo in GC_generic_malloc and
9090 GC_generic_malloc_ignore_off_page. (Propagated from the gcc tree.)
9091 * Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
9092 (According to Christian Limpach, the NetBSD problem is fixed.
9093 Presumably so is the Solaris 2.3 problem.)
9094 * Removed placement delete from gc_cpp.h for the SGI compiler (thanks
9095 to Simon Gornall for the patch).
9096 * Changed semantics of the GC_IGNORE_FB environment variable, based
9097 on experimentation by Nicolas Cannasse pointing out that the old
9098 interpretation was useless. We still need help in identifying win32
9099 graphics memory mappings. The current "solution" is a hack.
9100 * Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
9101 It probably made more sense in the gcc context.
9102 * Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
9103 * Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
9104 supports the same extension on various platforms.
9105 * Added some basic (completely untested) defines for Win64, in support
9106 of future work.
9107 * Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
9108 a memory overwrite bug on Solaris and perhaps other platforms.
9109 * Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
9110 Jakub Jelinek for the patch and explaining the problem).
9111 Otherwise pre-linking could cause the collector to fail.
9112 * Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
9113 for HP/UX with gcc. The compiler-based implementation appears to work
9114 only with the vendor compiler.
9115 * Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
9116 making client mark code cleaner and less dependent on GC version.
9117 * Export several new procedures and GC_generic_malloc from gc_mark.h
9118 to support user-defined kinds. Use the new procedures to replace existing
9119 code in gcj_mlc.c and typd_mlc.c.
9120 * Added support for GC_BACKTRACES.
9121 * Fixed a remaining problem in CORD_str with signed characters (thanks
9122 to Alexandr Petrosian for the patch).
9123 * Removed supposedly redundant, but very buggy, definitions of finalizer
9124 macros from javaxfc.h. Fortunately this file probably has no users.
9125 The correct declarations were already in gc.h.
9126 * Also need to set GC_in_thread_creation while waiting for GC during
9127 thread termination, since it is also possible to collect from an
9128 unregistered thread in that case.
9129 * Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
9130 Plus some other minor WinCE fixes (thanks to Alain Novak).
9131 * Added GC_register_describe_type_fn.
9132 * Arrange for debugging finalizer registration to ignore non-heap
9133 registrations, since the regular version of the routine also behaves
9134 that way.
9135 * GC_gcj_malloc and friends need to check for finalizers waiting to be run.
9136 One of the more obscure allocation routines with missing a LOCK() call.
9137 * Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
9138 to work with VS.NET.
9139 * Cleaned up GC_INIT calls in test. Updated gc.man to encourage GC_INIT
9140 use in portable code.
9141 * Taught the GC to use libunwind if --enable-full-debug is specified on
9142 IA64 and libunwind is present.
9143 * The USE_MUNMAP code could get confused about the age of a block and
9144 prematurely unmap it. GC_unmap_old had a bug related to wrapping of
9145 GC_gc_no. GC_freehblk and GC_merge_unmapped didn't maintain
9146 hb_last_reclaimed reasonably when blocks were merged. The code was
9147 fixed to reflect original intent, but that may not always be an
9148 improvement.
9149
9150
9151 == [6.3alpha4] 2004-01-01 ==
9152
9153 * USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
9154 * Darwin support was broken in alpha3 as a result of my mis-integration of
9155 Andrew Begel's patches. Fixed with another patch from Andrew Begel.
9156 * A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
9157 overly aggressive. We may collect from an unregistered thread during
9158 thread creation. Fixed by explicitly checking for that case. (Added
9159 GC_in_thread_creation.)
9160
9161
9162 == [6.3alpha3] 2003-12-20 ==
9163
9164 * Removed -DSMALL_CONFIG from BCC_MAKEFILE.
9165 * Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
9166 * Mostly applied a DJGPP patch from Doug Kaufman. Especially Makefile.dj
9167 had suffered from serious bit rot.
9168 * Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
9169 and a call to alloca (for lcc compatibility).
9170 * Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
9171 the memory with PROT_NONE instead of unmapping it. The latter risks
9172 an intervening mmap grabbing the address space out from underneath us.
9173 Updated this code to reflect a cleaner patch from Ulrich Drepper.
9174 * Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
9175 (Patch from Andrew Begel.)
9176 * Dynamically choose whether or not lock should spin on win32 (thanks
9177 to Maurizio Vairani for the patch). This may be a significant performance
9178 improvement for win32.
9179 * Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
9180 in the distribution (thanks to Maurizio Vairani).
9181 * Maybe_install_looping_handler() was accidentally exported, violating
9182 our name space convention.
9183 * Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD. (Thanks to
9184 Christian Limpach. I generalized the patch to use sigsetjmp on all
9185 UNIX_LIKE platforms, admittedly a slightly risky move. But it may avoid
9186 similar problems on some other platforms. I also cleaned up the definition
9187 of UNIX_LIKE a bit.)
9188 * Integrated Andrew Begel's Darwin threads patch, adjusted according to
9189 some of Fergus Hendersons's comments. (Patch didn't apply cleanly,
9190 errors are possible.)
9191 * Added another test or two for the Intel 8.0 compiler to avoid
9192 confusing it with gcc. The single-threaded collector should now build
9193 with icc, at least on ia64.
9194
9195
9196 == [6.3alpha2] 2003-11-04 ==
9197
9198 * Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
9199 * Put back the WINABI qualifier for GC_CreateThread. (Thanks to
9200 Danny Smith for the patch. 6.3alpha1 had the qualifier in one place
9201 but not elsewhere, which was clearly wrong.)
9202 * Sometimes explicitly define __private_extern__ before DARWIN dyld.h
9203 include. (Thanks to Andreas Tobler for posting the patch.)
9204 * Included signal.h from pthread_support.c. Removed GC_looping_handler,
9205 which was dead code.
9206 * GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
9207 defined (thanks to Glauco Masotti for testing and reporting this).
9208 Changed GC_find_start to never just return 0. According to its
9209 comment it doesn't, and it's unclear that's correct.
9210 * GC_alloc_large had several largely compensating bugs in the
9211 computation of GC_words_wasted. (It was confused about bytes vs.
9212 words in two places.)
9213 * Integrated Slava Sysoltsev's patch to support more recent versions of
9214 the Intel compiler on IA64/Linux.
9215 * Changed win32 spinlock initialization to conditionally set a spin count.
9216 (Emmanual Stumpf pointed out that enabling this makes a large performance
9217 difference on win32 multiprocessors.) Also cleaned up the win32 spinlock
9218 initialization code a bit.
9219 * Fixed thread support for HP/UX/IA64. The register backing store base for
9220 the main thread was sometimes not set correctly. (Thanks to
9221 Laurent Morichetti.)
9222 * Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
9223 * Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
9224 avoid 64-bit size mismatches (thanks to Bernie Solomon).
9225 * Fixed GC_generic_push_regs to avoid a potential and very unfortunate
9226 tail call optimization. This could lead to prematurely reclaimed
9227 objects on configurations that used the generic routine and the new
9228 build infrastructure (which potentially optimizes mach_dep.c).
9229 This was a serious bug, but it's unclear whether it has resulted in
9230 any real failures.
9231 * Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
9232 for noticing the problem and supplying the patch).
9233 * Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
9234 to Anthony Green).
9235 * Partially merged a win32 patch from Ben Hutchings, and substantially
9236 revised other parts of win32_threads.c. It had several problems.
9237 Under MinGW with a statically linked library, the main thread was
9238 not registered. Cygwin detached threads leaked thread descriptors.
9239 There were several race conditions. For now, unfortunately the
9240 static threads limit remains, though we increased it, and made table
9241 traversal cost depend on the actual thread count.
9242 There is also still some code duplication with pthread_support.c.
9243 (Thread descriptors did become much smaller, since Ben Hutchings
9244 removed the thread context from them.)
9245 * Integrated a Solaris configure.in patch from Rainer Orth.
9246 * Added GC_IGNORE_FB and associated warning to very partially address
9247 the issue of the collector treating a mapped frame buffer as part
9248 of the root set. (Thanks to David Peroutka for providing some
9249 insight. More would be helpful. Is there anything that can be used
9250 to at least partially identify such memory segments?)
9251
9252
9253 == [6.3alpha1] 2003-07-26 ==
9254
9255 * Integrated some NetBSD patches by Marc Recht. These
9256 were already in the NetBSD package.
9257 * GC_pthread_create waited for the semaphore even if pthread_create failed.
9258 (Thanks to Dick Porter for the pthread_support.c patch.) Applied the
9259 analogous fix for aix_irix_threads.c.
9260 * Added Rainer Orth's Tru64 fixes.
9261 * The check for exceeding the thread table size in win32 threadDetach
9262 was incorrect (thanks to Alexandr Petrosian for the patch).
9263 * Applied Andrew Begel's patch to correct some reentrancy issues
9264 with dynamic loading on Darwin.
9265 * GC_CreateThread() was neglecting to duplicate the thread handle in
9266 the table (thanks to Tum Nguyen for the patch).
9267 * Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
9268 Roger Sayle for the patch).
9269 * Applied more AIX threads patches from Scott Ananian.
9270
9271
9272 == [6.2] 2003-06-21 ==
9273
9274 * Integrated a second round of Irix/AIX patches from Dan Bonachea.
9275 Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
9276 the Irix assembler to do the C preprocessing; gcc -E doesn't work.
9277 * Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
9278 * There was a race between GC_pthread_detach and thread exit that could
9279 result in a thread structure being deallocated by GC_pthread_detach
9280 even though it was still needed by the thread exit code (thanks to
9281 Dick Porter for the small test case that allowed this to be debugged).
9282 * Fixed version parsing for non-alpha versions in acinclude.m4 and
9283 version checking in version.h.
9284 * Issues identified (not yet fixed):
9285 - A dynamic libgc.so references dlopen unconditionally, but doesn't link
9286 against libdl.
9287 - GC_proc_fd for Solaris is not correctly updated in response to a
9288 fork() call. Thus incremental collection in the child won't work
9289 correctly. (Thanks to Ben Cottrell for pointing this out.)
9290 - --enable-redirect-malloc is mostly untested and known not to work
9291 on some platforms.
9292 - There seem to be outstanding issues on Solaris/x86, possibly with
9293 finding the data segment starting address.
9294 - Very large root set sizes (> 16 MB or so) could cause the collector
9295 to abort with an unexpected mark stack overflow. (Thanks to
9296 Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial
9297 size.
9298 - The SGI version of the collector marks from mmapped pages, even
9299 if they are not part of dynamic library static data areas. This
9300 causes performance problems with some SGI libraries that use mmap
9301 as a bitmap allocator. NOT YET FIXED. It may be possible to turn
9302 off DYNAMIC_LOADING in the collector as a workaround. It may also
9303 be possible to conditionally intercept mmap and use GC_exclude_static_roots.
9304 The real fix is to walk rld data structures, which looks possible.
9305 - Incremental collector should handle large objects better. Currently,
9306 it looks like the whole object is treated as dirty if any part of it is.
9307
9308
9309 == [6.2alpha6] 2003-06-05 ==
9310
9311 * There was an extra underscore in the name of GC_save_registers_in_stack
9312 for NetBSD/SPARC (thanks to Jaap Boender for the patch).
9313 * Integrated Brian Alliet's patch for Darwin. This restructured the
9314 linuxthreads/pthreads support to separate generic pthreads support
9315 from more the system-dependent thread-stopping code. I believe this
9316 should make it easier to eliminate the code duplication between
9317 pthreads platforms in the future. The patch included some other
9318 code cleanups.
9319 * Integrated Dan Bonachea's patch to support AIX threads. This required
9320 substantial manual integration, mostly due to conflicts with other
9321 recent threads changes. It may take another iteration to
9322 get it to work.
9323 * Removed HPUX/PA-RISC support from aix_irix_threads.c. It wasn't used
9324 anyway and it cluttered up the code. And anything we can do to migrate
9325 towards generic pthreads support is a good thing.
9326 * Added a more explicit test for tracing of function arguments to test.c.
9327 * Added Akira Tagoh's PowerPC64 patch.
9328 * Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
9329 pointing it out). gc.h now includes just windows.h, not winbase.h.
9330 * Declared GC_save_regs_in_stack() in gc_priv.h. Remove other declarations.
9331 * Changed --enable-cplusplus to use automake consistently. The old way
9332 confused libtool. "Make install" didn't work correctly for the old version.
9333 Previously --enable-cplusplus was broken on cygwin.
9334 * Changed the C version of GC_push_regs to fail at compile time if it is
9335 generated with an empty body. This seems to have been the cause of one
9336 or two subtle failures on unusual platforms. Those failures should
9337 now occur at build time and be easily fixable.
9338
9339
9340 == [6.2alpha5] 2003-05-14 ==
9341
9342 * GC_invoke_finalizers could, under rare conditions, set
9343 GC_finalizer_mem_freed to an essentially random value. This could
9344 possibly cause unbounded heap growth for long-running applications
9345 under some conditions. (The bug was introduced in 6.1alpha5, and
9346 is not in gcc3.3.)
9347 * Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared.
9348 GC_DLL is used instead. All internal tests are now on GC_DLL.
9349 README.macros is now more precise about the intended meaning.
9350 * Include DllMain in the multi-threaded win32 version only if the
9351 collector is actually built as a dll (thanks to Mohan Embar for
9352 a version of the patch).
9353 * Hide the cygwin threadAttach/Detach functions. They were violating our
9354 namespace rules.
9355 * Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT
9356 (thanks again to Ben Hutchings).
9357 * Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
9358 * CORD_cat was not rebalancing unbalanced trees in some cases, violating
9359 a CORD invariant. Also tweaked the re-balancing rule for
9360 CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report
9361 and patch.)
9362 * Added hand-coded structured exception handling support to mark.c.
9363 This should enable support of dynamic libraries under win32 with
9364 gcc-compiled code. (Thanks to Ranjit Mathew for the patch.)
9365 Turned on dynamic library scanning for gcc on Win32.
9366 * Removed some remnants of read wrapping (thanks to Kenneth Schalk).
9367 GC_USE_LD_WRAP was probably broken in recent versions.
9368 * The build could fail on some platforms since gcconfig.h could include
9369 declarations mentioning ptr_t, which was not defined, e.g. when if_mach
9370 was built (thanks to Yann Dirson for pointing this out). Also
9371 cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
9372 * The GC_LOOP_ON_ABORT environment variable interfered with incremental
9373 collection, since the write fault handler was erroneously overridden.
9374 Handlers are now set up in the correct order.
9375 * It used to be possible to call GC_mark_thread_local_free_lists() while
9376 the world was not stopped during an incremental GC. This was not safe.
9377 Fortunately, it was also unnecessary. Added GC_world_stopped flag
9378 to avoid it. (This caused occasional crashes in GC_set_fl_marks
9379 with thread local allocation and incremental GC. This probably happened
9380 primarily on old, slow multiprocessors.)
9381 * Allowed overriding of MAX_THREADS in win32_threads.c from the build
9382 command line (thanks to Yannis Bres for the patch).
9383 * Taught the IA64/linux code to determine the register backing store base from
9384 /proc/self/maps after checking the __libc symbol, but before guessing.
9385 (__libc symbols are on the endangered list, and the guess is likely to not
9386 always be right for 2.6 kernels.) Restructured the code to read and parse
9387 /proc/self/maps so it only exists in one place (all platforms).
9388 * The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it
9389 also registered the main data segment, but didn't actually do so. (I don't
9390 think anyone actually uses this configuration, but ...)
9391 * Made another attempt to get --enablecplusplus to do the right thing.
9392 Since there are unavoidable problems with C programs linking against a
9393 dynamic library that includes C++ code, I separated out the c++ code into
9394 libgccpp.
9395
9396
9397 == [6.2alpha4] 2003-03-10 ==
9398
9399 * Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS. (See Debian bug
9400 # 177204)
9401 * Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
9402 * Integrated Grzegorz Jakacki's substantial GNU build patch. "Make dist"
9403 should now work for the GNU build process. Documentation files
9404 are installed under share/gc.
9405 * Tweaked gc_cpp.h to again support the Borland compiler (thanks to
9406 Rene Girard for pointing out the problems).
9407 * Updated BCC_MAKEFILE (thanks to Rene Girard).
9408 * Added GC_ASSERT check for minimum thread stack size.
9409 * Added --enable-gc-assertions.
9410 * Added some web documentation to the distribution. Updated it in the
9411 process.
9412 * Separate gc_conf_macros.h from gc.h.
9413 * Added generic GC_THREADS client-defined macro to set the appropriate
9414 GC_XXX_THREADS internal macro. (gc_config_macros.h.)
9415 * Add debugging versions of _ignore_off_page allocation primitives.
9416 * Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
9417 from gc.h to gc_priv.h.
9418 * Reset GC_fail_count even if only a small allocation succeeds.
9419 * Integrated Brian Alliet's patch for dynamic library support on Darwin.
9420 * gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
9421 when it should have called the lower case version, since it was
9422 explicitly computing a base pointer.
9423
9424
9425 == [6.2alpha3] 2003-01-30 ==
9426
9427 * Don't include execinfo.h in os_dep.c when it's not needed, and may not
9428 exist.
9429
9430
9431 == [6.2alpha2] ==
9432
9433 * Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
9434 Hironori Sakamoto for the patch).
9435 * Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
9436 * Attempted to work around the problems with .S filenames and the SGI
9437 compiler. (Untested.)
9438 * Worked around an HP/UX make issue with the GNU-style build process.
9439 * Fixed the --enable-cplusplus build machinery to allow builds without
9440 a C++ compiler. (That was always the intent ...)
9441 * Changed the debugging allocation macros to explicitly pass the return
9442 address for Linux and XXXBSD on hardware for which we can't get stack
9443 traces. Use __builtin_return_address(0) to generate it when possible.
9444 Some of the configuration work was cleaned up (good) and moved to gc.h
9445 (bad, but necessary). This should make leak detection more useful
9446 on a number of platforms. (Thanks to Fabian Thylman for the suggestion.)
9447 * Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
9448 * Bumped revision number for dynamic library.
9449
9450
9451 == [6.2alpha1] 2003-01-23 ==
9452
9453 * Guard the test for GC_DUMP_REGULARLY in misc.c with
9454 "#ifndef NO_DEBUGGING". Otherwise it fails to build with NO_DEBUGGING
9455 defined. (Thanks to Manuel Serrano.)
9456 * Message about retrying suspend signals was incorrectly generated even when
9457 flag was not set.
9458 * Cleaned up MACOSX/NEXT root registration code. There was apparently a
9459 separate ifdef case in GC_register_data_segments() for no reason.
9460 * Removed MPROTECT_VDB for MACOSX port, based on one negative report.
9461 * Arrange for gc.h and friends to be correctly installed with GNU-style
9462 "make install".
9463 * Enable the GNU-style build facility include C++ support in the library
9464 with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
9465 * Mark from GC_thread_key in linux_threads.c, in case that's allocated
9466 from the garbage collected heap, as it is with our own thread-specific
9467 storage implementation (thanks to Jeff Sturm).
9468 * Mark all free list header blocks if they are heap allocated. This avoids
9469 some unnecessary tracing. And it remains correct if we clear the
9470 root set. (Thanks to Jeff Sturm for identifying the bug.)
9471 * Improved S390/Linux support. Add S390/Linux 64-bit support (thanks to
9472 Ulrich Weigand).
9473 * Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
9474 GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h. This is technically
9475 an interface change. Based on the fact that nobody reported this,
9476 I suspect/hope there were no clients.
9477 * Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
9478 when appropriate, (2) doesn't generate references to undefined internal
9479 macros, and (3) allows easier manual construction of descriptors.
9480 * Close the file descriptor used by GC_print_address_map().
9481 * Set the "close-on-exec" bit for various file descriptors maintained
9482 for the collector's internal use.
9483 * Added a hack to find memory segments owned by the system allocator
9484 under win32. Based on my tests, this tends to eventually find all
9485 segments, though it may take a while. There appear to be cleaner,
9486 but slower solutions under NT/XP. But they rely on an API that's
9487 unsupported under 9X.
9488 * Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM. (Thanks
9489 to Akira Tagoh for pointing out that HEURISTIC1 does not work on
9490 64-bit kernels.)
9491 * Added GC_set_free_space_divisor to avoid some Windows dll issues.
9492 * Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
9493 of candidate pointers for tagging, etc.
9494 * Always lock around GC_notify_full_gc(). Simplified code for
9495 invoking GC_notify_full_gc().
9496 * Changed the way DATASTART is defined on FreeBSD to be robust against
9497 an unmapped page after etext. (Thanks to Hironori Sakamoto for
9498 tracking down the intermittent failure.)
9499 * Made GC_enable() and GC_disable() official. Deprecated direct update
9500 of GC_dont_gc. Changed GC_gcollect to be a noop when garbage collection
9501 is disabled.
9502 * Call GC_register_dynamic_libraries before stopping the world on Linux,
9503 in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
9504 * Introduced a more general mechanism for platform-dependent code to
9505 decide whether the main data segment should be handled separately
9506 from dynamic libraries, or registered by GC_register_dynamic_libraries.
9507 The latter is more reliable and easier on Linux with dl_iterate_phdr.
9508
9509
9510 == [6.1] ==
9511
9512 * Added GC_MAXIMUM_HEAP_SIZE environment variable.
9513 * Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
9514 * Double page hash table size for -DLARGE_CONFIG.
9515 * Integrated Bo Thorsen's x64 support.
9516 * STACKBOTTOM definition for LINUX/MIPS was partially changed back
9517 (thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
9518 * Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
9519 SEARCH_FOR_DATA_START. It doesn't hurt to fall back to a search.
9520 And __data_start doesn't seem to get defined correctly of the GC
9521 library is loaded with LD_PRELOAD, e.g. for leak detection.
9522 * If the GC_find_leak environment variable is set, do a
9523 atexit(GC_gcollect) to give us at least one chance to detect leaks.
9524 This may report some very benign leaks, but ...
9525 * Added REDIRECT_FREE. It's necessary if we want leak detection with
9526 LD_PRELOAD.
9527 * Defer printing of leaked objects, as for smashed objects.
9528 * Fixed process and descriptor leak in GC_print_callers. Try for
9529 line number even if we got function name.)
9530 * Ported parallel GC support and thread local allocation to Alpha.
9531 Not yet well-tested.
9532 * Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
9533 * Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
9534 alpha_mach_dep.s.
9535 * Incorporated a change to new_gc_alloc.h,
9536 which should make it work with gcc3.1.
9537 * Use alpha_mach_dep.S only on Linux. (It's not clear that this is
9538 optimal, but it otherwise didn't build on Tru64. Thanks to Fergus Henderson.)
9539 * Added ifdef to guard free() in os_dep.c. Otherwise we get a
9540 compilation error on Irix (thanks to Dai Sato).
9541 * Added an experimental version of GC_memalign to mallocx.c. This can't
9542 always work, since we don't handle alignment requests in the hblk-level
9543 allocator, and we can't handle arbitrary pointer displacements unless
9544 GC_all_interior_pointers is enabled. But it should work for alignment
9545 requests up to HBLKSIZE. This is not yet documented in the standard
9546 places.
9547 * Finally debugged the OSF1/Tru64 thread support. This needs more testing,
9548 since I needed to add a somewhat unconvincing workaround for signal
9549 delivery issues that I don't yet completely understand. But it does
9550 pass my tests, even in parallel GC mode. Incremental GC support is
9551 disabled if thread support is enabled, due to the signal issues.
9552 * Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
9553 * Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
9554 declarations to gc.h. On IA64, this is required for REDIRECT_MALLOC
9555 to work correctly with these.
9556 * Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
9557
9558
9559 == [6.1alpha5] 2002-06-19 ==
9560
9561 * Added GC_finalizer_mem_freed, and changed some of the code that
9562 decided on heap expansion to look at it. Memory explicitly
9563 deallocated by finalizers essentially needs to be counted as reclaimed
9564 by the GC. Otherwise there are cases in which the heap can grow
9565 infinitely. (Thanks to Mark Reichert for the test case.)
9566 * Integrated Adam Megacz patches to not scan dynamic libraries if
9567 we are compiling with gcc on win32. Otherwise we need structured
9568 exception handling to deal with asynchronously unmapped root
9569 segments, and gcc doesn't directly support that.
9570 * Integrated Anthony Green's patch to support Wine.
9571 * GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
9572 places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
9573 * Integrated Loren J. Rittle's Alpha FreeBSD patches. These also
9574 changed the declarations of symbols like _end on many platforms to
9575 that they wouldn't mistakenly be declared as short data symbols (suggested by
9576 Richard Henderson).
9577 * Integrated changes from the Debian distribution (thanks to Ryan Murray
9578 for pointing these out).
9579 Fix C++ comments in POWERPC port. Add ARM32
9580 incremental GC support. Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
9581 this time for real. Use va_copy to get rid of cord printf problems
9582 (finally).
9583 * Close file descriptor used to count CPUs (thanks to Jeff Sturm for
9584 pointing out the omission).
9585 * Don't just drop gcj free lists in GC_start_reclaim, since that can
9586 eventually cause the marker to see a bogus mark descriptor in the
9587 dropped objects. The usual symptom was a very intermittent segmentation
9588 fault in the marker. This mattered only if one of the GC_gcj_malloc
9589 variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
9590 Tom Tromey for helping to track this down).
9591 * Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
9592 Jeff Sturm, Tom Tromey, and Christian Joensson).
9593 * Fixed a typo in strdup definition (thanks to Gerard A Allan).
9594 * Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
9595 This is needed on Linux. I'm not sure whether it's better or worse
9596 on Tru64.
9597 * Changed gc_cpp.h once more to declare operator new and friends only in
9598 a Microsoft environment. This may need further fine tuning (thanks to
9599 Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
9600 * Don't ever override strdup if it's already macro defined (thanks to
9601 Adnan Ali for pointing out the problem).
9602 * Changed gc_cpp.h yet again to also overload placement new. Due to the
9603 C++ overloading rules, the other overloaded new operations otherwise hide
9604 placement new, which causes many STL uses to break (thanks to Reza Shahidi
9605 for reporting this, and to Matt Austern for proposing a fix).
9606 * Integrated cygwin pthreads support from Dan Bonachea.
9607 * Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
9608 * Changed printing code to print more complete GC times.
9609 * Applied Mark Mitchell's Irix patch to correct some bit rot.
9610 * Clarified which object-printing routines in dbg_mlc.c should hold
9611 the allocation lock. Restructured the code to allow reasonable object
9612 printing with -DREDIRECT_MALLOC.
9613 * Fix the Linux mmap code to always start with 0x1000 as the initial hint.
9614 Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
9615 Jeffrey Mark Siskind).
9616 * Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
9617 with a system header (thanks to Philip Brown).
9618 * Cause win32_threads.c to handle an out of range stack pointer correctly,
9619 though currently with a warning. (Thanks to Jonathan Clark for
9620 observing that Windows applications may temporarily use the stack
9621 pointer for other purposes, and suggesting a fix. Unfortunately, it's
9622 not clear that there is a complete solution to this problem.)
9623
9624
9625 == [6.1alpha4] 2002-06-16 ==
9626
9627 * Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
9628 building. Increased 64-bit heap size limit in test.c slightly, since
9629 a functional SPARC collector seems to slightly exceed the old limits.
9630 * Use NPRGREG in solaris_threads.c, thus printing all registers if things
9631 go wrong.
9632 * Added GC_MARKERS environment variable to allow use of a single marker
9633 thread on an MP without confusing the lock implementation.
9634 * Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
9635 This is really a purely generational mode, and we can afford to
9636 postpone the collection until the heap is (nearly) full.
9637 * Remove read() wrapper for MPROTECT_VDB. It was causing more harm than
9638 good. It is often no longer needed if system calls avoid writing to
9639 pointerful heap objects.
9640 * Fix MACOSX test in gcconfig.h (thanks to John Clements).
9641 * Change GC_test_and_set so that it consistently has one argument.
9642 Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
9643 Ryan Murray).
9644 * Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort()
9645 declaration (thanks to Michael Smith).
9646 * Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START().
9647 * Added win32 recognition code in configure.in. Changed some of the
9648 dllimport/export defines in gc.h (thanks to Adam Megacz).
9649 * GC_malloc_many didn't set hb_last_reclaimed when it called
9650 GC_reclaim_generic. (I'm not sure this matters much, but ...)
9651 * Allocating uncollectible objects with debug information sometimes
9652 allocated objects that were one byte too small, since uncollectible
9653 objects don't have the extra byte added at the end (thanks to
9654 Wink Saville for pointing this out).
9655 * Added a bit more assertion checking to make sure that gcj objects
9656 on free lists never have a nonzero second word.
9657 * Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
9658 * Upgraded libtool, configure.in and some related files to hopefully
9659 support NetBSD/SPARC (thanks to Adrian Bunk). Unfortunately,
9660 libtool 1.4.2 seemed to be buggy due to missing quotes in several
9661 "test" invocations. Fixed those in the ltmain.sh script.
9662 * Some win32-specific patches, including the introduction of
9663 GC_CreateThread (thanks to Adam Megacz).
9664 * Merged in gcj changes from Anthony Green to support embedded systems.
9665 * Tried to consistently rename preprocessed assembly files with a capital
9666 .S extension.
9667 * Use alpha_mach_dep.S on ALPHA again. It doesn't really matter, but this
9668 makes our distribution consistent with the gcc one, avoiding future merge
9669 problems.
9670 * Move GET_MEM definition into gcconfig.h. Include gcconfig.h slightly
9671 later in gc_priv.h to avoid forward references to ptr_t.
9672 * Add some testing of local allocation to test.c.
9673 * Change definition of INVALID_QTID in specific.h. The -1 value was used
9674 inconsistently, and too likely to collide with a valid stack address.
9675 Some general clean-up of specific.[ch]. Added assertions. (Thanks
9676 to Michael Smith for tracking down an intermittent bug to this
9677 general area. I'm not sure it has been squashed yet, however.)
9678 * On Pthread systems it was not safe to call GC_malloc() between fork()
9679 and exec(). According to the applicable standards, it doesn't appear
9680 to be safe to call malloc() or many other libc functions either, thus
9681 it's not clear this is fixable. Added experimental support for
9682 -DHANDLE_FORK in linux_threads.c which tries to support it. It may
9683 succeed if libc does the right thing. I'm not sure whether it does.
9684 (Thanks to Kenneth Schalk for pointing out this issue.)
9685 * Documented thread local allocation primitives to require an
9686 explicit GC_init call. GC_init_parallel is no longer declared to
9687 be a constructor function, since that isn't portable and often
9688 seems to lead to initialization order problems.
9689 * Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
9690 compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
9691 * Some more patches for Linux on HP PA-RISC.
9692 * Added include/gc_allocator.h. It implements (hopefully) standard
9693 conforming (as opposed to SGI-style) allocators that allocate
9694 collectible (gc_allocator) or GC-traceable, but not collectible
9695 (traceable_allocator) objects. This borrows heavily from libstc++,
9696 which borrows heavily from the SGI implementation, this part of
9697 which was written by Matt Austern. Changed test_cpp.cc to very
9698 minimally test this.
9699 * On Linux/x86, retry mmap with a different start argument. That should
9700 allow the collector to use more (closer to 3GB) of the address space.
9701 * Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
9702 patch to the gcc tree).
9703 * Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
9704 to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
9705 * Compensated for the fact that current versions of glibc set
9706 __libc_stack_end incorrectly on Linux/IA64 while initialization code
9707 is running. This could cause the collector to miss 16 bytes of
9708 the memory stack if GC_malloc or friends where called before main().
9709 * Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
9710 This will probably take another iteration to work, since his
9711 patch conflicted with the libtool upgrade.
9712 * Added README.arm.cross containing some information about cross-
9713 compiling to an ARM processor from Margaret Fleck (original code provided by
9714 Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
9715 Tilman Vogel; also ported for iPAQ by Oliver Kurth).
9716
9717
9718 == [6.1alpha3] 2002-02-07 ==
9719
9720 * Minor cleanup on the gcconfig.h section for SPARC.
9721 * Minor fix to support Intel compiler for Linux/x86 (thanks to
9722 Sven Hartrumpf).
9723 * Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
9724 * Restructured the way in which we determine whether or not to keep
9725 call stacks for debug allocation. By default SAVE_CALL_COUNT is
9726 now zero on all platforms. Added SAVE_CALL_NARGS parameters.
9727 If possible, use execinfo.h to capture call stack. (This should
9728 add support for a number of new platforms, though often at
9729 considerable runtime expense.)
9730 * Try to print symbolic information for call stacks. On Linux, we
9731 do this with a combination of execinfo.h and running addr2line in
9732 a separate process. This is both much more expensive and much more
9733 useful. Amazingly, it seems to be fast enough for most purposes.
9734 * Redefined strdup if -DREDIRECT_MALLOC is given.
9735 * Changed incremental collector and MPROTECT_VDB implementation so that,
9736 under favorable conditions, pointer-free objects are not protected.
9737 Added GC_incremental_protection_needs() to determine ahead of time whether
9738 pointer-free objects may be protected. Replaced GC_write_hint() with
9739 GC_remove_protection().
9740 * Added test for GC_ENABLE_INCREMENTAL environment variable.
9741 * Made GC_time_limit runtime configurable. Added GC_PAUSE_TIME_TARGET
9742 environment variable.
9743 * Eliminated GC_page_sz, a duplicate of GC_page_size.
9744 * Caused the Solaris and Irix thread creation primitives to call
9745 GC_init_inner().
9746
9747
9748 == [6.1alpha2] 2001-12-20 ==
9749
9750 * No longer wrap read by default in multi-threaded applications. It was
9751 pointed out on the libgcj list that this holds the allocation lock for
9752 way too long if the read blocks. For now, reads into the heap are
9753 broken with incremental collection. It's possible to turn this back on
9754 if you make sure that read calls don't block (e.g. by calling select
9755 first).
9756 * Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
9757 * Added check for environment variable GC_IGNORE_GCJ_INFO.
9758 * Added printing of stop-the-world GC times if GC_PRINT_STATS environment
9759 variable is set.
9760 * The calloc definition in leak_detector.h was missing parentheses, and
9761 realloc was missing a second argument to GC_REALLOC (thanks to
9762 Elvenlord Elrond).
9763 * Added GC_PRINT_BACK_HEIGHT environment variable and associated
9764 code, mostly in the new file backgraph.c. See doc/README.environment.
9765 * Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
9766 Jonathan Clark).
9767 * Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
9768 different address-space layout). This may help for other machines with
9769 holes in the data segment. (Thanks to Hironori Sakamoto.)
9770 * Changed the order in which GC_push_roots and friends push things onto
9771 the mark stack. GC_push_all calls need to come first, since we can't
9772 necessarily recover if those overflow the mark stack. (Thanks to
9773 Matthew Flatt for tracking down the problem.)
9774 * Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
9775
9776
9777 == [6.1alpha1] 2001-09-22 ==
9778
9779 * Non-debug, atomic allocations could result in bogus smashed object
9780 reports with debugging on (thanks to Patrick Doyle for the small test case).
9781 * Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
9782 2.2.4 bug.
9783 * Initial port to HP/UX on Itanium. Thread support and both 32 and 64
9784 bit ABIs appear to work. Parallel mark support doesn't yet, due to
9785 some inline assembly code issues. Thread local allocation does appear
9786 to work.
9787 * ifdef'ed out glibc2.1/Itanium workaround. I suspect nobody is using
9788 that combination anymore.
9789 * Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
9790 Dimitris Vyzovitis for the patch).
9791 * Debugged 64-bit support on HP/UX PA-RISC.
9792 * Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
9793 * Unregistering of finalizers with debugging allocation was broken (thanks
9794 to Jani Kajala for the test case).
9795 * Old finalizers were not returned correctly from GC_debug_register_finalizer.
9796 * Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
9797 * Cleaned up some statistics gathering code in reclaim.c (thanks to
9798 Walter Bright).
9799 * Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
9800 * Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
9801 traversal to dyn_load.c. Changed it to weakly reference dl_iterate_phdr,
9802 so that the old code is still used with old versions of glibc.
9803 * Cleaned up feature test macros for various threads packages and
9804 integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
9805 It's likely that the cleanup broke something, since it touched lots of
9806 code. It's also likely that it fixed some unreported bugs in the
9807 less common thread implementations, since some of the original code
9808 didn't stand up to close scrutiny. Support for the next pthreads
9809 implementation should be easier to add.
9810
9811
9812 == [6.0] 2001-07-26 ==
9813
9814 * Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
9815 * Fixed a stack clearing problem that resulted in SIGILL with a
9816 misaligned stack pointer for multi-threaded SPARC builds.
9817 * Integrated another HURD patch (thanks to Igor Khavkine).
9818
9819
9820 == [6.0alpha9] ==
9821
9822 * added README.macros.
9823 * Made gc.mak a symbolic link to work around winzip's tendency to ignore
9824 hard links.
9825 * Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
9826 it on untested platforms.
9827 * Integrated initial GNU HURD port (thanks to Chris Lingard and
9828 Igor Khavkine).
9829 * A few more fixes for Digital Mars compiler (by Walter Bright).
9830 * Fixed gcc version recognition. Renamed OPERATOR_NEW_ARRAY to
9831 GC_OPERATOR_NEW_ARRAY. Changed GC_OPERATOR_NEW_ARRAY to be the default.
9832 It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
9833 Cesar Eduardo Barros).
9834 * Changed the byte size to free-list mapping in thread local allocation
9835 so that size 0 allocations are handled correctly.
9836 * Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
9837 * Changed finalization registration to invoke GC_oom_fn when it runs out
9838 of memory.
9839 * Removed lvalue cast in finalize.c. This caused some debug configurations
9840 not to build with some non-gcc compilers.
9841
9842
9843 == [6.0alpha8] 2001-06-15 ==
9844
9845 * Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
9846 so that they compile under Irix (thanks to Dave Love).
9847 * Updated powerpc_macosx_mach_dep.s so that it works if the collector
9848 is in a dynamic library (thanks to Andrew Begel).
9849 * Transformed README.debugging into debugging.html, updating and
9850 expanding it in the process. Added gcdescr.html and tree.html
9851 from the web site to the GC distribution.
9852 * Fixed several problems related to PRINT_BLACK_LIST. This involved
9853 restructuring some of the marker macros.
9854 * Fixed some problems with the sizing of objects with debug information.
9855 Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST. Reduced the
9856 object size with SHORT_DEBUG_HDRS by another word.
9857 * The "Needed to allocate blacklisted ..." warning had inadvertently
9858 been turned off by default, due to a buggy test in allchblk.c. Turned
9859 it back on.
9860 * Removed the marker macros to deal with 2 pointers in interleaved fashion.
9861 They were messy and the performance improvement seemed minimal. We'll
9862 leave such scheduling issues to the compiler.
9863 * Changed Linux/PowerPC test to also check for __powerpc__ in response
9864 to a discussion on the gcc mailing list.
9865 * Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
9866 (suggested by Matthew Flatt). This was causing problems in
9867 systems that register all of their own roots. It looks far more correct
9868 to me without the "static" anyway.
9869 * Fixed several problems with thread local allocation of pointer-free or
9870 typed objects. The collector was reclaiming thread-local free lists, since
9871 it wasn't following the link fields.
9872 * There was apparently a long-standing race condition related to
9873 multi-threaded incremental collection. A collection could be started and
9874 a thread stopped between the memory unprotect system call and the setting of
9875 the corresponding dirt bit. I believe this did not affect Solaris or PCR,
9876 which use a different dirty-bit implementation. Fixed this by installing
9877 signal handlers with sigaction instead of signal, and disabling the thread
9878 suspend signal while in the write-protect handler. (It is unclear
9879 whether this scenario ever actually occurred.)
9880 * Incremental collection did not cooperate correctly with the PARALLEL_MARK
9881 implementation of GC_malloc_many or the local_malloc primitives. It still
9882 doesn't work well, but it shouldn't lose memory anymore.
9883 * Integrated some changes from the gcc source tree that I had previously
9884 missed (thanks to Bryce McKinlay for the reminder and patch).
9885 * Added Makefile.direct as a copy of the default Makefile, which would
9886 normally be overwritten if configure is run.
9887 * Changed the gc.tar target in Makefile.direct to embed the version number
9888 in the gc directory name. This will affect future tar file distributions.
9889 * Changed the Irix dynamic library finding code to no longer try to
9890 eliminate writable text segments under Irix6.x, since that is probably no
9891 longer necessary, and can apparently be unsafe on occasion (thanks to
9892 Shiro Kawai for pointing this out).
9893 * GC_cleanup with GC_DEBUG enabled passed a real object base address to
9894 GC_debug_register_finalizer_ignore_self, which expected a pointer past the
9895 debug header. Call GC_register_finalizer_ignore_self instead, even with
9896 debugging enabled (thanks to Jean-Daniel Fekete for catching this).
9897 * The collector didn't build with call chain saving enabled but NARGS=0.
9898 * Fixed up the GNU-style build files enough so that they work in some
9899 obvious cases (thanks to Maarten Thibaut).
9900 * Added initial port to Digital Mars compiler for win32 (thanks to Walter
9901 Bright).
9902
9903
9904 == [6.0alpha7] 2001-04-19 ==
9905
9906 * Added GC_finalizer_notifier. Fixed GC_finalize_on_demand. (The variable
9907 actually wasn't being tested at the right points. The build-time flag
9908 was.)
9909 * Added Tom Tromey's S390 Linux patch.
9910 * Added code to push GC_finalize_now in GC_push_finalizer_structures
9911 (thanks to Matthew Flatt).
9912 * Added GC_push_gc_structures() to push all GC internal roots.
9913 * Integrated some FreeBSD changes from Matthew Flatt.
9914 * It looks like USRSTACK is not always correctly defined under Solaris.
9915 Hacked gcconfig.h to attempt to work around the problem. The result
9916 is not well tested. (Thanks again to Matthew Flatt for pointing this out.)
9917 * Added Ji-Yong Chung's win32 threads and C++ fixes.
9918 * Arranged for hpux_test_and_clear.s to no longer be needed or built.
9919 It was causing build problems with gas, and it's not clear this is
9920 better than the pthreads alternative on this platform.
9921 * Some MINGW32 fixes from Hubert Garavel.
9922 * Added initial Hitachi SH4 port from Kaz Kojima.
9923 * Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
9924 * Made include/gc_mark.h more public and separated out the really private
9925 pieces. This is probably still not quite sufficient for clients that
9926 want to supply their own kind of type information. But it's a start.
9927 This involved lots of identifier renaming to make it namespace clean.
9928 * Added GC_dont_precollect for clients that need complete control over
9929 the root set.
9930 * GC_is_visible didn't do the right thing with gcj objects. (Not that
9931 many people are likely to care, but ...)
9932 * Don't redefine read with GC_USE_LD_WRAP.
9933 * Initial port to LINUX/HP_PA. Incremental collection and threads are not
9934 yet supported. (Incremental collection should work if you have the
9935 right kernel. Threads may work with a sufficiently patched pthread
9936 library.)
9937 * Changed gcconfig.h to recognize __i386__ as an alternative to x86 in
9938 many places (thanks to Benjamin Lerman).
9939 * Made win32_threads.c more tolerant of detaching a thread that it didn't
9940 know about (thanks to Paul Nash).
9941 * Added Makefile.am and configure.in from gcc to the distribution, with
9942 minimal changes. For the moment, those are just placeholders. In the
9943 future, we're planning to switch to a GNU-style build environment for
9944 Un*x-like systems, though the old Makefile will remain as a backup.
9945 * Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
9946 option.
9947 * Redistributed some functions between malloc.c and mallocx.c, so that
9948 simple statically linked apps no longer pull in mallocx.o.
9949 * Changed large object allocation to clear the first and last few words
9950 of each block before releasing the lock. Otherwise the marker could see
9951 objects with nonsensical type descriptors.
9952 * Fixed a couple of subtle problems that could result in not recognizing
9953 interior pointers from the stack. (I believe these were introduced
9954 in 6.0alpha6.)
9955 * GC_debug_free_inner called GC_free, which tried to reacquire the
9956 allocator lock, and hence deadlocked. (DBG_HDRS_ALL probably never worked
9957 with threads.)
9958 * Fixed several problems with back traces. Accidental references to a free
9959 list could cause the free list pointer to be overwritten by a back pointer.
9960 There seemed to be some problems with the encoding of root and finalizer
9961 references.
9962
9963
9964 == [6.0alpha6] ==
9965
9966 * Changed the definition of DATASTART on ALPHA and IA64, where data_start
9967 and __data_start are not defined by earlier versions of glibc. This might
9968 need to be fixed on other platforms as well.
9969 * Changed the way the stack base and backing store base are found on IA64.
9970 This should now remain reliable on future kernels. But since it relies
9971 on /proc, it will no longer work in the simulated NUE environment.
9972 * Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
9973 on the OS. On non-Unix systems, rand() should be used instead. Handled
9974 small RAND_MAX (thanks to Peter Ross for pointing this out).
9975 * Fixed the cord make rules to create the cord subdirectory, if necessary
9976 (thanks to Doug Moen).
9977 * Changed fo_object_size calculation in finalize.c. Turned finalization
9978 of non-heap object into a no-op. Removed anachronism from GC_size()
9979 implementation.
9980 * Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
9981 It was missed in a previous renaming (thanks to Vladimir Tsichevski
9982 for pointing this out).
9983 * Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
9984 * Added GC_no_dls hook for applications that want to register their own
9985 roots.
9986 * Integrated Kjetil Matheussen's Amiga changes.
9987 * Added FREEBSD_STACKBOTTOM. Changed the FreeBSD/x86 port to use it
9988 (thanks to Matthew Flatt).
9989 * Added pthread_detach interception for platforms supported by linux_threads.c
9990 and irix_threads.c.
9991 * Changed the USE_MMAP code to check for the case in which we got the
9992 high end of the address space, i.e. mem_ptr + mem_sz == 0. It appears
9993 that this can happen under Solaris 7. It seems to be allowed by what
9994 I would claim is an oversight in the mmap specification. (Thanks to
9995 Toshio Endo for pointing out the problem.)
9996 * Cleanup of linux_threads.c. Some code was originally cloned from
9997 irix_threads.c and now unnecessary. Some comments were obviously wrong.
9998 * (Mostly) fixed a longstanding problem with setting of dirty bits from
9999 a signal handler. In the presence of threads, dirty bits could get lost,
10000 since the getting of a bit in the bit vector was not atomic with respect
10001 to other updates. The fix is 100% correct only for platforms for which
10002 GC_test_and_set is defined. The goal is to make that all platforms with
10003 thread support. Matters only if incremental GC and threads are both
10004 enabled.
10005 * made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
10006 initialization time, instead of build-time option. This is a
10007 nontrivial, high risk change. It should slow down the code measurably
10008 only if MERGE_SIZES is not defined, which is a very nonstandard
10009 configuration.
10010 * Added doc/README.environment, and implemented what it describes. This
10011 allows a number of additional configuration options to be set through
10012 the environment. It documents a few previously undocumented options.
10013 * Integrated Eric Benson's leak testing improvements.
10014 * Removed the option to throw away the beginning of each page (DISCARD_WORDS).
10015 This became less and less useful as processors enforce stricter alignment.
10016 And it hadn't been tested in ages, and was thus probably broken anyway.
10017
10018
10019 == [6.0alpha5] ==
10020
10021 * Changed the definition of GC_pause in linux_threads.c to use a volatile
10022 asm. Some versions of gcc apparently optimize away writes to local volatile
10023 variables. This caused poor locking behavior starting at about
10024 4 processors.
10025 * Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
10026 to linux_threads.c.
10027 The first two calls could be used to generally avoid sending GC signals to
10028 blocked threads, avoiding both premature wakeups and unnecessary overhead.
10029 * Fixed a serious bug in thread-local allocation. At thread termination,
10030 GC_free could get called on small integers. Changed the code for thread
10031 termination to more efficiently return left-over free-lists.
10032 * Integrated Kjetil Matheussen's BeOS support.
10033 * Rearranged the directory structure to create the doc and tests
10034 subdirectories.
10035 * Sort of integrated Eric Benson's patch for OSF1. This provided basic
10036 OSF1 thread support by suitably extending hpux_irix_threads.c. Based
10037 on earlier email conversations with David Butenhof, I suspect that it
10038 will be more reliable in the long run to base this on linux_threads.c
10039 instead. Thus I attempted to patch up linux_threads.c based on Eric's code.
10040 The result is almost certainly broken, but hopefully close enough that
10041 someone with access to a machine can pick it up.
10042 * Integrated lots of minor changes from the NetBSD distribution. (These
10043 were supplied by David Brownlee. I'm not sure about the original
10044 authors.)
10045 * Hacked a bit more on the HP/UX thread-support in linux_threads.c. It
10046 now appears to work in the absence of incremental collection. Renamed
10047 hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
10048 support HPUX there.
10049 * Changed gc.h to define _REENTRANT in cases in which it should already
10050 have been defined. It is still safer to also define it on the command
10051 line.
10052
10053
10054 == [6.0alpha4] ==
10055
10056 * Moved up the detection of mostly full blocks to the initiation of the
10057 sweep phase. This eliminates some lock contention in the PARALLEL_MARK case,
10058 as multiple threads try to look at mostly full blocks concurrently.
10059 * Restored the code in GC_malloc_many that grabs a prefix of the global
10060 free list. This avoids the case in which every GC_malloc_many call
10061 tries and fails to allocate a new heap block, and the returns a single
10062 object from the global free list.
10063 * Some minor fixes in new_hblk.c. (Attempted to build free lists in order
10064 of increasing addresses instead of decreasing addresses for cache performance
10065 reasons. But this seems to be only a very minor gain with -DEAGER_SWEEP,
10066 and a loss in other cases. So the change was backed out.)
10067 * Fixed some of the documentation (thanks in large part to Fergus Henderson).
10068 * Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
10069 large numbers of mmaps (thanks to Eric Benson). Also fixed that code to
10070 deal with short reads.
10071 * Added GC_get_total_bytes().
10072 * Fixed leak detection mode to avoid spurious messages under linuxthreads.
10073 (This should also now be easy for the other supported threads packages.
10074 But the code is tricky enough that I'm hesitant to do it without being able
10075 to test. Everything allocated in the GC thread support itself should be
10076 explicitly deallocated.)
10077 * Made it possible (with luck) to redirect malloc to GC_local_malloc.
10078
10079
10080 == [6.0alpha3] 2000-09-26 ==
10081
10082 * Fixed the /proc/self/maps code to not seek, since that apparently is not
10083 reliable across all interesting kernels.
10084 * Fixed some compilation problems in the absence of PARALLEL_MARK
10085 (introduced in alpha2).
10086 * Fixed an algorithmic problem with PARALLEL_MARK. If work needs to
10087 be given back to the main mark "stack", the BOTTOM entries of the local
10088 stack should be given away, not the top ones. This has substantial
10089 performance impact, especially for > 2 processors, from what I can tell.
10090 * Extracted gc_lock.h from gc_priv.h. This should eventually make it a
10091 bit easier to avoid including gc_priv.h in clients.
10092 * Moved all include files to include/ and removed duplicate links to the
10093 same file. The old scheme was a bad idea because it was too easy to get the
10094 copies out of sync, and many systems don't support hard links.
10095 Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
10096 the process, although I tried to update them appropriately.
10097 * Removed the partial support for a copied nursery. It's not clear that
10098 this would be a tremendous win, since we don't consistently lose to
10099 generational copying collectors. And it would significantly complicate
10100 many things. May be reintroduced if/when it really turns out to win.
10101 * Removed references to IRIX_JDK_THREADS, since I believe there never
10102 were and never will be any clients.
10103 * Added some code to linux_threads.c to possibly support HPUX threads
10104 using the Linux code. Unfortunately, it doesn't work yet, and is
10105 currently disabled.
10106 * Added support under Linux/x86 for saving the call chain, both in (debug)
10107 objects for client debugging, and in GC_arrays._last_stack for GC
10108 debugging. This was previously supported only under Solaris. It is
10109 not enabled by default under x86, since it requires that code be compiled
10110 to explicitly gave frame pointers on the call stack. (With gcc this
10111 currently happens by default, but is often turned off explicitly.)
10112 To turn it on, define SAVE_CALL_CHAIN.
10113
10114
10115 == [6.0alpha2] ==
10116
10117 * Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
10118 for which that's expensive.
10119 * Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
10120 * Added a missing volatile to OR_WORD and renamed the parameter to
10121 GC_compare_and_swap so it's not a C++ reserved word (thanks to
10122 Toshio Endo for pointing out both of those).
10123 * Changed Linux dynamic library registration code to look at /proc/self/maps
10124 instead of the rld data structures when REDIRECT_MALLOC is defined.
10125 Otherwise some of the rld data data structures may be prematurely garbage
10126 collected.
10127 * Fixed USE_LD_WRAP a bit more, so it should now work without threads.
10128 * Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
10129 Temporarily added some backward compatibility definitions. Renamed
10130 USE_LD_WRAP to GC_USE_LD_WRAP.
10131 * Many MACOSX POWERPC changes, some additions to the gctest output, and
10132 a few minor generic bug fixes (thanks to Dietmar Planitzer).
10133
10134
10135 == [6.0alpha1] ==
10136
10137 * Added HP/PA prefetch support.
10138 * Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
10139 the reliability of generating pointer backtrace information, e.g. in
10140 the Bigloo environment.
10141 * Added parallel marking support (-DPARALLEL_MARK). This currently
10142 works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
10143 to other platforms. This is intended to be a lighter-weight (less
10144 new code, probably not as scalable) solution than the work by Toshio Endo
10145 et al, at the University of Tokyo. A number of their ideas were
10146 reused, though the code wasn't, and the underlying data structure
10147 is significantly different. In particular, we keep the global mark
10148 stack as a single shared data structure, but most of the work is done
10149 on smaller thread-local mark stacks.
10150 * Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
10151 with -DPARALLEL_MARK.
10152 * Added full support for thread local allocation under Linux
10153 (-DTHREAD_LOCAL_ALLOC). This is a thin veneer on GC_malloc_many, and
10154 should be easily portable to other platforms, especially those that
10155 support pthreads.
10156 * CLEAR_DOUBLE was not always getting invoked when it should have been.
10157 * GC_gcj_malloc and friends used different out of memory handling than
10158 everything else, probably because I forgot about one when I implemented
10159 the other. They now both call GC_oom_fn(), not GC_oom_action().
10160 * Integrated Jakub Jelinek's fixes for Linux/SPARC.
10161 * Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
10162 GC_arrays, and separately registered the first two as excluded roots.
10163 This makes code compiled with gc_inl.h less dependent on the
10164 collector version. (It would be nice to remove the inclusion of
10165 gc_priv.h by gc_inl.h completely, but we're not there yet. The
10166 locking definitions in gc_priv.h are still referenced.)
10167 This change was later conditioned on SEPARATE_GLOBALS, which
10168 is not defined by default, since it involves a performance hit.
10169 * Register GC_obj_kinds separately as an excluded root region. The
10170 attempt to register it with GC_arrays was usually failing. (This wasn't
10171 serious, but seemed to generate some confusion.)
10172 * Moved backptr.h to gc_backptr.h.
10173
10174
10175 == [5.4] ==
10176
10177 * Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
10178 Shawn Wagner for actually testing this).
10179 * Fixed GC_is_thread_stack in solaris_threads.c. It forgot to return a value
10180 in the common case.
10181 * Fixed another silly syntax problem in GC_double_descr (thanks to
10182 Fergus Henderson for finding it).
10183 * Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
10184
10185
10186 == [5.3] 2000-09-24 ==
10187
10188 * Fixed _end declaration for OSF1.
10189 * There were lots of spurious leak reports in leak detection mode, caused
10190 by the fact that some pages were not being swept, and hence unmarked
10191 objects weren't making it onto free lists. (This bug dated back to 5.0.)
10192 * Fixed a typo in the liblinuxgc.so Makefile rule.
10193 * Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
10194 around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
10195
10196
10197 == [5.2] ==
10198
10199 * dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
10200 was defined as a macro. This prevented the collector from building on
10201 Irix.
10202 * We quietly assumed that indirect mark descriptors were never 0.
10203 Our own typed allocation interface violated that. This could result
10204 in segmentation faults in the marker with typed allocation.
10205 * Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
10206 Ben Hutchings for the patch).
10207 * Taught the collector about VC++ handling array operator new (thanks to
10208 Ben Hutchings for the patch).
10209 * The two copies of gc_hdrs.h had diverged. Made one a link to the other
10210 again.
10211
10212
10213 == [5.1] ==
10214
10215 * Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
10216 * Fixed a typo in GC_double_descr in typd_mlc.c.
10217 This probably could result in objects described by array descriptors not
10218 getting traced correctly (thanks to Ben Hutchings for pointing this out).
10219 * The block nearly full tests in reclaim.c were not correct for 64 bit
10220 environments. This could result in unnecessary heap growth under unlikely
10221 conditions.
10222
10223
10224 == [5.0] ==
10225
10226 * Fixed threadlibs.c for linux threads. -DUSE_LD_WRAP was broken and
10227 -ldl was omitted. Fixed Linux stack finding code to handle
10228 -DUSE_LD_WRAP correctly.
10229 * Added MSWIN32 exception handler around marker, so that the collector
10230 can recover from root segments that are unmapped during the collection.
10231 This caused occasional failures under Windows 98, and may also be
10232 an issue under Windows NT/2000.
10233
10234
10235 == [5.0alpha7] ==
10236
10237 * -DREDIRECT_MALLOC was broken in alpha6. Fixed.
10238 * Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
10239 accept it.
10240 * Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
10241 linked into every executable.
10242 * Added PREFETCH to bitmap marker. Changed it to use the header cache.
10243 * GC_push_marked sometimes pushed one object too many, resulting in a
10244 segmentation fault in GC_mark_from_mark_stack. This was probably an old
10245 bug. It finally showed up in gctest on win32.
10246 * Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
10247 when SMALL_CONFIG was defined. This was no doubt a major performance bug for
10248 the default win32 configuration.
10249 * Removed -DSMALL_CONFIG from NT_MAKEFILE. It seemed like an anachronism now
10250 that the average PC has 64MB or so.
10251 * Integrated Bryce McKinlay's patches for linux threads and dynamic loading
10252 from the libgcj tree. Turned on dynamic loading support for Linux/PPC.
10253 * Changed the stack finding code to use environ on HP/UX (thanks
10254 to Gustavo Rodriguez-Rivera for the suggestion). This should
10255 probably be done on other platforms, too. Since I can't test those, that'll
10256 wait until after 5.0.
10257
10258
10259 == [5.0alpha6] ==
10260
10261 * GC_malloc_explicitly_typed and friends sometimes failed to
10262 initialize first word.
10263 * Added allocation routines and support in the marker for mark descriptors
10264 in a type structure referenced by the first word of an object. This was
10265 introduced to support gcj, but hopefully in a way that makes it
10266 generically useful.
10267 * Added GC_requested_heapsize, and inhibited collections in non-incremental
10268 mode if the actual used heap size is less than what was explicitly
10269 requested.
10270 * The Solaris pthreads version of GC_pthread_create didn't handle a NULL
10271 attribute pointer. Solaris thread support used the wrong default thread
10272 stack size (thanks to Melissa O'Neill for the patch).
10273 * Changed PUSH_CONTENTS macro to no longer modify first parameter.
10274 This usually doesn't matter, but it was certainly an accident waiting
10275 to happen ...
10276 * Added GC_register_finalizer_no_order and friends to gc.h. They're
10277 needed by Java implementations.
10278 * Integrated a fix for a win32 deadlock resulting from clock() calling
10279 malloc (thanks to Chris Dodd).
10280 * Integrated Hiroshi Kawashima's port to Linux/MIPS. This was designed
10281 for a handheld platform, and may or may not be sufficient for other
10282 machines.
10283 * Fixed a va_arg problem with the %c specifier in cordprnt.c. It appears
10284 that this was always broken, but recent versions of gcc are the first to
10285 report the (statically detectable) bug.
10286 * Added an attempt at a more general solution to dlopen races/deadlocks.
10287 GC_dlopen now temporarily disables collection. Still not ideal, but ...
10288 * Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
10289 prefetch instructions. May improve performance measurably, but I'm not
10290 sure the code will run correctly on processors that don't support the
10291 instruction. Won't build except with very recent gcc.
10292 * Added caching for header lookups in the marker. This seems to result
10293 in a barely measurable performance gain. Added support for interleaved
10294 lookups of two pointers, but unconfigured that since the performance
10295 gain is currently near zero, and it adds to code size.
10296 * Changed Linux DATASTART definition to check both data_start and
10297 __data_start, since nothing else seems to be portable.
10298 * Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
10299 wrapping mechanism. Probably currently useful only on Linux.
10300 * Moved some variables for the scratch allocator into GC_arrays (suggested
10301 by Martin Hirzel).
10302 * Fixed a win32 threads bug that caused the collector to not look for
10303 interior pointers from one of the thread stacks without
10304 ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
10305 * Added Mingw32 support (thanks to Jeff Sturm for the patch).
10306 * Changed the alpha port to use the generic register scanning code instead
10307 of alpha_mach_dep.s. Alpha_mach_dep.s doesn't look for pointers in fp
10308 registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
10309 for helping debug this). Changed the IA64 code to
10310 do something similar for similar reasons.
10311
10312
10313 == [5.0alpha4] 1999-10-30 ==
10314
10315 * Added protection fault handling patch for Linux/M68K from Fergus
10316 Henderson and Roman Hodek.
10317 * Removed the tests for SGI_SOURCE in new_gc_alloc.h. This was causing that
10318 interface to fail on non-SGI platforms.
10319 * Changed the Linux stack finding code to use /proc, after changing it
10320 to use HEURISTIC1 (thanks to David Mosberger for pointing out /proc hook).
10321 * Added HP/UX incremental GC support and HP/UX 11 thread support.
10322 Thread support is currently still flaky.
10323 * Added basic Linux/IA64 support.
10324 * Integrated Anthony Green's PicoJava support.
10325 * Integrated Scott Ananian's StrongARM/NetBSD support.
10326 * Fixed some fairly serious performance bugs in the incremental
10327 collector. These have probably been there essentially forever.
10328 (Mark bits were sometimes set before scanning dirty pages.
10329 The reclaim phase unnecessarily dirtied full small object pages.)
10330 * Changed the reclaim phase to ignore nearly full pages to avoid
10331 touching them.
10332 * Limited GC_black_list_spacing to roughly the heap growth increment.
10333 * Changed full collection triggering heuristic to decrease full GC
10334 frequency by default, but to explicitly trigger full GCs during
10335 heap growth. This doesn't always improve things, but on average it's
10336 probably a win.
10337 * GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
10338 bug report and fix).
10339
10340
10341 == [5.0alpha3] 1999-09-15 ==
10342
10343 (Also known as 4.15alpha3.)
10344 * Added some highly incomplete code to support a copied young generation.
10345 Comments on nursery.h are appreciated.
10346 * Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
10347 so the same effect could be obtained with a runtime switch. This is
10348 a step towards standardizing on a single dynamic GC library.
10349 * Significantly changed the way leak detection is handled, as a consequence
10350 of the above.
10351
10352
10353 == [5.0alpha2] 1999-07-23 ==
10354
10355 * Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
10356 * Added -DKEEP_BACK_PTRS and backptr.h interface. (The implementation
10357 idea came from Alan Demers.)
10358
10359
10360 == [5.0alpha1] 1999-06-30 ==
10361
10362 (Also known as 4.15alpha1.)
10363 * Reworked large block allocator. Now uses multiple doubly linked free
10364 lists to approximate best fit.
10365 * Changed heap expansion heuristic. Entirely free blocks are no longer
10366 counted towards the heap size. This seems to have a major impact on
10367 heap size stability; the old version could expand the heap way too
10368 much in the presence of large block fragmentation.
10369 * added -DGC_ASSERTIONS and some simple assertions inside the collector.
10370 This is mainlyt for collector debugging.
10371 * added -DUSE_MUNMAP to allow the heap to shrink. Supported on only
10372 a few UNIX-like platforms for now.
10373 * added GC_dump_regions() for debugging of fragmentation issues.
10374 * Changed PowerPC pointer alignment under Linux to 4.
10375 * Changed the Linux/Alpha port to walk the data segment backwards until
10376 it encounters a SIGSEGV. The old way to find the start of the data
10377 segment broke with a recent release.
10378 * cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
10379 GC_register_finalizer, so that it would continue to work with GC_DEBUG.
10380 * allochblk sometimes cleared the wrong block for debugging purposes
10381 when it dropped blacklisted blocks. This could result in spurious
10382 error reports with GC_DEBUG.
10383 * added MACOS X Server support (thanks to Andrew Stone).
10384 * Changed the Solaris threads code to ignore stack limits > 8 MB with
10385 a warning. Empirically, it is not safe to access arbitrary pages
10386 in such large stacks. And the dirty bit implementation does not
10387 guarantee that none of them will be accessed.
10388 * Integrated Martin Tauchmann's Amiga changes.
10389 * Integrated James Dominy's OpenBSD/SPARC port.
10390
10391
10392 == [4.14] 1999-04-16 ==
10393
10394 * changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
10395
10396
10397 == [4.14alpha2] 1999-03-26 ==
10398
10399 * -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
10400 Recycling the mark stack during expansion could result in a size
10401 zero heap segment, which confused things. (This was probably also an
10402 issue with the normal config and huge pages.)
10403 * Did more work to make sure that callee-save registers were scanned
10404 completely, even with the setjmp-based code. Added USE_GENERIC_PUSH_REGS
10405 macro to facilitate testing on machines I have access to.
10406 * Added code to explicitly push register contents for win32 threads.
10407 This seems to be necessary. (Thanks to Pierre de Rop.)
10408
10409
10410 == [4.14alpha1] 1999-03-10 ==
10411
10412 * Fixed GC_print_source_ptr to not use a prototype.
10413 * generalized CYGWIN test.
10414 * gc::new did the wrong thing with PointerFreeGC placement (thanks to
10415 Rauli Ruohonen).
10416 * In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
10417 values could fail to be scanned if the register was saved and
10418 reused in a GC frame. This showed up in verbose mode with gctest
10419 compiled with an unreleased SGI compiler. I vaguely recall an old
10420 bug report that may have been related. The bug was probably quite old.
10421 (The problem was that the stack scanning could be deferred until
10422 after the relevant frame was overwritten, and the new save location
10423 might be outside the scanned area. Fixed by more eager stack scanning.)
10424 * PRINT_BLACK_LIST had some problems. A few source addresses were garbage.
10425 * Replaced Makefile.dj and added -I flags to cord make targets (thanks to
10426 Gary Leavens).
10427 * GC_try_to_collect was broken with the non-incremental collector.
10428 * gc_cleanup destructors could pass the wrong address to
10429 GC_register_finalizer_ignore_self in the presence of multiple
10430 inheritance (thanks to Darrell Schiebel).
10431 * Changed PowerPC Linux stack finding code.
10432
10433
10434 == [4.13] 1999-02-19 ==
10435
10436 * Fixed a crucial bug in the Watcom port. There was a redundant declaration
10437 of GC_push_one in gc_priv.h.
10438 * Added FINALIZE_ON_DEMAND.
10439 * Fixed some pre-ANSI cc problems in test.c.
10440 * Removed getpagesize() use for Solaris. It seems to be missing in one
10441 or two versions.
10442 * Fixed bool handling for SPARCCompiler version 4.2.
10443 * Fixed some files in include that had gotten unlinked from the main
10444 copy.
10445 * Some RS/6000 fixes (missing casts). (Thanks to Toralf Foerster.)
10446 * Fixed several problems in GC_debug_realloc, affecting mostly the
10447 FIND_LEAK case.
10448 * GC_exclude_static_roots contained a buggy unsigned comparison to
10449 terminate a loop (thanks to Wilson Ho).
10450 * CORD_str failed if the substring occurred at the last possible position.
10451 (Only affects cord users.)
10452 * Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
10453 os_dep.c code for dealing with various Linux versions.
10454 * Added workaround for Irix pthreads sigaction bug and possible signal
10455 misdirection problems.
10456
10457
10458 == [4.13alpha3] 1998-12-08 ==
10459
10460 * Fixed MSWIN32 recognition test, which interfered with cygwin.
10461 * Removed unnecessary gc_watcom.asm from distribution. Removed
10462 some obsolete README.win32 text.
10463 * Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
10464 for code for retrieving the fault address in a signal handler).
10465 Changed Linux signal handler context argument to be a pointer.
10466 * Took care of some new warnings generated by the 7.3 SGI compiler.
10467 * Integrated Phillip Musumeci's FreeBSD/ELF fixes.
10468 * -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
10469
10470
10471 == [4.13alpha2] 1998-08-08 ==
10472
10473 * Fixed more Linux threads problems.
10474 * Changed default GC_free_space_divisor to 3 with new large block allocation
10475 (thanks to Matthew Flatt for some measurements that suggest the old
10476 value sometimes favors space too much over time).
10477 * More CYGWIN32 fixes.
10478 * Integrated Tyson Dowd's Linux-M68K port.
10479 * Minor HP PA and DEC UNIX fixes from Fergus Henderson.
10480 * Integrated Christoffe Raffali's Linux-SPARC changes.
10481 * Allowed for one more GC fixup iteration after a full GC in incremental
10482 mode. Some quick measurements suggested that this significantly
10483 reduces pause times even with smaller GC_RATE values.
10484 * Moved some more GC data structures into GC_arrays. This decreases
10485 pause times and GC overhead, but makes debugging slightly less convenient.
10486 * Fixed namespace pollution problem ("excl_table").
10487 * Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
10488 that slightly.
10489 * Added some win32 threads fixes.
10490 * Integrated Ivan Demakov and David Stes' Watcom fixes.
10491 * Various other minor fixes contributed by many people.
10492 * Renamed config.h to gcconfig.h, since config.h tends to be used for
10493 many other things.
10494 * Integrated Matthew Flatt's support for 68K MacOS "far globals".
10495 * Fixed up some of the dynamic library Makefile targets for consistency
10496 across platforms.
10497 * Fixed a USE_MMAP typo that caused out-of-memory handling to fail
10498 on Solaris.
10499 * Added code to test.c to test thread creation a bit more.
10500 * Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
10501 * Fixed Solaris 2.7 stack base finding problem. (This may actually
10502 have been done in an earlier alpha release.)
10503
10504
10505 == [4.13alpha1] 1998-02-17 ==
10506
10507 * Changed RS6000 STACKBOTTOM.
10508 * Integrated Patrick Beard's Mac changes.
10509 * Alpha1 didn't compile on Irix m.n, m < 6.
10510 * Replaced Makefile.dj with a new one from Gary Leavens.
10511 * Added Andrew Stitcher's changes to support SCO OpenServer.
10512 * Added PRINT_BLACK_LIST, to allow debugging of high densities of false
10513 pointers.
10514 * Added code to debug allocator to keep track of return address
10515 in GC_malloc caller, thus giving a bit more context.
10516 * Changed default behavior of large block allocator to more
10517 aggressively avoid fragmentation. This is likely to slow down the
10518 collector when it succeeds at reducing space cost.
10519 * Integrated Fergus Henderson's CYGWIN32 changes. They are untested,
10520 but needed for newer versions.
10521 * USE_MMAP had some serious bugs. This caused the collector to fail
10522 consistently on Solaris with -DSMALL_CONFIG.
10523 * Added Linux threads support (thanks to Fergus Henderson).
10524
10525
10526 == [4.12] 1997-08-26 ==
10527
10528 * Fixed ElfW definition in dyn_load.c.
10529 This prevented the dynamic library support from compiling on some
10530 older ELF Linux systems.
10531 * Fixed UTS4 port (which I apparently mangled during the integration).
10532 (Thanks to Alistair Crooks.)
10533 * "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
10534 Fixed in gc_priv.h.
10535 * Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
10536 The current state of things should suffice for at least some
10537 applications.
10538 * Changed the out of memory retry count handling. (This matters only
10539 if GC_max_retries > 0, which is no longer the default.)
10540 * If a /proc read failed repeatedly, GC_written_pages was not updated
10541 correctly (thanks to Peter Chubb for diagnosing this).
10542 * Under unlikely circumstances, the allocator could infinite loop in
10543 an out of memory situation (thanks to Kenjiro Taura for
10544 identifying the problem and supplying a fix).
10545 * Fixed a syntactic error in the DJGPP code. Also fixed a test program
10546 problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
10547 * Atomic uncollectible objects were not treated correctly by the
10548 incremental collector. This resulted in weird log statistics and
10549 occasional performance problems (thanks to Peter Chubb for pointing this out).
10550 * Fixed some problems resulting from compilers that don't define
10551 __STDC__. In this case void * and char * were used inconsistently
10552 in some cases. (Void * should not have been used at all. If
10553 you have an ANSI superset compiler that does not define __STDC__,
10554 please compile with -D__STDC__=0. Thanks to Manuel Serrano and others
10555 for pointing out the problem.)
10556 * Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
10557 Also fixed some other IRIX_THREADS problems which may or may not have
10558 had observable symptoms.
10559 * Fixed an HP PA compilation problem in dyn_load.c (thanks to
10560 Philippe Queinnec).
10561 * SEGV fault handlers sometimes did not get reset correctly (thanks
10562 to David Pickens).
10563 * Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
10564 This probably needs more work to become functional.
10565 * Fixed struct sigcontext_struct in os_dep.c for compilation under
10566 Linux 2.1.X (thanks to Fergus Henderson).
10567 * Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
10568 (by Kristian Kristensen). These may still not be right, but it is
10569 it is likely to work more often than what was there before. They may
10570 even be exactly right.
10571 * Added a #include <string.h> to test_cpp.cc. This appears to help
10572 with HP/UX and gcc (thanks to Assar Westerlund).
10573 * Version 4.11 failed to run in incremental mode on recent 64-bit Irix
10574 kernels. This was a problem related to page unaligned heap segments.
10575 Changed the code to page align heap sections on all platforms.
10576 (I had mistakenly identified this as a kernel problem earlier.
10577 It was not.)
10578 * Version 4.11 did not make allocated storage executable, except on
10579 one or two platforms, due to a bug in a #if test (thanks to David Grove
10580 for pointing this out).
10581 * Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
10582 * Added GC_exclude_static_roots.
10583 * Fixed the object size mapping algorithm. This shouldn't matter,
10584 but the old code was ugly.
10585 * Heap checking code could die if one of the allocated objects was
10586 larger than its base address. (Unsigned underflow problem. Thanks
10587 to Clay Spence for isolating the problem.)
10588 * Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
10589 to Fred Stearns).
10590 * Added Fergus Henderson's patches for improved robustness with large
10591 heaps and lots of blacklisting.
10592 * Added Peter Chubb's changes to support Solaris Pthreads, to support
10593 MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
10594 through /proc, to add malloc_typed_ignore_off_page, and a few other
10595 minor features and bug fixes.
10596 * The Solaris 2 port should not use sbrk. I received confirmation from
10597 Sun that the use of sbrk and malloc in the same program is not
10598 supported. The collector now defines USE_MMAP by default on Solaris.
10599 * Replaced the djgpp makefile with Gary Leavens' version.
10600 * Fixed MSWIN32 detection test.
10601 * Added Fergus Henderson's patches to allow putting the collector into
10602 a DLL under GNU win32.
10603 * Added Ivan V. Demakov's port to Watcom C on x86.
10604 * Added Ian Piumarta's Linux/PowerPC port.
10605 * Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
10606 Brian Burton). This is of course unsafe, and may be controversial.
10607 On the other hand, it seems to be needed often enough that it's worth
10608 adding as a standard facility.
10609 * Add Lars Farm's suggestions on building the collector for MacOS.
10610
10611
10612 == [4.12alpha2] ==
10613
10614 (Changes not specified.)
10615
10616
10617 == [4.11] 1996-12-03 ==
10618
10619 * Rationalized (hopefully) GC_try_to_collect in an incremental collection
10620 environment. It appeared to not handle a call while a collection was in
10621 progress, and was otherwise too conservative.
10622 * Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
10623 code.
10624 * Added Patrick Beard's Mac fixes, with substantial completely untested
10625 modifications.
10626 * Fixed the MPROTECT_VDB code to deal with large pages and imprecise
10627 fault addresses (as on an UltraSPARC running Solaris 2.5). Note that this
10628 was not a problem in the default configuration, which uses PROC_VDB.
10629 * The DEC Alpha assembly code needed to restore $gp between calls (thanks to
10630 Fergus Henderson for tracking this down and supplying a patch).
10631 * The write command for "de" was completely broken for large files.
10632 I used the easiest portable fix, which involved changing the semantics
10633 so that f.new is written instead of overwriting f. That's safer anyway.
10634 * Added README.solaris2 with a discussion of the possible problems of
10635 mixing the collector's sbrk allocation with malloc/realloc.
10636 * Changed the data segment starting address for SGI machines. The
10637 old code failed under IRIX6.
10638 * Required double word alignment for MIPS.
10639 * Various minor fixes to remove warnings.
10640 * Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
10641 In particular, the collector could try to fork a thread with the
10642 world stopped as part of GC_thr_init. It also failed to deal with
10643 the case in which the original thread terminated before the whole
10644 process did.
10645 * Added -DNO_EXECUTE_PERMISSION. This has a major performance impact
10646 on the incremental collector under Irix, and perhaps under other
10647 operating systems.
10648 * Added some code to support allocating the heap with mmap. This may
10649 be preferable under some circumstances.
10650 * Integrated dynamic library support for HP (thanks to Knut Tvedten).
10651 * Integrated James Clark's win32 threads support, and made a number
10652 of changes to it (many of which suggested by Pontus Rydin). This is still
10653 not 100% solid.
10654 * Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
10655 370-class machine.
10656 * Fixed a serious bug in explicitly typed allocation. Objects requiring
10657 large descriptors where handled in a way that usually resulted in
10658 a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
10659 for helping to track this down).
10660 * Added partial support for GNU win32 development (thanks to
10661 Fergus Henderson).
10662 * Added optional support for Java-style finalization semantics (thanks to
10663 Patrick Bridges). This is recommended only for Java implementations.
10664 * GC_malloc_uncollectable faulted instead of returning 0 when out of
10665 memory (thanks to Daniel R. Grayson for noticing).
10666 * Calls to GC_base before the collector was initialized failed on a
10667 DEC Alpha (thanks to Matthew Flatt).
10668 * Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
10669 (thanks to Jeremy Fitzhardinge).
10670 * GC_debug_realloc failed for uncollectible objects (thanks to
10671 Jeremy Fitzhardinge).
10672 * Explicitly typed allocation could crash if it ran out of memory (thanks to
10673 Jeremy Fitzhardinge).
10674 * Added minimal support for a DEC Alpha running Linux.
10675 * Fixed a problem with allocation of objects whose size overflowed
10676 ptrdiff_t. (This now fails unconditionally, as it should.)
10677 * Added the beginning of Irix pthread support.
10678 * Integrated Xiaokun Zhu's fixes for djgpp 2.01.
10679 * Added SGI-style STL allocator support (gc_alloc.h).
10680 * Fixed a serious bug in README.solaris2.
10681 Multi-threaded programs must include
10682 gc.h with SOLARIS_THREADS defined.
10683 * Changed GC_free so it actually deallocates uncollectible objects (thanks
10684 to Peter Chubb for pointing out the problem).
10685 * Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
10686 * Changed the Borland cc configuration so that the assembler is not
10687 required.
10688 * Fixed a bug in the C++ test that caused it to fail in 64-bit
10689 environments.
10690
10691
10692 == [4.10t3] 1996-11-18 ==
10693
10694 Some changes related to threads support.
10695
10696
10697 == [4.10] 1996-02-19 ==
10698
10699 * Fixed a typo around a call to GC_collect_or_expand in alloc.c. It broke
10700 handling of out of memory. (Thanks to Patrick C. Beard for noticing.)
10701
10702
10703 == [4.9] 1996-02-12 ==
10704
10705 * More README.debugging fixes.
10706 * Objects ready for finalization, but not finalized in the same GC
10707 cycle, could be prematurely collected. This occasionally happened
10708 in test_cpp.
10709 * Too little memory was obtained from the system for very large
10710 objects. That could cause a heap explosion if these objects were
10711 not contiguous (e.g. under PCR), and too much of them was blacklisted.
10712 * Due to an improper initialization, the collector was too hesitant to
10713 allocate blacklisted objects immediately after system startup.
10714 * Moved GC_arrays from the data into the bss segment by not explicitly
10715 initializing it to zero. This significantly
10716 reduces the size of executables, and probably avoids some disk accesses
10717 on program startup. It's conceivable that it might break a port that I
10718 didn't test.
10719 * Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
10720 occurred a while ago.
10721
10722
10723 == [4.8] 1995-11-20 ==
10724
10725 * Changed a "comment" in a MacOS specific part of mach_dep.c that caused
10726 gcc to fail on other platforms.
10727
10728
10729 == [4.7] 1995-11-18 ==
10730
10731 * Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
10732 * Updated some Mac specific files (to synchronize with Patrick C. Beard).
10733 * Fixed a serious bug for machines with non-word-aligned pointers.
10734 (Thanks to Patrick C. Beard for pointing out the problem. The collector
10735 should fail almost any conceivable test immediately on such machines.)
10736
10737
10738 == [4.6] 1995-11-09 ==
10739
10740 * Added Linux ELF support (thanks to Arrigo Triulzi).
10741 * GC_base crashed if it was called before any other GC_ routines.
10742 This could happen if a gc_cleanup object was allocated outside the heap
10743 before any heap allocation.
10744 * The heap expansion heuristic was not stable if all objects had finalization
10745 enabled. Fixed finalize.c to count memory in finalization queue and
10746 avoid explicit deallocation. Changed alloc.c to also consider this count.
10747 (This is still not recommended. It's expensive if nothing else. Thanks
10748 to John Ellis for pointing this out.)
10749 * GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
10750 this out).
10751 * The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
10752 pointing this out). The current workaround is ugly, but expected to be
10753 temporary.
10754 * Fixed a formatting problem for SPARC stack traces.
10755 * Fixed some '=='s in os_dep.c that should have been assignments.
10756 Fortunately these were in code that should never be executed anyway (thanks
10757 to Fergus Henderson).
10758 * Fixed the heap block allocator to only drop blacklisted blocks in small
10759 chunks. Made BL_LIMIT self adjusting. (Both of these were in response
10760 to heap growth observed by Paul Graham.)
10761 * Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
10762 Patrick C. Beard).
10763 * Significantly updated README.debugging.
10764 * Fixed some problems with longjmps out of signal handlers, especially under
10765 Solaris. Added a workaround for the fact that siglongjmp doesn't appear to
10766 do the right thing with -lthread under Solaris.
10767 * Added MSDOS/djgpp port (thanks to Mitch Harris).
10768 * Added "make reserved_namespace" and "make user_namespace". The
10769 first renames ALL "GC_xxx" identifiers as "_GC_xxx". The second is the
10770 inverse transformation. Note that doing this is guaranteed to break all
10771 clients written for the other names.
10772 * descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
10773 defined should be -ALIGNMENT not WORDS_TO_BYTES(-1). This is
10774 a serious bug on machines with pointer alignment of less than a word.
10775 * GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
10776 end of the object correctly. Caused failures of the C++ test on a DEC Alpha
10777 with g++.
10778 * gc_inl.h still had problems. Partially fixed. Added warnings at the
10779 beginning to hopefully specify the remaining dangers.
10780 * Added DATAEND definition to config.h.
10781 * Fixed some of the .h file organization. Fixed "make floppy".
10782
10783
10784 == [4.5] 1995-06-14 ==
10785
10786 * Fixed many minor and one major README bugs (thanks to Franklin Chen
10787 for pointing out many of them).
10788 * Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
10789 * Added incremental GC support (MPROTECT_VDB) for Linux (with some
10790 help from Bruno Haible).
10791 * Altered SPARC recognition tests in gc.h and config.h (mostly as
10792 suggested by Fergus Henderson).
10793 * Added basic incremental GC support for win32, as implemented by
10794 Windows NT and Windows 95. GC_enable_incremental is a no-op
10795 under win32s, which doesn't implement enough of the VM interface.
10796 * Added -DLARGE_CONFIG.
10797 * Fixed GC_..._ignore_off_page to also function without
10798 -DALL_INTERIOR_POINTERS.
10799 * (Hopefully) fixed RS/6000 port. (Only the test was broken.)
10800 * Fixed a performance bug in the non-incremental collector running
10801 on machines supporting incremental collection with MPROTECT_VDB
10802 (e.g. SunOS 4, DEC AXP). This turned into a correctness bug under
10803 win32s with win32 incremental collection. (Not all memory protection
10804 was disabled.)
10805 * Fixed some ppcr related bit rot.
10806 * Caused dynamic libraries to be unregistered before re-registering.
10807 The old way turned out to be a performance bug on some machines.
10808 * GC_root_size was not properly maintained under MSWIN32.
10809 * Added -DNO_DEBUGGING and GC_dump.
10810 * Fixed a couple of bugs arising with SOLARIS_THREADS +
10811 REDIRECT_MALLOC.
10812 * Added NetBSD/M68K port (thanks to Peter Seebach).
10813 * Fixed a serious realloc bug. For certain object sizes, the collector
10814 wouldn't scan the expanded part of the object. (Thanks to Clay Spence
10815 for noticing the problem, and helping me to track it down.)
10816
10817
10818 == [4.4] 1995-02-18 ==
10819
10820 * ASM_CLEAR_CODE was erroneously defined for HP
10821 PA machines, resulting in a compile error.
10822 * Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
10823 * Gc_cleanup objects didn't work if they were created on
10824 the stack. Fixed.
10825 * One copy of Gc_cpp.h in the distribution was out of
10826 synch, and failed to document some known compiler
10827 problems with explicit destructor invocation. Partially
10828 fixed. There are probably other compilers on which
10829 gc_cleanup is miscompiled.
10830 * Fixed Makefile to pass C compiler flags to C++ compiler.
10831 * Added Mac fixes.
10832 * Fixed os_dep.c to work around what appears to be
10833 a new and different VirtualQuery bug under newer
10834 versions of win32s.
10835 * GC_non_gc_bytes was not correctly maintained by
10836 GC_free. Fixed (thanks to James Clark).
10837 * Added GC_set_max_heap_size.
10838 * Changed allocation code to ignore blacklisting if it is preventing
10839 use of a very large block of memory. This has the advantage
10840 that naive code allocating very large objects is much more
10841 likely to work. The downside is you might no
10842 longer find out that such code should really use
10843 GC_malloc_ignore_off_page.
10844 * Changed GC_printf under win32 to close and reopen the file
10845 between calls. FAT file systems otherwise make the log file
10846 useless for debugging.
10847 * Added GC_try_to_collect and GC_get_bytes_since_gc. These
10848 allow starting an abortable collection during idle times.
10849 This facility does not require special OS support. (Thanks to
10850 Michael Spertus of Geodesic Systems for suggesting this. It was
10851 actually an easy addition. Kumar Srikantan previously added a similar
10852 facility to a now ancient version of the collector. At the time
10853 this was much harder, and the result was less convincing.)
10854 * Added some support for the Borland development environment (thanks
10855 to John Ellis and Michael Spertus).
10856 * Removed a misfeature from checksums.c that caused unexpected
10857 heap growth (thanks to Scott Schwartz).
10858 * Changed finalize.c to call WARN if it encounters a finalization cycle.
10859 WARN is defined in gc_priv.h to write a message, usually to stdout.
10860 In many environments, this may be inappropriate.
10861 * Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
10862 naming convention.
10863 * Added GC_set_warn_proc to intercept warnings.
10864 * Fixed Amiga port (thanks to Michel Schinz).
10865 * Fixed a bug in mark.c that could result in an access to unmapped
10866 memory from GC_mark_from_mark_stack on machines with unaligned
10867 pointers.
10868 * Fixed a win32 specific performance bug that could result in scanning of
10869 objects allocated with the system malloc.
10870 * Added REDIRECT_MALLOC.
10871
10872
10873 == [4.3] 1994-12-23 ==
10874
10875 * Fixed SPARC alignment problem with GC_DEBUG.
10876 * Fixed Solaris threads /proc workaround. The real
10877 problem was an interaction with mprotect.
10878 * Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
10879 * Slightly improved allocator space utilization by
10880 fixing the GC_size_map mechanism.
10881 * Integrated some Sony News and MIPS RISCos 4.51
10882 patches (thanks to Nobuyuki Hikichi at Software Research Associates,
10883 Inc., Japan).
10884 * Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
10885 * Added GC_same_obj and friends. Changed GC_base
10886 to return 0 for pointers past the end of large objects.
10887 Improved GC_base performance with ALL_INTERIOR_POINTERS
10888 on machines with a slow integer mod operation.
10889 Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
10890 for preprocessor.
10891 * changed the default on most UNIX machines to be that
10892 signals are not disabled during critical GC operations.
10893 This is still ANSI-conforming, though somewhat dangerous
10894 in the presence of signal handlers. But the performance
10895 cost of the alternative is sometimes problematic.
10896 Can be changed back with a minor Makefile edit.
10897 * renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
10898 following my own naming convention. Added the function
10899 CORD_to_const_char_star.
10900 * Fixed a gross bug in GC_finalize. Symptom: occasional
10901 address faults in that function (thanks to Anselm Baird-Smith).
10902 * Added port to ICL DRS6000 running DRS/NX. Restructured
10903 things a bit to factor out common code, and remove obsolete
10904 code. Collector should now run under SUNOS5 with either
10905 mprotect or /proc dirty bits. (Thanks to Douglas Steel.)
10906 * More bug fixes and workarounds for Solaris 2.X. (These were
10907 mostly related to putting the collector in a dynamic library,
10908 which didn't really work before. Also SOLARIS_THREADS
10909 didn't interact well with dl_open.) (Thanks to Brian Lewis.)
10910 * Fixed a serious performance bug on the DEC Alpha. The text
10911 segment was getting registered as part of the root set.
10912 (Amazingly, the result was still fast enough that the bug
10913 was not conspicuous.) The fix works on OSF/1, version 1.3.
10914 Hopefully it also works on other versions of OSF/1 ...
10915 * Fixed a bug in GC_clear_roots.
10916 * Fixed a bug in GC_generic_malloc_words_small that broke
10917 gc_inl.h (reported by Antoine de Maricourt).
10918 * Fixed some problems with cord/de under Linux.
10919 * Fixed some cord problems, notably with CORD_riter4.
10920 * Added DG/UX port (thanks to Ben A. Mesander).
10921 * Added finalization registration routines with weaker ordering
10922 constraints. (This is necessary for C++ finalization with
10923 multiple inheritance, since the compiler often adds self-cycles.)
10924 * Filled the holes in the SCO port (thanks to Michael Arnoldus).
10925 * Completely rewritten the documentation in the interface gc_c++.h
10926 (later renamed gc_cpp.h) making it both clearer and more precise (done by
10927 John Ellis).
10928 * The definition of accessibility now ignores pointers from a finalizable
10929 object (an object with a clean-up function) to itself (done by John Ellis).
10930 This allows objects with virtual base classes to be finalizable by the
10931 collector. Compilers typically implement virtual base classes using
10932 pointers from an object to itself, which under the old definition of
10933 accessibility prevented objects with virtual base classes from ever
10934 being collected or finalized.
10935 * gc_cleanup now includes gc as a virtual base. This was enabled by
10936 the change in the definition of accessibility (by John Ellis).
10937 * Added support for operator new[] (by John Ellis). Since most compilers
10938 don't yet support operator new[], it is conditionalized on
10939 -DOPERATOR_NEW_ARRAY. The code is untested, but it's trivial and looks
10940 correct.
10941 * The test program test_gc_c++ (later renamed test_cpp.cc)
10942 tries to test for the C++-specific functionality not tested by the
10943 other programs.
10944 * Added unistd.h include to misc.c. (Needed for ppcr.)
10945 * Added PowerMac port (thanks to Patrick C. Beard).
10946 * Fixed "srcdir"-related Makefile problems. Changed things so
10947 that all externally visible include files always appear in the
10948 include subdirectory of the source. Made gc.h directly
10949 includable from C++ code (thanks to Per Bothner).
10950 * Changed Intel code to also mark from ebp (thanks to Kevin Warne).
10951 * Renamed C++ related files so they could live in a FAT
10952 file system (thanks to Charles Fiterman).
10953 * Changed Windows NT Makefile to include C++ support in
10954 gc.lib. Added C++ test as Makefile target.
10955
10956
10957 == [4.2] 1994-08-03 ==
10958
10959 * Multiple bug fixes/workarounds in the Solaris threads version.
10960 (It occasionally failed to locate some register contents for
10961 marking. It also turns out that thr_suspend and friends are
10962 unreliable in Solaris 2.3. Dirty bit reads appear
10963 to be unreliable under some weird
10964 circumstances. My stack marking code
10965 contained a serious performance bug. The new code is
10966 extremely defensive, and has not failed in several CPU
10967 hours of testing. But no guarantees ...)
10968 * Added MacOS support. (Thanks to Patrick C. Beard.
10969 David Chase suggested several improvements.)
10970 * Fixed several syntactic bugs in gc_c++.h and friends. (These
10971 didn't bother g++, but did bother most other compilers.)
10972 Fixed gc_c++.h finalization interface.
10973 * 64 bit alignment for allocated objects was not guaranteed in a
10974 few cases in which it should have been.
10975 * Added GC_malloc_atomic_ignore_off_page.
10976 * Added GC_collect_a_little.
10977 * Added some prototypes to gc.h.
10978 * Some other minor bug fixes (notably in Makefile).
10979 * Fixed OS/2 / EMX port (thanks to Ari Huttunen).
10980 * Fixed AmigaDOS port (thanks to Michel Schinz).
10981 * Fixed the DATASTART definition under Solaris. There
10982 was a 1 in 16K chance of the collector missing the first
10983 64K of static data (and thus crashing).
10984 * Fixed some blatant anachronisms in the README file.
10985 * Fixed PCR-Makefile for upcoming PPCR release.
10986
10987
10988 == [4.1] 1994-05-20 ==
10989
10990 * Changed finalization implementation to guarantee that
10991 finalization procedures are called outside of the allocation
10992 lock, making direct use of the interface a little less dangerous.
10993 MAY BREAK EXISTING CLIENTS that assume finalizers
10994 are protected by a lock. Since there seem to be few multi-threaded
10995 clients that use finalization, this is hopefully not much of
10996 a problem.
10997 * Fixed a gross bug in CORD_prev.
10998 * Fixed a bug in blacklst.c that could result in unbounded
10999 heap growth during startup on machines that do not clear
11000 memory obtained from the OS (e.g. win32s).
11001 * Ported de editor to Win32 and win32s. (This is now the only
11002 version with a mouse-sensitive UI. Thanks to Rob Haack for the
11003 implementation based on the generic Windows application template.)
11004 * Added GC_malloc_ignore_off_page to allocate large arrays
11005 in the presence of ALL_INTERIOR_POINTERS.
11006 * Changed GC_call_with_alloc_lock to not disable signals in
11007 the single-threaded case.
11008 * Reduced retry count in GC_collect_or_expand for garbage
11009 collecting when out of memory.
11010 * Made uncollectible allocations bypass black-listing, as they
11011 should.
11012 * Fixed a bug in typed_test in test.c that could cause (legitimate)
11013 GC crashes.
11014 * Fixed some potential synchronization problems in finalize.c
11015 * Fixed a real locking problem in typd_mlc.c.
11016 * Worked around an AIX 3.2 compiler feature that results in
11017 out of bounds memory references.
11018 * Partially worked around an IRIX5.2 beta problem (which may
11019 or may not persist to the final release).
11020 * Fixed a bug in the heap integrity checking code that could
11021 result in explicitly deallocated objects being identified as
11022 smashed. Fixed a bug in the dbg_mlc stack saving code
11023 that caused old argument pointers to be considered live.
11024 * Fixed a bug in CORD_ncmp (and hence CORD_str).
11025 * Repaired the OS2 port, which had suffered from bit rot
11026 in 4.0. Worked around what appears to be CSet/2 V1.0
11027 optimizer bug.
11028 * Fixed a Makefile bug for target "c++".
11029
11030
11031 == [4.0] 1994-04-07 ==
11032
11033 * Added support for Solaris threads (which was possible
11034 only by reimplementing some fraction of Solaris threads,
11035 since Sun doesn't currently make the thread debugging
11036 interface available).
11037 * Added non-threads Win32 and win32s support.
11038 * (Grudgingly, with suitable muttering of obscenities) renamed
11039 files so that the collector distribution could live on a FAT
11040 file system. Files that are guaranteed to be useless on
11041 a PC still have long names. Gc_inline.h and gc_private.h
11042 still exist, but now just include gc_inl.h and gc_priv.h.
11043 * Fixed a really obscure bug in finalization that could cause
11044 undetected mark stack overflows. (I would be surprised if
11045 any real code ever tickled this one.)
11046 * Changed finalization code to dynamically resize the hash
11047 tables it maintains. (This probably does not matter for well-
11048 -written code. It no doubt does for C++ code that overuses
11049 destructors.)
11050 * Added typed allocation primitives. Rewrote the marker to
11051 accommodate them with more reasonable efficiency. This
11052 change should also speed up marking for GC_malloc allocated
11053 objects a little. See gc_typed.h for new primitives. (Thanks to
11054 Zhong Shao performed much of the experimentation that led to the
11055 current typed allocation facility.)
11056 * Improved debugging facilities slightly. Allocation time
11057 stack traces are now kept by default on SPARC/SUNOS4. (Thanks to
11058 Scott Schwartz.)
11059 * Added better support for small heap applications.
11060 * Significantly extended cord package. Fixed a bug in the
11061 implementation of lazily read files. Printf and friends now
11062 have cord variants. Cord traversals are a bit faster.
11063 * Made ALL_INTERIOR_POINTERS recognition the default.
11064 * Fixed de so that it can run in constant space, independent
11065 of file size. Added simple string searching to cords and de.
11066 * Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
11067 * Added dynamic library support for OSF/1 (thanks to Alan Dosser and
11068 Tim Bingham at DEC).
11069 * Changed argument to GC_expand_hp to be expressed
11070 in units of bytes instead of heap blocks. (Necessary
11071 since the heap block size now varies depending on
11072 configuration. The old version was never very clean.)
11073 * Added GC_get_heap_size(). The previous "equivalent"
11074 was broken.
11075 * Restructured the Makefile a bit.
11076 * Added FreeBSD port (provided by Jeffrey Hsu).
11077
11078
11079 == [3.7] 1994-03-15 ==
11080
11081 * Added a workaround for an HP/UX compiler bug.
11082 * Fixed another stack clearing performance bug. Reworked
11083 that code once more.
11084
11085
11086 == [3.6] 1994-01-14 ==
11087
11088 * fixed a bug in the mark stack growth code that was introduced
11089 in 3.4.
11090 * fixed Makefile to work around DEC AXP compiler tail recursion
11091 bug.
11092
11093
11094 == [3.5] ==
11095
11096 * Minor collections now mark from roots only once, if that
11097 doesn't cause an excessive pause.
11098 * The stack clearing heuristic was refined to prevent anomalies
11099 with very heavily recursive programs and sparse stacks.
11100 * Fixed a bug that prevented mark stack growth in some cases.
11101 GC_objects_are_marked should be set to TRUE after a call
11102 to GC_push_roots and as part of GC_push_marked, since
11103 both can now set mark bits. I think this is only a performance
11104 bug, but I wouldn't bet on it. It's certainly very hard to argue
11105 that the old version was correct.
11106 * Fixed an incremental collection bug that prevented it from
11107 working at all when HBLKSIZE != getpagesize()
11108 * Changed dynamic_loading.c to include gc_priv.h before testing
11109 DYNAMIC_LOADING. SunOS dynamic library scanning
11110 must have been broken in 3.4.
11111 * Object size rounding now adapts to program behavior.
11112 * Added a workaround (provided by Manuel Serrano and
11113 colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
11114 that I had incorrectly assumed to have been squished.
11115 The collector was broken if the text segment size was within
11116 32 bytes of a multiple of 8K bytes, and if the beginning of
11117 the data segment contained interesting roots. The workaround
11118 assumes a demand-loadable executable. The original may have
11119 have "worked" in some other cases.
11120 * Added dynamic library support under IRIX5.
11121 * Added support for EMX under OS/2 (thanks to Ari Huttunen).
11122 * Added support of Motorola 88K processor running CX/UX (by Brent Benson).
11123
11124
11125 == [3.4] ==
11126
11127 * Fixed a performance bug in GC_realloc.
11128 * Updated the amiga port.
11129 * Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
11130 * Added cord library.
11131 * Added trivial performance enhancement for
11132 ALL_INTERIOR_POINTERS (do not scan last word).
11133
11134
11135 == [3.3] 1993-10-02 ==
11136
11137 * PCR-specific bugs (thanks to Neil Sharman).
11138 * Missing locking in GC_free, redundant FASTUNLOCK
11139 in GC_malloc_stubborn, and 2 bugs in
11140 GC_unregister_disappearing_link (pointed out by Neil Sharman).
11141 * Common symbols allocated by the SunOS4.X dynamic loader
11142 were not included in the root set.
11143 * Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
11144 * Merged Amiga port from Jesper Peterson (untested).
11145 * Merged NeXT port from Thomas Funke (significantly
11146 modified and untested). (Also thanks to Brian D. Carlstrom for
11147 the supplied the NeXT ports.)
11148
11149
11150 == [3.2] ==
11151
11152 Fixed a serious and not entirely repeatable bug in
11153 the incremental collector. It appeared only when dirty bit info
11154 on the roots was available, which is normally only under Solaris.
11155 It also added GC_general_register_disappearing_link, and some
11156 testing code. Interface.c disappeared.
11157
11158
11159 == [3.1] ==
11160
11161 * A workaround for a SunOS 4.X SPARC C compiler
11162 misfeature that caused problems when the collector was turned into
11163 a dynamic library.
11164 * A fix for a bug in GC_base that could result in a memory fault.
11165 * A fix for a performance bug (and several other misfeatures) pointed
11166 out by Dave Detlefs and Alan Dosser.
11167 * Use of dirty bit information for static data under Solaris 2.X.
11168 * DEC Alpha/OSF1 support (thanks to Alan Dosser).
11169 * Incremental collection on more platforms.
11170 * A more refined heap expansion policy. Less space usage by default.
11171 * Various minor enhancements to reduce space usage, and to reduce
11172 the amount of memory scanned by the collector.
11173 * Uncollectible allocation without per object overhead.
11174 * More conscientious handling of out-of-memory conditions.
11175 * Fixed a bug in debugging stubborn allocation.
11176 * Fixed a bug that resulted in occasional erroneous reporting of smashed
11177 objects with debugging allocation.
11178 * Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
11179
11180
11181 == [3.0] ==
11182
11183 Added generational/incremental collection and stubborn objects.
11184
11185
11186 == [2.6] 1993-04-27 ==
11187
11188 (Changes not specified.)
11189
11190
11191 == [2.5] ==
11192
11193 * Removed an explicit call to exit(1)
11194 * Fixed calls to GC_printf and GC_err_printf, so the correct number of
11195 arguments are always supplied. The OS/2 C compiler gets confused if
11196 the number of actuals and the number of formals differ. (ANSI C
11197 doesn't require this to work. The ANSI sanctioned way of doing things
11198 causes too many compatibility problems.)
11199
11200
11201 == [2.4] 1993-01-26 ==
11202
11203 Added GC_free_space_divisor as a tuning knob, added
11204 support for OS/2 and linux, and fixed the following bugs:
11205 * On machines with unaligned pointers (e.g. Sun 3), every 128th word could
11206 fail to be considered for marking.
11207 * Dynamic_load.c erroneously added 4 bytes to the length of the data and
11208 bss sections of the dynamic library. This could result in a bad memory
11209 reference if the actual length was a multiple of a page. (Observed on
11210 Sun 3. Can probably also happen on a Sun 4.)
11211 (Thanks to Robert Brazile for pointing out that the Sun 3 version
11212 was broken. Dynamic library handling is still broken on Sun 3s
11213 under 4.1.1U1, but apparently not 4.1.1. If you have such a machine,
11214 use -Bstatic.)
11215
11216
11217 == [2.3] ==
11218
11219 * Added ALL_INTERIOR_POINTERS.
11220 * Missing declaration of etext in the A/UX version.
11221 * Some PCR root-finding problems.
11222 * Blacklisting was not 100% effective, because the plausible future
11223 heap bounds were being miscalculated.
11224 * GC_realloc didn't handle out-of-memory correctly.
11225 * GC_base could return a nonzero value for addresses inside free blocks.
11226 * test.c wasn't really thread safe, and could erroneously report failure
11227 in a multi-threaded environment. (The locking primitives need to be
11228 replaced for other threads packages.)
11229 * GC_CONS was thoroughly broken.
11230 * On a SPARC with dynamic linking, signals stayed disabled while the
11231 client code was running (thanks to Manuel Serrano).
11232
11233
11234 == [2.2] ==
11235
11236 * GC_realloc could fail to extend the size of the object for certain large
11237 object sizes.
11238 * A blatant subscript range error in GC_printf, which unfortunately
11239 wasn't exercised on machines with sufficient stack alignment constraints.
11240 * GC_register_displacement did the wrong thing if it was called after
11241 any allocation had taken place.
11242 * The leak finding code would eventually break after 2048 byte
11243 byte objects leaked.
11244 * interface.c didn't compile.
11245 * The heap size remained much too small for large stacks.
11246 * The stack clearing code behaved badly for large stacks, and perhaps
11247 on HP/PA machines.
11248
11249
11250 == [2.1] ==
11251
11252 * The first stable version since 1.9.
11253 * Added support for PPCR.
11254
11255
11256 == [2.0] ==
11257
11258 * Introduced a consistent naming convention for collector
11259 routines and added support for registering dynamic library data segments
11260 in the standard mark_roots.c (original code supporting the SunOS dynamic
11261 loader provided by Bill Janssen). Most of the data structures were revamped.
11262 The treatment of interior pointers was completely changed. Finalization
11263 was added. Support for locking was added. Object kinds were added.
11264 We added a black listing facility to avoid allocating at addresses known
11265 to occur as integers somewhere in the address space. Much of this
11266 was accomplished by adapting ideas and code from the PCR collector.
11267 The test program was changed and expanded.
11268
11269
11270 == [1.9] 1992-01-29 ==
11271
11272 * fixed a major bug in gc_realloc.
11273
11274
11275 == [1.8] ==
11276
11277 * added ULTRIX support in gc_private.h. (Robert Brazile originally supplied
11278 the ULTRIX code. Alan Dosser and Regis Cridlig subsequently provided updates
11279 and information on variation between ULTRIX systems.)
11280
11281
11282 == [1.5] ==
11283
11284 * ensure 8 byte alignment for objects allocated on a sparc based machine.
11285
11286
11287 == [1.4] ==
11288
11289 * Does not use compile time determined values
11290 for the stack base. This no longer works on Sun 3s, since Sun 3/80s use
11291 a different stack base. We now use a straightforward heuristic on all
11292 machines on which it is known to work (incl. Sun 3s) and compile-time
11293 determined values for the rest. There should really be library calls
11294 to determine such values.
11295
11296
11297 == [1.3] ==
11298
11299 * Fixed spurious
11300 assembly language assignments to TMP_SP. Only the assignment in the PC/RT
11301 code is necessary. On other machines, with certain compiler options,
11302 the assignments can lead to an unsaved register being overwritten.
11303 Known to cause problems under SunOS 3.5 WITHOUT the -O option. (With
11304 -O the compiler recognizes it as dead code. It probably shouldn't,
11305 but that's another story.)
11306 The SPARC-specific code was originally contributed by Mark Weiser.
11307 The Encore Multimax modifications were supplied by Kevin Kenny.
11308 The adaptation to the IBM PC/RT is largely
11309 due to Vernon Lee, on machines made available to Rice by IBM.
11310 Much of the HP specific code and a number of good suggestions for improving
11311 the generic code are due to Walter Underwood.
11312 Parag Patel supplied the A/UX code.
11313 Manuel Serrano supplied linux and Sony News specific code.