Debian Codegraph @

gc/ChangeLog

raw
1
2 == [8.2.8] 2024-09-08 ==
3
4 * Allow GC_size() argument to be null
5 * Disable backtrace saving at garbage collections if DONT_SAVE_TO_LAST_STACK
6 * Eliminate 'cast signed to bigger unsigned' CSA warnings in GC_find_limit
7 * Eliminate 'x might be clobbered by longjmp' gcc warning in setjmp_t.c
8 * Fix 'un-mprotect vdb failed' abort with out-of-memory reason on Linux
9 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
10 * Fix GC_debug_realloc to support custom kind
11 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
12 * Fix GC_print_trace_inner to print the last element of the circular buffer
13 * Fix cordtst2.tmp file deletion in cordtest on Windows
14 * Fix double lock in GC_malloc called from backtrace()
15 * Fix handling of page-unaligned boundaries in soft_set_grungy_pages
16 * Fix heap blocks size computation by GC_get_memory_use
17 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
18 * Fix infinite resend lost signals if a thread is restarted by SIGQUIT
19 * Fix null pointer dereference in GC_is_visible if type_descr is null
20 * Fix per_object_helper() after changing hb_sz units
21 * Fix pointer relational comparison in GC_do_enumerate_reachable_objects
22 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
23 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
24 * Fix potential address overflow in GC_add_to_heap
25 * Fix potential buffer overrun during read in GC_text_mapping
26 * Fix various typos in comments
27 * Prevent GC_noop_sink from scanning by the collector
28 * Prevent redirected malloc call from a garbage collection routine
29 * Redirect malloc_usable_size() in leak_detector.h
30 * Remove redundant dirty/reachable_here calls in GC_malloc_explicitly_typed
31 * Update and fix diagrams describing the tree structure for pointer lookups
32 * Use atomic store to set GC_first_nonempty in GC_do_parallel_mark
33 * Use atomic store to set entry id and update cache_ptr in slow_getspecific
34 * Workaround '.obj file not found' error reported by watcom wlib
35
36
37 == [8.2.6] 2024-02-04 ==
38
39 * Avoid unexpected heap growth in gctest for the case of VERY_SMALL_CONFIG
40 * Change gc.man to include gc/gc.h
41 * Check for out-of-memory on every memory allocation in tests
42 * Do not compile pthread_start.c on Cygwin even if build shared libs (CMake)
43 * Eliminate 'alloc_small declared but unused' gcc warning in gctest
44 * Eliminate 'make_key is defined but unused' gcc warning in threadkeytest
45 * Eliminate 'old_segv_handler is defined but unused' gcc warning on OpenBSD
46 * Eliminate 'rand() may return deterministic values' warning
47 * Eliminate 'unused parameter' compiler warnings reported by MS clang
48 * Eliminate 'unused parameter' gcc warning in free() if IGNORE_FREE
49 * Eliminate 'unused value' gcc warnings in init_global_static_roots (Symbian)
50 * Eliminate GCC warning of unsafe __builtin_return_address(1) in Cmake script
51 * Eliminate compiler warning of missing cast in LONG_MULT after shift
52 * Eliminate warning of unused expression result in GC_FreeBSDGetDataStart
53 * Ensure _GNU_SOURCE is defined if HAVE_DLADDR is defined by configure
54 * Fix 'g++ not found' error on OpenBSD (Makefile.direct)
55 * Fix 'implicit declaration of function pthread_atfork' gcc error on MinGW
56 * Fix 'implicit declaration of function sbrk' gcc error on Symbian
57 * Fix 'implicit declaration of iscntrl()' warning in cord/de_win (MinGW)
58 * Fix 'info' buffer potential overrun in GC_save_callers
59 * Fix 'l-value specifies const object' MSVC error in GC_push_many_regs
60 * Fix 'linker input unused' error inside check_c_compiler_flag (CMake)
61 * Fix 'missing binary operator before token' gcc error in gcconfig.h
62 * Fix 'missing sysconf() prototype' gcc error in setjmp_t tool (OpenBSD)
63 * Fix 'sigset_t undeclared' MS VC error if pthreads-w32 is used
64 * Fix 'undefined reference' linker errors if shared build on OpenBSD (CMake)
65 * Fix 'unused GC_set_and_save_fault_handler' warning on OS X
66 * Fix GC_push_stack_for() to push also Xmm registers on Windows/x64
67 * Fix GC_set_handle_fork(1) on Darwin when MPROTECT_VDB but no threads
68 * Fix MACH_TYPE macro redefinition on Symbian/arm
69 * Fix SVR4 macro definition order
70 * Fix asm constraint in LONG_MULT for gcc/x86
71 * Fix assertion violation in GC_get_maps on Linux if malloc redirection
72 * Fix back graph and checksums support in WCC_MAKEFILE
73 * Fix bitwise negation and rounding direction in setjmp_t tool
74 * Fix checksums GC_record_fault invocation on Darwin
75 * Fix closing bracket placement for case statement in configure
76 * Fix deprecation warning about support of CMake older than v3.5
77 * Fix extra 'extern C' for include signal.h in gcconfig.h
78 * Fix getcontext() detection by CMake on OpenBSD
79 * Fix handling of GC_gc_no counter wrap in GC_clear_stack
80 * Fix handling of GC_gc_no counter wrap in GC_notify_or_invoke_finalizers
81 * Fix indent of a closing curly brace in GC_forward_exception
82 * Fix lock assertion violation in GC_try_to_collect_inner on OS X
83 * Fix missing GC_pthread_sigmask on FreeBSD and NetBSD
84 * Fix missing _setjmp() on djgpp
85 * Fix missing atomic barriers in CORD_from_file_lazy
86 * Fix missing outermost parentheses in CORD_pos_cur_char_addr and hugetest
87 * Fix missing redirect and implementation of pthread_sigmask() on OpenBSD
88 * Fix missing type widening before left shift in GC_MAKE_PROC
89 * Fix misspelled GC_HEADERS_H macro in gc_priv.h
90 * Fix null dereference in check_finalizer_nested if redirect malloc on Linux
91 * Fix posix_memalign() to overwrite pointer storage only on success
92 * Fix race in init_lib_bounds on Linux with glibc v2.34+ if redirect malloc
93 * Fix skipped removal of page protection in case of address hash collision
94 * Fix typos in comments
95 * Fix undefined GC_real_pthread_sigmask if redirect malloc on OS X
96 * Fix update of last_back_trace_gc_no if KEEP_BACK_PTRS is not defined
97 * Handle GC_gc_no counter overflow properly in GC_print_trace
98 * Include Darwin CoreFoundation.h only if 32-bit ARM
99 * Make gc_allocator<void> members public
100 * Re-enable incremental mode on OS X (arm64)
101 * Remove .log and cordtest .tmp files by 'make clean' (Makefile.direct)
102 * Remove a redundant check of HOST_ANDROID in gcconfig.h
103 * Remove duplication of random numbers generator formula
104 * Specify constexpr in GC allocators if C++20 or later
105 * Support NetBSD/riscv64
106 * Support non-msys MinGW build by CMake
107 * Turn on handle fork by default on Darwin (multi-threaded only)
108 * Use AO primitives in GC_RAND_NEXT instead of no_sanitize attribute
109 * Workaround 'malloc inconsistent dll linkage' MS VC error in CMake script
110 * Workaround MS Clang failure to compile de_win.rc
111 * Workaround mark stack overflow in GC_push_finalizer_structures on MinGW
112
113
114 == [8.2.4] 2023-05-26 ==
115
116 * Abort with appropriate message if first call of mmap fails with EPERM
117 * Adjust CORD_ec comment placement in ec.h
118 * Adjust WoW64 workaround to work on UWP/WinRT
119 * Adjust naming of Win32/64 and x86/64 words in comments and documentation
120 * Avoid potential race between realloc and GC_block_was_dirty
121 * Do not double-clear first two words of object in GC_generic_malloc
122 * Do not mention FASTLOCK in comment
123 * Do not mix debug and non-debug allocations in disclaim tests
124 * Do not prohibit threaded builds with malloc redirection on non-Linux
125 * Do not prohibit zero proc argument in GC_register_disclaim_proc
126 * Eliminate '&array may not produce intended result' wcc warnings
127 * Eliminate 'GC_unmap_end declared but unused' bcc warning in disclaim_bench
128 * Eliminate 'ISO C++17 does not allow register specifier' gcc warning
129 * Eliminate 'cast signed to bigger unsigned' CSA warning in WARNs, new_thread
130 * Eliminate 'n obtained from untrusted source' code defect FP in test_cpp
131 * Eliminate 'skipping config since MAXSIG/_NSIG is unknown' cppcheck FP
132 * Eliminate data race FP between remove_protection and write_fault_handler
133 * Eliminate data race FP reported in need_unreachable_finalization by TSan
134 * Ensure 'new' system header is included by gc_cpp.h if GC_INCLUDE_NEW
135 * Ensure GC_NO_PTHREAD_SIGMASK defined if no GC_pthread_sigmask prototype
136 * Fix 'EMSCRIPTEN macro redefined' compile error
137 * Fix 'ISO C90 forbids mixed decl and code' warning in SOFT_VDB dirty_init
138 * Fix 'call to undeclared pthread_setname_np' errors in configure and cmake
139 * Fix 'failed to create new win32 semaphore' Cygwin fatal error at fork
140 * Fix 'operator new is missing throw(bad_alloc)' clang warning in gc_cpp.h
141 * Fix 'overflow in conversion from word' g++ warning in GC_init
142 * Fix 'unknown option --no-undefined' linker error in cmake script (OS X)
143 * Fix 'unresolved _end' linker error when targeting Android bitcode
144 * Fix CORD_next() indent inside loop in test_basics() of cordtest
145 * Fix DCL_LOCK_STATE placement in GC_set_oom_fn
146 * Fix GC_excl_table overrun on overflow in GC_exclude_static_roots
147 * Fix GC_thread_is_registered for finished threads
148 * Fix GC_unreachable_finalize_mark_proc to ensure its unique address
149 * Fix GC_unregister_my_thread call before GC functions usage in gctest
150 * Fix IRIX5 defined wrongly on FreeBSD/mips, WinCE/mips, Tandem S-Series
151 * Fix allocated objects count increment in alloc8bytes of gctest
152 * Fix alt-stack handling in GC_push_all_stacks if stack grows up
153 * Fix comparisons to heap boundary in GC_get_back_ptr_info and GC_mark_from
154 * Fix data race in GC_heapsize_at_forced_unmap variable
155 * Fix description of client promise for IGNORE_OFF_PAGE allocated objects
156 * Fix disabling of automatic dynamic libraries registration
157 * Fix double initialization of main thread local free lists on Win32
158 * Fix gccpp and gctba library names in gcinterface.md
159 * Fix infinite loop in disable_gc_for_dlopen and GC_wait_for_gc_completion
160 * Fix infinite wait in pthread_join/detach if thread already finished (Win32)
161 * Fix joinable threads shutdown on NaCl
162 * Fix loop condition over dll_thread_table in GC_lookup_pthread (Win32)
163 * Fix missing GC_CALLBACK for GC_waitForSingleObjectInfinite
164 * Fix missing extern C for __asan_default_options
165 * Fix missing libalphagc.so dependency in Makefile.direct
166 * Fix missing lock while updating GC_in_thread_creation in GC_exit_check
167 * Fix missing recovery from faults in GC_mark_some on Win64 if MinGW
168 * Fix missing result check of pthread_attr_getdetachstate in pthread_create
169 * Fix mistyped function name in documentation of REDIRECT_REALLOC
170 * Fix negative heap size values reported in WARN
171 * Fix null pointer dereference in TRACE_TARGET
172 * Fix of GC_bytes_allocd increment in GC_generic_malloc_inner
173 * Fix overlapping region assertion in mark_some if malloc redirect on Linux
174 * Fix potential SIGSEGV on out-of-memory in gctest
175 * Fix signals delivery fail in find-leak mode if init from non-main thread
176 * Fix stack top/bottom print order in GC_push_all_stacks if stack grows up
177 * Fix store-and-dirty call in GC_CONS
178 * Fix unregistering of thread created by intercepted pthread_create on NaCl
179 * Fix unused GC_parse_version if no SOFT_VDB and no parallel mark on Linux
180 * Fix use of unset errno after pthread_create/sigmask calls
181 * Fix various typos in comments and documentation
182 * Increment allocated objects count after GC_GCJ_MALLOC() in gctest
183 * Invoke GC_oom_fn if GC_make_array_descriptor failed because of no memory
184 * Make Emscripten Asyncify feature optional
185 * Mention gctba library in README.cmake
186 * Prevent 'function should return a value' BCC error in CMake script
187 * Provide meaningful error message in case of Emscripten threaded build
188 * Reduce local variable scope in resend_lost_signals_retry for cppcheck
189 * Remove disable-warning options from WCC_MAKEFILE unrecognized by wcc v2.0
190 * Remove false warning of missing libpthread.so on Linux
191 * Remove redundant 'ifdef THREADS' around LOCK/UNLOCK in call_with_alloc_lock
192 * Remove redundant GC_ATTR_UNUSED for GC_mark_and_push
193 * Remove unused GC_old_sig_mask from gc_locks.h
194 * Replace WARN in GC_mark_some wrapper back to GC_COND_LOG_PRINTF
195 * Specify throw and noexcept for operator new/delete in gc_cpp.h for MS VC
196 * Support Hurd/x86_64
197 * Support client-defined stack pointer adjustment before thread stack push
198 * Suppress 'unreachable code' wcc warning in I_HOLD_LOCK assertion (CMake)
199 * Update autotools for release preparation (ac-2.71, am-1.16.5, m4-1.14.19)
200 * Update dump function name in GC_DUMP_REGULARLY variable documentation
201 * Use emscripten_stack_get_base instead of emscripten_scan_stack
202 * Use sbrk() to get OS memory on Emscripten
203 * Workaround 'writing into region of size 0' gcc warning in suspend_handler
204 * Workaround CSA null pointer dereference FP in invalidate_map of cord/de
205 * Workaround a malfunction of soft-dirty bits clearing on Power9
206
207
208 == [8.2.2] 2022-08-26 ==
209
210 * Abort if no progress with thread suspend/resume signals resending
211 * Add CMake option to force libatomic_ops headers usage
212 * Add _PROP suffix to CORD/GC[CPP]_VERSION variables in CMake script
213 * Allow not to bypass pthread_cancel hardening in pthread_start
214 * Allow to start marker threads in child of single-threaded client
215 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
216 * Avoid potential signal loss before sigsuspend in suspend_handler if TSan
217 * Define SUNOS5SIGS macro for kFreeBSD
218 * Distribute gc_gcj.h and some other headers in single-obj-compilation
219 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
220 * Do not call SET_HDR() to remove forwarding counts if none exists in hblk
221 * Do not call mprotect/mmap to GC_unmap/remap (Linux)
222 * Do not count unmapped regions if GC_unmap is madvise-based (Linux)
223 * Do not define NEED_FIND_LIMIT in case of OpenBSD user threads
224 * Do not fail tests if pthread_create returns resource unavailable error
225 * Do not name GCC intrinsics as C11 ones
226 * Do not probe to find main data root start if dl_iterate_phdr exists
227 * Do not send signal to thread which is suspended manually
228 * Do not use usleep between signals resend if ThreadSanitizer
229 * Eliminate '-pedantic is not option that controls warnings' GCC-6.3 message
230 * Eliminate '/GS can not protect parameters' MS VC warning in msvc_dbg
231 * Eliminate 'R_AARCH64_ABS64 used with TLS symbol' linker warning (clang)
232 * Eliminate 'buffer overflow detected' FP error in realloc_test
233 * Eliminate 'extension used' clang warning in sparc_mach_dep.S (configure)
234 * Eliminate 'function/data pointer conversion in expression' MSVC warning
235 * Eliminate 'implicit decl of _setjmp' gcc warning if -std=c11 on Cygwin
236 * Eliminate 'layout of aggregates has changed in GCC 5' warning in test_cpp
237 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
238 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
239 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
240 * Eliminate 'potentially uninitialized local variable tc' warning (MSVC)
241 * Eliminate 'skipping config since MAX_HEAP_SECTS is unknown' cppcheck FP
242 * Eliminate 'unused but set variable' gcc warnings in cpptest
243 * Eliminate 'value exceeds maximum size' warnings in debug_malloc, huge_test
244 * Eliminate 'writing into region of size 0' gcc FP warning in realloc
245 * Eliminate ASan stack-buffer-underflow FP in GC_mark_and_push_stack (E2K)
246 * Eliminate code defect about incorrect size of allocated object (leaktest)
247 * Eliminate data race reported by TSan in GC_have_errors
248 * Eliminate division-by-zero FP warning in GC_ASSERT in reclaim_block
249 * Eliminate stringop-overflow gcc-12 warning in CORD__next
250 * Ensure typed objects descriptor is never located in the first word
251 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
252 * Fix 'GC_text_mapping not used' GCC warning if redirect malloc w/o threads
253 * Fix 'ISO C forbids conversion of function pointer to object' warning
254 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
255 * Fix 'undefined reference to __data_start' linker error on Linux/aarch64
256 * Fix 'unresolved __imp__wsprintfA' linker error in msvc_dbg.c (MSVC)
257 * Fix 'unresolved symbol GetModuleHandle' error in win32_threads.c (UWP)
258 * Fix (workaround) stack overflow in gctest on Alpine Linux/s390x
259 * Fix GC_ATTR_NO_SANITIZE_THREAD definition for GCC
260 * Fix GC_allocate_ml incorrect cleanup in GC_deinit if pthreads (MinGW)
261 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
262 * Fix GC_make_descriptor for zero length argument
263 * Fix GC_suspend_thread if called before thread destructor
264 * Fix GC_unmapped_bytes update in GC_unmap for Sony PS/3
265 * Fix SIGSEGV caused by dropped stack access from child process in gctest
266 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
267 * Fix abort in Win32 DllMain if PARALLEL_MARK
268 * Fix abort when GC_repeat_read returns zero
269 * Fix assertion about built-in AO_test_and_set_acquire on sparc64 (gcc-12)
270 * Fix assertion violation in GC_allow_register_threads on Windows
271 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
272 * Fix comment in GC_init regarding GC_init_parallel call
273 * Fix context saving when GC_suspend_thread(self)
274 * Fix data race in fail_proc1 of gctest
275 * Fix hang in GC_free if GC_PREFER_MPROTECT_VDB (Mingw64)
276 * Fix hang in select() called from suspend signal handler if TSan
277 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
278 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
279 * Fix incremental mode enabling in gctest if TEST_MANUAL_VDB
280 * Fix linking of tests in case of finalization is off
281 * Fix lock assertion violation in GC_find_limit if always multi-threaded
282 * Fix memory return to OS in GC_unmap
283 * Fix missing lock when GC_generate_random_valid_address is called
284 * Fix missing write() declaration if CONSOLE_LOG (Watcom)
285 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
286 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
287 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
288 * Fix potential race if start_mark_threads called from threads in child
289 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
290 * Fix pthread_setname_np and dladdr detection by CMake
291 * Fix race between calloc_explicitly_typed and push_complex_descriptor
292 * Fix typos in comments and debugging.md
293 * Fix undefined __stack_base__ on UWP/arm64 (llvm-mingw)
294 * Force GC_with_callee_saves_pushed in suspend_handler if NO_SA_SIGACTION
295 * Link with rt library to get clock_gettime where necessary
296 * Make finalizer_closure pointer read/write atomic in malloc and callback
297 * Move platform-specific sleep call to GC_usleep (refactoring)
298 * Pass -lrt linker option in CMake script on HP/UX, NetBSD
299 * Prevent (fix) parallel custom mark procs run in single-threaded clients
300 * Prevent changing of GC_markers_m1 value while collection in progress
301 * Refer to Makefile.direct instead of deleted Makefile file in README
302 * Relax assertion of hb_n_marks in reclaim_block if more than two markers
303 * Remove IF_IA64 macro in pthread_stop_world (refactoring)
304 * Remove checking of RS6000 completely
305 * Remove duplicate check of MSWIN_XBOX1 in os_dep.c
306 * Remove duplicate include gc_tiny_fl.h in gc_priv.h
307 * Remove non-working check of M68K in gctest
308 * Remove useless TSan W/A about read of mark_lock_holder for Windows
309 * Replace RAISE_SIGNAL macro with a static function (refactoring)
310 * Replace SSH cloning with HTTPS one in README
311 * Retry pthread_kill if EAGAIN (Linux)
312 * Revert "Check real-symbols are already initialized in pthread_join/detach"
313 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
314 * Revert addition of msvc_dbg.h in include.am
315 * Set default build type to RelWithDebInfo (CMake)
316 * Start configure help messages with a lower case letter
317 * Support 'z' format modifier by CORD_vsprintf
318 * Support Elbrus 2000 (Linux/e2k)
319 * Support GCC MCF thread model (mcfgthreads) in configure (MinGW)
320 * Support GC_remove_roots on Win32
321 * Support OpenBSD/riscv64
322 * Support build using Makefile.direct on Linux/sparc
323 * Support space-separated flags in CFLAGS_EXTRA passed to CMake
324 * Update README.win32 about default build configuration (configure, cmake)
325 * Update documentation of GC_RATE and MAX_PRIOR_ATTEMPTS
326 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
327 * Use SIGUSR1/2 on FreeBSD/arm64
328 * Use compiler TLS on NetBSD only if at least gcc-4.4 or clang-3.9
329 * Workaround 'info is not assigned' cppcheck FP if assertions on (OS X)
330 * Workaround SIG_SUSPEND delivery to thread inside mutex_lock fail if TSan
331 * Workaround TSan FP about race between generic_malloc and array_mark_proc
332 * Workaround TSan FP in acquire_mark_lock called from fork_prepare_proc
333 * Workaround TSan FP warning in finalized_malloc, push_unconditionally
334 * Workaround TSan FP warning in fork_prepare_proc
335 * Workaround TSan FP warning in push_marked1/2/4, ptr_store_and_dirty
336 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
337 * Workaround call stack size exceeded in gctest (Wasm)
338 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage
339 * Workaround gctest hang if test compiled as C++ code by MSVC (CMake)
340 * Workaround msvc_dbg.c build failure on arm[64] (MSVC)
341
342
343 == [8.2.0] 2021-09-29 ==
344
345 * Add API for accessing incremental GC time limit with nanosecond precision
346 * Add API function to force start of incremental collection
347 * Add GC_ prefix to scan_ptr and some other static variables (refactoring)
348 * Add GC_get/set_disable_automatic_collection API
349 * Add I_HOLD_LOCK assertion to expand_hp_inner and related functions
350 * Add assertion on free-list argument and result of GC_new_kind
351 * Add assertion that GC is initialized to base incremental_protection_needs
352 * Add assertions that GC_page_size is initialized
353 * Add cordtest, staticrootstest, test_cpp, tracetest, disclaim tests (CMake)
354 * Add debug messages on thread suspend/resume (Win32)
355 * Add dummy testing of GC_incr_bytes_allocd/freed
356 * Add table of contents in gcdescr.md
357 * Add testing of GC_CALLOC/MALLOC_EXPLICITLY_TYPED (gctest)
358 * Adjust formatting of numbered lists in README.md to match other .md files
359 * Adjust highlighting of API prototypes in gcinterface.md
360 * Adjust macro def/usage for AVR32, CRIS, NETBSD, OPENBSD, SH4 in gcconfig.h
361 * Adjust printf calls in gctest check_heap_stats so that each has new-line
362 * Allow incremental GC on Cygwin
363 * Allow memory unmapping in case of MPROTECT_VDB
364 * Allow to disable GWW or mprotect-based VDB at build
365 * Allow to disable Glibc FPU exception mask and TSX workarounds (Linux)
366 * Allow to disable __builtin_return_address(1) usage (x86 and x64)
367 * Allow to specify custom value of LOG_PHT_ENTRIES
368 * Always abort on failure to access /proc/self/maps (Linux)
369 * Always define default_push_other_roots (code refactoring)
370 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
371 * Avoid initial 3ms pause on world stop/start with GC_retry_signals (Linux)
372 * Build cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE
373 * Build gc as a shared multi-threaded library by default (CMake)
374 * Build gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE
375 * Build gctba library
376 * Build shared libraries by default (WCC_MAKEFILE)
377 * Change CLOCK_TYPE to timespec for Nintendo Switch (code refactoring)
378 * Change EMSCRIPTEN macro for internal use to no-underscore format
379 * Change log_size fields of finalizer to unsigned type (code refactoring)
380 * Change type of toggleref_array_size/capacity to size_t (code refactoring)
381 * Check leak of objects allocated by CRT malloc in gctest (MS VC)
382 * Check real-symbols are already initialized in pthread_join/detach
383 * Collapse multiple includes of windows.h (code refactoring)
384 * Comments reformatting in mark.c to properly delimit sentences
385 * Compile de test GUI app with resources (CMake)
386 * Compile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)
387 * Compile msvc_dbg.c by CMake script (MS VC)
388 * Declare API function and print amount of memory obtained from OS
389 * Define GC_win32_free_heap API function for all Windows targets
390 * Define STATIC macro to static by default
391 * Depend number of fork_a_thread calls on NTHREADS (gctest)
392 * Detect dladdr() presence in CMake script
393 * Detect presence of execinfo.h system header in CMake script
394 * Detect presence of getcontext and dl_iterate_phdr in CMake script
395 * Detect sigsetjmp() availability in CMake script
396 * Disable Clang/GCC aliasing optimization in CMake script by default
397 * Do not build tests by default (Makefile.direct and other Makefiles)
398 * Do not build the tests by default (CMake)
399 * Do not call GC_push_conditional unless PROC_VDB
400 * Do not call add_to_our_memory with null pointer (refactoring)
401 * Do not compile pthread_*.c files in Cygwin or MSYS (CMake)
402 * Do not define GC_write_cs for Xbox One target
403 * Do not define HAVE_NO_FORK for all Unix-like systems
404 * Do not hard-code CMAKE_DL_LIBS value and install paths (CMake)
405 * Do not hard-code finalizable objects limit which triggers GC
406 * Do not update scratch_last_end_ptr unless used by reg dynamic libraries
407 * Document GC_incr_bytes_allocd/freed API function
408 * Eliminate '(long)size<=0 is always false' cppcheck FP
409 * Eliminate 'Consecutive return is unnecessary' cppcheck style warning
410 * Eliminate 'accessing GC_dont_gc without lock' in GC_init code defect FP
411 * Eliminate 'bytes_freed access w/o lock in incr_bytes_free' code defect FP
412 * Eliminate 'checking if unsigned i < 0' cppcheck FP in is_heap_base
413 * Eliminate 'hash_val value is never used' cppcheck false positive
414 * Eliminate 'passing tainted var maps_buf to tainted sink' code defect FP
415 * Eliminate 'retry_cnt is assigned value but never used' cppcheck FP
416 * Eliminate 'stop variable is always 0' compiler warning in print_callers
417 * Eliminate 'struct member os_callback is never used' cppcheck warning
418 * Eliminate 't->flags not atomically updated' code defect FP
419 * Eliminate 'tmpl might be accessed at non-zero index' cppcheck error
420 * Eliminate GCC warning of unsafe __builtin_return_address(1)
421 * Eliminate code duplication in reclaim_clear and disclaim_and_reclaim
422 * Eliminate double lock code defect false positive in generic_lock
423 * Eliminate memory leak reported in add_current_malloc_heap at exit (Win32)
424 * Emscripten single-threaded support (detect stack base, push registers)
425 * Enable CMake-based build for Borland and Watcom compilers
426 * Enable compilation without C runtime (Win32)
427 * Enable fork testing in single-thread builds (Unix-like)
428 * Enable mprotect-based incremental GC for Linux/arm and Linux/aarch64
429 * Enable true incremental collection even if parallel marker is on
430 * Enable use of __builtin_unwind_init() if clang-8 or later
431 * Ensure ELFSIZE is defined in dyn_load.c for OpenBSD (code refactoring)
432 * Ensure add_to_heap_inner arguments are valid (refactoring)
433 * Ensure all getters and setters are run at least once by gctest (pthreads)
434 * Export CMake targets with namespace BDWgc
435 * Fix 'const obj must be initialized if not extern' error in gc_alloc_ptrs.h
436 * Fix ./libgc.la dependency on FreeBSD (Automake)
437 * Fix HOST determination in CMake script
438 * Fix copyright message in de_win.rc, gc_cpp.cc, ec.h and specific.h
439 * Fix missing OS_TYPE definition for some targets
440 * Fix mmap(PROT_NONE) failure if RLIMIT_AS value is low (Linux)
441 * Generate cordtest and de executable files in GC base folder
442 * Generate pkg-config metadata file (CMake)
443 * Get rid of some non-ELF ifdefs (code refactoring)
444 * Handle potential incomplete buffer read in GC_linux_main_stack_base
445 * Implement GET_TIME for Nintendo Switch
446 * Increase NTHREADS value in tests if code coverage analysis
447 * Install docs and man page if enable_docs (CMake)
448 * Install gc_gcj.h and gc_pthread_redirects.h only if appropriate
449 * Log abort message details even if not print_stats (unless SMALL_CONFIG)
450 * Mark buffer returned by get_maps as const (code refactoring)
451 * Move C++ GC_ATTR_EXPLICIT and GC_NOEXCEPT definition to gc_config_macros.h
452 * Move GC state non-pointer variables into GC_arrays (code refactoring)
453 * Move GC state pointer variables into GC_arrays
454 * Move GC_scratch_recycle_inner() to alloc.c (refactoring)
455 * Move GC_throw_bad_alloc definition to new C++ file
456 * Move QNX and Emscripten macro definitions to proper place in gcconfig.h
457 * Move definition of GC_n_mark_procs and GC_n_kinds from mark.c to misc.c
458 * New API (GC_set_markers_count) to control number of parallel markers
459 * New API function to clear GC exclusion table
460 * New API function to get size of object debug header
461 * New API standalone functions to acquire and release the allocator lock
462 * New CMake option (disable_gc_debug) to remove debugging code
463 * New CMake option (disable_handle_fork) to disable fork handling completely
464 * New macro (CONSOLE_LOG) to enable logging to console on Win32
465 * New macro (GCTEST_PRINT_VERBOSE) to enable verbose logging in test.c only
466 * New macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)
467 * OpenBSD does not use ELF_CLASS (code refactoring)
468 * Pass -D GC_DLL -fvisibility=hidden if default configure build is requested
469 * Pass -no-undefined linker flag if building shared libraries (CMake)
470 * Print pid of child processes if verbose logging (gctest)
471 * Read environment variables from a file on WinCE (CMake script)
472 * Reduce stack-allocated buffer in get_nprocs from 4KB to 1.7KB
473 * Refine flags field comment in pthread_support.h
474 * Reflect result of VDB selection at runtime in incremental_protection_needs
475 * Reformat code of GC_push_roots
476 * Reformat gc.man (wrap long lines)
477 * Reformatting and code refactoring of CMake script
478 * Remove 'current users' section from overview.md
479 * Remove 'distributed ports', 'scalable versions' sections from overview.md
480 * Remove AC_MSG_RESULT for THREADDLLIBS (dgux386)
481 * Remove Borland-specific Makefile and gc.mak script
482 * Remove GC_eobjfreelist variable in typd_mlc.c (code refactoring)
483 * Remove GC_gcj_malloc_initialized variable (code refactoring)
484 * Remove Linux-specific commands for building cord/de from Makefile.direct
485 * Remove Win32 main_thread static variable if threads discovery is disabled
486 * Remove code duplication between GC_unmap and GC_unmap_gap (refactoring)
487 * Remove code duplication between PROTECT and UNPROTECT macros (refactoring)
488 * Remove commented out assignment of gc_use_mmap in configure (refactoring)
489 * Remove dash characters comprising prefix of some verbose logs (gctest)
490 * Remove dependency on user32.dll import library from static libgc (Win32)
491 * Remove documentation specific to particular old BDWGC releases
492 * Remove duplicate Linux-related macro definitions in gcconfig.h
493 * Remove duplicate macro definitions in gcconfig.h except for Linux
494 * Remove gcmt-dll generation, rename libgc-lib.a to libgc.a (CMake)
495 * Remove goto statement in print_callers (code refactoring)
496 * Remove limit on number of heap sections
497 * Remove new_gc_alloc.h file
498 * Remove redundant GC_with_callee_saves_pushed call in multi-threaded builds
499 * Remove redundant check of GC_free argument in register_finalizer
500 * Remove redundant type casts in backgraph HEIGHT_UNKNOWN/IN_PROGRESS
501 * Remove unused GC_prev_heap_addr (refactoring)
502 * Remove unused STACK_GRAN macro definitions (code refactoring)
503 * Remove unused sparc_sunos4_mach_dep.s file
504 * Remove useless empty statements after block ones (refactoring)
505 * Remove weakobj_free_list variable in disclaim_weakmap_test (refactoring)
506 * Rename READ to PROC_READ in os_dep.c (code refactoring)
507 * Rename cord/cord test executable to de (CMake)
508 * Rename ext_descr to typed_ext_descr_t (code refactoring)
509 * Rename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE
510 * Rename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile
511 * Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
512 * Rename nothreads option to disable_threads in NT_MAKEFILE
513 * Repeat run_one_test NTHREADS times by gctest if single-threaded
514 * Replace "msecs" with "ms" in all comments and messages
515 * Replace 'stack base' with 'stack bottom' in the documentation
516 * Replace SN_TARGET_ORBIS to PLATFORM_* and GC_NO_* macros
517 * Replace _M_AMD64 macro with _M_X64 (code refactoring)
518 * Replace find_limit_openbsd to find_limit_with_bound (OpenBSD 5.2+)
519 * Replace obsolete AC_HELP_STRING with AS_HELP_STRING (refactoring)
520 * Replace push_one calls with push_many_regs one for Win32 thread context
521 * Report memory region bounds and errno on GC_unmap/remap failure
522 * Report presence of process fork testing (gctest)
523 * Report time with a nanosecond precision where available
524 * Retry suspend/resume signals on all platforms by default
525 * Run tree and typed tests in child process (gctest)
526 * Set GC_collecting hint for GC_collect_a_little_inner calls (pthreads)
527 * Set name of GC marker threads
528 * Set so-version for installed shared libraries (CMake)
529 * Simplify logged message in scratch_recycle
530 * Simplify loops of collect_a_little/stopped_mark invoking mark_some
531 * Support -fvisibility=hidden option in CMake script
532 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)
533 * Support FreeBSD/RISC-V, Linux/arc, LoongArch, OpenBSD/powerpc64
534 * Support header files installation (CMake)
535 * Support most configure options in CMake script
536 * Suppress warnings in test_tinyfl() of gctest reported by Watcom C complier
537 * Take nanoseconds into account when updating full_gc_total_time
538 * Turn off C++ API by default, export it in gccpp library (CMake)
539 * Turn on automatic fork() handling by default on Android
540 * Update README.cmake regarding Unix, C++ and tests
541 * Update libgc.so version info to differentiate against v8.0.x
542 * Update the ASCII diagrams describing the tree structure for pointer lookups
543 * Update the documentation to match the current GC implementation
544 * Upgrade cmake_minimum_required(version) to 3.1
545 * Use CreateThread without GC_ prefix in gctest (code refactoring)
546 * Use KB/MB/GB abbreviations uniformly across entire documentation
547 * Use USE_MMAP_ANON when USE_MMAP is configured on OpenBSD
548 * Use a specific Emscripten allocator for Tiny
549 * Use atomic primitives for Sony PlayStation Portable 2 and PS4
550 * Use better precision Windows timers
551 * Use clock_gettime() instead of clock() on Cygwin and Linux
552 * Use compiler TLS on FreeBSD and NetBSD
553 * Use mprotect-based VDB on PowerPC and S390 (Linux)
554 * Use soft dirty bits on Linux (x86, powerpc, s390, x64)
555 * Workaround 'condition result<=0 is always false' cppcheck FP in get_maps
556 * Workaround 'push_regs configured incorrectly' error (GCC-11)
557 * Workaround 'same value in both branches of ternary operator' cppcheck FP
558 * Workaround various cppcheck false positives
559
560
561 == [8.0.14] 2024-09-07 ==
562
563 * Disable backtrace saving at garbage collections if DONT_SAVE_TO_LAST_STACK
564 * Fix infinite resend lost signals if a thread is restarted by SIGQUIT
565
566 Also, includes 7.6.22 changes
567
568
569 == [8.0.12] 2024-02-04 ==
570
571 * Eliminate 'make_key is defined but unused' gcc warning in threadkeytest
572 * Ensure _GNU_SOURCE is defined if HAVE_DLADDR is defined by configure
573 * Fix 'implicit declaration of function pthread_atfork' gcc error on MinGW
574 * Fix 'missing binary operator before token' gcc error in gcconfig.h
575 * Fix GC_set_handle_fork(1) on Darwin when MPROTECT_VDB but no threads
576 * Fix checksums GC_record_fault invocation on Darwin
577 * Fix extra 'extern C' for include signal.h in gcconfig.h
578
579 Also, includes 7.6.20 changes
580
581
582 == [8.0.10] 2023-05-26 ==
583
584 * Abort with appropriate message if first call of mmap fails with EPERM
585 * Avoid potential race between realloc and GC_block_was_dirty
586 * Do not prohibit zero proc argument in GC_register_disclaim_proc
587 * Eliminate '&array may not produce intended result' wcc warnings
588 * Eliminate 'cast signed to bigger unsigned' CSA warning in GC_new_thread
589 * Ensure 'new' system header is included by gc_cpp.h if GC_INCLUDE_NEW
590 * Fix 'overflow in conversion from word' g++ warning in GC_init
591 * Fix description of client promise for IGNORE_OFF_PAGE allocated objects
592 * Fix infinite loop in disable_gc_for_dlopen and GC_wait_for_gc_completion
593 * Fix missing extern C for __asan_default_options
594 * Fix store-and-dirty call in GC_CONS
595 * Fix typo in comment of GC_Thread_Rep.dummy
596 * Fix use of unset errno after pthread_sigmask calls
597 * Increment allocated objects count after GC_GCJ_MALLOC() in gctest
598 * Remove redundant GC_ATTR_UNUSED for GC_mark_and_push
599 * Workaround CSA null pointer dereference FP in invalidate_map of cord/de
600
601 Also, includes 7.6.18 changes
602
603
604 == [8.0.8] 2022-08-26 ==
605
606 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
607 * Define SUNOS5SIGS macro for kFreeBSD
608 * Distribute gc_disclaim.h in single-obj-compilation
609 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
610 * Do not name GCC intrinsics as C11 ones
611 * Do not send signal to thread which is suspended manually
612 * Eliminate 'buffer overflow detected' FP error in realloc_test
613 * Eliminate 'extension used' clang warning in sparc_mach_dep.S (configure)
614 * Eliminate 'function/data pointer conversion in expression' MSVC warning
615 * Eliminate 'implicit decl of _setjmp' gcc warning if -std=c11 on Cygwin
616 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
617 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
618 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
619 * Eliminate 'value exceeds maximum size' warnings in debug_malloc, huge_test
620 * Eliminate 'writing into region of size 0' gcc FP warning in realloc
621 * Eliminate division-by-zero FP warning in GC_ASSERT in reclaim_block
622 * Eliminate stringop-overflow gcc-12 warning in CORD__next
623 * Ensure typed objects descriptor is never located in the first word
624 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
625 * Fix 'GC_text_mapping not used' GCC warning if redirect malloc w/o threads
626 * Fix 'ISO C forbids conversion of function pointer to object' warning
627 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
628 * Fix 'undefined reference to __data_start' linker error on Linux/aarch64
629 * Fix GC_allocate_ml incorrect cleanup in GC_deinit if pthreads (MinGW)
630 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
631 * Fix GC_make_descriptor for zero length argument
632 * Fix GC_suspend_thread if called before thread destructor
633 * Fix GC_unmapped_bytes update in GC_unmap for Sony PS/3
634 * Fix SIGSEGV caused by dropped stack access from child process in gctest
635 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
636 * Fix abort in Win32 DllMain if PARALLEL_MARK
637 * Fix assertion about built-in AO_test_and_set_acquire on sparc64 (gcc-12)
638 * Fix assertion violation in GC_allow_register_threads on Windows
639 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
640 * Fix context saving when GC_suspend_thread(self)
641 * Fix data race in fail_proc1 of gctest
642 * Fix get_maps failure when GC_repeat_read returns zero
643 * Fix hang in GC_free if GC_PREFER_MPROTECT_VDB (Mingw64)
644 * Fix hang in select() called from suspend signal handler if TSan
645 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
646 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
647 * Fix incremental mode enabling in gctest if TEST_MANUAL_VDB
648 * Fix lock assertion violation in GC_find_limit if always multi-threaded
649 * Fix missing lock when GC_generate_random_valid_address is called
650 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
651 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
652 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
653 * Fix potential race if start_mark_threads called from threads in child
654 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
655 * Fix race between calloc_explicitly_typed and push_complex_descriptor
656 * Fix stack overflow in gctest on Alpine Linux/s390x
657 * Fix typo in debugging.html
658 * Fix typos in comments of .c files and gc.h
659 * Fix undefined __stack_base__ on UWP/arm64 (llvm-mingw)
660 * Make finalizer_closure pointer read/write atomic in malloc and callback
661 * Prevent (fix) parallel custom mark procs run in single-threaded clients
662 * Prevent changing of GC_markers_m1 value while collection in progress
663 * Refer to Makefile.direct instead of deleted Makefile file in README
664 * Relax assertion of hb_n_marks in reclaim_block if more than two markers
665 * Remove checking of RS6000 completely
666 * Remove duplicate check of MSWIN_XBOX1 in os_dep.c
667 * Remove non-working check of M68K in gctest
668 * Remove useless TSan W/A about read of mark_lock_holder for Windows
669 * Replace SSH cloning with HTTPS one in README
670 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
671 * Revert addition of msvc_dbg.h in include.am
672 * Support 'z' format modifier by CORD_vsprintf
673 * Update documentation of GC_RATE and MAX_PRIOR_ATTEMPTS
674 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
675 * Workaround TSan FP about race between generic_malloc and array_mark_proc
676 * Workaround TSan FP warning in finalized_malloc, push_unconditionally
677 * Workaround TSan FP warning in push_marked1/2/4, ptr_store_and_dirty
678 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
679 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage (tests)
680
681
682 == [8.0.6] 2021-09-28 ==
683
684 * Add loop to handle abort error like in suspend logic on Darwin
685 * Add support of OpenBSD/aarch64
686 * Add threading libraries to bdw-gc.pc
687 * Allocate start_info struct on the stack in GC_pthread_create
688 * Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
689 * Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
690 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
691 * Check _MSVC_LANG macro in addition to __cplusplus (MS VC)
692 * Compile C++ code with exception handling enabled in NT_MAKEFILE
693 * Define OS_TYPE and DATAEND for UWP targets
694 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
695 * Do not report 'Incremental GC incompatible' warning more than once
696 * Do not use Manual VDB mode if C malloc is redirected
697 * Do not use iOS private symbols
698 * Eliminate 'GC_non_gc_bytes is deprecated' warning in new_gc_alloc.h
699 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
700 * Eliminate 'cast between incompatible func types' warnings for FARPROC vars
701 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
702 * Eliminate 'gc_pthread_redirects.h should contain header guard' code defect
703 * Eliminate 'implicit declaration of sbrk' gcc warning if -std=c11 on Cygwin
704 * Eliminate 'possible loss of data' BCC and MS VC warnings
705 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
706 * Eliminate 'unused function' compiler warnings (GC_add_map_entry, GC_lock)
707 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
708 * Enable sbrk-to-mmap fallback on major supported Unix-like platforms
709 * Ensure process is running on one CPU core if AO ops are emulated with locks
710 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
711 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
712 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
713 * Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
714 * Fix 'Wrong __data_start/_end pair' if -Bsymbolic-functions used (Linux)
715 * Fix 'condition pred!=NULL is always true' compiler warning
716 * Fix 'external linkage required for var because of dllimport' error on MinGW
717 * Fix 'ulong undefined' compilation error on AIX
718 * Fix 'undefined reference to __data_start' linker error on RISC-V
719 * Fix 'use of undeclared BUS_PAGE_FAULT' compilation error on FreeBSD 12
720 * Fix 'write to GC log failed' error (Cygwin)
721 * Fix 'wrong finalization data' gctest failure on Windows
722 * Fix CMake build on macOS Catalina
723 * Fix GC_OPENBSD_THREADS definition (OpenBSD/hppa)
724 * Fix GC_proc_fd value in child process at fork (Solaris)
725 * Fix GC_with_callee_saves_pushed for Android NDK r23 (clang-12)
726 * Fix MPROTECT_VDB definition for single-threaded GC builds
727 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
728 * Fix STACKBOTTOM on 32-bit HP/UX 11.11
729 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
730 * Fix assertion violation in register_dynlib_callback on Android
731 * Fix build for OS X (CMake)
732 * Fix building of shared library with C++ support on MinGW
733 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
734 * Fix configure message about 'AIX gcc optimization fix'
735 * Fix cordtest build in SMakefile.amiga
736 * Fix data race regarding *rlh value in generic_malloc_many
737 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
738 * Fix gc_allocator.h compilation by Clang
739 * Fix gc_cflags variable name in configure (HP/UX)
740 * Fix handling of areas smaller than page size in GC_scratch_recycle
741 * Fix incorrect markup formatting in documentation
742 * Fix misaligned tlfs passed to AO_load on m68k
743 * Fix missing GC_quiet declaration in pcr_interface.c
744 * Fix missing gc_dlopen.c and specific.c in CMake script
745 * Fix missing scratch_last_end_ptr update (Irix)
746 * Fix mmap() failures on AIX, HP/UX and Haiku
747 * Fix overflow of scratch_free_ptr value
748 * Fix page_was_[ever_]dirty() for static roots (Solaris)
749 * Fix printf format specifier in simple_example.md
750 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
751 * Fix subexpression widening in memhash() of disclaim_weakmap_test
752 * Fix test_cpp failure caused by arbitrary link order (Win32)
753 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
754 * Fix various typos mostly in documentation files
755 * Fix word size, data start and alignment for OpenBSD/mips64(el)
756 * Include <alloca.h> when using alloca on AIX
757 * Limit number of unmapped regions (Linux and DragonFly)
758 * New macro to avoid system-wide new/delete inlining in gc_cpp.h (Win32)
759 * Prevent GetThreadContext failure (Windows)
760 * Prevent WARN of incompatible incremental GC if default or manual VDB
761 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
762 * Refactoring of WoW64 workaround (Win32)
763 * Refine GC_INIT documentation about its multiple invocation
764 * Refine GC_parallel documentation in gc.h
765 * Refine do_blocking() documentation in gc.h
766 * Remove a misleading comment about Solaris in gc.h
767 * Remove cord .h files from list of non-installed headers (Automake)
768 * Remove dead part of condition to define NEED_FIND_LIMIT in gc_priv.h
769 * Remove gcmt-lib generation by CMake
770 * Support MSYS builds by CMake and configure
771 * Update documentation about the incremental collector support
772 * Use HEURISTIC2 on OpenBSD when single-threaded
773 * Use pstat_getprocvm to determine main stack bottom on HP-UX
774 * Workaround 'expression is only useful for its side effects' WCC warning
775 * Workaround clang-3.8/s390x bug when processing __builtin_frame_address
776 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
777
778
779 == [8.0.4] 2019-03-02 ==
780
781 * Avoid a full GC when growing finalizer tables if in incremental mode
782 * Avoid potential race in hb_sz access between realloc and reclaim_block
783 * Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
784 * Avoid unexpected heap growth in gctest caused by GC_disable
785 * Ensure result of every variant of MS_TIME_DIFF has unsigned long type
786 * Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
787 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
788 * Fix 'unexpected mark stack overflow' abort in push_all_stack
789 * Fix 'wrong __data_start/_end pair' error on Android
790 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
791 * Fix GetThreadContext stale register values use if WoW64 (Win32)
792 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
793 * Fix thread_info() count argument value (OS X)
794 * Support de_win.c compilation by Makefile.direct (cord/de)
795
796
797 == [8.0.2] 2018-12-23 ==
798
799 * Abort with appropriate message if executable pages cannot be allocated
800 * Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
801 * Add paths to filenames mentioned in the copyright section in README
802 * Add test using disclaim notifiers to implement a weak map
803 * Adjust #error messages format
804 * Allow to force executable pages allocation in gctest
805 * Avoid potential 'macro redefinition' errors for config.h macros
806 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
807 * Check result of pthread_mutex_unlock in specific.c
808 * Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
809 * Default to non-executable memory allocation across all make scripts
810 * Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
811 * Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
812 * Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
813 * Do not use spin locks if AO test-and-set is emulated (pthreads)
814 * Document HANDLE_FORK macro optional usage in Makefile.direct
815 * Document assertion in the setters that used to return old value
816 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
817 * Eliminate 'casting signed to bigger unsigned int' CSA warning
818 * Eliminate 'different const qualifiers' MS VC warnings in cordbscs
819 * Eliminate 'function is never used' cppcheck warning for calloc/realloc
820 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
821 * Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
822 * Eliminate 'struct member is never used' cppcheck warnings in os_dep
823 * Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
824 * Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
825 * Eliminate redundant check in backwards_height
826 * Fix 'USE_MUNMAP macro redefinition' error for NaCl
827 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
828 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
829 * Fix 'too wide non-owner permissions are set for resource' code defect
830 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
831 * Fix GC_register_disclaim_proc for leak-finding mode
832 * Fix a deadlock in write_fault_handler if AO_or is emulated
833 * Fix comment typo in CMakeLists.txt
834 * Fix concurrent bitmap update in GC_dirty
835 * Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
836 * Fix executable memory allocation in GC_unix_get_mem
837 * Fix hbp overflow in GC_install_counts
838 * Fix linkage with a system libatomic_ops shared library
839 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
840 * Fix marking of finalizer closure object
841 * Fix marks and hb_n_marks consistency when disclaim returns true
842 * Fix memory allocation on GCF (Linux/x64)
843 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
844 * Fix test_cpp assertion violation in find-leak mode
845 * Fix tests linkage with internal atomic_ops.o
846 * Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
847 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
848 * New macro to suppress printing of leaked objects
849 * Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
850 * Prefix internal durango_get_mem symbol with 'GC_'
851 * Prevent double inclusion of javaxfc.h and private/specific.h
852 * Print relevant message in tests not appropriate for leak detection mode
853 * Reduce scope of local variables in GC_remove_all_threads_but_me
854 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
855 * Refine documentation in gc_disclaim.h
856 * Remove extra USE_MMAP definition for Interix
857 * Remove redundant header double-inclusion checks in the private headers
858 * Remove strlen calls with a constant string argument in msvc_dbg
859 * Specify register_disclaim_proc and finalized_malloc argument as non-null
860 * Support UWP/arm64 target
861 * Test marking of finalizer closure object in disclaim_test
862 * Turn off leak detection mode explicitly in cord/de
863 * Turn off parallel marker, thread-local allocation if used AO ops emulated
864 * Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
865 * Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
866 * Update NO_EXECUTE_PERMISSION documentation
867 * Update documentation about arm64 ABI in gcconfig.h
868 * Use AO_or in async_set_pht_entry_from_index if available
869 * Use GC_WORD_MAX macro across all C source files
870 * Use macro to operate on a flag residing in GC_stop_count
871 * Use standalone private macro to guard against ptr_t redefinition
872 * Workaround '#error' cppcheck messages in backgraph and private headers
873 * Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
874 * Workaround 'GC_dump function is never used' cppcheck warning
875 * Workaround 'local address assignment to a global variable' CSA warning
876 * Workaround 'local variable end shadows outer symbol' cppcheck warnings
877 * Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
878 * Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
879 * Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
880 * Workaround 'potential non-terminated string' false positive in cordbscs
881 * Workaround 'value of _MAX_PATH is unknown' cppcheck warning
882 * Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
883
884
885 == [8.0.0] 2018-09-05 ==
886
887 * Accept Android platform by both CMake and configure
888 * Access finalize_now atomically to avoid TSan warning without no-sanitize
889 * Acknowledge thread restart from suspend_handler (NetBSD)
890 * Add a sanity check that load_acquire and store_release are available
891 * Add AO primitives implementation to GC based on GCC atomic intrinsic
892 * Add assertion for suspend_ack_sem in start_world
893 * Add assertion to allocobj that live unmarked object cannot be reclaimed
894 * Add assertions about held lock when accessing all_bottom_indices
895 * Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
896 * Add assertions to finalize and threads support for MANUAL_VDB needs
897 * Add basic calculation of the total full-collection time
898 * Add check that gc_cpp operator delete is called (test_cpp)
899 * Add debug logging to new_thread about GC_threads hash table collisions
900 * Add GC prefix to _MSVC_DBG_H macro
901 * Add initial RISC-V support
902 * Add Makefile target to run all tests without test-driver
903 * Add test_atomic_ops to perform minimal testing of used atomic primitives
904 * Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
905 * Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
906 * Allocate non-executable memory by default (CMake)
907 * Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
908 * Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
909 * Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
910 * Allow disabling of dynamic loading in CMake script and configure
911 * Allow disabling of main static data registration in CMake and configure
912 * Allow disabling of threads discovery in CMake script and configure
913 * Allow gc_assertions enabling in CMake script
914 * Allow gc_debug, redirect_malloc, large_config options in CMake script
915 * Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
916 * Allow mmap enabling in CMake script and configure
917 * Allow passing -D DEFAULT_VDB to CFLAGS
918 * Allow subthreadcreate_test to be compiled with zero NTHREADS
919 * Allow to turn on spin locking even if thread-local allocations are used
920 * Always include gc_atomic_ops.h unless threads are disabled
921 * Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
922 * Avoid duplication of code handling pthreads case in configure
923 * Avoid potential data race during apply_to_each_object(reset_back_edge)
924 * Avoid potential data race during GC_dump execution
925 * Avoid potential race between malloc_kind and mark_thread_local_fls_for
926 * Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
927 * Avoid potential race in print_static_roots called by dyld_image_add/remove
928 * Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
929 * Avoid potential race when accessing size_map table
930 * Avoid potential race when storing oh_back_ptr during parallel marking
931 * Avoid SIGSEGV during GC_INIT on some Android devices
932 * Build only shared libraries by default (configure)
933 * Change pointer arguments of push_all[_eager]/conditional API to void* type
934 * Change type of hb_sz field (of hblkhdr) from size_t to word
935 * Check consistency of descr, adjust, clear arguments of GC_new_kind
936 * Check that GC_WIN32_PTHREADS is not specified for Cygwin
937 * Check thread_local is initialized before accessing thread_key
938 * Collapse multiple BCOPY_EXISTS macro definitions
939 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
940 * Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
941 * Compile checksums.c only if --enable-checksums is given (configure)
942 * Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
943 * Convert .html files to Markdown format
944 * Convert code of .c files to valid C++ code
945 * Decide between memory unmapping and mprotect-based dirty bits at runtime
946 * Declare t local variable in the block where the variable is used
947 * Define ABORT() using _CrtDbgBreak (if available) on Windows host
948 * Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
949 * Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
950 * Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
951 * Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
952 * Define GC_THREADS instead of GC_x_THREADS in Makefiles
953 * Define macro to specify the environment file name extension (Win32/WinCE)
954 * Define static resend_lost_signals(), restart_all() in pthread_stop_world
955 * Detect sigsetjmp() availability by configure
956 * Determine whether to use compiler TLS for kFreeBSD at compile time
957 * Do not call BCOPY and BZERO if size is zero
958 * Do not call sem_getvalue in stop_world if one thread exists
959 * Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
960 * Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
961 * Do not declare dl_iterate_phdr as weak for kFreeBSD
962 * Do not include windows.h when compiling gc_cpp.cc
963 * Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
964 * Do not merge dynamic root with the existing static one in add_roots_inner
965 * Do not print n_rescuing_pages value if incremental collections disabled
966 * Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
967 * Do not rebuild_root_index unless remove_root_at_pos is called
968 * Do not specify version info for test libraries (Automake)
969 * Do not use alternate thread library on Solaris
970 * Do not use asm in GC_pause
971 * Do not use PKG_CHECK_MODULES in configure
972 * Do not use system clock consistently if NO_CLOCK
973 * Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
974 * Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
975 * Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
976 * Eliminate 'comparison is always false' code defect in get_maps
977 * Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
978 * Eliminate 'potential unsafe sign check of a bitwise operation' code defect
979 * Enable alternative finalization interface (DISCLAIM) in all makefiles
980 * Enable compilation for Cygwin with MPROTECT_VDB
981 * Enable handle-fork and memory unmapping by default
982 * Enable mprotect-based incremental GC for Win64 (GCC)
983 * Expose API to control rate and max prior attempts of collect_a_little
984 * Expose API to control the minimum bytes allocated before a GC occurs
985 * Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
986 * Fix 'doc' files installation folder
987 * Fix build of cord tests as C++ files (Makefile.direct)
988 * Fix comment typos in backgraph.c, de.c, gcconfig.h
989 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
990 * Fix start_world not resuming all threads on Darwin
991 * Fix test_cpp failure in case GC_DEBUG is defined
992 * Group common defines for POSIX platforms in configure and CMake scripts
993 * Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
994 * Handle pthread restart signals loss if retry_signals
995 * Hide value stored to thread-specific entries for a test purpose
996 * Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
997 * Implement memory unmapping for Sony PS/3
998 * Imply configure --single-obj-compilation if --disable-static
999 * Include malloc.c in extra/gc.c after include gc_inline.h
1000 * Increase MAX_HEAP_SECTS (10 times) for large-config
1001 * Initial single-threaded support of Interix subsystem
1002 * Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
1003 * Initial support of TIZEN platform
1004 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1005 * Make extend_size_map() static (code refactoring)
1006 * Make subthreadcreate test compilable even without libatomic_ops
1007 * Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
1008 * Move de_win compiled resource files to cord/tests
1009 * Move pcr_interface.c, real_malloc.c to 'extra' folder
1010 * New API function (GC_dump_named) to produce named dumps
1011 * New API function (GC_is_incremental_mode)
1012 * New API function (get_expl_freed_bytes_since_gc)
1013 * New API function (get_size_map_at) to get content of size_map table
1014 * New API to stop and start the GC world externally
1015 * New API to turn on manual VDB at runtime
1016 * New field (expl_freed_bytes_since_gc) in public prof_stats_s
1017 * New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
1018 * New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
1019 * Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
1020 * Print time passed since GC initialization in GC_dump
1021 * Public API (GC_deinit) to allow Win32 critical sections deletion
1022 * Reduce probability of collision in threads hashtable for 64-bit targets
1023 * Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
1024 * Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
1025 * Reformat code and comments in gc_allocator.h
1026 * Remove 'dist' target from Makefile.direct
1027 * Remove a redundant check of __cplusplus in Symbian-specific .cpp files
1028 * Remove Android-specific code in gcconfig.h for M68K
1029 * Remove C++ WeakPointer and CleanUp API which lacks implementation
1030 * Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
1031 * Remove done_init static variable from fnlz_mlc.c
1032 * Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
1033 * Remove duplicated sample code in leak.md
1034 * Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
1035 * Remove GC code fragment (which already merged) from README.Mac
1036 * Remove GC_GNU_THREADS macro (HURD)
1037 * Remove GENERAL_MALLOC internal macro
1038 * Remove HIGH_BIT macro duplicating SIGNB
1039 * Remove lint-specific code
1040 * Remove Makefile KandRtest target (that supported K&R C compiler)
1041 * Remove MIN_WORDS macro from gc_priv.h
1042 * Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
1043 * Remove name of optional arguments of operator new and new[] in gc_cpp.h
1044 * Remove notes that K&R C compiler is unsupported
1045 * Remove PUSH_CONTENTS_HDR multi-line macro
1046 * Remove redundant check that clear_fl_marks argument is non-null
1047 * Remove redundant THREADS macro checks in alloc.c and gc_priv.h
1048 * Remove stubborn objects allocation code completely, remove stubborn.c
1049 * Remove unnecessary argument casts in add_roots_inner calls
1050 * Remove unnecessary type casts in n_set_marks
1051 * Remove unused USE_GENERIC macro definition and description
1052 * Remove version info in 'de' cord test application
1053 * Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
1054 * Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
1055 * Replace some FIXME items with TODO ones
1056 * Run command passed to if_not_there directly from Makefile.direct
1057 * Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
1058 * Skip grungy_pages update when mark state invalid to speedup read_dirty
1059 * Skip typed_test in gctest if NO_TYPED_TEST macro is defined
1060 * Support configure --disable-thread-local-alloc option (similar for CMake)
1061 * Support enable_checksums option in CMake script
1062 * Support Haiku multi-threaded build by CMake
1063 * Support threads for DragonFly in configure
1064 * Turn on 'atomic uncollectable' functionality by default (CMake)
1065 * Turn on GC assertions in NT_MAKEFILE for debug builds
1066 * Turn on gcj, disclaim and java finalization by default (CMake)
1067 * Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
1068 * Turn on incremental mode in cordtest and cord/de
1069 * Turn on incremental mode in disclaim_test, test_cpp and staticroots test
1070 * Turn on parallel marker by default for all multi-threaded builds
1071 * Update GC compilation and usage notes for Win32
1072 * Update shared libraries version info to differentiate against v7.6
1073 * Update top_index entry pointer only when the entry is constructed fully
1074 * Use __builtin_expect in SIZET_SAT_ADD macro
1075 * Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
1076 * Use __int64 instead of 'long long' in LONG_MULT if appropriate
1077 * Use __thread keyword for Android NDK r12b+ Clang (arm)
1078 * Use atomic allocation for leafs in reverse_test (gctest)
1079 * Use atomic load/store for the concurrently accessed variables in GC_lock
1080 * Use C11 static_assert if available
1081 * Use compiler atomic intrinsics by default if available (configure)
1082 * Use EXPECT FALSE for mark_from code documented as executed rarely
1083 * Use heap-allocated memory for local mark stack of non-marker thread
1084 * Use HOST_ANDROID define instead of PLATFORM_ANDROID
1085 * Use include gc.h with the angle brackets in the man page synopsis
1086 * Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
1087 * Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
1088 * Use noexcept specifier in gc_allocator and gc_cpp if C++11
1089 * Use same macro (NTHREADS) across all tests to specify number of threads
1090 * Use sigsetjmp() in setjmp_t tool if available
1091 * Use thread-local allocations for all multi-threaded builds
1092 * Use THREAD_EQUAL consistently to compare pthread_t values
1093 * Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
1094 * Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
1095 * Workaround Thread Sanitizer (TSan) false positive warnings
1096
1097
1098 == [7.6.22] 2024-09-07 ==
1099
1100 * Eliminate 'cast signed to bigger unsigned' CSA warnings in GC_find_limit
1101 * Fix GC_debug_realloc to support custom kind
1102 * Fix heap blocks size computation by GC_get_memory_use
1103 * Fix pointer relational comparison in GC_do_enumerate_reachable_objects
1104 * Prevent GC_noop_sink from scanning by the collector
1105
1106 Also, includes 7.4.28 changes
1107
1108
1109 == [7.6.20] 2024-02-03 ==
1110
1111 * Eliminate compiler warning of missing cast in LONG_MULT after shift
1112 * Fix 'sigset_t undeclared' MS VC error if pthreads-w32 is used
1113 * Fix lock assertion violation in GC_try_to_collect_inner on OS X
1114 * Fix missing outermost parentheses in macro definitions in huge test
1115 * Fix undefined GC_real_pthread_sigmask if redirect malloc on OS X
1116
1117 Also, includes 7.4.26 changes
1118
1119
1120 == [7.6.18] 2023-05-26 ==
1121
1122 * Fix IRIX5 defined wrongly on FreeBSD/mips
1123 * Fix alt-stack handling in GC_push_all_stacks if stack grows up
1124 * Fix data race in GC_heapsize_at_forced_unmap variable
1125
1126 Also, includes 7.4.24 changes
1127
1128
1129 == [7.6.16] 2022-08-26 ==
1130
1131 * Do not send signal to thread which is suspended manually
1132 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
1133 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
1134 * Fix context saving when GC_suspend_thread(self)
1135 * Fix data race in fail_proc1 of gctest
1136 * Fix GC_suspend_thread if called before thread destructor
1137 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
1138 * Fix lock assertion violation in GC_find_limit if always multi-threaded
1139 * Fix potential race if start_mark_threads called from threads in child
1140 * Make finalizer_closure pointer read/write atomic in malloc and callback
1141 * Prevent changing of GC_markers_m1 value while collection in progress
1142 * Replace SSH cloning with HTTPS one in README
1143 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
1144
1145 Also, includes 7.4.22 changes
1146
1147
1148 == [7.6.14] 2021-09-28 ==
1149
1150 * Add loop to handle abort error like in suspend logic on Darwin
1151 * Add support of OpenBSD/aarch64
1152 * Add threading libraries to bdw-gc.pc
1153 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
1154 * Do not use iOS private symbols
1155 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
1156 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
1157 * Eliminate 'possible loss of data' BCC and MS VC warnings
1158 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
1159 * Eliminate 'unused function GC_add_map_entry' compiler warning
1160 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
1161 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
1162 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
1163 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
1164 * Fix 'ulong undefined' compilation error on AIX
1165 * Fix 'undefined reference to __data_start' linker error on RISC-V
1166 * Fix 'write to GC log failed' error
1167 * Fix GC_proc_fd value in child process at fork (Solaris)
1168 * Fix MPROTECT_VDB definition for single-threaded GC builds
1169 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
1170 * Fix STACKBOTTOM on 32-bit HP/UX 11.11
1171 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
1172 * Fix assertion violation in register_dynlib_callback on Android
1173 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
1174 * Fix configure message about 'AIX gcc optimization fix'
1175 * Fix cordtest build in SMakefile.amiga
1176 * Fix data race regarding *rlh value in generic_malloc_many
1177 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
1178 * Fix gc_allocator.h compilation by Clang
1179 * Fix gc_cflags variable name in configure (HP/UX)
1180 * Fix handling of areas smaller than page size in GC_scratch_recycle
1181 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
1182 * Fix misaligned tlfs passed to AO_load on m68k
1183 * Fix missing GC_quiet declaration in pcr_interface.c
1184 * Fix missing gc_dlopen.c in CMake script
1185 * Fix missing scratch_last_end_ptr update (Irix)
1186 * Fix overflow of scratch_free_ptr value
1187 * Fix page_was_[ever_]dirty() for static roots (Solaris)
1188 * Fix printf format specifier in simple_example.html
1189 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
1190 * Fix test_cpp failure caused by arbitrary link order (Win32)
1191 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
1192 * Fix various typos mostly in documentation files
1193 * Fix word size, data start and alignment for OpenBSD/mips64(el)
1194 * Prevent GetThreadContext failure (Windows)
1195 * Prevent WARN of incompatible incremental GC if default or manual VDB
1196 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
1197 * Refactoring of WoW64 workaround (Win32)
1198 * Remove a misleading comment about Solaris in gc.h
1199 * Workaround 'expression is only useful for its side effects' WCC warning
1200 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
1201
1202
1203 == [7.6.12] 2019-03-01 ==
1204
1205 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
1206 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1207 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
1208 * Fix 'unexpected mark stack overflow' abort in push_all_stack
1209 * Fix 'wrong __data_start/_end pair' error on Android
1210 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
1211 * Fix GetThreadContext stale register values use if WoW64 (Win32)
1212 * Fix executable memory allocation in GC_unix_get_mem
1213 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
1214 * Fix thread_info() count argument value (OS X)
1215 * Update NO_EXECUTE_PERMISSION documentation
1216
1217
1218 == [7.6.10] 2018-12-13 ==
1219
1220 * Add paths to filenames mentioned in the copyright section in README
1221 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
1222 * Eliminate 'casting signed to bigger unsigned int' CSA warning
1223 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
1224 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1225 * Fix 'too wide non-owner permissions are set for resource' code defect
1226 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
1227 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
1228 * Fix GC_register_disclaim_proc for leak-finding mode
1229 * Fix a deadlock in write_fault_handler if AO_or is emulated
1230 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
1231 * Fix concurrent bitmap update in GC_dirty
1232 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
1233 * Fix hbp overflow in GC_install_counts
1234 * Fix linkage with a system libatomic_ops shared library
1235 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
1236 * Fix marking of finalizer closure object
1237 * Fix marks and hb_n_marks consistency when disclaim returns true
1238 * Fix memory allocation on GCF (Linux/x64)
1239 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1240 * Fix start_world not resuming all threads on Darwin
1241 * Fix test_cpp assertion violation in find-leak mode
1242 * Fix tests linkage with internal atomic_ops.o
1243 * Fix unneeded end_stubborn_change in disclaim_test
1244 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1245 * New macro to suppress printing of leaked objects
1246 * Prevent double inclusion of javaxfc.h and private/specific.h
1247 * Reduce scope of local variables in GC_remove_all_threads_but_me
1248 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
1249 * Refine documentation in gc_disclaim.h
1250 * Test marking of finalizer closure object in disclaim_test
1251 * Update documentation about arm64 ABI in gcconfig.h
1252 * Use AO_or in async_set_pht_entry_from_index if available
1253 * Use include gc.h with the angle brackets in the man page synopsis
1254
1255
1256 == [7.6.8] 2018-08-12 ==
1257
1258 * Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
1259 * Add NetBSD/aarch64 and initial RISC-V support
1260 * Adjust formatting of configure help messages and config.h comments
1261 * Avoid multiple 'getcontext failed' warnings if getcontext is broken
1262 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
1263 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
1264 * Do not call GC_dirty_inner unless GC_incremental
1265 * Do not use NULL in gc_inline.h
1266 * Eliminate 'cast between incompatible function types' compiler warning
1267 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
1268 * Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
1269 * Eliminate 'declaration of var hides global declaration' compiler warning
1270 * Eliminate 'language extension used' Clang warning in gc.h
1271 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
1272 * Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
1273 * Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
1274 * Eliminate 'switch statement contains no case label' compiler warning
1275 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
1276 * Eliminate duplicate clear_mark_bit call when removing disappearing link
1277 * Fast fail on invalid CPU parameter passed to NT_MAKEFILE
1278 * Fix 'collecting from unknown thread' abort in leak-finding mode
1279 * Fix 'pointer arithmetic with NULL' code defect in print_callers
1280 * Fix Borland version in documentation to match that in BCC_MAKEFILE
1281 * Fix comment about inv_sz computation in setup_header
1282 * Fix comments style in configure.ac and Makefile.am
1283 * Fix compilation by digimars.mak (DMC)
1284 * Fix compilation by WCC makefile
1285 * Fix compilation of darwin_stop_world for iOS 8+
1286 * Fix cords for MANUAL_VDB
1287 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
1288 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
1289 * Fix gctest in leak-finding mode
1290 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
1291 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
1292 * Fix mark stack overflow checking in push_selected
1293 * Fix missing GC_dirty calls for GC-allocated objects used internally
1294 * Fix missing GC_dirty invocation from debug_end_stubborn_change
1295 * Fix MSWIN32 macro redefinition (WCC)
1296 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
1297 * Fix new and delete operators definition for DigitalMars compiler
1298 * Fix NT_MAKEFILE for VS 2017
1299 * Fix potential null dereference in GC_CONS
1300 * Fix register_dynamic_libraries on Windows 10
1301 * Fix result computation in n_set_marks
1302 * Fix return type in GC_set_warn_proc API documentation
1303 * Fix tests for GC compiled with MANUAL_VDB
1304 * Fix the build for Emscripten
1305 * Fix typo in comment for CORD_ec_flush_buf prototype
1306 * Fix typos in ChangeLog and generic_malloc
1307 * Fix UNTESTED for multi-threaded API functions in gctest
1308 * Fix VirtualQuery call in case of malloc failure (Win32)
1309 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1310 * Keep pointer to the start of previous entry in remove_specific_after_fork
1311 * Move de_win compiled resource files to cord/tests
1312 * Never return null by C++ GC allocators and gc_cpp operator new
1313 * Perform thread_suspend in loop as it may be interrupted (Darwin)
1314 * Really abort if failed to read /proc for library registration (Linux)
1315 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
1316 * Remove duplicate local variable in reclaim_block
1317 * Remove information how to send bugs from README.cords file
1318 * Remove libatomic_ops license information
1319 * Remove unused USE_GENERIC macro definition and description
1320 * Suppress 'functions containing switch are not expanded inline' bcc warning
1321 * Suppress 'non-member operator new/delete may not be inline' VC++ warning
1322 * Turn on incremental collection in gctest also if MANUAL_VDB
1323 * Update copyright information in alloc.c, gc.c/h and the documentation
1324 * Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
1325 * Update NT_MAKEFILE usage information in README files for Win32 and Win64
1326 * Workaround 'class C does not have a copy constructor' cppcheck warning
1327 * Workaround 'function nested_sp is never used' cppcheck style warning
1328 * Workaround 'opposite expression on both sides of &' cppcheck style warning
1329 * Workaround 'template-id not supported in this context' compiler error (WCC)
1330
1331
1332 == [7.6.6] 2018-04-20 ==
1333
1334 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
1335 * Eliminate 'boolean result used in bitwise operation' cppcheck warning
1336 * Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
1337 * Explicitly unblock GC signals on GC initialization
1338 * Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
1339 * Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
1340 * Fix arguments delimiter in pcr_interface.c (PCR)
1341 * Fix assertion violation in DllMain of win32_threads
1342 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
1343 * Fix data race during apply_to_each_object(reset_back_edge)
1344 * Fix dbg_mlc.c/o file name in documentation
1345 * Fix gctest with musl libc on s390x
1346 * Fix include gc_gcj.h in thread_local_alloc.c
1347 * Fix man section number (3)
1348 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
1349 * Fix missing new-line in ABORT_ARG<n> definition
1350 * Fix missing SIGBUS handler setup for kFreeBSD
1351 * Fix null dereference in print_callers on backtrace_symbols failure
1352 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
1353 * Fix the collector hang when it is configured with --enable-gc-debug
1354 * Fix thread_suspend fail for threads registered from key destructor (OS X)
1355 * Fix type of local variables receiving result of PHT_HASH
1356 * Fix typo in AIX macro name
1357 * Fix typo in comment in specific.h
1358 * Fix unbounded heap growth in case of intensive disappearing links usage
1359 * Remove API symbols renaming in WCC_MAKEFILE
1360 * Support Haiku/x64 and Haiku/x86 hosts
1361 * Support threads for DragonFly in configure
1362 * Workaround 'address of auto-variable returned' cppcheck error
1363 * Workaround gctest hang on kFreeBSD (if thread-local allocations are on)
1364
1365
1366 == [7.6.4] 2018-01-26 ==
1367
1368 * Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
1369 * Change compiler invocation example in gc.man to use dynamic libgc
1370 * Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
1371 * Do not declare dl_iterate_phdr as weak for DragonFly
1372 * Fix 'cords' parallel build in Makefile.direct
1373 * Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
1374 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
1375 * Fix GC allocation mutex in child after a fork
1376 * Fix global operator delete definition for C++14 in gc_cpp
1377 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
1378 * Fix libgc version which was changed in linkage breaking way
1379 * Fix missing EOLn output in threadlibs tool
1380 * Fix threadlibs tool to output '-lpthread' for DragonFly
1381 * Prevent DATASTART redefinition for NaCl
1382 * Remove obsolete advice about linking with _DYNAMIC=0 (Linux)
1383
1384
1385 == [7.6.2] 2017-12-23 ==
1386
1387 * Add assertion that no hb_n_marks underflow occurs
1388 * Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
1389 * Add minimal testing of GC_set_bit (gctest)
1390 * Add more cases to huge_test to cover sizes close to word-type maximum
1391 * Add testing of new[]/delete[] (test_cpp)
1392 * Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
1393 * Adjust code indentation of calloc_explicitly_typed
1394 * Align local_mark_stack in help_marker explicitly
1395 * Allow custom TRACE_ENTRIES value
1396 * Allow gctest and thread_leak_test with zero NTHREADS
1397 * Avoid data race in finalized_count (gctest)
1398 * Code refactoring of divide-by-HBLKSIZE occurrences
1399 * Code refactoring of huge_test
1400 * Code refactoring of tests/subthread_create regarding AO add primitive
1401 * Compile thread_local_alloc only if multi-threaded build (Makefile.am)
1402 * Delete preprocessor output on make clean (Makefile.direct)
1403 * Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
1404 * Do not disable parallel mark for WRAP_MARK_SOME
1405 * Do not enable mprotect-based incremental mode if unmapping is on (gctest)
1406 * Do not install documentation if configure --disable-docs (new option)
1407 * Do not use tkill (Android)
1408 * Document base and size of objects allocated by finalized_malloc
1409 * Document configure 'syntax error' issue in README
1410 * Eliminate 'address of local variable returned' static analyzer warning
1411 * Eliminate 'array vs singleton' code defect in typed_test (gctest)
1412 * Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
1413 * Eliminate 'boolean result used in bitwise op' cppcheck false warning
1414 * Eliminate 'C-style pointer casting' cppcheck style warnings in test
1415 * Eliminate 'checking if unsigned variable is <0' cppcheck style warning
1416 * Eliminate 'class member var with name also defined in parent' warning
1417 * Eliminate 'comparison is always false' static analyzer warning in finalize
1418 * Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
1419 * Eliminate 'condition is always true' cppcheck style warning
1420 * Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
1421 * Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
1422 * Eliminate 'dereference of null' CSA false warning in array_mark_proc
1423 * Eliminate 'function result not used' code defect in GC_mark_local
1424 * Eliminate 'GC_collecting is set but never used' code defect (Win32)
1425 * Eliminate 'GC_record_fault is never used' cppcheck style warning
1426 * Eliminate 'integer shift by a negative amount' code defect in finalize
1427 * Eliminate 'label not used' cppcheck false warnings in GC_mark_X
1428 * Eliminate 'memory leak' code defect for scratch-allocated memory
1429 * Eliminate 'memory leak' code defect in remove_specific
1430 * Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
1431 * Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
1432 * Eliminate 'possible integer underflow' code defect (cord-de)
1433 * Eliminate 'potential overflow' static analyzer warning in test
1434 * Eliminate 'printf format specifies type void*' GCC pedantic warnings
1435 * Eliminate 'scope of variable can be reduced' cppcheck warnings
1436 * Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
1437 * Eliminate 'this statement may fall through' GCC warnings
1438 * Eliminate 'unnecessary comparison of static strings' cppcheck warning
1439 * Eliminate 'unsafe vsprintf is deprecated' compiler warning
1440 * Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
1441 * Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
1442 * Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
1443 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
1444 * Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
1445 * Eliminate 'value of DATASTART2 unknown' cppcheck info messages
1446 * Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
1447 * Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
1448 * Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
1449 * Eliminate 'write to memory that was const-qualified' code analyzer warning
1450 * Eliminate all 'scope of variable can be reduced' cppcheck style warnings
1451 * Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
1452 * Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
1453 * Eliminate CSA warning of non-virtual destructor in test_cpp base class
1454 * Eliminate CSA warning of staticroot that can be a local variable (tests)
1455 * Eliminate CSA warning of unmodified non-const static var (disclaim_test)
1456 * Eliminate redundant local variable in register_finalizer
1457 * Eliminate TSan (Thread Sanitizer) warnings in gctest
1458 * Eliminate UBSan warning of overflow during descr subtraction in mark_from
1459 * Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
1460 * Eliminate unsigned fl_builder_count underflow in mark_thread
1461 * Enable GC_is_tmp_root for all platforms
1462 * Execute more single-threaded GC tests by CMake
1463 * Expand tabs to spaces in de_win.rc (tests)
1464 * Export GC_dump_finalization/regions()
1465 * Export GC_is_tmp_root() and GC_print_trace[_inner]()
1466 * Export GC_print_free_list()
1467 * Fix '32-bit value shift followed by expansion to 64-bit' code defect
1468 * Fix 'GC_written_pages never read' code defect (GWW_VDB)
1469 * Fix 'label cannot be reached' static analyzer warning in disclaim_test
1470 * Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
1471 * Fix 'syntax error' reported by cppcheck for mach_dep
1472 * Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
1473 * Fix 'variable assigned a value that is never used' cppcheck style warnings
1474 * Fix 'void pointers in calculations: behavior undefined' cppcheck warning
1475 * Fix assertion violation about disabled cancel in try_to_collect_inner
1476 * Fix atomic_ops build in Makefile.direct for Solaris
1477 * Fix Clang static analyzer warning about not found gc_priv.h in extra files
1478 * Fix compilation error in get_main_stack_base (Emscripten)
1479 * Fix compilation for winpthreads if HANDLE_FORK
1480 * Fix compilation if configured with --enable-werror on OS X
1481 * Fix cord/de build in Makefile.direct (Linux)
1482 * Fix data race in a list referenced by A.aa (gctest)
1483 * Fix data race in collectable_count (gctest)
1484 * Fix data race in do_local_mark when comparing active_count to helper_count
1485 * Fix data race in GC_suspend/resume_thread
1486 * Fix data race in last_stop_count access (suspend_handler_inner)
1487 * Fix data race in make_descriptor when setting explicit_typing_initialized
1488 * Fix data race in mark_thread when updating mark_no
1489 * Fix data race when getting object size in explicitly-typed allocators
1490 * Fix deadlock in GC_suspend_thread
1491 * Fix gctest failure for Darwin if CPPCHECK is defined
1492 * Fix lack of barriers to synchronize memory for suspend_handler
1493 * Fix marking of disclaim-reachable objects in the incremental mode
1494 * Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
1495 * Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
1496 * Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
1497 * Fix page calculation in checksums
1498 * Fix parallel build in Makefile.direct
1499 * Fix test_cpp and c++ parallel build in Makefile.direct
1500 * Fix typo in comment of GC_mark_some
1501 * Fix typos in cdescr.html and README.sgi
1502 * Make GC_INIT optional for clients even if thread-local allocations enabled
1503 * Match uclinux pattern in configure
1504 * Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
1505 * Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
1506 * New API function (GC_is_init_called) to check if BDWGC is initialized
1507 * New target (check-cpp) in Makefile.direct
1508 * Prevent abort in register_data_segments for Symbian and Emscripten
1509 * Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
1510 * Print realloc_count value in gctest
1511 * Put invariant name in quotes to make mark_state comments clearer
1512 * Refine configure messages when checking for compiler option support
1513 * Remove extraneous semicolons after AC_MSG_WARN (configure)
1514 * Remove page_was_dirty and remove_protection duplicate definitions
1515 * Remove unnecessary type casts of printf arguments to unsigned long
1516 * Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
1517 * Rename 'test' to 'check' target in Makefile.direct
1518 * Replace deprecated rewind to fseek in cordxtra
1519 * Report gcc/clang pedantic warnings (configure)
1520 * Skip thread suspend/resume API testing for Tru64 (OSF1)
1521 * Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
1522 * Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
1523 * Suppress 'tainted string passed to vulnerable operation' false defects
1524 * Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
1525 * Test GC initialization from non-main thread on FreeBSD and NetBSD
1526 * Test GCJ object creation with length-based descriptor (gctest)
1527 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
1528 * Update README regarding make cords with Makefile.direct
1529 * Update README to use autogen.sh on build from the source repository
1530 * Update shared libraries version info to differentiate against v7.4
1531 * Use mprotect instead of mmap in GC_unmap() on Cygwin
1532 * Use same style of include gc.h in documentation
1533 * Workaround '!GC_page_size is always false' cppcheck style warning
1534 * Workaround '#error' cppcheck error messages
1535 * Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
1536 * Workaround 'array compared to 0', 'untrusted loop bound' false defects
1537 * Workaround 'bad address arithmetic' static analysis tool false positive
1538 * Workaround 'checking if unsigned value is negative' cppcheck warning
1539 * Workaround 'checking unsigned value is negative' code defect in mark_from
1540 * Workaround 'comparison of identical expressions' false code defects
1541 * Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
1542 * Workaround 'condition is always false' cppcheck warning in get_next_stack
1543 * Workaround 'condition is always true' cppcheck style warnings in GC_init
1544 * Workaround 'function is never used' cppcheck style warnings
1545 * Workaround 'insecure libc pseudo-random number generator used' code defect
1546 * Workaround 'int shift by negative amount' false code defect in finalize
1547 * Workaround 'local variable size too big' static analyzer warning
1548 * Workaround 'memory leak: result' cppcheck false error (POSIX)
1549 * Workaround 'null pointer dereference' false positive in push_next_marked
1550 * Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
1551 * Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
1552 * Workaround 'obsolete function alloca() called' cppcheck warnings
1553 * Workaround 'passing untyped NULL to variadic function' cppcheck warning
1554 * Workaround 'pointer used before comparison to null' code defect (pthread)
1555 * Workaround 'possible null pointer dereference' cppcheck warnings
1556 * Workaround 'potential multiplication overflow' code defect in de_win (cord)
1557 * Workaround 'redundant assignment of *result to itself' cppcheck warning
1558 * Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
1559 * Workaround 'same expression on both sides of ==' cppcheck style warning
1560 * Workaround 'same expression on both sides of OR' cppcheck style warning
1561 * Workaround 'struct member is never used' cppcheck style warnings
1562 * Workaround 'tainted int used as loop bound' static analysis tool warning
1563 * Workaround 'Uninitialized variable' cppcheck errors
1564 * Workaround 'unused variable' cppcheck style warnings
1565 * Workaround 'va_list used before va_start' cppcheck error in cord
1566 * Workaround 'value of macro unknown' cppcheck info messages
1567 * Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
1568 * Workaround 'value of SIGBUS unknown' cppcheck info messages
1569 * Workaround 'value of WINAPI unknown' cppcheck info messages
1570 * Workaround 'variable hides enumerator with same name' cppcheck warnings
1571 * Workaround 'variable reassigned before old value used' cppcheck warnings
1572 * Workaround 'waiting while holding lock' code defect in stop_world (Unix)
1573 * Workaround false 'uninitialized var use' code defect (initsecondarythread)
1574
1575 Also, includes 7.4.6 changes
1576
1577
1578 == [7.6.0] 2016-08-02 ==
1579
1580 * ABORT_ARGn log details at INFO level (Android)
1581 * Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
1582 * Add API function to calculate total memory in use by all GC blocks
1583 * Add API function to set/modify GC log file descriptor (Unix)
1584 * Add alloc_size attribute to GC_generic_malloc
1585 * Add alt-stack registration support
1586 * Add assertion for GC_new_kind boolean arguments
1587 * Add assertion on lock status to GC_alloc_large and its callers
1588 * Add build scripts for VC 9 (Win32/64)
1589 * Add build system plumbing for building with -Werror
1590 * Add incremental GC support for Darwin/arm64
1591 * Add profiling callback events to indicate start/end of reclaim phase
1592 * Add support for enumerating the reachable objects in the heap
1593 * Add toggle-ref support (following Mono GC API)
1594 * Added instructions to README.md for building from git
1595 * Adjust code indentation of malloc/calloc/str[n]dup
1596 * Allow fork() automatic handling on Android with API level 21+
1597 * Allow specific TLS attributes for GC_thread_key
1598 * Allow thread local allocations from within pthread TLS destructors
1599 * Allow to force GC_dump_regularly set on at compilation
1600 * Altera NIOS2 support
1601 * Change 'cord' no-argument functions declaration style to ANSI C
1602 * Check DATASTART is less than DATAEND even assertions off
1603 * Check for execinfo.h by configure
1604 * Code refactoring of GC_push_finalizer/thread/typed_structures
1605 * Code refactoring regarding 'data start' definition for FreeBSD
1606 * Consistently set type of DATASTART/END to ptr_t (code refactoring)
1607 * Consistently use int[] type for '_end' symbol (code refactoring)
1608 * Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
1609 * Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
1610 * Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
1611 * Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
1612 * Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
1613 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
1614 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
1615 * Document GC_register_my_thread returned value
1616 * Dump the block information in CSV format
1617 * Eliminate redundant *flh check for null in GC_allocobj
1618 * Enable atomic-uncollectable in operator new in gc_cpp.h
1619 * Enable build with musl libc
1620 * Enable gc.h inclusion by client without implicit include windows.h (Win32)
1621 * Enable huge_test for Win64 (and LLP64 target)
1622 * Enable thread-local storage for Android Clang
1623 * Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
1624 * Export GC_push_all_eager, GC_push_finalizer_structures
1625 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
1626 * Fix assertion in GC_mark_from for non-heap regions
1627 * Fix compilation for Android clang/arm with bfd linker
1628 * Fix integer shift undefined behavior in GC_init_explicit_typing
1629 * Fix missing new-line and redundant trailing dot in WARN messages
1630 * Fix STACKBOTTOM for Solaris 11/x86
1631 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
1632 * Fix unchecked fork() result in gctest (Unix, Cygwin)
1633 * Fix user-defined signals drop by marker threads
1634 * Fix various typos in comments and documentation
1635 * FreeBSD/arm support improvement
1636 * GC_make_descriptor code refactoring (eliminate two local variables)
1637 * GC_malloc[_atomic] global and thread-local generalization with kind
1638 * GC_malloc_[atomic_]uncollectable generalization
1639 * GC_scratch_alloc code refactoring (and WARN message improvement)
1640 * Group all compact fields of GC_arrays to fit in single page
1641 * Handle load_segs overflow in register_dynlib_callback gracefully
1642 * Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
1643 * Implement event callbacks for profiling (following Mono GC API)
1644 * Implement the finalization extension API
1645 * Implement thread suspend/resume API (Linux threads only)
1646 * Improve documentation for disappearing links in gc.h
1647 * Make heap growth more conservative after GC_gcollect_and_unmap call
1648 * Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
1649 * Move MessageBox invocation code from GC_abort to a separate routine (Win32)
1650 * NaCl/arm initial support; NaCl runtime fixes for other CPUs
1651 * New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
1652 * New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
1653 * New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
1654 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
1655 * Re-implement GC_finalized_malloc using GC_malloc_kind
1656 * Refactoring of android_thread_kill/pthread_kill calls
1657 * Refactoring of GC_Xobjfreelist (use single array to keep free lists)
1658 * Refactoring of thread-local *_freelists (use single array of free lists)
1659 * Refine description in README how to build from source repository
1660 * Refine GC_free_space_divisor comment regarding its initial value
1661 * Reformat code of gc_cpp.cc/h
1662 * Remove 'opp' local variable in GC_malloc_X
1663 * Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
1664 * Remove code commented out by 'ifdef UNDEFINED'
1665 * Remove hb_large_block field (use 1 extra bit of hb_flags instead)
1666 * Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
1667 * Remove redundant casts in GC_generic_or_special_malloc and similar
1668 * Remove unsupported FreeBSD/ia64 case from gcconfig.h file
1669 * Remove unused GC_gcjdebugobjfreelist
1670 * Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
1671 * Replace non-API occurrences of GC_word to word (code refactoring)
1672 * Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
1673 * Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
1674 * Standalone profiling callback for threads suspend/resume
1675 * Support (add machine description for) TILE-Gx and TILEPro targets
1676 * Support build for Android 64-bit (arm64, mips64, x64)
1677 * Support FreeBSD/aarch64, FreeBSD/mips
1678 * Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
1679 * Support MinGW build in scripts
1680 * Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
1681 * Use magic header on objects to improve disclaim_test
1682 * Workaround 'sa_sigaction member missing' compiler error (Android/x32)
1683 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
1684 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
1685
1686 Also, includes 7.4.4 changes
1687
1688
1689 == [7.4.28] 2024-09-07 ==
1690
1691 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
1692 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
1693 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
1694 * Fix GC_print_trace_inner to print the last element of the circular buffer
1695 * Fix cordtst2.tmp file deletion in cordtest on Windows
1696 * Fix double lock in GC_malloc called from backtrace()
1697 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
1698 * Fix null pointer dereference in GC_is_visible if type_descr is null
1699 * Fix per_object_helper() after changing hb_sz units
1700 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
1701 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
1702 * Fix potential address overflow in GC_add_to_heap
1703 * Fix potential buffer overrun during read in GC_text_mapping
1704 * Fix typos in comments
1705 * Prevent redirected malloc call from a garbage collection routine
1706 * Remove redundant dirty/reachable_here calls in GC_malloc_explicitly_typed
1707 * Update and fix diagrams describing the tree structure for pointer lookups
1708
1709
1710 == [7.4.26] 2024-02-03 ==
1711
1712 * Eliminate 'unused parameter' gcc warning in free() if IGNORE_FREE
1713 * Eliminate 'unused value' gcc warnings in init_global_static_roots (Symbian)
1714 * Fix 'implicit declaration of function sbrk' gcc error on Symbian
1715 * Fix 'unused GC_set_and_save_fault_handler' warning on OS X
1716 * Fix GC_push_stack_for() to push also Xmm registers on Windows/x64
1717 * Fix MACH_TYPE macro redefinition on Symbian/arm
1718 * Fix missing GC_pthread_sigmask on FreeBSD and NetBSD
1719 * Fix missing redirect and implementation of pthread_sigmask() on OpenBSD
1720
1721 Also, includes 7.2r changes.
1722
1723
1724 == [7.4.24] 2023-05-25 ==
1725
1726 * Adjust CORD_ec comment placement in ec.h
1727 * Do not mix debug and non-debug allocations in disclaim tests
1728 * Eliminate 'cast signed to bigger unsigned' CSA warning in WARN calls
1729 * Ensure GC_NO_PTHREAD_SIGMASK defined if no GC_pthread_sigmask prototype
1730 * Fix GC_thread_is_registered for finished threads
1731 * Fix GC_unregister_my_thread call before GC functions usage in gctest
1732 * Fix missing lock while updating GC_in_thread_creation in GC_exit_check
1733 * Fix null pointer dereference in TRACE_TARGET
1734 * Fix of GC_bytes_allocd increment in GC_generic_malloc_inner
1735 * Remove redundant 'ifdef THREADS' around LOCK/UNLOCK in call_with_alloc_lock
1736
1737 Also, includes 7.2q changes.
1738
1739
1740 == [7.4.22] 2022-08-26 ==
1741
1742 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
1743 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
1744 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
1745 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
1746 * Fix SIGSEGV caused by dropped stack access from child process in gctest
1747 * Fix abort in Win32 DllMain if PARALLEL_MARK
1748 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
1749 * Fix comment in GC_init regarding GC_init_parallel call
1750 * Fix stack overflow in gctest on Alpine Linux/s390x
1751 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
1752 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
1753 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage
1754
1755 Also, includes 7.2p changes.
1756
1757
1758 == [7.4.20] 2021-09-28 ==
1759
1760 * Do not hold GC_fault_handler_lock when in Sleep (Windows)
1761 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
1762 * Eliminate 'unused function GC_add_map_entry' compiler warning
1763 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
1764 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
1765 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
1766 * Fix configure message about 'AIX gcc optimization fix'
1767 * Fix cordtest build in SMakefile.amiga
1768 * Prevent GetThreadContext failure (Windows)
1769 * Refactoring of WoW64 workaround (Win32)
1770
1771 Also, includes 7.2o changes
1772
1773
1774 == [7.4.18] 2019-03-01 ==
1775
1776 * Fix 'wrong __data_start/_end pair' error on Android
1777 * Fix thread_info() count argument value (OS X)
1778
1779 Also, includes 7.2n changes
1780
1781
1782 == [7.4.16] 2018-12-13 ==
1783
1784 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1785 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
1786 * Fix GC_register_disclaim_proc for leak-finding mode
1787 * Fix concurrent bitmap update in GC_dirty
1788 * Fix marking of finalizer closure object
1789 * Fix marks and hb_n_marks consistency when disclaim returns true
1790 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1791 * Refine documentation in gc_disclaim.h
1792
1793 Also, includes 7.2m changes
1794
1795
1796 == [7.4.14] 2018-08-11 ==
1797
1798 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
1799 * Do not call GC_dirty_inner unless GC_incremental
1800 * Eliminate 'cast between incompatible function types' compiler warning
1801 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
1802 * Eliminate 'language extension used' Clang warning in gc.h
1803 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
1804 * Eliminate 'switch statement contains no case label' compiler warning
1805 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
1806 * Eliminate duplicate clear_mark_bit call when removing disappearing link
1807 * Fix 'collecting from unknown thread' abort in leak-finding mode
1808 * Fix compilation by digimars.mak (DMC) and by WCC makefile
1809 * Fix cords for MANUAL_VDB
1810 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
1811 * Fix gctest in leak-finding mode
1812 * Fix missing GC_dirty calls for GC-allocated objects used internally
1813 * Fix missing GC_dirty invocation from debug_end_stubborn_change
1814 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
1815 * Fix typos in ChangeLog and generic_malloc
1816 * Keep pointer to the start of previous entry in remove_specific_after_fork
1817 * New API function (GC_is_init_called) to check if BDWGC is initialized
1818 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
1819 * Remove duplicate local variable in reclaim_block
1820 * Remove libatomic_ops license information from README
1821 * Workaround 'dynamic exception specifications deprecated in C++11' warning
1822
1823 Also, includes 7.2l changes
1824
1825
1826 == [7.4.12] 2018-04-19 ==
1827
1828 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
1829 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
1830 * Fix gctest with musl libc on s390x
1831 * Fix missing new-line in ABORT_ARG<n> definition
1832 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
1833 * Fix type of local variables receiving result of PHT_HASH
1834 * Remove API symbols renaming in WCC_MAKEFILE
1835
1836 Also, includes 7.2k changes
1837
1838
1839 == [7.4.10] 2018-01-22 ==
1840
1841 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
1842 Also, includes 7.2j changes
1843
1844
1845 == [7.4.8] 2017-12-22 ==
1846
1847 * Eliminate 'this statement may fall through' GCC warnings
1848 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
1849 * Fix data race in make_descriptor when setting explicit_typing_initialized
1850 * Fix marking of disclaim-reachable objects in the incremental mode
1851 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
1852 Also, includes 7.2i changes
1853
1854
1855 == [7.4.6] 2017-10-26 ==
1856
1857 * Add configure --enable-gcov option (enable code coverage analysis)
1858 * Add configure check whether to define NO_GETCONTEXT
1859 * Adjust GC_memalign comment
1860 * Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
1861 * Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
1862 * Avoid busy waiting in mark_thread while GC_parallel is false
1863 * Better document minimum value of size argument for typed allocations
1864 * Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
1865 * Consistently use 'msec' instead of 'ms' in comments in pthread_support
1866 * Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
1867 * Do not produce .tar.bz2 distribution file (configure)
1868 * Do not require libatomic_ops for single-threaded builds (configure)
1869 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
1870 * Document GWW_VDB in gcdescr.html
1871 * Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
1872 * Eliminate 'conditional expression is always true' code defect in GC_init
1873 * Eliminate 'FP divide-by-zero' static analyzer warning
1874 * Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
1875 * Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
1876 * Eliminate 'ISO C forbids object to function pointer conversion' warning
1877 * Eliminate 'locally defined symbol imported' MS linker warnings (cord)
1878 * Eliminate 'null dereference' code defect warning in register_finalizer
1879 * Eliminate 'possible loss of data' compiler warnings (MS VC)
1880 * Eliminate 'printf format specifier mismatch' compiler warning (tools)
1881 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
1882 * Eliminate 'value stored is never read' warning of Clang static analyzer
1883 * Eliminate duplicate log messages in GC_mark_from
1884 * Eliminate most of collisions in GC_threads on Linux/x64
1885 * Ensure GC initialized when atfork_prepare is called by client
1886 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
1887 * Fix 'bogus LR' detection in FindTopOfStack (Darwin)
1888 * Fix 'execvp argument incompatible pointer type' compiler warning (tools)
1889 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
1890 * Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
1891 * Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
1892 * Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
1893 * Fix 'ISO C90 forbids mixed declarations and code' compiler warning
1894 * Fix 'missing libc-version.h' build error (uClibc/x86[_64])
1895 * Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
1896 * Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
1897 * Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
1898 * Fix (adjust) GC_scratch_alloc actual argument type
1899 * Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
1900 * Fix finalize.c compilation in 'strict ANSI' mode
1901 * Fix GC shared library tests failure related to dl_iterate_phdr (musl)
1902 * Fix gc.h compliance to strict ANSI (pthreads)
1903 * Fix GC_bytes_allocd incrementation in case of allocation failure
1904 * Fix GC_jmp_buf multiple definition
1905 * Fix GC_noop6 definition to avoid its calls to be optimized away
1906 * Fix gctest failure if PARALLEL_MARK (musl)
1907 * Fix gctest thread stack overflow (musl-gcc)
1908 * Fix initsecondarythread_test runtime failure if GC compiled w/o threads
1909 * Fix lack of 2 trailing zeros in _MSC_VER numbers
1910 * Fix local variable declarations in disclaim_bench
1911 * Fix missing #error pragma
1912 * Fix missing .exe for disclaim test filenames in Makefile (MinGW)
1913 * Fix missing atomic/[un]collectable/realloc_count increments in gctest
1914 * Fix missing new-line and redundant trailing dot in WARN messages
1915 * Fix missing new-line at format strings end in subthread_create test
1916 * Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
1917 * Fix potential overflow in decrement when computing GC_markers_m1
1918 * Fix printf format specifiers in extra files (cppcheck warnings)
1919 * Fix pthread_start compilation if single-obj-compilation (Linux)
1920 * Fix register_finalizer call in disclaim_bench for GC_DEBUG
1921 * Fix static assertion violation in LONG_MULT for 64-bit targets
1922 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
1923 * Fix thread id leaks in subthread_create and threadkey_test
1924 * Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
1925 * Fix tools/setjmp_t to prevent nested_sp inlining
1926 * Fix typo in CHECK_GCLIB_VERSION name (test)
1927 * Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
1928 * Fix unchecked fork() result in gctest (Unix, Cygwin)
1929 * Improve detection of internal libatomic_ops (configure)
1930 * Move libraries version info to the beginning of Makefile.am
1931 * Prevent abort in register_data_segments for Symbian
1932 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
1933 * Refine Makefile.direct comment about multi-threaded GC build
1934 * Refine README about library source downloading
1935 * Refine should_invoke_finalizers documentation
1936 * Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
1937 * Remove non-existent configure option in simple_example.html
1938 * Replace C++ style comments to C ones, remove commented out code (extra)
1939 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
1940 * Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
1941 * Suppress 'tainted string passed to vulnerable operation' false defects
1942 * Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
1943 * Update bdwgc mailing list online archive link in documentation
1944 * Update shared libraries version info to differentiate against v7.2
1945 * Use AC_DEFINE for defining NO_GETCONTEXT in configure
1946 * Workaround 'index out of bounds' UBSan false warning in push_marked
1947 * Workaround 'mmap() resource handle leak' static analyzer warning
1948 * Workaround 'redundant assignment of *result to itself' cppcheck warning
1949 * Workaround 'resource leak' error reported by cppcheck (tools, test)
1950 Also, includes 7.2h changes
1951
1952
1953 == [7.4.4] 2016-05-25 ==
1954
1955 * Allow GC_FAST_MALLOC_GRANS() multiple use in a function
1956 * Also enable the TSX workaround for Linux/x86
1957 * Avoid unstructured procfs on Solaris
1958 * Change cord/de main() declaration style from K-R to ANSI C
1959 * Change no-argument functions declaration style to ANSI C (cord)
1960 * Do not include sigcontext.h and asm/sigcontext.h
1961 * Eliminate 'divide by zero' compiler warning in cordtest
1962 * Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
1963 * Eliminate warnings detected by Cppcheck in cord de[_win]
1964 * Fix 'comparison of non-null parameter is always false' warning (Clang)
1965 * Fix 'CORD_iter5 unused result' code defect in cordxtra
1966 * Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
1967 * Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
1968 * Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
1969 * Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
1970 * Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
1971 * Fix 'statement unreachable' compiler warning in GC_mark_from
1972 * Fix 'statement unreachable' compiler warning in memalign
1973 * Fix 'unused label' compiler warning in cord/de
1974 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
1975 * Fix 'variable unused' warning in GC_save_callers
1976 * Fix 'visibility attribute not supported' GCC warning (IBM AIX)
1977 * Fix CMake warning about CMP0054 by unquoting instances of HOST
1978 * Fix Cygwin64 build
1979 * Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
1980 * Fix Makefile.direct for Cygwin
1981 * Fix __alloc_size__ availability detection (Clang)
1982 * Fix abort message in GC_move_long_link
1983 * Fix and code refactoring of lock elision workaround (Linux/x64)
1984 * Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
1985 * Fix data race in GC_init_explicit_typing
1986 * Fix gc.mak regarding msvc_dbg and test (MSVC)
1987 * Fix missing error handling of pthread_attr_init/getstacksize
1988 * Fix missing error handling of pthreads_mutex_init and cond_wait
1989 * Fix missing numeric casts in cord
1990 * Fix potential left shift overflows in finalize.c (64-bit targets)
1991 * Fix pthreads-win32 name in comments and documentation
1992 * Fix setup_mark_lock missing prototype
1993 * Fix unchecked fcntl() result
1994 * Fix unchecked pointer dereference in check_ints (gctest)
1995 * Fix unchecked pthread_join() result in threadkey_test
1996 * Fix unchecked sigdelset() result in pthread_support
1997 * Fix undefined PTRFREE/NORMAL in gc_inline.h
1998 * Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
1999 * Relax mark_mutex attribute needed to disable elision (Linux/x64)
2000 * Remove (deprecate) TODO file
2001 * Remove code duplication in GC_realloc
2002 * Remove duplicate new-line in OUT_OF_MEMORY message (cord)
2003 * Remove references to missing linux_threads.c from documentation
2004 * Revert "Move asm machine-dependent files to 'src' folder" (partly)
2005 * Support Android API level 21
2006 * Update compiler options in gc.mak (Win32)
2007 * Use mmap instead of sbrk (Hurd)
2008 * Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
2009 * Workaround 'identical expr on both sides of bitwise op' warning
2010 * Workaround Linux NTPL lock elision bug
2011 * Workaround false warning about unreachable code path
2012 * Workaround invalid '_end' symbol on Android clang 3.5+
2013 Also, includes 7.2g changes
2014
2015
2016 == [7.4.2] 2014-06-03 ==
2017
2018 * Add config option to use STGRTMIN-based signals for thread suspend/resume
2019 * Allow parallel mark to be enabled on powerpc-linux systems
2020 * Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
2021 * Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
2022 * Fix 'attribute declaration must precede definition' warning (clang-3.1)
2023 * Fix (enable) Cygwin-64 build
2024 * Fix GC_finalized_malloc failure on disclaim_test
2025 * Fix GC_sig_suspend initialization when non-constant SIGRTMIN used
2026 * Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
2027 * Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
2028 * Fix data roots registration for Android/x86 and NDK ARM 'gold' linker
2029 * Fix find stackbottom on BlueGene P/Q systems
2030 * Fix machdep .lo files path in configure (SPARC, IA-64)
2031 * Fix ok_init assignment (missing cast) in GC_new_kind_inner
2032 * Fix typos in names in AUTHORS and ChangeLog files
2033 * Remove barrett_diagram file duplicated by tree.html
2034 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
2035 * Restore contribution information for ancient releases in ChangeLog
2036 Also, includes 7.2f changes
2037
2038
2039 == [7.4.0] 2013-11-17 ==
2040
2041 * Add 'bytes reclaimed' counters to public GC_prof_stats_s
2042 * Add AArch64 (64-bit ARM) target support
2043 * Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality
2044 * Add GC_get_prof_stats[_unsafe]() to GC public API
2045 * Add GC_push_all/conditional() to GC public API
2046 * Add assertion on number_of_objs to GC_extend_size_map
2047 * Add assertion to GC_enable() ensuring no counter underflow
2048 * Add assertion to LOCK definition that lock is not already held
2049 * Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR
2050 * Add double-lock assertion to GC_acquire_mark_lock
2051 * Add manual POSIX fork handling support (Android)
2052 * Add note about 'pkg-config' solving problem with autoconf 2.68 or older
2053 * Add public GC_set/get_abort_func to replace default GC_on_abort
2054 * Add public GC_start_mark_threads() to allow parallel marker in fork child
2055 * Add public setter and getter for GC_push_other_roots
2056 * Add support of Android logger
2057 * Add tests for GC_register/move/unregister_long_link
2058 * Add thread suspend/resume signals public setters (POSIX threads)
2059 * Added long weakref support
2060 * Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h
2061 * Adjust README.md title and references to doc .html files in it
2062 * Adjust build scripts to enable additional test library in staticrootstest
2063 * Adjust logged messages in start_mark_threads and GC_thr_init
2064 * Adjust printf format specifiers in GC_print_trace
2065 * Allow not to rely on __data_start value (Linux)
2066 * Allow pthread_kill error code logging in GC_suspend/resume (debugging)
2067 * Allow to compile GC_inner_start_routine aside from extra/gc.c
2068 * Allow to omit libc atexit() call
2069 * Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
2070 * Better document GC_warn_proc in gc.h
2071 * Call GC_on_abort (with NULL argument) on exit(1)
2072 * Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats
2073 * Change policy regarding version numbers ("micro" part instead of "alpha")
2074 * Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style
2075 * Check GC_base result in GC_print_all_smashed_proc
2076 * Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)
2077 * Check traceable_allocator.allocate result before dereference in test_cpp
2078 * Code refactoring of GC_x_printf (move shared code to macro)
2079 * Convert readme to markdown
2080 * Default to use libc_stack_end in single-threaded GC on glibc targets
2081 * Define GC_VSNPRINTF internal macro in misc.c (code refactoring)
2082 * Define functions in darwin_semaphore.h as inline instead of static
2083 * Define old_bus_handler static variable only if used (Unix)
2084 * Detect dladdr() presence by configure
2085 * Disable find-leak GC_gcollect on GC abnormal EXIT
2086 * Do not define _setjmp/_longjmp macros in mach_dep.c
2087 * Do not duplicate android_log_write output to GC log file (Android)
2088 * Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
2089 * Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
2090 * Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified
2091 * Elaborate comment on dependencies in autogen.sh
2092 * Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots
2093 * Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
2094 * Eliminate 'uninitialized variable use' warning in test_printf (cord)
2095 * Eliminate 'unused result' compiler warning in main() of test_cpp
2096 * Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
2097 * Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX)
2098 * Eliminate Clang warning for GC_pthread_exit attribute
2099 * Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
2100 * Eliminate GCC warning in GC_get_main_stack_base (OpenBSD)
2101 * Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app
2102 * Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion
2103 * Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
2104 * Eliminate warning and simplify expression in GC_init_explicit_typing
2105 * Enable 'force GC at every GC_malloc' debug-related functionality
2106 * Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
2107 * Enable prefetch operations by default (GCC 3.0+)
2108 * Enable staticrootstest for the case of GC shared library build
2109 * Enable thread-local allocation support for Clang on Cygwin
2110 * Explicitly specify that Darwin, Linux and Solaris platforms have dladdr
2111 * Fix ABORT definition for mingw32ce (WinCE)
2112 * Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1
2113 * Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
2114 * Fix GC_INIT_CONF_ROOTS in gc.h for Android
2115 * Fix GC_INLINE definition to comply with ISO C90 standard (GCC)
2116 * Fix GC_remove_all_threads_but_me for Android (fork support)
2117 * Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
2118 * Fix dyn_load.c compilation for Android 4.3
2119 * Fix make disclaim_test to link with new GNU ld linking rules
2120 * Improve GC error printing atomicity in GC_debug_X and GC_print_obj
2121 * Improve GC output atomicity in GC_print_obj, GC_print_all_errors
2122 * Improve debug-only messages of add/remove_roots and init_linux_data_start
2123 * Improve fork test logging in gctest
2124 * Improve logged messages about heap size and usage
2125 * Improve logging for Android differentiating messages by log level
2126 * Improve staticrootstest (add global data to library, add lib w/o GC_INIT)
2127 * Improve staticrootstest checks (tests)
2128 * Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
2129 * Include proper header file in 'tools' for configuration macros
2130 * Include pthread_np.h from pthread_stop_world.c on OpenBSD
2131 * Log error messages to stderr instead of stdout in tests
2132 * Make GC_generic_malloc_ignore_off_page() public
2133 * Make GC_mark_lock_holder variable static
2134 * Make GC_print_trace always thread-safe and remove 'lock' argument
2135 * Mark GC_started_thread_while_stopped() as GC_INNER
2136 * Minimize code duplication in GC_mark_and_push
2137 * Move 'include setjmp.h' from mach_dep.c to gc_priv.h
2138 * Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)
2139 * Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
2140 * Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer
2141 * Port BDWGC to Android/x86
2142 * Postpone the suspend signal in GC_dirty_init only if used to stop world
2143 * Prepend '#' symbol to GC number in logged messages
2144 * Prevent POSIX fork if mprotect_thread is started (Darwin)
2145 * Prevent abort on GC_err/warn_printf write failure
2146 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
2147 * Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined
2148 * Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC)
2149 * Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h
2150 * Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
2151 * Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h
2152 * Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD
2153 * Remove DebugBreak on WriteFile failure (Win32)
2154 * Remove GC_BUILD definition from build scripts
2155 * Remove abort on open log failure from GC_write (Win32)
2156 * Remove configure.ac outdated revision number
2157 * Remove nested EXPECT in GC_core_finalized_malloc
2158 * Remove nested always-false ifdef for HPUX and FREEBSD
2159 * Remove redundant GC_err_printf before abort
2160 * Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)
2161 * Rename subthread_create to subthreadcreate_test (Makefile)
2162 * Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages
2163 * Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()
2164 * Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
2165 * Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world
2166 * Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
2167 * Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF
2168 * Replace sprintf with defensive snprintf
2169 * Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning)
2170 * Simplify LOCK/UNLOCK macro definition for static code analysis tools
2171 * Specify GC_malloc result is unused in some tests
2172 * Specify GC_pthread_join result is unused in threadkey_test
2173 * Specify LT_INIT in configure.ac
2174 * Start of port to QNX
2175 * Support rthreads introduced in OpenBSD 5.2+
2176 * Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
2177 * Tag GC malloc routines with alloc_size attribute for Clang 3.2+
2178 * Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code
2179 * Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING
2180 * Turn on world-stop delay logging at debug level by default for Android
2181 * Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
2182 * Use GC_log_printf for logging instead of GC_[err_]printf
2183 * Use compiler TLS for Android NDK gcc/arm
2184 * Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning)
2185 * Use pthread API to operate thread-local data on Linux if no compiler TLS
2186 * Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h
2187 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
2188 Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes
2189
2190
2191 == [7.3alpha2] 2012-05-11 ==
2192
2193 * Add 'const' qualifier to pointer argument of some API functions
2194 * Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
2195 * Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API
2196 * Add GC_is_heap_ptr, GC_move_disappearing_link to GC API
2197 * Add SHORT_DBG_HDRS macro template to configure
2198 * Add Symbian port to mainline (porting done by Djamel Magri)
2199 * Add TODO file
2200 * Add assertion ensuring proper alignment of 'pushed' GC symbols
2201 * Add assertion in GC_getspecific on qtid
2202 * Add assertion to GC_incremental_protection_needs, refine documentation
2203 * Add assertion to check GC_large_free_bytes by GC_finish_collection
2204 * Add configure option to compile all library .c files into single gc.o
2205 * Add cordtest to make check
2206 * Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM)
2207 * Add finalization.html to 'doc' folder
2208 * Add javaxfc.h to the installation set of GC header files (configure)
2209 * Add on-heap-resize event notification to API
2210 * Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
2211 * Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
2212 * Allow GC_exclude_static_roots() region start to be unaligned
2213 * Allow Win32 DllMain chaining on the client side
2214 * Allow to exclude finalization support by GC_NO_FINALIZATION macro
2215 * Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin
2216 * Avoid unnecessary GC_find_limit invocation if GC_no_dls
2217 * Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest
2218 * Cast pointers to word (instead of unsigned long) in specific.h
2219 * Changed the order in autogen.sh so ltmain exists in time for automake
2220 * Declare privately and use handy GC_base_C() for constant object pointers
2221 * Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW)
2222 * Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off
2223 * Do not compile backgraph.c unless configure '--enable-gc-debug'
2224 * Do not compile pthread_stop_world.c for Cygwin/Darwin (configure)
2225 * Do not install ancient new_gc_alloc.h broken for modern STL (configure)
2226 * Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
2227 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
2228 * Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32)
2229 * Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation)
2230 * Extend thread-related debug messages
2231 * Fix 'configure --enable-cplusplus' for Cygwin/MinGW
2232 * Fix DATASTART (and other minor improvements) for NaCl target
2233 * Fix GC_setspecific to prevent garbage collection inside
2234 * Fix compiler warning in cordtest
2235 * Fix minor warnings reported by GCC with '-pedantic' option
2236 * Fix static data roots registration on Android (if GC is shared)
2237 * Implement GC_get_stack_base for Darwin for single-threaded mode
2238 * Improve GC_allochblk algorithm of block splitting when unmapping enabled
2239 * Improve GC_collect_or_expand algorithm for many finalizers registered case
2240 * In tests, print a message in case a test is a no-op
2241 * Instruct configure to hide internal libgc.so symbols if supported by GCC
2242 * Log amount of unmapped memory (if enabled) on marking-for-collection
2243 * Make __data_start a weak symbol to allow loading modules on mips
2244 * Move "cord" library tests to "cord/tests" folder
2245 * Move asm machine-dependent files to "src" folder
2246 * Move build tools sources to "tools" folder
2247 * Move cord_pos.h to public headers folder
2248 * Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin)
2249 * Optimize some functions by moving pthread_self calls out of LOCK section
2250 * Place only major per-release changes description to ChangeLog (this file)
2251 * Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin)
2252 * Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
2253 * Remove all auto-generated files from the repo
2254 * Remove binary icon file for de_win
2255 * Remove cordtest from "cord" library
2256 * Remove duplicate MacOS_Test_config.h file
2257 * Remove gc_amiga_redirects.h (included internally) from public headers
2258 * Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure)
2259 * Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX
2260 * Remove unsupported MMAP_STACKS (specific to Solaris threads)
2261 * Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros
2262 * Replace ARGSUSED comment-based annotation with GCC 'unused' attribute
2263 * Replace GC_ms_entry declaration with opaque definition for public API
2264 * Replace long GC_markers global variable with int GC_markers_m1
2265 * Replace pointer relational comparisons with non-pointer ones
2266 * Replace printf PRIxMAX specifier with '%p' for thread id debug output
2267 * Require autoconf 2.61 instead of v2.64
2268 * Simplify autogen.sh (use autoreconf)
2269 * Split GC_abort with GC_on_abort and abort() invoked from ABORT
2270 * Support GC_ATTR_MALLOC for MS VisualStudio
2271 * Tag auxiliary malloc-like API functions with 'malloc' attribute
2272 * Tag deprecated variables in GC API
2273 * Tag must-be-non-null arguments of GC API functions
2274 * Turn on "extra" GCC warnings
2275 * Turn on unused-parameter checking for GCC
2276 * Update AUTHORS file
2277 * Use EXPECT for checking various 'initialized' boolean variables
2278 * Use USE_COMPILER_TLS on Cygwin
2279 * Use pthread_key for thread-local storage on FreeBSD
2280 * Use union of AO_t and word to favor strict-aliasing compiler optimization
2281 Also, includes 7.2 changes
2282
2283
2284 == [7.2s] 2024-09-06 ==
2285
2286 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
2287 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
2288 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
2289 * Eliminate warning and simplify expression in GC_init_explicit_typing
2290 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
2291 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
2292 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
2293 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
2294 * Fix GC_jmp_buf multiple definition
2295 * Fix GC_print_trace_inner to print the last element of the circular buffer
2296 * Fix double lock in GC_malloc called from backtrace()
2297 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
2298 * Fix null pointer dereference in GC_is_visible if type_descr is null
2299 * Fix per_object_helper() after changing hb_sz units
2300 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
2301 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
2302 * Fix potential address overflow in GC_add_to_heap
2303 * Fix potential buffer overrun during read in GC_text_mapping
2304 * Fix typos in comments
2305 * Prevent compiler warnings regarding unused argument and printf in extra
2306 * Prevent redirected malloc call from a garbage collection routine
2307 * Remove barrett_diagram file duplicated by tree.html
2308 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
2309 * Resolve GCC warning in setjmp_t.c
2310 * Update and fix diagrams describing the tree structure for pointer lookups
2311
2312
2313 == [7.2r] 2024-02-03 ==
2314
2315 * Fix 'g++ not found' error on OpenBSD (Makefile.direct)
2316 * Fix 'implicit declaration of iscntrl()' warning in cord/de_win (MinGW)
2317 * Fix 'info' buffer potential overrun in GC_save_callers
2318 * Fix 'missing sysconf() prototype' gcc error in setjmp_t tool (OpenBSD)
2319 * Fix SVR4 macro definition order
2320 * Fix asm constraint in LONG_MULT for gcc/x86
2321 * Fix assertion violation in GC_get_maps on Linux if malloc redirection
2322 * Fix bitwise negation and rounding direction in setjmp_t tool
2323 * Fix closing bracket placement for case statement in configure
2324 * Fix indent of a closing curly brace in GC_forward_exception
2325 * Fix missing outermost parentheses in CORD_pos_cur_char_addr
2326 * Fix missing type widening before left shift in GC_MAKE_PROC
2327 * Fix misspelled GC_HEADERS_H macro in gc_priv.h
2328 * Fix null dereference in check_finalizer_nested if redirect malloc on Linux
2329 * Fix posix_memalign() to overwrite pointer storage only on success
2330 * Fix skipped removal of page protection in case of address hash collision
2331 * Fix typos in comments
2332 * Fix update of last_back_trace_gc_no if KEEP_BACK_PTRS is not defined
2333
2334
2335 == [7.2q] 2023-05-25 ==
2336
2337 * Fix CORD_next() indent inside loop in test_basics() of cordtest
2338 * Fix DCL_LOCK_STATE placement in GC_set_oom_fn
2339 * Fix GC_excl_table overrun on overflow in GC_exclude_static_roots
2340 * Fix IRIX5 defined wrongly on Tandem S-Series and WinCE/mips
2341 * Fix comparisons to heap boundary in GC_get_back_ptr_info and GC_mark_from
2342 * Fix disabling of automatic dynamic libraries registration
2343 * Fix double initialization of main thread local free lists on Win32
2344 * Fix joinable threads shutdown on NaCl
2345 * Fix loop condition over dll_thread_table in GC_lookup_pthread (Win32)
2346 * Fix missing GC_CALLBACK for GC_waitForSingleObjectInfinite
2347 * Fix missing libalphagc.so dependency in Makefile.direct
2348 * Fix missing result check of pthread_attr_getdetachstate in pthread_create
2349 * Fix overlapping region assertion in mark_some if malloc redirect on Linux
2350 * Fix potential SIGSEGV on out-of-memory in gctest
2351 * Fix typos in comments and documentation
2352 * Fix unregistering of thread created by intercepted pthread_create on NaCl
2353 * Fix use of unset errno after pthread_create call
2354 * Invoke GC_oom_fn if GC_make_array_descriptor failed because of no memory
2355
2356
2357 == [7.2p] 2022-08-25 ==
2358
2359 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
2360 * Define SUNOS5SIGS macro for kFreeBSD
2361 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
2362 * Ensure typed objects descriptor is never located in the first word
2363 * Fix GC_make_descriptor for zero length argument
2364 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
2365 * Fix assertion violation in GC_allow_register_threads on Windows
2366 * Fix get_maps failure when GC_repeat_read returns zero
2367 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
2368 * Fix missing lock when GC_generate_random_valid_address is called
2369 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
2370 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
2371 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
2372 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
2373 * Fix race between calloc_explicitly_typed and push_complex_descriptor
2374 * Fix typos in comments of .c files, gc.h and a typo in debugging.html
2375 * Refer to Makefile.direct instead of deleted Makefile file in README
2376 * Remove checking of RS6000 completely
2377 * Remove non-working check of M68K in gctest
2378 * Revert addition of msvc_dbg.h in include.am
2379
2380
2381 == [7.2o] 2021-09-28 ==
2382
2383 * Add loop to handle abort error like in suspend logic on Darwin
2384 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
2385 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
2386 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
2387 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
2388 * Fix 'expected function body after declarator' clang error in gc_cpp.cc
2389 * Fix 'write to GC log failed' error
2390 * Fix GC_proc_fd value in child process at fork (Solaris)
2391 * Fix assertion violation in register_dynlib_callback on Android
2392 * Fix configure message about 'AIX gcc optimization fix'
2393 * Fix data race regarding *rlh value in generic_malloc_many
2394 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
2395 * Fix fread failure after enable_incremental if malloc is redirected (Linux)
2396 * Fix gc_cflags variable name in configure (HP/UX)
2397 * Fix handling of areas smaller than page size on recycle scratch area
2398 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
2399 * Fix misaligned tlfs passed to AO_load on m68k
2400 * Fix missing GC_quiet declaration in pcr_interface.c
2401 * Fix missing gc_dlopen.c in CMake script
2402 * Fix missing scratch_last_end_ptr update (Irix)
2403 * Fix overflow of scratch_free_ptr value
2404 * Fix page_was_[ever_]dirty() for static roots (Solaris)
2405 * Fix printf format specifier in simple_example.html
2406 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
2407 * Fix various typos in comments and documentation files
2408 * Fix word size, data start and alignment for OpenBSD/mips64(el)
2409 * Prevent WARN of incompatible incremental GC if default or manual VDB
2410 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
2411 * Remove a misleading comment about Solaris in gc.h
2412
2413
2414 == [7.2n] 2019-03-01 ==
2415
2416 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
2417 * Fix 'unexpected mark stack overflow' abort in push_all_stack
2418 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
2419 * Fix GetThreadContext stale register values use if WoW64 (Win32)
2420 * Fix executable memory allocation in GC_unix_get_mem
2421 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
2422
2423
2424 == [7.2m] 2018-12-11 ==
2425
2426 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
2427 * Fix hbp overflow in GC_install_counts
2428 * Fix start_world not resuming all threads on Darwin
2429 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
2430
2431
2432 == [7.2l] 2018-08-10 ==
2433
2434 * Fix 'pointer arithmetic with NULL' code defect in print_callers
2435 * Fix Borland version in documentation to match that in BCC_MAKEFILE
2436 * Fix comment about inv_sz computation in setup_header
2437 * Fix comments style in configure.ac and Makefile.am
2438 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
2439 * Fix global operator delete definition for C++14 in gc_cpp
2440 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
2441 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
2442 * Fix mark stack overflow checking in push_selected
2443 * Fix MSWIN32 macro redefinition (WCC)
2444 * Fix potential null dereference in GC_CONS
2445 * Fix register_dynamic_libraries on Windows 10
2446 * Fix result computation in n_set_marks
2447 * Fix return type in GC_set_warn_proc API documentation
2448 * Fix typo in comment for CORD_ec_flush_buf prototype
2449 * Fix typos in ChangeLog
2450 * Fix VirtualQuery call in case of malloc failure (Win32)
2451 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
2452 * Perform thread_suspend in loop as it may be interrupted (Darwin)
2453 * Workaround 'template-id not supported in this context' compiler error (WCC)
2454
2455
2456 == [7.2k] 2018-04-19 ==
2457
2458 * Fix arguments delimiter in pcr_interface.c (PCR)
2459 * Fix assertion violation in DllMain of win32_threads
2460 * Fix data race during apply_to_each_object(reset_back_edge)
2461 * Fix dbg_mlc.c/o file name in documentation
2462 * Fix include gc_gcj.h in thread_local_alloc.c
2463 * Fix man section number (3)
2464 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
2465 * Fix missing SIGBUS handler setup for kFreeBSD
2466 * Fix null dereference in print_callers on backtrace_symbols failure
2467 * Fix the collector hang when it is configured with --enable-gc-debug
2468 * Fix thread_suspend fail for threads registered from key destructor (OS X)
2469 * Fix typo in AIX macro name
2470 * Fix typo in comment in specific.h
2471
2472
2473 == [7.2j] 2018-01-21 ==
2474
2475 * Fix GC allocation mutex in child after a fork
2476 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
2477 * Fix libgc version which was changed in linkage breaking way
2478 * Fix missing EOLn output in threadlibs tool
2479
2480
2481 == [7.2i] 2017-12-21 ==
2482
2483 * Avoid data race in finalized_count (gctest)
2484 * Fix assertion violation about disabled cancel in try_to_collect_inner
2485 * Fix data race in a list referenced by A.aa (gctest)
2486 * Fix data race in do_local_mark when comparing active_count to helper_count
2487 * Fix data race in GC_init_explicit_typing
2488 * Fix data race in last_stop_count access (suspend_handler_inner)
2489 * Fix data race in mark_thread when updating mark_no
2490 * Fix data race when getting object size in explicitly-typed allocators
2491 * Fix lack of barriers to synchronize memory for suspend_handler
2492 * Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
2493 * Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)
2494
2495
2496 == [7.2h] 2017-10-12 ==
2497
2498 * Add gctest as a test (CMake)
2499 * Change no-argument functions declaration style to ANSI C (extra files)
2500 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
2501 * Ensure oom_fn callback executed on out-of-memory in calloc
2502 * Fix '~' operator application to unsigned values shorter than word
2503 * Fix 'context local variable might be clobbered by setjmp' compiler warning
2504 * Fix 'doc' files installation folder
2505 * Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
2506 * Fix ALL_INTERIOR_POINTERS name in comments and documentation
2507 * Fix AO_SRC_DIR target name in NT_*_MAKEFILE
2508 * Fix assertion in GC_mark_from for non-heap regions
2509 * Fix assertion in GC_steal_mark_stack for non-heap regions
2510 * Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
2511 * Fix assertion violation in GC_wait_builder called from start_mark_threads
2512 * Fix assertion violation in mark_local checking GC_mark_stack_top
2513 * Fix assertion violation in return_single_freelist in child process
2514 * Fix bm_huge initialization for 64-bit targets (gctest)
2515 * Fix broken external links in documentation
2516 * Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
2517 * Fix calloc_explicitly_typed in case of lb*n overflow
2518 * Fix CMake warning about CMP0054 by unquoting instances of HOST
2519 * Fix conditional expression in pos_fetch, next non-macro definitions (cord)
2520 * Fix configure --disable-munmap handling
2521 * Fix CORD_substr_closure for the case when CORD_from_fn returns C string
2522 * Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
2523 * Fix double lock in pthread_detach (Cygwin, winpthreads)
2524 * Fix double multiplication of lb by n in calloc_explicitly_typed
2525 * Fix enable_parallel_mark condition in CMake script
2526 * Fix external libatomic_ops pkg-config-based detection
2527 * Fix gc_allocator.h file name in new_gc_alloc.h comment
2528 * Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
2529 * Fix gc_cleanup destructor for non-heap objects (gc_cpp)
2530 * Fix GC_collect_or_expand to prevent allocation size value wrap-around
2531 * Fix GC_incremental declaration/definition type mismatch
2532 * Fix GC_mark_stack_top assertion violation properly in mark_local
2533 * Fix GC_remove_specific invocation from remove_all_threads_but_me
2534 * Fix GC_requested_heapsize increment in GC_init
2535 * Fix GC_setspecific to prevent garbage collection inside
2536 * Fix GC_SIZE_MAX definition (Linux/musl-gcc)
2537 * Fix GCJ support in CMake build script
2538 * Fix gctest crash if configure --enable-handle-fork on Darwin
2539 * Fix get_maps on proc maps file asynchronous growth
2540 * Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ
2541 * Fix header filename in gcconfig.h comment
2542 * Fix infinite mark_some calls after memory mapping disappeared (Glibc)
2543 * Fix integer shift undefined behavior in GC_init_explicit_typing
2544 * Fix leak_test crash in print_callers if free() is redirected
2545 * Fix Makefile.direct recursive invocation
2546 * Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
2547 * Fix missing win32_threads.c compilation for Cygwin (CMake)
2548 * Fix MS VC warning about compiling unused checksums and thread_local_alloc
2549 * Fix name typos in GC_FAST_MALLOC_GRANS comment
2550 * Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
2551 * Fix OSF1 host pattern in CMakeLists.txt
2552 * Fix PCR-Makefile by removing compilation of a missing file
2553 * Fix potential data race in GC_SysVGetDataStart (SPARC)
2554 * Fix potential integer overflow in GC_find_limit_* functions
2555 * Fix printf arguments type in print_callers
2556 * Fix pthread_detach for threads not yet registered (Cygwin, winpthreads)
2557 * Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads)
2558 * Fix pthread_join when thread is registered in thread key destructor
2559 * Fix push_complex_descriptor to avoid unlimited global mark stack growth
2560 * Fix removal of dead threads in a child process
2561 * Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
2562 * Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME
2563 * Fix Solaris/sparc detection in case of strict C compliance is enforced
2564 * Fix STACKBOTTOM for Solaris 11/x86
2565 * Fix storage class of local variable in register_dynamic_libraries (Irix)
2566 * Fix tools/setjmp_t hang (OS X)
2567 * Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
2568 * Fix undefined HEAP_START in register_dynamic_libraries
2569 * Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32
2570 * Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h
2571 * Fix various typos in comments, documentation and printed messages
2572 * Handle load_segs overflow in register_dynlib_callback gracefully
2573 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
2574 * Replace (fix) 'objs' acronym in comments with 'objects' word
2575 * Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
2576 * Update documentation about bugs reporting and new releases notification
2577 * Update Download information in GC overview document
2578 * Update shared libraries version info (v7.2)
2579 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
2580 * Workaround missing getcontext() in Docker osrf/ubuntu_32bit
2581
2582
2583 == [7.2g] 2016-05-23 ==
2584
2585 * Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
2586 * Fix 'implicit declaration of function' compiler warnings in cord/de
2587 * Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
2588 * Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)
2589 * Fix GC initialization in cord de_win for Cygwin
2590 * Fix GC_get_stack_base if called before GC_init (Win32)
2591 * Fix OSX issue with pthread_attr_setstacksize failure
2592 * Fix Unicode Win32 API calls in cord de_win
2593 * Fix USE_COMPILER_TLS macro duplicate description in README
2594 * Fix cord de_win WndProc prototype parameters for 64-bit (Win64)
2595 * Fix file descriptor resource leak in GC_register_data_segments (OS/2)
2596 * Fix filename printing in cordtest
2597 * Fix missing cord_pos.h, ec.h among installed headers (Automake)
2598 * Fix missing GC_get_stack_base for Amiga
2599 * Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
2600 * Fix mistyped ARM_THREAD_STATE macro (Darwin/arm)
2601 * Fix null-pointer dereferences on out-of-memory in cord and tests
2602 * Fix potential multiplication overflow in check_heap_stats (gctest)
2603 * Fix race (and potential deadlock) at marker threads initialization
2604 * Fix signedness of char values passed to isspace, iscntrl, isxdigit
2605 * Fix typo (items numbering) in GC_finalize_all documentation
2606 * Fix typos in ERROR_FL, GC_malloc_uncollectable comments
2607 * Fix typos in gc_priv.h, in README for ews4800
2608 * Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)
2609 * Fix various spelling errors
2610 * Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX
2611 * Regenerate configure files using official libtool release (v2.4.2)
2612 * Remove documentation about obsolete GC_REDIRECT_TO_LOCAL
2613 * Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from
2614 * windows-untested: Fix paths to msvc_dbg.c/h
2615
2616
2617 == [7.2f] 2014-06-03 ==
2618
2619 * Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
2620 * Fix 'source file in a subdirectory' Automake warnings
2621 * Fix ABORT message in GC_restart_handler
2622 * Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
2623 * Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
2624 * Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap
2625 * Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
2626 * Fix GET_MEM argument rounding in GC_scratch_alloc and similar
2627 * Fix PARALLEL_MARK for Windows 7+
2628 * Fix build (broken by fenv.h inclusion) on Linux/x64 under uClibc
2629 * Fix crash when using GC_malloc_many() as first allocation call
2630 * Fix mark stack excessive growth during parallel mark
2631 * Fix or remove broken URLs in documentation
2632 * Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)
2633 * Fix typo in GC_collect_or_expand comment
2634 * Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes
2635 * Regenerate configure files by automake 1.14.1, libtool 2.4.2.418
2636 * Update emails/links due to project site and ML transition
2637
2638
2639 == [7.2e] 2013-11-10 ==
2640
2641 * Add weak attribute to avoid __data_start undefined messages (s390x)
2642 * Add weak stubs for pthread_cancel API
2643 * Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
2644 * Append _test suffix to 'initsecondarythread' binary file names
2645 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
2646 * Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
2647 * Fix GC_CreateThread 'dwStackSize' argument type for Win64
2648 * Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
2649 * Fix GC_clear_stack by declaring 'dummy' local array as volatile
2650 * Fix GC_get_stack_base assembly code (Cygwin/Clang)
2651 * Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
2652 * Fix GC_marker_Id elements initialization (WinCE)
2653 * Fix GC_print_trace missing unlock
2654 * Fix GC_unix_mmap_get_mem for open of /dev/zero failure
2655 * Fix GC_win32_free_heap compilation error for Cygwin
2656 * Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
2657 * Fix Win32 GC_write preventing potential infinite recursion at abort
2658 * Fix assertion violation in GC_mark_from prefetch loop
2659 * Fix collection of objects referenced only from GC_mark_stack_X variables
2660 * Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
2661 * Fix heap sections overflow for Win32/Cygwin with enabled parallel marker
2662 * Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
2663 * Fix missing tabs in SMakefile.amiga file
2664 * Fix null-pointer dereference in CORD_substr_closure
2665 * Fix old_segv/bus_act variables initialization for FreeBSD
2666 * Fix potential double fclose in test_extras (cordtest)
2667 * Fix pthread_attr_t resource leak in pthread_create
2668 * Fix race in GC_print_all_errors regarding GC_leaked
2669 * Fix sizeof in GC_push_thread_structures
2670 * Fix stackbottom/stack_end assignment in GC_call_with_gc_active
2671 * Fix tests makefile to link with new GNU ld linking rules
2672 * Fix typos in comments and documentation
2673 * Fix unportable '==' test operators in configure
2674 * Fix vsprintf_args cleanup in CORD_vsprintf
2675 * Merge FreeBSD New ports collection for boehm-gc v7.2d
2676 * Replace GC_DBG_RA with GC_DBG_EXTRAS macro
2677 * Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file
2678 * Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)
2679
2680
2681 == [7.2d] 2012-08-09 ==
2682
2683 * Fix GC_call_with_stack_base to prevent its tail-call optimization
2684 * Fix all address-of-dummy operations by using GC_approx_sp() instead
2685 * Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
2686 * Fix test_cpp (ensure the collector recognizes pointers to interiors)
2687 * Fix thread-related tests for pthreads-w32
2688 * test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
2689
2690
2691 == [7.2c] 2012-06-11 ==
2692
2693 * Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory
2694 * Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
2695 * Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
2696 * Fix visibility of GC_clear/set_mark_bit (unhide symbols)
2697 * Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols
2698
2699
2700 == [7.2b] 2012-05-23 ==
2701
2702 * Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
2703
2704
2705 == [7.2] 2012-05-11 ==
2706
2707 * Abort in GC_thr_init on pthread_atfork failure (POSIX threads)
2708 * Add GC_WIN32_PTHREADS target in configure
2709 * Add GC_is_disabled new function to GC API
2710 * Add info that getcontext() resets FPE mask no longer on Linux/x64
2711 * Add public GC_set_handle_fork to control forked child handling support
2712 * Add realloc_test.c test
2713 * Add support for Hexagon target
2714 * Add thread-safe GC_get_heap_usage_safe to GC API
2715 * Change GC_check_fl_marks prototype and implementation
2716 * Check pthread_create/join result in test
2717 * Define GC_DLL (in configure) if building only dynamic libraries
2718 * Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set
2719 * Disable incremental mode on Darwin if fork handling requested
2720 * Enable parallel marker in configure for Solaris
2721 * Fix "comparison of signed and unsigned values" compiler warnings
2722 * Fix 'volatile' keyword placement in GC_SysVGetDataStart
2723 * Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target
2724 * Fix GC_READ_ENV_FILE code for Cygwin
2725 * Fix GC_add_roots_inner for Mac OS X (align segment start)
2726 * Fix GC_check_fl_marks regarding concurrent access
2727 * Fix GC_finalizer_nested size to workaround alignment problem in Watcom
2728 * Fix GC_find_limit_with_bound to always reset fault handler on return
2729 * Fix GC_init static assertion for clang/x64 (Darwin)
2730 * Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection
2731 * Fix GC_push_all/selected boundaries check
2732 * Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
2733 * Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
2734 * Fix GC_restart_handler to preserve errno if needed
2735 * Fix GC_root_size update in GC_add_roots_inner (Win32)
2736 * Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32)
2737 * Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
2738 * Fix calloc, GC_generic_malloc to check for allocation size overflows
2739 * Fix compiler warning in GC_dyld_image_add/remove (Darwin)
2740 * Fix configure --enable-cplusplus make install
2741 * Fix configure to disable GCC aliasing optimization unless forced to
2742 * Fix duplicate definitions in gcconfig.h for NetBSD
2743 * Fix fork() support on Cygwin and Darwin targets
2744 * Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS
2745 * Fix gc_cpp.cc for Cygwin (remove duplicate function definition)
2746 * Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
2747 * Fix gcconfig.h to handle mips64-linux target
2748 * Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
2749 * Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6
2750 * Fix tests to check GC_malloc result for NULL (out-of-memory)
2751 * Fix thread model in configure for MinGW ("win32" instead of "posix")
2752 * Fix various warnings reported by LINT-like tools
2753 * Fix visibility of some GC internal symbols used by GNU GCJ currently
2754 * Port some thread tests to Win32
2755 * Refine API GC setters and getter comments regarding locking
2756 * Refine GC_stackbottom description in gc.h
2757 * Remove duplicate calls in GC_register_dynamic_libraries
2758 * Remove locking in API GC_get_bytes_since_gc and friends
2759 * Remove newly-added GC_get_heap_size/free_bytes_inner from API
2760 * Remove some local variables that are unused
2761 * Support multi-threading for RTEMS target
2762 * Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning
2763 * Use pkg-config to pick up libatomic_ops, etc
2764 * Workaround some Linux/arm kernels bug to get correct GC_nprocs value
2765
2766
2767 == [7.2alpha6] 2011-06-14 ==
2768
2769 * configure_atomic_ops.sh: Remove.
2770 * Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
2771 * Makefile.am (EXTRA_DIST): Add autogen.sh.
2772
2773 * NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
2774 filename passed.
2775 * NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
2776 extension.
2777 * NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
2778 * NT_MAKEFILE (.cpp.obj): Likewise.
2779
2780 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
2781 GC_traverse_back_graph): Move prototype to gc_priv.h.
2782 * checksums.c (GC_page_was_ever_dirty): Likewise.
2783 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
2784 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
2785 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
2786 GC_get_next_stack): Likewise.
2787 * finalize.c (GC_reset_finalizer_nested,
2788 GC_check_finalizer_nested): Likewise.
2789 * gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
2790 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
2791 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
2792 * misc.c (GC_register_main_static_data, GC_init_win32,
2793 GC_setpagesize, GC_init_linux_data_start,
2794 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
2795 GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
2796 GC_bl_init_no_interiors): Likewise.
2797 * os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
2798 Likewise.
2799 * reclaim.c (GC_check_leaked): Likewise.
2800 * win32_threads.c (GC_gww_dirty_init): Likewise.
2801 * darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
2802 GC_mprotect_resume): Move prototype to darwin_stop_world.h.
2803 * pthread_support.c (GC_FindTopOfStack): Likewise.
2804 * dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
2805 * mark.c (GC_page_was_ever_dirty): Remove (as already declared).
2806 * mark_rts.c (GC_roots_present): Change return type to void
2807 pointer (to match the prototype); return NULL instead of FALSE.
2808 * mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
2809 * os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
2810 * os_dep.c (GC_write_fault_handler): Make STATIC.
2811 * os_dep.c (GC_set_write_fault_handler): New function (only if
2812 GC_WIN32_THREADS).
2813 * pthread_start.c (GC_start_rtn_prepare_thread,
2814 GC_thread_exit_proc): Move prototype to pthread_support.h.
2815 * pthread_support.c (GC_nacl_initialize_gc_thread,
2816 GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
2817 Likewise.
2818 * pthread_support.c (GC_stop_init): Move prototype to
2819 pthread_stop_world.h.
2820 * win32_threads.c (GC_write_fault_handler): Remove prototype.
2821 * win32_threads.c (GC_register_my_thread_inner): Call
2822 GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
2823 (only if MPROTECT_VDB).
2824 * doc/README.win32: Add information about DMC.
2825 * include/private/gc_priv.h (GC_set_write_fault_handler): New
2826 prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
2827
2828 * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
2829
2830 * win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
2831 instead of FINISHED macro.
2832 * tests/test.c (check_heap_stats): Round up max_heap_sz value for
2833 Win32 (same as for USE_MMAP).
2834
2835 * tests/test.c (check_heap_stats): Adjust printf format specifier
2836 for max_heap_sz; cast max_heap_sz accordingly.
2837
2838 * doc/README.solaris2: Add note.
2839
2840 * configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
2841 Solaris/x86 2.10+.
2842
2843 * tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
2844 defined; explicitly define for some targets.
2845
2846 * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
2847 * stubborn.c (GC_dirty): Likewise.
2848 * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
2849 PROC_VDB): Undefine if MANUAL_VDB.
2850 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
2851 MANUAL_VDB.
2852 * os_dep.c (async_set_pht_entry_from_index): Define for
2853 MANUAL_VDB.
2854 * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
2855 success; if ioctl() failed then just print warning instead of
2856 aborting.
2857
2858 * include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
2859 for line number printing.
2860
2861 * os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
2862 (for PROC_VDB only); print errors via GC_err_printf; rename "ps"
2863 and "np" local variables to npages and pagesize, respectively;
2864 remove "current_addr" local variable.
2865
2866 * os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
2867 for BeOS and OS/2; define HAVE_GET_STACK_BASE.
2868 * os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
2869 GC_get_main_stack_base implementation is defined.
2870 * os_dep.c (GC_get_main_stack_base): Define that based on
2871 GC_get_stack_base() in a single place (only if
2872 GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
2873 result.
2874
2875 * mark.c (GC_push_selected): Remove "push_fn" argument (use
2876 GC_push_all directly); update the documentation.
2877 * mark.c (GC_push_conditional): Simplify the code (for better
2878 readability).
2879
2880 * mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
2881 boolean local variables.
2882 * doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
2883 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
2884 GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
2885 place.
2886 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
2887 PHT_HASH(h) only once (store result to a local variable).
2888
2889 * doc/README.solaris2: Update.
2890
2891 * include/private/gcconfig.h (end, InitStackBottom): Declare
2892 extern variable for RTEMS.
2893 * include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
2894 Update (for RTEMS).
2895 * include/private/gcconfig.h (DATAEND): Fix a typo in the macro
2896 name (for RTEMS).
2897 * tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
2898 Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
2899
2900 * include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
2901 single-threaded environment.
2902
2903 * include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
2904 * tests/test.c (NUMBER_ROUND_UP): New macro.
2905 * tests/test.c (check_heap_stats): Round up total expected heap
2906 size to the nearest 4 MiB bound.
2907 * tests/test.c (check_heap_stats): Print the current and expected
2908 heap sizes in case of failure.
2909
2910 * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
2911 only if GC_print_stats; print errors using GC_err_printf.
2912 * checksums.c (GC_check_blocks): Join adjacent printf() calls into
2913 a single one.
2914
2915 * pthread_support.c (pthread_join): Add assertion (check thread is
2916 finished).
2917 * pthread_support.c (GC_register_my_thread): Don't detach the
2918 thread if invoked from the thread destructor.
2919 * win32_threads.c (GC_register_my_thread): Likewise.
2920 * win32_threads.c (GC_unregister_my_thread): Don't delete the
2921 thread (just set FINISHED) if the thread is not detached (only if
2922 GC_PTHREADS); add assertion (check the thread is not finished).
2923 * tests/threadkey_test.c (main): Join some created threads.
2924
2925 * pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
2926 variable to "t".
2927 * win32_threads.c (GC_delete_gc_thread): Likewise.
2928 * pthread_support.c (pthread_join, pthread_detach,
2929 pthread_cancel): Rename "thread_gc_id" local variable to "t".
2930 * win32_threads.c (GC_pthread_detach): Likewise.
2931 * win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
2932 variable.
2933 * win32_threads.c (GC_pthread_join): Rename "joinee" local
2934 variable to "t".
2935
2936 * pthread_stop_world.c (pthread_sigmask): Undefine even if not
2937 DEBUG_THREADS.
2938 * pthread_stop_world.c (GC_unblock_gc_signals): New function (only
2939 if GC_EXPLICIT_SIGNALS_UNBLOCK).
2940 * pthread_support.c (GC_unblock_gc_signals): New prototype.
2941 * pthread_support.c (GC_register_my_thread_inner,
2942 GC_register_my_thread): Call GC_unblock_gc_signals (only if
2943 GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
2944 * include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
2945 macro.
2946
2947 * pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
2948 "sig" local variables; rename my_thread local variable to "self".
2949
2950 * tests/threadkey_test.c (LIMIT): Use smaller value (don't create
2951 more than 30 in parallel by default).
2952
2953 * tests/threadkey_test.c (key_once, main): Work around for Solaris
2954 PTHREAD_ONCE_INIT.
2955 * tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
2956
2957 * dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
2958 variable.
2959 * pthread_support.c (GC_unregister_my_thread_inner): Revert back
2960 GC_remove_specific invocation; add a comment.
2961 * include/private/thread_local_alloc.h (GC_remove_specific):
2962 Revert back.
2963 * specific.c (slow_getspecific): Cast qtid to AO_t.
2964 * include/private/specific.h (key_create, setspecific,
2965 remove_specific): Remove "extern" keyword.
2966 * include/private/specific.h (getspecific): Change type of "qtid"
2967 local variable to unsigned long.
2968
2969 * pthread_support.c (GC_check_tls): Fix "#endif" comment.
2970 * include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
2971 * include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
2972 Remove redundant test of the macro.
2973
2974 * backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
2975 * os_dep.c (GC_set_and_save_fault_handler): Recognize
2976 SIGACTION_FLAGS_NODEFER_HACK macro.
2977 * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
2978 macro.
2979 * pthread_support.c (GC_acquire_mark_lock): Remove commented out
2980 code.
2981 * include/private/gc_priv.h (SUNOS5SIGS): Don't include
2982 sys/siginfo.h on Linux.
2983 * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
2984 recognized, force PREFETCH_FOR_WRITE to be defined on x86.
2985 * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
2986 macro recognized (for HP/UX).
2987
2988 * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
2989 GWW_VDB).
2990 * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
2991 resetting (for PROC_VDB).
2992
2993 * tests/threadkey_test.c: New file.
2994 * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
2995 * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
2996 New variable.
2997
2998 * pthread_support.c (GC_unregister_my_thread_inner): Don't call
2999 GC_remove_specific.
3000 * include/private/thread_local_alloc.h (GC_remove_specific):
3001 Remove (since it is empty for all targets).
3002 * pthread_support.c (GC_record_stack_base): New inline function.
3003 * win32_threads.c (GC_record_stack_base): Likewise.
3004 * pthread_support.c (GC_register_my_thread_inner): Invoke
3005 GC_record_stack_base.
3006 * win32_threads.c (GC_register_my_thread_inner): Likewise.
3007 * pthread_support.c (GC_register_my_thread): If thread is FINISHED
3008 then call GC_record_stack_base, clear FINISHED, initialize
3009 thread-local list and return success.
3010 * win32_threads.c (GC_register_my_thread): Likewise.
3011 * include/gc.h (GC_register_my_thread): Update documentation.
3012 * include/private/thread_local_alloc.h (GC_thread_key): Likewise.
3013
3014 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
3015 adjacent "#ifdef".
3016 * thread_local_alloc.c (GC_malloc_atomic): Call
3017 GC_core_malloc_atomic (instead of GC_core_malloc).
3018
3019 * pthread_start.c (GC_start_rtn_prepare_thread): Change return
3020 type to GC_thread.
3021 * pthread_start.c (GC_inner_start_routine): Pass the current
3022 thread descriptor to pthread_cleanup_push (same as in
3023 win32_threads.c).
3024 * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
3025 variable to "self".
3026 * win32_threads.c (GC_push_all_stacks): Likewise.
3027 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
3028 "my_thread" local variable to "self".
3029 * pthread_support.c (GC_unregister_my_thread_inner): New static
3030 function.
3031 * pthread_support.c (GC_unregister_my_thread,
3032 GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
3033 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
3034 GC_do_blocking_inner): Rename "t" local variable to "thread_id".
3035 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
3036 "id" local variable to "thread_id".
3037
3038 * pthread_support.c (GC_unregister_my_thread): Call pthread_self
3039 only once.
3040 * win32_threads.c (GC_pthread_start_inner): Likewise.
3041 * pthread_support.c (GC_unregister_my_thread): Add debug output.
3042 * win32_threads.c (GC_unregister_my_thread): Likewise.
3043 * pthread_support.c (GC_register_my_thread,
3044 GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
3045 to "self".
3046
3047 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
3048 unconditionally (do not test GC_I_HIDE_POINTERS); update the
3049 comment.
3050 * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
3051 GC_HIDE/REVEAL_POINTER, respectively.
3052 * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
3053 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
3054
3055 * include/gc.h (GC_register_my_thread): Refine the comment.
3056
3057 * include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
3058 parentheses.
3059 * include/gc_typed.h (GC_get_bit, GC_set_bit,
3060 GC_CALLOC_EXPLICITLY_TYPED): Likewise.
3061
3062 * include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
3063
3064 * include/private/gcconfig.h (NO_GETCONTEXT): Do not use
3065 getcontext(2) on m68k because it is not implemented there.
3066
3067 * alloc.c (GC_clear_a_few_frames): Use BZERO().
3068 * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
3069 * reclaim.c (GC_start_reclaim): Likewise.
3070 * blacklst.c (total_stack_black_listed): Remove "len" local
3071 variable.
3072 * dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
3073 statement with "do-while" one.
3074 * dyn_load.c (GC_register_dynamic_libraries,
3075 GC_register_dynlib_callback): Remove redundant parentheses.
3076
3077 * cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
3078 "unused result" compiler warning for fread().
3079
3080 * os_dep.c (GC_write_fault_handler): Break when in_allocd_block
3081 is set to true.
3082
3083 * dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
3084 return -1 if the object has (or had) debugging info but was
3085 marked deallocated.
3086 * include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
3087 * dbg_mlc.c (GC_has_other_debug_info): Update documentation;
3088 remove "ohdr" local variable.
3089 * dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
3090 probably been deallocated.
3091 * dbg_mlc.c (GC_debug_free): Don't actually free the object even
3092 in the leak-finding mode if GC_findleak_delay_free.
3093 * dbg_mlc.c (GC_check_leaked): New function (only unless
3094 SHORT_DBG_HDRS).
3095 * doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
3096 * doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
3097 * include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
3098 on 64-bit architectures.
3099 * include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
3100 parentheses.
3101 * include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
3102 GC_has_other_debug_info change).
3103 * include/private/gc_priv.h (GC_findleak_delay_free): New global
3104 variable declaration (unless SHORT_DBG_HDRS).
3105 * misc.c (GC_findleak_delay_free): New global variable; recognize
3106 GC_FINDLEAK_DELAY_FREE.
3107 * misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
3108 variable (unless SHORT_DBG_HDRS).
3109 * reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
3110 * reclaim.c (GC_add_leaked): Don't add the object to leaked list
3111 if marked as deallocated.
3112
3113 * dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
3114 comment.
3115 * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
3116 * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
3117 * dbg_mlc.c (GC_smashed): Refine documentation.
3118 * mark.c (GC_push_selected): Change dirty_fn return type to
3119 GC_bool.
3120 * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
3121 * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
3122 local variable.
3123 * reclaim.c (GC_reclaim_block): Pass true constant to
3124 GC_reclaim_small_nonempty_block (instead of report_if_found).
3125 * doc/README.autoconf: Update; fix a typo.
3126 * include/private/gcconfig.h (GC_WORD_C): New macro.
3127
3128 * dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
3129 * dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
3130 comment.
3131 * dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
3132 argument.
3133 * dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
3134 message to GC_print_smashed_obj.
3135 * dbg_mlc.c (GC_debug_free): Call GC_size once.
3136 * dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
3137 allocation succeeded; remove unnecessary check for object is
3138 smashed (since this is done in GC_debug_free); remove "clobbered"
3139 local variable.
3140
3141 * dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
3142 Rename "integer" argument to "linenum"; change the type of the
3143 argument to int.
3144 * gcj_mlc.c (GC_store_debug_info): Likewise.
3145 * dbg_mlc.c (GET_OH_LINENUM): New macro.
3146 * dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
3147 GET_OH_LINENUM; adjust print format specifier.
3148 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
3149 GC_debug_malloc_atomic_ignore_off_page,
3150 GC_debug_generic_malloc_inner,
3151 GC_debug_generic_malloc_inner_ignore_off_page,
3152 GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
3153 GC_debug_malloc_uncollectable,
3154 GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
3155 "i".
3156 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
3157
3158 * os_dep.c (GC_linux_stack_base): Rename to
3159 GC_linux_main_stack_base.
3160 * os_dep.c (GC_freebsd_stack_base): Rename to
3161 GC_freebsd_main_stack_base; adjust error message.
3162 * pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
3163 as an argument for sem_init().
3164 * pthread_support.c (pthread_create): Likewise.
3165 * pthread_support.c (pthread_create): Abort in case sem_init()
3166 fails.
3167 * include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
3168 * tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
3169 from main() if it should be done from the primordial thread only.
3170
3171 * alloc.c: Don't include sys/types.h for ArmCC.
3172 * dyn_load.c: Likewise.
3173 * os_dep.c: Likewise.
3174 * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
3175 ArmCC.
3176 * mark.c (GC_noop): Define specially for ArmCC.
3177 * include/private/gc_priv.h (GC_noop): Likewise.
3178 * misc.c (GC_init): Don't test pointers comparison for ArmCC.
3179 * misc.c: Don't include unistd.h for ArmCC.
3180 * os_dep.c (pages_executable): Rename to GC_pages_executable;
3181 make STATIC.
3182 * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
3183 * ptr_chck.c (GC_is_visible): Explicitly cast
3184 (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
3185 a compiler warning).
3186 * include/private/gcconfig.h: Recognize __arm.
3187 * include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
3188 * include/private/gcconfig.h (HBLKPTR): Add parentheses for
3189 "bytes" argument.
3190
3191 * pthread_support.c (GC_get_nprocs): Don't define for Android.
3192 * pthread_support.c (GC_dummy_thread_local): Don't test
3193 GC_LINUX_THREADS.
3194 * include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
3195 Define for Android.
3196
3197 * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
3198 * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
3199 NO_GETCONTEXT.
3200 * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
3201 call for Android.
3202
3203 * include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
3204 Define before including windows.h.
3205 * include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
3206 Likewise.
3207 * include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
3208 NOSERVICE): Likewise.
3209 * include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
3210 arithmetics; add a comment.
3211
3212 * mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
3213 * extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
3214 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
3215 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
3216 "mark_byte" local variable.
3217 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
3218 about that AO_or() is not used by GC unless USE_MARK_BITS
3219 explicitly set.
3220 * include/private/gc_priv.h (OR_WORD): Likewise.
3221 * include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
3222 add parentheses.
3223 * include/private/gc_priv.h (ONES): Define before use by
3224 MAKE_COOLER.
3225 * include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
3226 * include/private/gc_priv.h (OR_WORD): Don't define if
3227 USE_MARK_BYTES.
3228 * include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
3229 definition; simplify expression.
3230
3231 * os_dep.c (GC_get_maps): Always close the file.
3232 * pthread_support.c (GC_get_nprocs): Likewise.
3233 * os_dep.c (READ): Define similarly across the file (without
3234 parameters).
3235 * pthread_support.c (GC_get_nprocs): Use signed int type for "i"
3236 and "len" local variables (since read() may return -1).
3237 * include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
3238 double underscore; add "volatile" for asm.
3239 * include/private/gc_pmark.h (LONG_MULT): Add missing
3240 parentheses.
3241 * include/private/gc_priv.h (OR_WORD): Likewise.
3242 * include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
3243 and ';' symbol.
3244
3245 * os_dep.c (GC_get_stack_base): Implement for Android (same as
3246 for Linux).
3247 * pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
3248 failed to open "stat" file (not to issue a warning twice); update
3249 the comment.
3250 * pthread_support.c (GC_thr_init): Call sysconf() on Android to
3251 get the number of CPUs.
3252
3253 * include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
3254 recent patches regarding this macro as the macro should be set
3255 (to 1) before including any other system header.
3256
3257 * doc/README.environment (GC_INITIAL_HEAP_SIZE,
3258 GC_MAXIMUM_HEAP_SIZE): Update.
3259
3260 * misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
3261 heap size specifier; return 0 if not a valid one.
3262 * include/gc_cpp.h: Explicitly define inline one-argument delete
3263 operator for Cygwin (as a workaround).
3264 * tests/test_cpp.cc (main): Suppress compiler warnings about
3265 "assigned value is unused".
3266
3267 * misc.c (GC_parse_mem_size_arg): New function.
3268 * misc.c (GC_init): Use GC_parse_mem_size_arg().
3269 * pthread_stop_world.c (tkill): Declare for Android.
3270
3271 * include/private/gc_priv.h (_GNU_SOURCE): Include features.h
3272 first (except for NaCl) and then define the macro to 1 if not yet.
3273
3274 * tests/tests.am (TESTS, check_PROGRAMS): Add
3275 'initsecondarythread'.
3276 * tests/tests.am (initsecondarythread_SOURCES,
3277 initsecondarythread_LDADD): New variable.
3278
3279 * dbg_mlc.c (GC_store_debug_info_inner): Always define; add
3280 "const" to its string argument.
3281 * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
3282 * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
3283 smashed or previously deallocated found.
3284 * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
3285 one.
3286 * reclaim.c (GC_reclaim_check): Likewise.
3287 * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
3288 * os_dep.c (GC_get_stack_base): Don't initialize
3289 stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
3290 calling GC_INIT() from a non-primordial thread is possible now).
3291 * reclaim.c (GC_add_leaked): Turn into an inline one.
3292 * reclaim.c (GC_reclaim_small_nonempty_block):
3293 Change report_if_found type from int/word to boolean.
3294 * include/private/gc_priv.h (GC_start_reclaim): Likewise.
3295 * include/private/gc_priv.h (set_mark_bit_from_hdr,
3296 clear_mark_bit_from_hdr): Place closing parenthesis properly.
3297
3298 * os_dep.c (GC_get_main_stack_base): Try to use
3299 pthread_attr_getstack first for Linux if THREADS.
3300 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
3301 alignment.
3302
3303 * dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
3304 typo.
3305 * dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
3306 * dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
3307 case of NULL argument).
3308 * dbg_mlc.c (GC_free): In case of NULL argument, just return
3309 (without any warning printed); eliminate "uncollectable" local
3310 variable.
3311
3312 * configure.ac (THREADDLLIBS): Use alternate thread library on
3313 Solaris 8.
3314 * configure.ac (need_atomic_ops_asm): Set to true only for SPARC
3315 Solaris.
3316 * configure.ac: Don't use libdl on mips-sgi-irix6.
3317
3318 * mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
3319 * mach_dep.c (GC_with_callee_saves_pushed): Don't call
3320 __builtin_unwind_init() for RTEMS; use setjmp() without the
3321 leading underscore (for RTEMS).
3322 * tests/test.c (BIG): Use smaller value for RTEMS.
3323 * tests/test.c (main): Customize for RTEMS.
3324
3325 * configure.host: Remove doubled words in comments.
3326 * os_dep.c: Likewise.
3327 * doc/README: Likewise.
3328 * extra/setjmp_t.c: Likewise.
3329 * tests/huge_test.c: Likewise.
3330 * extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
3331 K&R-style function definition with the ANSI C one.
3332 * extra/setjmp_t.c (nested_sp): Implement in the same way as
3333 GC_approx_sp.
3334
3335 * dyn_load.c (GC_dyld_sections): Add more sections.
3336 * dyn_load.c (GC_dyld_add_sect_fmts): New static variable.
3337 * dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
3338 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
3339 logging; add support for on-demand sections.
3340
3341 * gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
3342 GC_ASSERTIONS.
3343 * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
3344 declare (as external) unless GC_ASSERTIONS.
3345 * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
3346 Cygwin; add FIXME.
3347 * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
3348 * include/private/gcconfig.h: Add "#error" for every "-->" mark.
3349 * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
3350 an expression.
3351 * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
3352 (which existed previously as SUSPENDED and still exists in GCJ).
3353 * include/private/pthread_support.h (DISABLED_GC): Change the
3354 value (as it is already used by SUSPENDED_EXT).
3355
3356 * tests/test.c (reverse_test): Modify count (BIG) for
3357 ppc64-darwin.
3358
3359 * reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
3360 macro and environment variable; abort if any error has been
3361 printed provided the environment variable (or macro) is set.
3362 * doc/README.environment (GC_ABORT_ON_LEAK): Document.
3363 * doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
3364
3365 * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
3366 for RTEMS.
3367 * include/private/gcconfig.h (RTEMS): Add support for.
3368 * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
3369
3370 * mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
3371 it is used internally in some places).
3372
3373 * dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
3374 declaration.
3375 * dbg_mlc.c (GC_debug_malloc_replacement,
3376 GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
3377 * malloc.c (GC_debug_malloc_replacement): Likewise.
3378 * mallocx.c (GC_debug_realloc_replacement): Likewise.
3379 * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
3380 * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
3381 * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
3382 includes of string.h.
3383 * mallocx.c: Include string.h (for GC_strdup).
3384 * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
3385 to dbg_mlc.c.
3386 * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
3387 redundant trailing ';'.
3388 * include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
3389 * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
3390 properly.
3391 * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
3392 malloc.c, mallocx.c.
3393
3394 * alloc.c (GC_check_heap, GC_print_all_smashed): Move the
3395 definition from misc.c.
3396 * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
3397 public.
3398 * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
3399 * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
3400 macro.
3401 * dbg_mlc.c (MAX_SMASHED): Don't define if already set.
3402 * reclaim.c (MAX_LEAKED): Likewise.
3403 * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
3404 access to the global array.
3405 * reclaim.c (GC_add_leaked): Likewise.
3406 * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
3407 (new macro) is defined.
3408 * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
3409 * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
3410 GC_dump_regularly and GC_print_back_height variables with
3411 FALSE/TRUE.
3412 * reclaim.c (GC_print_all_errors): Refine the comment.
3413
3414 * tests/test.c (reverse_test_inner): Undo one of the previous
3415 patches which shifts "c" and "d" pointers only if
3416 ALL_INTERIOR_POINTERS (since interior pointers are always
3417 recognized in stacks).
3418
3419 * misc.c (GC_stdout, GC_stderr): Move the definition to the place
3420 where GC_log is defined (Unix only).
3421 * misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
3422 variable and the similar macro; redirect GC_stdout and GC_stderr
3423 to GC_log if "GC_LOG_FILE" environment variable is set unless
3424 prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
3425 * doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
3426 * doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
3427
3428 * misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
3429 only).
3430 * misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
3431 accordingly.
3432 * misc.c (GC_printf): Check GC_quiet before va_start().
3433
3434 * allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
3435 inside "if (GC_print_stats)" branch.
3436 * alloc.c (GC_collect_or_expand): Likewise.
3437 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3438 * headers.c (GC_scratch_alloc): Likewise.
3439 * os_dep.c (GC_get_maps, GC_remap, PROTECT,
3440 GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
3441 * alloc.c (min_bytes_allocd): Use GC_log_printf instead of
3442 GC_printf for DEBUG_THREADS output.
3443 * darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
3444 GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
3445 * pthread_start.c (GC_inner_start_routine): Likewise.
3446 * pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
3447 GC_push_all_stacks, GC_suspend_all, GC_stop_world,
3448 GC_start_world): Likewise.
3449 * pthread_support.c (GC_mark_thread, GC_get_nprocs,
3450 GC_start_rtn_prepare_thread, pthread_create): Likewise.
3451 * checksums.c (GC_update_check_page): Use GC_printf() instead of
3452 GC_err_printf() for error printing.
3453 * checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
3454 instead of GC_printf for logging purposes.
3455 * dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
3456 external variable outside from GC_register_dynamic_libraries.
3457 * dyn_load.c (GC_register_dynamic_libraries): Don't use
3458 sys_errlist value if errno equals to sys_nerr.
3459 * dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
3460 instead of GC_printf for DL_VERBOSE output.
3461 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
3462 GC_init_dyld): Use GC_log_printf instead of GC_printf for
3463 DARWIN_DEBUG output.
3464 * os_dep.c (catch_exception_raise): Use GC_log_printf
3465 instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
3466 * reclaim.c (GC_print_free_list): Move "n" increment out of
3467 GC_printf() call.
3468
3469 * win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
3470 DEBUG_WIN32_THREADS): Remove.
3471 * win32_threads.c (GC_register_my_thread_inner,
3472 GC_win32_start_inner): Use GC_log_printf instead of GC_printf
3473 inside "if (GC_print_stats)" branch.
3474 * win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
3475 GC_PTHREADS).
3476 * win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
3477 GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
3478 macro.
3479 * win32_threads.c (GC_push_stack_for, GC_mark_thread,
3480 GC_CreateThread, GC_beginthreadex, GC_pthread_join,
3481 GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
3482 GC_mark_thread_local_free_lists): Use GC_log_printf instead of
3483 GC_printf for DEBUG_THREADS output.
3484 * win32_threads.c (GC_win32_start_inner, GC_CreateThread,
3485 GC_beginthreadex, GC_pthread_join, GC_pthread_create,
3486 GC_pthread_start_inner, GC_thread_exit_proc): Cast
3487 GetCurrentThreadId result to long; don't cast value of pthread_t
3488 type to int; adjust printf format specifiers.
3489 * doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
3490 information.
3491
3492 * tests/test.c (cons, small_cons, gcj_cons, check_ints,
3493 check_uncollectable_ints, print_int_list, check_marks_int_list,
3494 fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
3495 alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
3496 test, main): Remove unnecessary casts of GC_printf calls to void.
3497
3498 * allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
3499 BDWGC) printed message (adjust letters case, terminating dot and
3500 new line symbols).
3501 * alloc.c (GC_check_fl_marks): Likewise.
3502 * backgraph.c (new_back_edges): Likewise.
3503 * checksums.c (GC_check_dirty): Likewise.
3504 * darwin_stop_world.c (GC_push_all_stacks,
3505 GC_suspend_thread_list): Likewise.
3506 * dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
3507 store_old): Likewise.
3508 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3509 * mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
3510 GC_push_selected, GC_push_next_marked_dirty): Likewise.
3511 * mark_rts.c (GC_exclude_static_roots_inner): Likewise.
3512 * os_dep.c (GC_remap, GC_default_push_other_roots,
3513 GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
3514 catch_exception_raise_state, catch_exception_raise_state_identity,
3515 GC_mprotect_thread_notify, GC_mprotect_thread,
3516 catch_exception_raise): Likewise.
3517 * pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
3518 GC_stop_world, GC_stop_init): Likewise.
3519 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
3520 GC_start_routine): Likewise.
3521 * win32_threads.c (GC_register_my_thread_inner,
3522 GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
3523 GC_pthread_start_inner): Likewise.
3524 * alloc.c (GC_expand_hp_inner): Realign the code.
3525 * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
3526 Likewise.
3527 * misc.c (GC_init): Likewise.
3528 * os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
3529 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
3530 * tests/test.c (run_one_test): Likewise.
3531 * misc.c (GC_err_puts): Document.
3532 * misc.c (GC_err_write): Remove.
3533 * os_dep.c (dump_maps): Likewise.
3534 * include/private/gc_priv.h (GC_err_write): Likewise.
3535 * os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
3536 dump_maps() and GC_err_write().
3537 * os_dep.c (GC_read_dirty): Remove redundant brackets.
3538
3539 * tests/test.c (reverse_test_inner): Test interior pointer
3540 recognition only if ALL_INTERIOR_POINTERS.
3541 * tests/test.c (run_one_test): Replace GC_all_interior_pointers
3542 with GC_get_all_interior_pointers(); simplify the expression.
3543 * tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
3544 GC_bytes_allocd_before_gc with GC_get_total_bytes().
3545 * tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
3546
3547 * dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
3548 warning if the argument is NULL and GC is in leaks detection mode.
3549 * dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
3550 function definition.
3551 * malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
3552 * mallocx.c (GC_posix_memalign): Likewise.
3553 * malloc.c (strdup): Fix string size value; rename "len" to "lb".
3554 * mallocx.c: Include errno.h unless WinCE (otherwise include
3555 windows.h for Win32 error constants).
3556 * win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
3557 windows.h inclusion.
3558 * misc.c (GC_init): Register at-exit callback if GC_find_leak
3559 (even if GC_FIND_LEAK macro is unset).
3560 * pthread_stop_world.c (NACL_STORE_REGS,
3561 __nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
3562 Use BCOPY() instead of memcpy().
3563 * pthread_support.c (GC_init_real_syms): Likewise.
3564 * doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
3565 Document new macro.
3566 * doc/README.macros (REDIRECT_MALLOC): Update documentation.
3567 * include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
3568 New API function prototype.
3569 * include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
3570 GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
3571 * include/gc.h (GC_STRDUP): Remove redundant parentheses.
3572 * include/leak_detector.h (realloc, strdup): Likewise.
3573 * include/gc.h (GC_STRNDUP): New API macro.
3574 * include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
3575 GC_NEW_UNCOLLECTABLE): Add missing parentheses.
3576 * include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
3577 prototype (only if GC_REQUIRE_WCSDUP).
3578 * include/gc.h (GC_WCSDUP): New API macro (only if
3579 GC_REQUIRE_WCSDUP).
3580 * include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
3581 GC_DONT_INCLUDE_STDLIB).
3582 * include/leak_detector.h (malloc, calloc, free, realloc):
3583 Undefine symbol before its redefinition.
3584 * include/leak_detector.h (strndup, memalign, posix_memalign):
3585 Redefine to the corresponding GC function.
3586 * include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
3587 if GC_REQUIRE_WCSDUP).
3588 * include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
3589 the macro if already defined.
3590
3591 * misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
3592 when doing code static analysis (to inform the tool that the
3593 function is a no-return one).
3594 * os_dep.c (GC_linux_stack_base): Remove a duplicate validation
3595 of the length of "stat" file; use signed int type for "i",
3596 "buf_offset" and "len" local variables (since read() may
3597 return -1).
3598
3599 * blacklst.c (GC_bl_init_no_interiors): New function (the code
3600 moved from GC_bl_init).
3601 * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
3602 GC_all_interior_pointers mode; remove unnecessarily parameter cast
3603 for GC_scratch_alloc call.
3604 * include/private/gc_priv.h (GC_bl_init): Move the function
3605 declaration to misc.c file.
3606 * misc.c (GC_bl_init_no_interiors): Add a prototype.
3607 * misc.c (GC_set_all_interior_pointers): Allow values other than 0
3608 and 1; allow altering GC_set_all_interior_pointers value even
3609 after GC initialization.
3610 * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
3611 GC_modws_valid_offsets if GC_all_interior_pointers is off.
3612 * misc.c (GC_init): Don't call GC_initialize_offsets() unless
3613 GC_all_interior_pointers mode.
3614
3615 * alloc.c (GC_finish_collection): Remove redundant brackets;
3616 adjust code indentation.
3617 * blacklst.c (GC_add_to_black_list_normal): Simplify expression
3618 (to improve code readability).
3619 * blacklst.c (GC_is_black_listed): Join nested "if" (into a single
3620 conditional expression); initialize "nblocks" just before the loop
3621 beginning.
3622 * misc.c (GC_init): Don't compute initial_heap_sz if GC is already
3623 initialized.
3624 * include/private/gc_priv.h (GC_initialize_offsets): Move the
3625 function declaration to misc.c file.
3626 * obj_map.c (GC_initialize_offsets): Remove offsets_initialized
3627 static variable since the function is called only once.
3628 * tests/middle.c (main): Use setter for GC_all_interior_pointers;
3629 adjust printf format specifier (and cast the value passed to).
3630
3631 * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
3632 documentation.
3633 * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
3634 if LARGE_CONFIG is defined.
3635 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
3636
3637 * alloc.c (GC_finish_collection): Replace "#else #ifdef" with
3638 "#elif".
3639 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
3640 MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
3641 * alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
3642 overflow even if not LARGE_CONFIG.
3643 * dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
3644 SMALL_CONFIG.
3645 * finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
3646 * doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
3647 GC_FULL_FREQUENCY): Refine the documentation.
3648
3649 * extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
3650 GC_word).
3651 * extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
3652 as word.
3653
3654 * dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
3655 GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
3656 LINT-like tool to instruct it that the function is invoked only
3657 with valid parameters (otherwise a SEGV is ok); recognize LINT2
3658 new macro.
3659 * misc.c (GC_abort): Instruct a LINT-like tool that the function
3660 never returns in fact.
3661 * os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
3662 close the file immediately after read; use STRTOULL() instead of
3663 decoding the address number manually.
3664 * include/private/gc_priv.h (EXPECT): Don't specify outcome for a
3665 LINT-like tool.
3666 * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
3667 LINT-like tool that the value is restricted to zero and one only
3668 (required since the variable is global and its value is used as a
3669 part of array index expression is some places).
3670
3671 * dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
3672 NULL.
3673 * dbg_mlc.c (GC_debug_register_finalizer,
3674 GC_debug_register_finalizer_no_order,
3675 GC_debug_register_finalizer_unreachable,
3676 GC_debug_register_finalizer_ignore_self): Handle out of memory
3677 case properly (similar to GC_register_finalizer_inner).
3678 * headers.c (GC_install_header): Handle the case when alloc_hdr()
3679 returns NULL.
3680 * os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
3681 * pthread_support.c (GC_mark_thread): Place a dummy return
3682 statement (which uses "id" argument) before the actual use of "id"
3683 as an array index (to suppress a warning produced by some static
3684 code analysis tools).
3685 * win32_threads.c (GC_mark_thread): Likewise.
3686 * pthread_support.c (GC_thr_init): Abort (with the appropriate
3687 message) if out of memory.
3688
3689 * finalize.c (GC_register_finalizer_inner): Fix a typo in a
3690 comment.
3691 *include/private/gcconfig.h (STACKBOTTOM): Likewise.
3692 * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
3693 EXPECT (the 2nd argument).
3694 * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
3695 Likewise.
3696 * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
3697 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
3698 * include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
3699 * include/private/gc_priv.h (SMALL_OBJ): Likewise.
3700 * include/private/specific.h (getspecific): Likewise.
3701 * pthread_support.c (LOCK_STATS): Add a comment.
3702
3703 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
3704 GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
3705 GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
3706 definition to gc_config_macros.
3707
3708 * pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
3709 GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
3710 GC_PTHREAD_EXIT_ATTRIBUTE).
3711 * include/gc_pthread_redirects.h (GC_pthread_cancel,
3712 pthread_cancel): Likewise.
3713 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
3714 GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
3715 code.
3716 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
3717 Define as empty for NaCl.
3718 * include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
3719 defined.
3720
3721 * dyn_load.c (GC_init_dyld): Do not invoke
3722 _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
3723 not required to register the main data segment in that case).
3724 * include/gc.h (GC_no_dls): Adjust the comment.
3725
3726 * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
3727 GC_NO_DLOPEN.
3728 * gc_dlopen.c: Likewise.
3729 * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
3730 * gc_dlopen.c: Don't include dlfcn.h (as it is included in
3731 gc_pthread_redirects.h).
3732 * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
3733 GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
3734 GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
3735 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
3736 pthread_sigmask): Likewise.
3737 * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
3738 GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
3739 * pthread_support.c (pthread_create, GC_pthread_create_t,
3740 GC_pthread_create): Rename GC_PTHREAD_CONST to
3741 GC_PTHREAD_CREATE_CONST.
3742 * win32_threads.c (GC_pthread_create): Likewise.
3743 * include/gc_pthread_redirects.h: Likewise.
3744 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
3745 GC_NO_PTHREAD_SIGMASK): New macro defined.
3746 * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
3747 empty for NaCl.
3748 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
3749 not define for Android (as CANCEL_SAFE is not defined).
3750
3751 * include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
3752 GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
3753 definition to gc_config_macros.h file.
3754 * include/gc_config_macros.h: Check the file is included from gc.h
3755 file.
3756 * include/gc_version.h: Likewise.
3757
3758 * gc_dlopen.c: Empty unit for NaCl.
3759 * os_dep.c: Include fcntl.h for NaCl.
3760 * os_dep.c (GC_get_main_stack_base): Ignore
3761 USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
3762 * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
3763 * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
3764 * pthread_start.c (GC_inner_start_routine): Don't invoke
3765 pthread_cleanup_push/pop for NaCl.
3766 * pthread_stop_world.c (GC_nacl_num_gc_threads,
3767 GC_nacl_thread_idx, GC_nacl_park_threads_now,
3768 GC_nacl_thread_parker, GC_nacl_gc_thread_self,
3769 GC_nacl_thread_parked, GC_nacl_thread_used,
3770 GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
3771 variable (fo NaCl only).
3772 * pthread_stop_world.c (GC_remove_allowed_signals,
3773 suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
3774 GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
3775 GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
3776 GC_restart_handler): Don't define for NaCl.
3777 * pthread_support.c (GC_get_nprocs): Likewise.
3778 * include/private/gc_priv.h (SIG_SUSPEND): Likewise.
3779 * include/private/gcconfig.h (LINUX): Likewise.
3780 * pthread_stop_world.c (GC_push_all_stacks): Push register storage
3781 for NaCl.
3782 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
3783 GC_start_world): Implement for NaCl.
3784 * pthread_stop_world.c (GC_stop_world): Don't define unused "i"
3785 local variable for OpenBSD (and NaCl).
3786 * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
3787 NaCl.
3788 * pthread_stop_world.c (nacl_pre_syscall_hook,
3789 __nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
3790 GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
3791 function (for NaCl only).
3792 * pthread_stop_world.c (GC_stop_init): Empty for NaCl.
3793 * pthread_support.c (pthread_cancel, pthread_sigmask): Don't
3794 redirect for NaCl.
3795 * include/gc_pthread_redirects.h (pthread_cancel,
3796 pthread_sigmask): Likewise.
3797 * pthread_support.c (GC_nacl_initialize_gc_thread,
3798 GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
3799 * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
3800 and shutdown thread for NaCl.
3801 * pthread_support.c (GC_thr_init): Call sysconf for NaCl.
3802 * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
3803 for NaCl.
3804 * include/gc.h: Don't include features.h for NaCl.
3805 * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
3806 * include/gc_pthread_redirects.h (GC_pthread_create): Use
3807 GC_PTHREAD_CONST instead of const.
3808 * win32_threads.c (GC_pthread_create): Likewise.
3809 * pthread_support.c (GC_pthread_create_t, GC_pthread_create,
3810 pthread_create): Likewise.
3811 * include/private/gcconfig.h (NACL): Recognize NaCl.
3812 * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
3813 * include/private/pthread_stop_world.h (thread_stop_info): Add
3814 reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
3815 NaCl only).
3816 * include/private/pthread_support.h (GC_nacl_gc_thread_self):
3817 Declare internal variable (for NaCl only).
3818
3819 * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
3820 macro.
3821
3822 * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
3823 keywords with double underscore.
3824 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
3825 catch_exception_raise_state_identity): Add GC_API_OSCALL to
3826 function definition.
3827 * os_dep.c (catch_exception_raise_state,
3828 catch_exception_raise_state_identity): Move definition to be
3829 before GC_ports.
3830 * os_dep.c (catch_exception_raise): Declare to have the symbol
3831 defined before GC_ports.
3832 * os_dep.c (GC_ports): Store references to catch_exception_raise,
3833 catch_exception_raise_state, catch_exception_raise_state_identity
3834 (to prevent stripping these symbols as dead).
3835 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
3836 catch_exception_raise_state_identity): Mark these symbols as
3837 "referenced dynamically" via an assembler directive (unless
3838 NO_DESC_CATCH_EXCEPTION_RAISE).
3839 * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
3840 similar to GC_API but as if GC_DLL is always defined).
3841
3842 * os_dep.c: Don't include signal.h for GC_write_fault_handler on
3843 Win32.
3844 * os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
3845 FreeBSD.
3846 * os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
3847 SEGV_ACCERR for older FreeBSD releases).
3848
3849 * dyn_load.c (GC_register_map_entries,
3850 GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
3851 DATASTART only once if DATASTART_IS_FUNC.
3852 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
3853 Calculate DATAEND only once if DATAEND_IS_FUNC.
3854 * dyn_load.c: Add comment to some endif; realign some code.
3855 * dyn_load.c (GC_init_dyld): Don't use
3856 _dyld_bind_fully_image_containing_address if
3857 NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
3858 * include/private/gcconfig.h (GC_data_start, GC_find_limit):
3859 Declare if used by DATASTART/DATAEND, respectively.
3860 * include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
3861 Define if DATASTART/DATAEND is a function, respectively.
3862 * include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
3863 NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
3864 unistd.h.
3865
3866 * os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
3867 Reorder to remove redundant ifdef for Win32.
3868 * os_dep.c: Add comment to some endif.
3869 * os_dep.c: Include pthread.h (for Linux even if single-threaded)
3870 if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
3871 * os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
3872 for some reason).
3873 * os_dep.c (GC_get_main_stack_base): Allow
3874 USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
3875 assertion for the returned result.
3876 * os_dep.c (GC_get_stack_base): Define for Darwin if
3877 multi-threaded.
3878 * os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
3879 * os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
3880 * os_dep.c (catch_exception_raise): Remove redundant parentheses;
3881 refine the documentation.
3882
3883 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
3884 well.
3885 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3886 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
3887 * include/gc.h (GC_INIT): Document.
3888 * include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
3889 GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
3890 define these macros also for ARM).
3891 * tests/test.c (check_heap_stats): Print main thread stack bottom
3892 as well (only if verbose mode is on).
3893
3894 * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
3895 introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
3896 and X86_64).
3897
3898 * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
3899 "volatile" keyword with double underscore.
3900 * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
3901 include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
3902 * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
3903 mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
3904 * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
3905 for Linux/x64 (since its GLibc getcontext currently has the bug).
3906
3907 * allchblk.c (GC_use_entire_heap): Change type to int (as declared
3908 in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
3909 macro.
3910 * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
3911 alter the default value of GC_use_entire_heap.
3912 * doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
3913 * doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
3914
3915 * include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
3916 MPROTECT_VDB undefining.
3917
3918 * include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
3919 the comment.
3920
3921 * include/private/gc_priv.h (_GC_arrays): Move the conditional
3922 macro definitions (shortcuts for GC_arrays members) into the
3923 structure body.
3924
3925 * darwin_stop_world.c (GC_mach_handler_thread,
3926 GC_use_mach_handler_thread,
3927 GC_darwin_register_mach_handler_thread): Define only if
3928 MPROTECT_VDB.
3929 * darwin_stop_world.c (GC_suspend_thread_list): Use
3930 GC_mach_handler_thread and GC_use_mach_handler_thread only if
3931 MPROTECT_VDB.
3932 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
3933 only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
3934 * misc.c (GC_init): Fix comment for GWW_VDB.
3935 * os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
3936 DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
3937 * os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
3938 DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
3939 * pthread_support.c (GC_thr_init): Define "dummy" local variable
3940 only unless GC_DARWIN_THREADS.
3941 * include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
3942 even in the single-threaded mode; define for iPhone/iPad.
3943 * include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
3944 around "undef".
3945 * include/private/gcconfig.h (HEURISTIC1): Remove unused for
3946 Cygwin.
3947 * include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
3948 Darwin/arm (instead of HEURISTIC1).
3949
3950 * misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
3951 (for ECOS and NOSYS).
3952 * os_dep.c (GC_get_main_stack_base): Likewise.
3953 * os_dep.c (GC_get_main_stack_base): Check
3954 USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
3955 remove "dummy" variable (use result one instead).
3956 * doc/README.macros (SN_TARGET_PS3): Document.
3957 * extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
3958 for Android.
3959 * include/private/pthread_support.h: Fix comment for "endif".
3960
3961 * misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
3962 * misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
3963 * os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
3964 * os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
3965 * os_dep.c (GC_default_push_other_roots,
3966 GC_push_thread_structures): Define for SN_TARGET_PS3.
3967 * include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
3968 for SN_TARGET_PS3.
3969 * include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
3970 (Sony PS/3 target).
3971 * include/private/gcconfig.h (THREADS): Define unconditionally if
3972 SN_TARGET_PS3.
3973 * include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
3974
3975 * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
3976 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
3977 GC_debug_malloc_atomic_ignore_off_page,
3978 GC_debug_generic_malloc_inner,
3979 GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
3980 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
3981 GC_debug_malloc_atomic_uncollectable): Likewise.
3982 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
3983 * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
3984 comment.
3985 * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
3986 * mark_rts.c (GC_roots_present): Likewise.
3987 * doc/README: Likewise.
3988 * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
3989 * include/private/gc_priv.h (_GC_arrays): Likewise.
3990
3991 * configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
3992 just blindly linking to -lpthread, as Android includes pthread
3993 support within libc and does not provide a separate libpthread.
3994 * dyn_load.c (GC_register_dynamic_libraries): Skip current link map
3995 entry if l_addr is NULL (Android/bionic only).
3996 * pthread_stop_world.c (android_thread_kill): New internal function
3997 (Android only).
3998 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
3999 android_thread_kill (based on tkill) instead of pthread_kill on
4000 Android (since pthread_kill cannot be used safely on the platform).
4001 * pthread_support.c (GC_new_thread): Store thread Id (obtained from
4002 gettid) for use by android_thread_kill (Android only).
4003 * include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
4004 structure member (Android only).
4005 * include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
4006 of __x86_64__ (Darwin); define __environ macro (Android on M68K).
4007
4008 * allchblk.c (GC_freehblk): Print extended error message (done via
4009 GC_printf() before aborting with a short message) only if
4010 GC_print_stats.
4011 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
4012 * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
4013 PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
4014 * pthread_stop_world.c (GC_start_world): Likewise.
4015 * win32_threads.c (GC_register_my_thread_inner): Likewise.
4016 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
4017 GC_dirty_init): Remove redundant print of an error message before
4018 aborting with the same message.
4019 * os_dep.c (GC_register_data_segments): Remove format specifier
4020 from the string passed to GC_err_puts(); use ABORT instead of EXIT
4021 (if invalid executable type).
4022 * os_dep.c (GC_remap): Adjust printf format specifier (for long
4023 type).
4024 * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
4025 (for SIGSEGV/BUS) only if GC_print_stats.
4026 * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
4027 calls.
4028
4029 * tests/test.c (main): Print the relevant message if GWW_VDB.
4030 * include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
4031 on x64 if compiled by GCC.
4032
4033 * tests/staticrootstest.c: Include string.h for memset() prototype.
4034 * tests/thread_leak_test.c (main): Fix printf() format specifiers.
4035
4036 * CMakeLists.txt: Check enable_parallel_mark on Darwin.
4037 * configure.ac: Likewise.
4038 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
4039 DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
4040 GC_DISCOVER_TASK_THREADS, respectively.
4041 * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
4042 * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
4043 * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
4044 (and remove FIXME).
4045 * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
4046 comment; remove FIXME.
4047 * win32_threads.c (GC_NO_DLLMAIN): Rename to
4048 GC_NO_THREADS_DISCOVERY.
4049 * tests/test.c (GC_NO_DLLMAIN): Likewise.
4050 * doc/README.macros (GC_NO_DLLMAIN): Likewise.
4051 * doc/README.win32 (GC_NO_DLLMAIN): Likewise.
4052 * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
4053 * win32_threads.c (GC_win32_dll_threads): Define as macro to true
4054 if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
4055 update the comment.
4056 * win32_threads.c (GC_use_DllMain): Rename to
4057 GC_use_threads_discovery; do not set GC_win32_dll_threads if
4058 GC_DISCOVER_TASK_THREADS.
4059 * win32_threads.c (GC_started_thread_while_stopped,
4060 GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
4061 GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
4062 which use GC_win32_dll_threads to minimize the possibility of
4063 an "unreachable code" compiler warning when GC_win32_dll_threads
4064 is defined as a macro.
4065 * win32_threads.c (GC_unregister_my_thread): Don't call
4066 GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
4067 (since can't happen); use "t" local variable only if not
4068 GC_win32_dll_threads.
4069 * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
4070 * include/gc.h (GC_use_DllMain): Rename to
4071 GC_use_threads_discovery but keep old name as a macro definition.
4072 * include/gc.h (GC_use_threads_discovery): Declare also for
4073 Darwin; update the comment.
4074 * tests/test.c (main): Call GC_use_threads_discovery for Darwin
4075 (to test the mode if possible).
4076
4077 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
4078 DARWIN_QUERY_TASK_THREADS): New macro recognized.
4079 * darwin_stop_world.c (GC_query_task_threads): add STATIC;
4080 initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
4081 or DARWIN_QUERY_TASK_THREADS; remove FIXME.
4082 * darwin_stop_world.c (GC_use_threads_discovery): New function
4083 (for setting GC_query_task_threads value).
4084 * darwin_stop_world.c (GC_mach_handler_thread,
4085 GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
4086 GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
4087 GC_darwin_register_mach_handler_thread): Define only if not
4088 DARWIN_SUSPEND_GC_THREADS.
4089 * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
4090 the code for GC_query_task_threads case from compilation unless
4091 DARWIN_SUSPEND_GC_THREADS.
4092 * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
4093 if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
4094 * os_dep.c (GC_mprotect_thread): Call
4095 GC_darwin_register_mach_handler_thread only if THREADS and not
4096 DARWIN_SUSPEND_GC_THREADS.
4097 * pthread_support.c (marker_mach_threads): Don't define if
4098 DARWIN_SUSPEND_GC_THREADS.
4099 * pthread_support.c (GC_mark_thread): Don't fill in
4100 marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
4101 * include/private/gc_locks.h (GC_need_to_lock): Always declare for
4102 THREADS case.
4103
4104 * darwin_stop_world.c (GC_query_task_threads): Don't define to
4105 false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
4106 the variable to false (for now).
4107 * darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
4108 only if not DARWIN_DONT_PARSE_STACK.
4109 * darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
4110 approach based on task_threads() only if GC_query_task_threads
4111 else use GC_threads table.
4112
4113 * darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
4114 * darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
4115 really clear GC_mach_threads[]).
4116 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
4117 (instead of calling GC_stop_init).
4118 * include/private/pthread_support.h (GC_stop_init): Remove proto.
4119 * pthread_support.c (GC_stop_init): Add proto (unless Darwin).
4120 * pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
4121 GC_DARWIN_THREADS.
4122
4123 * darwin_stop_world.c (GC_stack_range_for): New static function
4124 (move the code from GC_push_all_stacks).
4125 * darwin_stop_world.c (GC_push_all_stacks): Call
4126 GC_stack_range_for(); rename kern_return local variable to
4127 kern_result.
4128 * darwin_stop_world.c (GC_is_mach_marker): Change argument type
4129 from mach_port_t to thread_act_t.
4130 * pthread_support.c (GC_is_mach_marker): Likewise.
4131
4132 * darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
4133 variable initialization (always call current_task()).
4134 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
4135 Don't set thread's stop_info.stack_ptr value for Darwin.
4136 * include/private/darwin_stop_world.h (thread_stop_info): Update
4137 the comment for stack_ptr.
4138
4139 * darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
4140 variables to "kern_return" and "my_thread" ones, respectively;
4141 call mach_port_deallocate() unconditionally.
4142 * darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
4143 if DEBUG_THREADS.
4144
4145 * darwin_stop_world.c (GC_mach_thread): Move from
4146 darwin_stop_world.h.
4147 * include/private/darwin_stop_world.h (GC_mach_thread): Remove.
4148 * win32_threads.c (GC_start_world): Define "thread_id" local
4149 variable only if GC_ASSERTIONS; decide whether to resume a thread
4150 based on its "suspended" field value; assert that suspended thread
4151 stack_base is non-zero and the thread is not our one.
4152
4153 * darwin_stop_world.c (GC_thread_resume): New inline function
4154 (move code from GC_thread_resume).
4155 * darwin_stop_world.c (GC_start_world): Check result of
4156 task_threads(); call GC_thread_resume().
4157 * os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
4158 only if not CYGWIN32.
4159 * os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
4160 if not CYGWIN32.
4161
4162 * darwin_stop_world.c (FindTopOfStack): Change return type to
4163 ptr_t (from long); make GC_INNER; add GC_ prefix.
4164 * darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
4165 local variable (initialized from the corresponding GC_thread
4166 field unless GC_query_task_threads); add assertion that our
4167 thread is not blocked; prefix FindTopOfStack with GC_ and remove
4168 no longer needed cast to ptr_t of the result; handle thread
4169 blocked case (and remove FIXME); use GC_push_all_stack_sections
4170 unless GC_query_task_threads (and remove FIXME).
4171 * pthread_support.c (GC_FindTopOfStack): Declare (if needed).
4172 * pthread_support.c (GC_do_blocking_inner): Call
4173 GC_save_regs_in_stack (if needed) before acquiring the lock.
4174 * win32_threads.c (GC_do_blocking_inner): Likewise.
4175 * pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
4176 field of GC_thread (Darwin only).
4177 * include/private/pthread_support.h (GC_thread): Add topOfStack
4178 field for Darwin (unless DARWIN_DONT_PARSE_STACK).
4179
4180 * finalize.c (GC_check_finalizer_nested): Change return type to
4181 char pointer (instead of int pointer); use explicit cast for
4182 GC_finalizer_nested assignment.
4183 * pthread_support.c (GC_check_finalizer_nested): Likewise.
4184 * win32_threads.c (GC_check_finalizer_nested): Likewise.
4185 * finalize.c (GC_finalizer_nested): Change type to unsigned char.
4186 * finalize.c (GC_notify_or_invoke_finalizers): Change type of
4187 "pnested" local variable to char pointer.
4188 * pthread_support.c (GC_do_blocking_inner,
4189 GC_call_with_gc_active): Use explicit cast for "thread_blocked"
4190 field assignment.
4191 * win32_threads.c (GC_lookup_pthread): Use explicit cast for
4192 "suspended" field assignment.
4193 * win32_threads.c (GC_Thread_Rep): Use short type for
4194 finalizer_skipped; use char type for finalizer_nested and flags
4195 fields and reorder some fields (to minimize GC_Thread_Rep
4196 structure size).
4197 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
4198 * win32_threads.c (GC_Thread_Rep): Use char type for suspended
4199 field (instead of GC_bool).
4200 * include/private/pthread_support.h (GC_Thread_Rep): Use char type
4201 for thread_blocked field (instead of short).
4202
4203 * darwin_stop_world.c (GC_query_task_threads): New variable (or
4204 macro).
4205 * darwin_stop_world.c (GC_push_all_stacks): Use
4206 GC_query_task_threads (to choose between algorithms based on
4207 kernel task_threads and based on GC_threads table); update FIXME;
4208 remove commented out GC_push_one statements.
4209 * pthread_support.c (GC_thr_init, GC_do_blocking_inner,
4210 GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
4211 stack_ptr field for all platforms.
4212 * pthread_support.c (GC_call_with_gc_active): Initialize
4213 saved_stack_ptr field for all platforms.
4214 * include/private/darwin_stop_world.h (thread_stop_info): Add
4215 stack_ptr field; change type of already_suspended from int to
4216 GC_bool.
4217
4218 * darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
4219 * darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
4220 GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
4221 * darwin_stop_world.c (GC_mach_threads): Add FIXME.
4222 * darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
4223 GC_stop_world): Use FALSE and TRUE for already_suspended field and
4224 "changed", "found" variables.
4225 * darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
4226 PARALLEL_MARK).
4227 * darwin_stop_world.c (GC_suspend_thread_list): Change return type
4228 to GC_bool; change type of "changed", "found" to GC_bool; make
4229 "my_thread" as an argument (instead of acquiring/deallocating it
4230 locally); do not add my_thread, GC_mach_handler_thread and marker
4231 threads to GC_mach_threads table; check for overflow of
4232 GC_mach_threads table; increase GC_mach_threads_count if "found"
4233 is true and info.suspend_count is non-zero.
4234 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
4235 Adjust "thread" format specifiers for GC_printf(); search thread
4236 in "old_list" starting from the previous found one.
4237 * darwin_stop_world.c (GC_stop_world): Rename "changes" to
4238 "changed" local variable; remove "result" variable; adjust
4239 GC_printf debugging message.
4240 * darwin_stop_world.c (GC_start_world): Do not check for
4241 my_thread and GC_use_mach_handler_thread (since they are not added
4242 to GC_mach_threads table); call thread_info() only if
4243 DEBUG_THREADS or GC_ASSERTIONS.
4244 * pthread_support.c (marker_mach_threads): New static variable (if
4245 Darwin).
4246 * pthread_support.c (GC_is_mach_marker): New function (if Darwin).
4247 * pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
4248 table (if Darwin).
4249
4250 * alloc.c (GC_parallel): Define only if THREADS.
4251 * misc.c (GC_get_parallel): Likewise.
4252 * include/gc.h (GC_parallel, GC_get_parallel,
4253 GC_get_suspend_signal, GC_allow_register_threads,
4254 GC_register_my_thread, GC_unregister_my_thread): Define only if
4255 GC_THREADS.
4256 * include/gc.h (GC_get_heap_size): Fix a typo in a comment.
4257
4258 * configure.ac: Use `AC_C_INLINE'.
4259 * include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
4260 (determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
4261
4262 * dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
4263 FreeBSD).
4264 * dyn_load.c (GC_register_main_static_data): Move the definition
4265 above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
4266 case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
4267 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
4268 GC_register_main_static_data() result (instead of direct testing
4269 of dl_iterate_phdr (to prevent a compiler warning).
4270 * os_dep.c (CODE_OK): Test si_code also for the value of 2
4271 (FreeBSD case; required for FreeBSD v7+).
4272 * os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
4273 * include/private/gcconfig.h (DATASTART): Cast etext argument in
4274 GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
4275 case).
4276
4277 * include/private/specific.h (quick_thread_id): Define thru
4278 GC_approx_sp(); define as a macro.
4279 * include/private/specific.h (getspecific): Use GC_INLINE instead
4280 of __inline__ (to work around Sun CC which does not recognize
4281 inline keyword surrounded with underscores).
4282
4283 * darwin_stop_world.c (FindTopOfStack): Simplify condition
4284 expressions.
4285 * darwin_stop_world.c (GC_push_all_stacks): Merge two variants
4286 of this function (DARWIN_DONT_PARSE_STACK).
4287 * darwin_stop_world.c (GC_push_all_stacks): Add a check for our
4288 thread is found (same as in pthread_stop_world.c).
4289 * darwin_stop_world.c (GC_push_all_stacks): Print the number of
4290 scanned threads if verbose (same as in pthread_stop_world.c).
4291
4292 * darwin_stop_world.c (GC_push_all_stacks): Reset
4293 thread_state_count value before every thread_get_state call;
4294 refine the comment for thread_state_count.
4295 * darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
4296 rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
4297 register pushing.
4298 * darwin_stop_world.c (GC_push_all_stacks): Set outCount to
4299 GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
4300 * darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
4301 for x86.
4302
4303 * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
4304 * darwin_stop_world.c (GC_use_mach_handler_thread): Change type
4305 to GC_bool.
4306 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
4307 Simplify the expressions involving GC_use_mach_handler_thread.
4308 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
4309 Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
4310
4311 * include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
4312 pthread_sigmask, dlopen): Don't define for pthreads-win32 (and
4313 don't include signal.h and dlfcn.h).
4314
4315 * dyn_load.c (GC_register_dynlib_callback): Add FIXME.
4316
4317 * include/private/gcconfig.h: Add support for FreeBSD on ppc64.
4318
4319 * os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
4320 VM_PROT_EXECUTE.
4321
4322 * os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
4323 pages_executable is on.
4324 * os_dep.c (os2_alloc): Add FIXME (for recursion).
4325 * os_dep.c (UNPROTECT): Abort with a more informative message if
4326 pages_executable is on ("mprotect" case).
4327 * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
4328 pages_executable is on (Darwin case).
4329 * pthread_support.c (GC_init_real_syms): Abort with an informative
4330 message if libgc is linked after libpthread.
4331
4332 * dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
4333 for 64-bit targets.
4334 * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
4335 macro.
4336 * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
4337 since REAL(pthread_create) is used.
4338 * pthread_support.c (PTHREAD_CREATE): Remove unused.
4339
4340 * extra/threadlibs.c (main): Remove --wrap for "read" (since not
4341 wrapped anymore).
4342 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
4343 * os_dep.c (__wrap_read): Likewise.
4344
4345 * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
4346 beginning of the file.
4347 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
4348 macro (defined only for Linux and Solaris).
4349 * include/gc_pthread_redirects.h (GC_pthread_cancel,
4350 GC_pthread_exit): Declare new API function (only if
4351 GC_PTHREAD_EXIT_ATTRIBUTE).
4352 * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
4353 Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
4354 * include/private/pthread_support.h (DISABLED_GC): New macro.
4355 * pthread_support.c (pthread_cancel, pthread_exit): Restore
4356 original definition or declare "real" function (if needed and
4357 GC_PTHREAD_EXIT_ATTRIBUTE).
4358 * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
4359 Declare new types if needed.
4360 * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
4361 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
4362 * pthread_support.c (GC_init_real_syms): Initialize pointers to
4363 the "real" pthread_cancel and pthread_exit (only if
4364 GC_PTHREAD_EXIT_ATTRIBUTE).
4365 * pthread_support.c (GC_unregister_my_thread): Enable collections
4366 if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
4367 * pthread_support.c (pthread_cancel, pthread_exit): New wrapped
4368 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
4369 * pthread_support.c (GC_start_routine): Refine the comment.
4370 * extra/threadlibs.c (main): Adjust --wrap (add "read",
4371 "pthread_exit", "pthread_cancel" but remove "sleep").
4372 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
4373
4374 * include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
4375 macro definition.
4376 * include/gc.h (GC_reachable_here): Likewise.
4377 * include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
4378 with double '_'.
4379
4380 * pthread_start.c: New file.
4381 * CMakeLists.txt (SRC): Add pthread_start.c.
4382 * Makefile.am (libgc_la_SOURCES): Likewise.
4383 * Makefile.direct (CSRCS): Likewise.
4384 * Makefile.direct (OBJS): Add pthread_start.obj.
4385 * extra/gc.c: Add a comment; include pthread_start.c.
4386 * pthread_support.c (start_info): Move the struct definition down
4387 closer to its usage.
4388 * pthread_support.c (GC_thread_exit_proc): Replace STATIC with
4389 GC_INNER.
4390 * pthread_support.c (GC_inner_start_routine): Move to the
4391 definition to pthread_start.c; leave only the prototype; remove
4392 STATIC.
4393 * pthread_support.c (GC_start_rtn_prepare_thread): New function
4394 (contains parts of the original GC_inner_start_routine).
4395
4396 * configure.ac (NO_EXECUTE_PERMISSION): Add comment.
4397 * doc/README.macros (NO_EXECUTE_PERMISSION): Update the
4398 documentation.
4399 * include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
4400 New API function declaration.
4401 * os_dep.c (OPT_PROT_EXEC): Remove (superseded by
4402 pages_executable).
4403 * os_dep.c (pages_executable): New static variable.
4404 * os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
4405 GC_get_pages_executable only).
4406 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
4407 Replace OPT_PROT_EXEC with pages_executable.
4408 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
4409 GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
4410 * os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
4411 UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
4412 * os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
4413 API function definition.
4414
4415 * tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
4416 64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
4417 at least).
4418
4419 * tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
4420 32-bit CPUs (to prevent "Unexpected heap growth" failure).
4421
4422 * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
4423 * pthread_support.c (pthread_create, pthread_join, pthread_detach,
4424 pthread_sigmask): Likewise.
4425 * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
4426 is added).
4427 * gc_dlopen.c (GC_dlopen): Fix return type.
4428 * pthread_support.c (GC_init_real_syms): Don't define
4429 LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
4430 libpthread_name if RTLD_NEXT.
4431
4432 * gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
4433 * gc_dlopen.c (dlopen): Likewise.
4434 * include/gc.h (GC_enable_incremental): Refine the comment.
4435 * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
4436 missing (only for Win32).
4437 * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
4438 * win32_threads.c (GC_ExitThread): Likewise.
4439 * include/gc.h (GC_endthreadex): Add a comment.
4440
4441 * include/cord.h: Fix typos.
4442
4443 * Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
4444 "tests/CMakeLists.txt".
4445 * doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
4446
4447 * mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
4448 * include/private/gcconfig.h (AVR32): New macro (also define the
4449 supplementary macros for the target).
4450 * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
4451 define for AVR32.
4452
4453 * tests/leak_test.c (main): Explicitly define as returning int
4454 (to prevent a spurious test failure on some Linux/alpha targets).
4455 * tests/thread_leak_test.c (main): Likewise.
4456 * tests/thread_leak_test.c: Initialize GC_find_leak in the main
4457 thread (before GC_INIT) only.
4458 * tests/leak_test.c (main): Use GC_set_find_leak() instead of
4459 accessing GC_find_leak directly.
4460 * tests/thread_leak_test.c (main): Likewise.
4461
4462 * include/gc.h (GC_find_leak, GC_finalize_on_demand,
4463 GC_java_finalization, GC_dont_expand, GC_no_dls,
4464 GC_dont_precollect): Simplify the comment (remove the information
4465 about data races since the value is boolean).
4466
4467 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
4468 Solaris-specific implementation (based on thr_stksegment).
4469 * os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
4470 variable used by the Solaris-specific GC_get_stack_base().
4471
4472 * pthread_support.c (GC_mark_thread_local_free_lists,
4473 GC_check_tls): Mark (and check) only for live threads (in case of
4474 GC_destroy_thread_local() is called already but GC_delete_thread()
4475 is not yet).
4476 * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
4477 Likewise.
4478
4479 * NT_MAKEFILE: Remove the comment about DLL and win32s.
4480 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4481 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4482 * NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
4483 properly on VS 2005+).
4484 * NT_MAKEFILE: Update GC log file name in comments.
4485 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4486 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4487 * NT_X64_THREADS_MAKEFILE: Likewise.
4488 * doc/README.win32: Likewise.
4489 * NT_MAKEFILE: Remove ":full" for "-debug" option (since no
4490 longer supported by VS).
4491 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4492 * NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
4493 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4494 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4495 * NT_X64_THREADS_MAKEFILE: Likewise.
4496 * NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
4497 * NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
4498 * NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
4499 default stack size limit).
4500 * NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
4501 * win32_threads.c (GC_get_next_stack): Always define (since it is
4502 also used for Cygwin now).
4503
4504 * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
4505 be just before GC_clear_marks() call.
4506 * include/gc_mark.h (GC_start_callback_proc): Refine the comment.
4507
4508 * Makefile.am (check_LTLIBRARIES): Initialize to empty.
4509 * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
4510 * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
4511 libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
4512 libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
4513 Define.
4514 * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
4515
4516 * tests/staticrootstest.c: New file.
4517 * tests/staticrootslib.c: Likewise.
4518
4519 * dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
4520 Cygwin as well as other win32 targets.
4521 * dyn_load.c (GC_wnt): Define to constant true.
4522 * dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
4523 well as other win32 targets.
4524 * mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
4525 Don't define for Cygwin, as on other win32.
4526 * mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
4527 Cygwin as for other win32 targets.
4528 * mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
4529 other win32.
4530 * mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
4531 other win32.
4532 * mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
4533 declare on Cygwin as on other win32.
4534 * mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
4535 !NO_DEBUGGING, as on other win32 targets.
4536 * mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
4537 Cygwin as for other win32 targets.
4538 * os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
4539 * os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
4540 other win32.
4541 * os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
4542 * os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
4543 Win32, but call GC_unix_get_mem instead of GlobalAlloc.
4544 * os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
4545 * ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
4546 as on other win32 platforms.
4547 * win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
4548 for dynamic loading targets.
4549 * include/private/gc_priv.h (GC_INNER): Don't try to use
4550 visibility on Cygwin which does not support it.
4551 * include/private/gc_priv.h (struct roots): Don't declare r_next
4552 member on Cygwin as on other windows hosts.
4553 * include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
4554 likewise.
4555 * include/private/gc_priv.h (struct _GC_arrays): Do declare
4556 _heap_bases[] member and don't declare _root_index likewise.
4557 * include/private/gc_priv.h (GC_heap_bases): Do define likewise.
4558 * include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
4559 likewise.
4560 * include/private/gc_priv.h (GC_sysinfo): Do declare extern
4561 likewise.
4562 * include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
4563 prototype on Cygwin as other win32 platforms.
4564
4565 * os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
4566 pthread_attr_getstack() instead of GC_get_stack_base() (and check
4567 returned stackaddr for NULL); output a warning on failure.
4568
4569 * alloc.c (GC_start_call_back): Replace the definition type to
4570 GC_start_callback_proc.
4571 * alloc.c (GC_set_start_callback, GC_get_start_callback): New
4572 setter/getter function.
4573 * alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
4574 unconditionally (because GC_try_to_collect_inner always does full
4575 GC).
4576 * include/gc_mark.h (GC_start_callback_proc): New type.
4577 * include/gc_mark.h (GC_set_start_callback,
4578 GC_get_start_callback): New API function declaration.
4579
4580 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
4581 * os_dep.c (GC_get_main_stack_base): Recognize
4582 USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
4583 and use GC_get_stack_base() in this case.
4584
4585 * os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
4586 GC_find_limit_with_bound() should be called with the lock held).
4587 * backgraph.c (FOR_EACH_PRED): Fix a typo.
4588
4589 * alloc.c (GC_set_stop_func, GC_get_stop_func): Add
4590 DCL_LOCK_STATE.
4591 * finalize.c (GC_notify_or_invoke_finalizers): Likewise.
4592 * gc_dlopen.c (disable_gc_for_dlopen): Likewise.
4593 * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
4594 * mark.c (GC_print_trace): Likewise.
4595 * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
4596 GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
4597 GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
4598 GC_get_finalizer_notifier): Likewise.
4599 * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
4600 * pthread_support.c (GC_is_thread_tsd_valid,
4601 GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
4602 GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
4603 pthread_detach, GC_register_my_thread, GC_inner_start_routine,
4604 pthread_create): Likewise.
4605 * reclaim.c (GC_print_all_errors): Likewise.
4606 * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
4607 GC_unregister_my_thread, GC_do_blocking_inner,
4608 GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
4609 GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
4610 GC_init_parallel): Likewise.
4611
4612 * doc/README.darwin: Update.
4613
4614 * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
4615 usable on Mac OS X).
4616 * doc/README.cmake: Update.
4617
4618 * CMakeLists.txt: New file (adding CMake support).
4619 * tests/CMakeLists.txt: Likewise.
4620 * doc/README.cmake: Likewise.
4621
4622 * configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
4623 macros.
4624 * include/private/gc_priv.h (THREAD_FLD): Recognize
4625 __DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
4626
4627 * pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
4628 OpenBSD.
4629 * pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
4630 OpenBSD.
4631 * pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
4632 NetBSD and OpenBSD.
4633
4634 * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
4635 if THREADS is undefined.
4636 * include/gc.h (GC_malloc_many): Update the comment.
4637
4638 * include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
4639 (formerly known as Borland) C++ compiler v6.21+.
4640 * include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
4641 VC++ compilers.
4642
4643 * win32_threads.c (GC_register_my_thread_inner,
4644 GC_pthread_start_inner): Undo the previous commit changes for
4645 the thread flags and DETACHED state (since the state is only
4646 tested in GC_thread_exit_proc).
4647
4648 * include/gc.h (GC_unregister_my_thread): Fix a typo; update the
4649 comment.
4650 * pthread_support.c (GC_delete_thread): Allow to delete the main
4651 thread (don't call GC_INTERNAL_FREE for it); update the comment.
4652 * win32_threads.c (GC_delete_thread): Likewise.
4653 * pthread_support.c (GC_unregister_my_thread): Add an assertion
4654 for FINISHED flag is unset.
4655 * tests/test.c (check_heap_stats): Test the main thread
4656 unregistering (only if THREADS).
4657 * win32_threads.c (GC_register_my_thread_inner): Set flags to
4658 DETACHED (only if GC_PTHREADS).
4659 * win32_threads.c (GC_unregister_my_thread): Add FIXME (for
4660 GC_wait_for_gc_completion).
4661 * win32_threads.c (GC_pthread_start_inner): Clear flags detached
4662 state if needed; set pthread_id and flags while holding the lock.
4663
4664 * include/private/gc_priv.h (SIG_SUSPEND): Don't define for
4665 OpenBSD and Darwin.
4666
4667 * include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
4668
4669 * test.c (main, WinMain): Consistently don't invoke
4670 GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
4671 do invoke it even if parallel marking is enabled.
4672
4673 * tests/test.c (reverse_test): Comment out a check for MSWIN32
4674 (when determining BIG value) assuming outdated win32s.
4675 * tests/test.c (reverse_test): Rename to reverse_test_inner;
4676 change the declaration (to be of GC_fn_type); call itself thru
4677 GC_call_with_gc_active() if the argument is zero.
4678 * tests/test.c (reverse_test): New function added calling
4679 reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
4680 GC_call_with_gc_active).
4681
4682 * doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
4683 Document.
4684 * dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
4685 * dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
4686 PLATFORM_ANDROID.
4687 * include/private/gcconfig.h (LINUX): Define also if
4688 PLATFORM_ANDROID (for the windows-based toolkit).
4689 * include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
4690 define for Android/x86 platform.
4691 * include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
4692 new macro (undefine DYNAMIC_LOADING in this case).
4693 * include/private/gcconfig.h (CANCEL_SAFE): Don't define if
4694 PLATFORM_ANDROID.
4695 * include/private/gcconfig.h (IF_CANCEL): Fix definition for the
4696 explicitly defined CANCEL_SAFE.
4697
4698 * allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
4699 if GC_DISABLE_INCREMENTAL.
4700 * reclaim.c (GC_reclaim_generic): Likewise.
4701 * checksums.c (GC_page_was_ever_dirty): Add prototype.
4702 * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
4703 unless PARALLEL_MARK.
4704 * include/private/gc_priv.h (GC_dirty_maintained,
4705 GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
4706 declare if GC_DISABLE_INCREMENTAL.
4707 * include/private/gc_priv.h (GC_print_finalization_stats): Don't
4708 declare if SMALL_CONFIG.
4709 * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
4710 GC_DISABLE_INCREMENTAL (since nothing to check).
4711 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
4712 GC_DISABLE_INCREMENTAL.
4713 * os_dep.c (GC_dirty_maintained): Likewise.
4714 * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
4715 GC_DISABLE_INCREMENTAL.
4716 * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
4717 Uncomment; define only if CHECKSUMS.
4718
4719 * darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
4720 GC_push_all_stack() instead of GC_push_all_stack_frames()).
4721 * include/private/gc_priv.h (GC_push_all_stack_frames,
4722 GC_push_all_register_frames): Rename to
4723 GC_push_all_stack_sections and GC_push_all_register_sections,
4724 respectively.
4725 * mark_rts.c (GC_push_all_stack_frames,
4726 GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
4727 GC_push_current_stack): Likewise.
4728 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
4729 * win32_threads.c (GC_push_stack_for): Likewise.
4730 * misc.c (GC_call_with_gc_active): Rename "frame" local variable
4731 to "stacksect".
4732 * pthread_support.c (GC_call_with_gc_active): Likewise.
4733 * win32_threads.c (GC_call_with_gc_active): Likewise.
4734 * pthread_support.c (GC_call_with_gc_active): Update FIXME for
4735 Darwin.
4736 * win32_threads.c (GC_Thread_Rep): Update the comment for
4737 traced_stack_sect.
4738
4739 * darwin_stop_world.c (GC_push_all_stacks): Rename
4740 activation_frame to traced_stack_sect.
4741 * include/private/gc_priv.h (GC_push_all_stack_frames,
4742 GC_push_all_register_frames): Likewise.
4743 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
4744 * mark_rts.c (GC_push_all_register_frames,
4745 GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
4746 GC_push_current_stack): Likewise.
4747 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
4748 * pthread_support.c (GC_call_with_gc_active): Likewise.
4749 * win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
4750 GC_push_stack_for): Likewise.
4751 * include/private/gc_priv.h (GC_activation_frame_s): Rename to
4752 GC_traced_stack_sect_s.
4753 * include/private/gc_priv.h (GC_activation_frame): Rename to
4754 GC_traced_stack_sect.
4755 * misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
4756 * doc/README.macros (UNICODE): Document.
4757
4758 * doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
4759 * include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
4760 declare and use GC_envfile_getenv().
4761 * misc.c (GC_envfile_content, GC_envfile_length): New static
4762 variable (only if GC_READ_ENV_FILE).
4763 * misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
4764 * misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
4765 if GC_READ_ENV_FILE).
4766 * misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
4767 if GC_READ_ENV_FILE.
4768 * misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
4769 calls to be just before GC_envfile_init() one (since the latter
4770 uses GET_MEM).
4771 * misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
4772 WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
4773 * mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
4774 from the ABORT message.
4775 * misc.c (GC_init): Likewise.
4776 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
4777 Likewise.
4778 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
4779 * pthread_support.c (GC_init_real_syms, start_mark_threads):
4780 Likewise.
4781
4782 * win32_threads.c (GC_get_next_stack): Don't define for Cygwin
4783 (since unused for now).
4784
4785 * dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
4786 GC_register_main_static_data() is defined.
4787 * dyn_load.c (GC_register_dynamic_libraries): Define only if used
4788 (if DYNAMIC_LOADING or PCR or Win32/CE).
4789 * dyn_load.c (GC_register_main_static_data): Define the default
4790 one only if DYNAMIC_LOADING.
4791 * include/private/gc_priv.h (GC_register_dynamic_libraries):
4792 Declare only if used (to prevent compiler warning).
4793
4794 * mark_rts.c (GC_approx_sp): Add a comment (for GCC).
4795
4796
4797 == [7.2alpha4] 2009-12-01 ==
4798
4799 * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
4800
4801 * include/gc.h (GC_get_suspend_signal): New function declaration.
4802 * misc.c (GC_get_suspend_signal): New API function (only if
4803 THREADS).
4804
4805 * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
4806 two if GC_incremental (instead of TRUE_INCREMENTAL).
4807
4808 * sparc_mach_dep.S (GC_push_regs): Remove the reference.
4809
4810 * os_dep.c (SIZE_T, PULONG_PTR): Remove.
4811 * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
4812 "word"); add the comment.
4813 * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
4814 GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
4815
4816 * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
4817 const value (for speed).
4818 * win32_threads.c (THREAD_TABLE_INDEX): New macro.
4819 * win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
4820 GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
4821 THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
4822 * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
4823
4824 * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
4825
4826 * backgraph.c: Remove apostrophe char from "#error".
4827
4828 * doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
4829 * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
4830 new macro; implicitly define it if SMALL_CONFIG.
4831 * alloc.c (GC_incremental, GC_timeout_stop_func): Check for
4832 GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
4833 * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
4834 GC_push_conditional): Likewise.
4835 * mark.c (GC_push_next_marked_dirty, GC_push_selected,
4836 GC_push_conditional, GC_block_was_dirty): Likewise.
4837 * misc.c (GC_enable_incremental): Likewise.
4838 * misc.c (GC_init): Likewise.
4839
4840 * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
4841 * misc.c (WIN32_LEAN_AND_MEAN): Likewise.
4842 * os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
4843 * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
4844 in a comment.
4845 * backgraph.c: Likewise.
4846 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
4847 * extra/threadlibs.c (main): Likewise.
4848 * pthread_support.c (pthread_join): Likewise.
4849 * tests/test.c (main): Likewise.
4850
4851 * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
4852 a duplicate symbol definition linker error).
4853 * misc.c (GC_clear_stack_inner): Likewise.
4854 * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
4855
4856 * include/private/gc_priv.h (GC_write_disabled): New variable
4857 declaration (only if GC_ASSERTIONS and Win32 threads).
4858 * misc.c (GC_write): Add assertion for GC_write_disabled value is
4859 not on (only if THREADS).
4860 * win32_threads.c (GC_write_disabled): New variable (only if
4861 GC_ASSERTIONS and not Cygwin).
4862 * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
4863 (while holding GC_write_cs).
4864
4865 * win32_threads.c (GC_please_stop): If DllMain-based thread
4866 registration is not compiled in then define GC_please_stop as
4867 a non-volatile variable for assertion only.
4868 * win32_threads.c (GC_stop_world): Set and clear only if defined.
4869 * win32_threads.c (GC_stop_world): Add the comment for GC_printf()
4870 usage (while holding GC_write_cs).
4871 * win32_threads.c (GC_delete_gc_thread): Likewise.
4872 * os_dep.c (GC_remove_protection): Likewise.
4873
4874 * pthread_support.c (GC_inner_start_routine): Join 3 sequential
4875 GC_printf() calls into a single one (for DEBUG_THREADS).
4876
4877 * include/private/gc_priv.h (GC_total_stacksize): New variable
4878 declaration (only if THREADS).
4879 * alloc.c (GC_total_stacksize): New variable (only if THREADS).
4880 * alloc.c (min_bytes_allocd): Calculate stack_size using
4881 GC_stackbottom only in the single-threaded case; otherwise use
4882 GC_total_stacksize; print GC_total_stacksize value if
4883 DEBUG_THREADS.
4884 * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
4885 specifier for lo/hi values (instead of "%lx").
4886 * darwin_stop_world.c (GC_push_all_stacks): Use
4887 GC_push_all_stack_frames() instead of GC_push_all_stack().
4888 * darwin_stop_world.c (GC_push_all_stacks): Recalculate
4889 GC_total_stacksize value.
4890 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
4891 * win32_threads.c (GC_push_all_stacks): Likewise.
4892 * win32_threads.c (GC_push_stack_for): Pass "me" argument; return
4893 stack size; don't check for non-zero value of thread->stack_base.
4894 * win32_threads.c (GC_push_all_stacks): Don't call
4895 GC_push_stack_for() and don't check for "t->id == me" if
4896 thread->stack_base is zero.
4897
4898 * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
4899 with "0x".
4900 * os_dep.c (PROTECT): Likewise.
4901 * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
4902 int (to match printf type specifier).
4903
4904 * tests/test.c (check_heap_stats): Take into account the unmapped
4905 memory size when checking for "Unexpected heap growth"; remove
4906 FIXME.
4907
4908 * alloc.c: Revert last change.
4909
4910 * include/private/gcconfig.h (STACKBOTTOM): Add a presence check
4911 for eCos/NOSYS.
4912 * misc.c (GC_write): Comment out _Jv_diag_write() call (since no
4913 longer defined in GCJ).
4914
4915 * os_dep.c (brk): Rename to ecos_gc_brk.
4916
4917 * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
4918 stack_size even if THREADS.
4919 * doc/README.macros (DEBUG_THREADS): Document.
4920 * pthread_support.c (DEBUG_THREADS): Remove the commented out
4921 definition.
4922 * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
4923 definition.
4924 * win32_threads.c: Include errno.h (except for WinCE).
4925 * win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
4926 to local variables, and free "arg" parameter before "start"
4927 invocation.
4928 * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
4929 (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
4930 * win32_threads.c (GC_beginthreadex): Return 0 on error (instead
4931 of -1).
4932
4933 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
4934 Use GC_INNER for the function definition.
4935 * include/private/darwin_stop_world.h
4936 (GC_darwin_register_mach_handler_thread): Remove the prototype.
4937 * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
4938 for the function prototype.
4939 * include/private/gc_priv.h (NDEBUG): Explicitly define if
4940 NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
4941 inclusion).
4942
4943 * include/private/gcconfig.h: Move DebugBreak() workaround (for
4944 x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
4945
4946 * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
4947 GC_freehblk): Use GC_INNER for the function definition.
4948 * alloc.c (GC_never_stop_func, GC_should_collect,
4949 GC_try_to_collect_inner, GC_collect_a_little_inner,
4950 GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
4951 GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
4952 * backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
4953 Likewise.
4954 * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
4955 GC_promote_black_lists, GC_unpromote_black_lists,
4956 GC_add_to_black_list_normal, GC_add_to_black_list_stack,
4957 GC_is_black_listed): Likewise.
4958 * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
4959 GC_stop_init, GC_stop_world, GC_start_world): Likewise.
4960 * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
4961 GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
4962 GC_store_debug_info, GC_start_debugging,
4963 GC_debug_generic_malloc_inner,
4964 GC_debug_generic_malloc_inner_ignore_off_page,
4965 GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
4966 * dyn_load.c (GC_register_dynamic_libraries,
4967 GC_register_main_static_data, GC_init_dyld): Likewise.
4968 * finalize.c (GC_push_finalizer_structures, GC_finalize,
4969 GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
4970 Likewise.
4971 * gcj_mlc.c (GC_core_gcj_malloc): Likewise.
4972 * headers.c (GC_find_header, GC_header_cache_miss,
4973 GC_scratch_alloc, GC_init_headers, GC_install_header,
4974 GC_install_counts, GC_remove_header, GC_remove_counts,
4975 GC_next_used_block, GC_prev_block): Likewise.
4976 * mach_dep.c (GC_with_callee_saves_pushed): Likewise.
4977 * malloc.c (GC_collect_or_expand, GC_alloc_large,
4978 GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
4979 GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
4980 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
4981 * mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
4982 GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
4983 GC_clear_marks, GC_initiate_gc, GC_mark_some,
4984 GC_mark_stack_empty, GC_invalidate_mark_state,
4985 GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
4986 GC_mark_init, GC_push_all, GC_push_conditional,
4987 GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
4988 Likewise.
4989 * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
4990 GC_exclude_static_roots_inner, GC_push_all_register_frames,
4991 GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
4992 GC_push_roots): Likewise.
4993 * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
4994 Likewise.
4995 * new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
4996 * obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
4997 GC_initialize_offsets): Likewise.
4998 * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
4999 GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
5000 GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
5001 GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
5002 GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
5003 GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
5004 GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
5005 GC_page_was_ever_dirty, GC_remove_protection,
5006 GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
5007 GC_save_callers, GC_print_callers): Likewise.
5008 * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
5009 GC_start_world, GC_stop_init): Likewise.
5010 * pthread_support.c (GC_mark_thread_local_free_lists,
5011 GC_lookup_thread, GC_reset_finalizer_nested,
5012 GC_check_finalizer_nested, GC_segment_is_thread_stack,
5013 GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
5014 GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
5015 GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
5016 GC_wait_marker, GC_notify_all_marker): Likewise.
5017 * reclaim.c (GC_print_all_errors, GC_block_empty,
5018 GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
5019 GC_reclaim_all): Likewise.
5020 * thread_local_alloc.c (GC_init_thread_local,
5021 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
5022 * win32_threads.c (GC_reset_finalizer_nested,
5023 GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
5024 GC_start_world, GC_push_all_stacks, GC_get_next_stack,
5025 GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
5026 GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
5027 GC_thr_init, GC_init_parallel, GC_lock,
5028 GC_mark_thread_local_free_lists): Likewise.
5029 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
5030 GC_traverse_back_graph): Use GC_INNER for the function prototype.
5031 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
5032 Likewise.
5033 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
5034 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
5035 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
5036 GC_get_next_stack): Likewise.
5037 * finalize.c (GC_reset_finalizer_nested,
5038 GC_check_finalizer_nested): Likewise.
5039 * gcj_mlc.c (GC_start_debugging): Likewise.
5040 * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
5041 GC_has_other_debug_info, GC_store_debug_info): Likewise.
5042 * include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
5043 * include/private/gc_locks.h (GC_lock): Likewise.
5044 * include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
5045 GC_mark_from): Likewise.
5046 * include/private/pthread_support.h (GC_lookup_thread,
5047 GC_stop_init): Likewise.
5048 * include/private/thread_local_alloc.h (GC_init_thread_local,
5049 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
5050 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
5051 * mark.c (GC_page_was_ever_dirty): Likewise.
5052 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
5053 * misc.c (GC_register_main_static_data, GC_init_win32,
5054 GC_setpagesize, GC_init_linux_data_start,
5055 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
5056 GC_do_blocking_inner): Likewise.
5057 * os_dep.c (GC_greatest_stack_base_below): Likewise.
5058 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
5059 Likewise.
5060 * include/private/gc_priv.h: Likewise.
5061 * include/private/gc_priv.h (GC_INNER): Update the comment.
5062 * doc/README.macros (GC_DLL): Update.
5063
5064 * alloc.c (GC_collection_in_progress): Move the prototype to
5065 gc_priv.h.
5066 * gc_dlopen.c (GC_collection_in_progress): Likewise.
5067 * pthread_support.c (GC_collection_in_progress): Likewise.
5068 * misc.c (GC_init_parallel): Likewise.
5069 * pthread_support.c (GC_init_parallel): Likewise.
5070 * win32_threads.c (GC_init_parallel): Likewise.
5071 * darwin_stop_world.c (GC_thr_init): Likewise.
5072 * misc.c (GC_thr_init): Likewise.
5073 * pthread_stop_world.c (GC_thr_init): Likewise.
5074 * pthread_support.c (GC_thr_init): Likewise.
5075 * blacklst.c (GC_clear_bl, GC_copy_bl,
5076 GC_number_stack_black_listed): Make STATIC.
5077 * dbg_mlc.c (GC_print_obj, GC_make_closure,
5078 GC_debug_invoke_finalizer): Likewise.
5079 * malloc.c (GC_alloc_large_and_clear): Likewise.
5080 * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
5081 GC_push_marked4, GC_push_marked, GC_push_next_marked,
5082 GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
5083 Likewise.
5084 * misc.c (GC_clear_stack_inner): Likewise.
5085 * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
5086 * darwin_stop_world.c (FindTopOfStack): Make static; define only
5087 if not DARWIN_DONT_PARSE_STACK.
5088 * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
5089 * dyn_load.c (GC_repeat_read): Remove unused prototype.
5090 * include/private/gc_pmark.h (GC_find_start): Likewise.
5091 * misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
5092 * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
5093 THREADS).
5094 * dyn_load.c (GC_register_main_static_data): Define only if
5095 DYNAMIC_LOADING.
5096 * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
5097 "return" statement.
5098 * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
5099 GC_PTHREADS).
5100 * include/gc.h: Fix a typo.
5101 * include/gc_inline.h (GC_ASSERT): Define (if not defined) since
5102 the header is public.
5103 * include/gc_inline.h (GC_generic_malloc_many): New public
5104 function declaration.
5105 * mallocx.c (GC_generic_malloc_many): Make public.
5106 * include/private/gc_priv.h (GC_INNER): Use visibility attribute
5107 (if available).
5108 * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
5109 * include/private/gc_priv.h: Include atomic_ops.h if THREADS and
5110 MPROTECT_VDB.
5111 * os_dep.c: Don't include atomic_ops.h
5112 * win32_threads.c: Likewise.
5113 * include/private/gc_priv.h (GC_push_selected, GC_push_regs,
5114 GC_push_marked, GC_number_stack_black_listed,
5115 GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
5116 GC_generic_malloc_many, GC_make_closure,
5117 GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
5118 Remove the prototype.
5119 * mark.c (GC_page_was_ever_dirty): Add prototype (only if
5120 PROC_VDB).
5121 * include/private/gc_priv.h (GC_push_next_marked_dirty,
5122 GC_push_next_marked, GC_push_next_marked_uncollectable): Move
5123 the prototype to mark.c.
5124 * include/private/gc_priv.h (GC_is_static_root): Declare only if
5125 not THREADS.
5126 * include/private/gc_priv.h (GC_free_inner): Declare only if
5127 THREADS.
5128 * include/private/gc_priv.h (GC_debug_free_inner): Declare only if
5129 THREADS and DBG_HDRS_ALL.
5130 * include/private/gc_priv.h (GC_markers): Declare GC_markers only
5131 if PARALLEL_MARK.
5132 * include/private/gc_priv.h (GC_register_main_static_data): Move
5133 the prototype to misc.c.
5134 * mach_dep.c (GC_push_regs): Make STATIC; define only along with
5135 HAVE_PUSH_REGS definition.
5136 * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
5137 definition with the ANSI C one.
5138 * mark.c (GC_started_thread_while_stopped): Declared only if not
5139 GNU C.
5140 * win32_threads.c (GC_started_thread_while_stopped): Don't define
5141 if GNU C.
5142 * mark.c (GC_mark_from): Avoid unbalanced brackets in
5143 #if-#else-#endif blocks.
5144 * mark_rts.c (GC_is_static_root): Define only if not THREADS.
5145 * os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
5146 * os_dep.c (GC_page_was_ever_dirty): Comment out the function
5147 except for PROC_VDB.
5148 * tests/test.c (main): Don't reference GC_print_obj,
5149 GC_make_closure, GC_debug_invoke_finalizer,
5150 GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
5151 * thread_local_alloc.c: Don't include "gc_inline.h".
5152 * win32_threads.c (GC_write_fault_handler): Declare only if
5153 MPROTECT_VDB.
5154
5155 * allchblk.c (DEBUG): Remove macro (since unused).
5156 * allchblk.c: Include private/gc_priv.h before other includes and
5157 definitions.
5158 * alloc.c: Likewise.
5159 * gc_dlopen.c: Likewise.
5160 * headers.c: Likewise.
5161 * mallocx.c: Likewise.
5162 * mark_rts.c: Likewise.
5163 * new_hblk.c: Likewise.
5164 * reclaim.c: Likewise.
5165 * mark.c: Include private/gc_pmark.h before other includes.
5166 * misc.c: Likewise.
5167 * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
5168 * pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
5169 * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
5170 already defined in gc_config_macros.h).
5171 * dyn_load.c (GC_init_dyld): Remove parameter cast for
5172 _dyld_register_func_for_add_image() and
5173 _dyld_register_func_for_remove_image(); add the comment about
5174 possible warnings; add FIXME for the deprecated
5175 _dyld_bind_fully_image_containing_address().
5176 * include/private/gc_priv.h: Include gc.h before the standard
5177 headers inclusion.
5178 * tests/test.c: Likewise.
5179 * include/private/gcconfig.h (DebugBreak): Update the comment.
5180 * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
5181
5182 * configure.ac (openbsd): Define GC_OPENBSD_THREADS.
5183 * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
5184 * configure.ac: Add sparc-openbsd case.
5185 * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
5186 Document.
5187 * tests/test.c (main): Handle OpenBSD case.
5188 * include/private/pthread_stop_world.h: Likewise.
5189 * extra/threadlibs.c (main): Replace K&R-style function definition
5190 with the ANSI C one.
5191 * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
5192 * dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
5193 * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
5194 define it for OpenBSD.
5195 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
5196 pthread_sigmask): Don't declare and redefine for OpenBSD.
5197 * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, x86,
5198 x64, powerpc).
5199 * mach_dep.c (NO_GETCONTEXT): Likewise.
5200 * include/private/pthread_stop_world.h (thread_stop_info): Don't
5201 define last_stop_count field if OpenBSD.
5202 * misc.c (GC_init_dyld): Add declaration (if NetBSD).
5203 * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
5204 * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
5205 * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
5206 (only if OpenBSD).
5207 * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
5208 GC_skip_hole_openbsd): New static function (only if OpenBSD).
5209 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
5210 GC_register_data_segments): Define specially for OpenBSD case.
5211 * os_dep.c (GC_fault_handler_lock): Initialize to
5212 AO_TS_INITIALIZER (instead of 0).
5213 * pthread_support.c (GC_allocate_lock): Likewise.
5214 * pthread_stop_world.c (NSIG, GC_print_sig_mask,
5215 GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
5216 GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
5217 GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
5218 GC_restart_handler): Don't define and use if OpenBSD.
5219 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
5220 GC_start_world): Handle OpenBSD case.
5221 * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
5222 * pthread_support.c (pthread_sigmask): Don't undefine the macro and
5223 don't define the wrapper function if OpenBSD.
5224 * pthread_support.c (GC_thr_init): Handle OpenBSD case.
5225
5226 * dyn_load.c: Move the inclusion of private/gc_priv.h below
5227 definition of a feature macro (_GNU_SOURCE).
5228
5229 * include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
5230 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
5231 (only if GC_I_HIDE_POINTERS).
5232 * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
5233 * dbg_mlc.c (GC_get_back_ptr_info): Likewise.
5234 * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
5235 GC_enqueue_all_finalizers): Likewise.
5236 * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
5237 * finalize.c (GC_general_register_disappearing_link,
5238 GC_unregister_disappearing_link, GC_register_finalizer_inner,
5239 GC_finalize): Likewise.
5240 * include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
5241 * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
5242 of I_HIDE_POINTERS.
5243 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
5244 * include/gc.h (_GC_H): Strip leading underscore.
5245 * include/gc_backptr.h (_GC_H): Likewise.
5246 * include/gc_gcj.h (_GC_H): Likewise.
5247 * include/gc_mark.h (_GC_H): Likewise.
5248 * include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
5249 * include/javaxfc.h (_GC_H): Likewise.
5250 * include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
5251 * include/private/dbg_mlc.h (_GC_H): Likewise.
5252 * include/private/gc_priv.h (_GC_H): Likewise.
5253
5254 * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
5255
5256 * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
5257 variable definitions).
5258 * include/private/gc_priv.h (GC_EXTERN): Update the comment.
5259 * allchblk.c (GC_unmap_threshold): Define as GC_INNER.
5260 * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
5261 GC_n_memory, GC_fail_count): Likewise.
5262 * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
5263 * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
5264 * mach_dep.c (GC_save_regs_ret_val): Likewise.
5265 * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
5266 GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
5267 GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
5268 GC_mark_no, GC_markers): Likewise.
5269 * mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
5270 * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
5271 GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
5272 GC_backtraces, GC_force_unmap_on_gcollect,
5273 GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
5274 GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
5275 * os_dep.c (GC_page_size, GC_dont_query_stack_min,
5276 GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
5277 GC_dirty_maintained, GC_fault_handler_lock): Likewise.
5278 * pthread_support.c (GC_allocate_ml, GC_lock_holder,
5279 GC_need_to_lock, GC_thr_initialized, GC_threads,
5280 GC_in_thread_creation, GC_collecting, GC_allocate_lock,
5281 GC_mark_lock_holder): Likewise.
5282 * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
5283 Likewise.
5284 * win32_threads.c (GC_allocate_ml, GC_lock_holder,
5285 GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
5286 * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
5287 * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
5288
5289 * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
5290 GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
5291 case (since they are not defined inside GC at present).
5292 * include/private/gc_priv.h (GC_objects_are_marked): Remove the
5293 declaration (since made static).
5294 * mark.c (GC_objects_are_marked): Define as STATIC.
5295 * win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
5296 Likewise.
5297 * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
5298 to initialize GC_n_kinds).
5299 * win32_threads.c (start_mark_threads): Adjust the comment.
5300
5301 * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
5302 function.
5303 * backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
5304 * mark_rts.c (add_roots_to_index): Likewise.
5305
5306 * extra/gc.c: New file.
5307 * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
5308
5309 * misc.c (GC_log): Remove the declaration; move the definition (to
5310 the place where it is used); make STATIC.
5311 * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
5312 to print open log failure.
5313 * misc.c (GC_write): Don't abort on open log failure if the GC is
5314 compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
5315
5316 * include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
5317
5318 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
5319 the variable declaration to gc_priv.h.
5320 * alloc.c (GC_bytes_found, GC_unmap_threshold,
5321 GC_force_unmap_on_gcollect): Likewise.
5322 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
5323 * finalize.c (GC_fail_count): Likewise.
5324 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
5325 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
5326 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
5327 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
5328 GC_mark_stack_too_small, GC_mark_state): Likewise.
5329 * include/private/pthread_support.h (GC_threads,
5330 GC_thr_initialized, GC_in_thread_creation): Likewise.
5331 * mallocx.c (GC_bytes_found): Likewise.
5332 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
5333 * misc.c (GC_unmap_threshold): Likewise.
5334 * os_dep.c (GC_unmap_threshold): Likewise.
5335 * pthread_support.c (GC_markers): Likewise.
5336 * thread_local_alloc.c (GC_gcjobjfreelist,
5337 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5338 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
5339 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
5340 * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
5341 a tag for now); defined after "gcconfig.h" inclusion.
5342 * include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
5343 keyword for most global variables.
5344 * alloc.c (GC_copyright): Add the comment about the symbol
5345 visibility.
5346 * finalize.c (GC_fo_entries): Likewise.
5347 * include/private/gc_priv.h (GC_print_stats): Likewise.
5348 * misc.c (GC_quiet): Likewise.
5349 * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
5350 STATIC.
5351 * pthread_support.c (GC_threads): Add explicit zero initializer
5352 (to make the variable definition differ from the declaration).
5353
5354 * backgraph.c (GC_quiet): Remove the declaration (not needed
5355 anymore since gc_priv.h is always included).
5356 * checksums.c (GC_quiet): Likewise.
5357 * gcj_mlc.c (GC_quiet): Likewise.
5358 * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
5359 comment.
5360 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
5361 GC_hdr_cache_misses): Likewise.
5362 * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
5363 * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
5364 Likewise.
5365 * win32_threads.c (GC_please_stop, GC_max_thread_index,
5366 GC_mark_mutex_waitcnt): Likewise.
5367
5368 * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
5369 'D') in the name.
5370
5371 * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
5372 redirection is turned off; turn it on later when dlopen real
5373 symbol is no longer needed (according to the comment and the same
5374 as in dyn_load.c).
5375 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
5376 REAL_DLFUNC, respectively (to have unique names since the
5377 definitions may differ from that of the similar ones in
5378 pthread_support.c).
5379 * mark.c (source): Undefine the macro when no longer needed.
5380 * os_dep.c (handler): Rename the type to GC_fault_handler_t (to
5381 have the unique name across the project).
5382 * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
5383 comment.
5384 * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
5385 * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
5386 longer needed.
5387
5388 * pthread_stop_world.c (pthread_sigmask): Undefine before using
5389 in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
5390 * win32_threads.c (dlopen, _beginthread): Don't undefine (since
5391 neither redirected nor used here).
5392 * win32_threads.c (GC_Thread_Rep): Rename "table_management" to
5393 "tm" for short; remove "tm_" prefix.
5394 * win32_threads.c (in_use, next): Don't define the macros; use
5395 tm.in_use and tm.next fields, respectively (to ease debugging).
5396 * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
5397 unique name across the project).
5398
5399 * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
5400 inclusion.
5401 * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
5402 not included yet.
5403 * finalize.c (I_HIDE_POINTERS): Don't define.
5404 * include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
5405 * misc.c (I_HIDE_POINTERS): Likewise.
5406 * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
5407 GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
5408 * include/private/gc_pmark.h: Remove the comment about gc_priv.h
5409 inclusion order.
5410
5411 * dyn_load.c: Include gc_priv.h before using configuration
5412 information (MACOS).
5413 * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
5414 GC_MUST_RESTORE_REDEFINED_DLOPEN.
5415
5416 * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
5417 properly.
5418 * darwin_stop_world.c: Replace "if DEBUG_THREADS" with
5419 "ifdef DEBUG_THREADS".
5420 * pthread_stop_world.c: Likewise.
5421 * pthread_support.c: Likewise.
5422 * include/gc_inline.h: Guard with GC_INLINE_H.
5423
5424 * alloc.c (GC_copyright): Define as const.
5425 * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
5426 (since the name starts with "GC_" prefix).
5427 * dbg_mlc.c (GC_describe_type_fns): Likewise.
5428 * dyn_load.c (GC_FirstDLOpenedLinkMap,
5429 GC_register_dynlib_callback, GC_dyld_sections,
5430 GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
5431 Likewise.
5432 * malloc.c (GC_libpthread_start, GC_libpthread_end,
5433 GC_libld_start, GC_libld_end): Likewise.
5434 * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
5435 Likewise.
5436 * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
5437 GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
5438 GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
5439 GC_forward_exception): Likewise.
5440 * pthread_support.c (GC_syms_initialized): Likewise.
5441 * typd_mlc.c (GC_push_typed_structures_proc): Likewise.
5442 * win32_threads.c (GC_win32_dll_threads,
5443 GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
5444 GC_waitForSingleObjectInfinite): Likewise.
5445 * darwin_stop_world.c (GC_use_mach_handler_thread,
5446 GC_use_mach_handler_thread, GC_mach_threads_count): Replace
5447 "static" with "STATIC" and add zero initializer.
5448 * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
5449 GC_sigbus_count): Likewise.
5450 * headers.c (free_hdr): Replace "static" with GC_INLINE.
5451 * misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
5452 * os_dep.c (memory): Rename static variable to ecos_gc_memory.
5453 * os_dep.c (async_set_pht_entry_from_index): Make static (for
5454 MPROTECT_VDB case).
5455 * pthread_support.c (GC_real_pthread_create,
5456 GC_real_pthread_sigmask, GC_real_pthread_join,
5457 GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
5458 for static GC_real_XXX symbols.
5459 * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
5460
5461 * alloc.c (GC_finish_collection): Replace getenv() with GETENV().
5462 * dyn_load.c (GC_init_dyld): Likewise.
5463 * os_dep.c (GC_print_callers): Likewise.
5464 * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
5465 result (since it's always of "struct mach_header" type).
5466 * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
5467 GC_dyld_image_remove (to always have the first argument of
5468 "struct mach_header" pointer type).
5469
5470 * configure.ac: Add threads support for OpenBSD case (threads may
5471 not work correctly for it).
5472
5473 * acinclude.m4: Rename to m4/gc_set_version.m4.
5474 * m4/libtool.m4: Delete the file.
5475 * m4/lt~obsolete.m4: Likewise.
5476 * m4/ltoptions.m4: Likewise.
5477 * m4/ltsugar.m4: Likewise.
5478 * m4/ltversion.m4: Likewise.
5479
5480 * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
5481 x86mingw32ce toolchain to workaround the incorrect DebugBreak()
5482 declaration in winbase.h (the workaround would turn into a no-op
5483 when DebugBreak() will be defined as a macro in the toolchain).
5484
5485 * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
5486 x86mingw32ce toolchain).
5487 * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
5488 toolchain (or if already defined).
5489 * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
5490 defined for WinCE or if NO_GETENV is defined).
5491 * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
5492 NO_GETENV one.
5493
5494 * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
5495 * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
5496 * libtool.m4: Remove.
5497 * m4/libtool.m4: New file (generated).
5498 * m4/lt~obsolete.m4: Likewise.
5499 * m4/ltoptions.m4: Likewise.
5500 * m4/ltsugar.m4: Likewise.
5501 * m4/ltversion.m4: Likewise.
5502
5503 * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
5504 prefix GC_CreateThread and GC_ExitThread with '_' if defined.
5505 * doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
5506
5507 * alloc.c (GC_collect_or_expand): Add "retry" argument; add the
5508 comments; don't use "default" stop_func on a retry if
5509 GC_dont_expand.
5510 * alloc.c (GC_allocobj): Pass "retry" argument to
5511 GC_collect_or_expand().
5512 * malloc.c (GC_alloc_large): Likewise.
5513 * include/private/gc_priv.h (GC_collect_or_expand): Move the
5514 declaration to malloc.c; add "retry" argument.
5515
5516 * alloc.c (GC_start_call_back): Move the variable definition from
5517 misc.c.
5518 * include/private/gc_priv.h (GC_start_call_back): Remove the
5519 declaration.
5520 * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
5521 * alloc.c (GC_try_to_collect_inner): Also call stop_func at the
5522 beginning of the function.
5523 * include/gc.h (GC_try_to_collect): Refine the comment about
5524 stop_func.
5525
5526 * alloc.c (GC_default_stop_func, GC_try_to_collect_general,
5527 GC_gcollect): Add the comment.
5528 * alloc.c (GC_try_to_collect_general): Move the assertion on
5529 stop_func != 0 to GC_try_to_collect().
5530 * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
5531 GC_default_stop_func instead (holding the lock).
5532 * alloc.c (GC_gcollect): Pass 0 as stop_func instead of
5533 GC_default_stop_func (to prevent data races).
5534
5535 * Makefile.direct: Move "define arguments" documentation to
5536 doc/README.macros; add reference to doc/README.macros.
5537 * Makefile.dj: Change the documentation reference to
5538 doc/README.macros.
5539 * README.QUICK: Likewise.
5540 * configure.ac: Likewise.
5541 * allchblk.c: Remove unnecessary "-D" from the comment.
5542 * doc/README.macros: Likewise.
5543 * README.environment: Likewise.
5544 * include/gc.h: Likewise.
5545 * include/gc_inline.h: Likewise.
5546 * include/private/gcconfig.h: Likewise.
5547 * README.QUICK: Fix a typo.
5548
5549 * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
5550 CreateFile(); don't immediately flush every write if very verbose.
5551
5552 * doc/README.win32: Replace ".exe.log" to ".gc.log".
5553 * doc/README.win64: Likewise.
5554 * doc/README.win64: Fix a typo.
5555 * misc.c (GC_CreateLogFile): Strip executable file extension for
5556 the log file; use ".gc.log" extension (instead of ".log").
5557
5558 * include/gc_config_macros.h: Avoid the redefinition of
5559 GC_xxx_THREADS macros.
5560
5561 * alloc.c (GC_try_to_collect_general): Change the type of "result"
5562 local variable to GC_bool.
5563
5564 * include/gc_config_macros.h: Use old behavior for FreeBSD and
5565 NetBSD platform detection code (check that other GC_xxx_THREADS
5566 are undefined); add FIXME.
5567
5568 * include/gc_config_macros.h: Rearrange the platform detection
5569 code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
5570 GC_THREADS first if GC_XXX_THREADS already set; define proper
5571 GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
5572 place; define _REENTRANT if posix threads except for Win32).
5573
5574 * alloc.c (GC_try_to_collect_general): New function (move the code
5575 from GC_try_to_collect, pass force_unmap argument).
5576 * alloc.c (GC_try_to_collect, GC_gcollect): Call
5577 GC_try_to_collect_general().
5578 * alloc.c (GC_gcollect_and_unmap): New public function.
5579 * include/gc.h (GC_gcollect_and_unmap): New function declaration.
5580 * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
5581 WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
5582 and GC_gcollect()).
5583
5584 * include/gc.h (GC_allow_register_threads, GC_register_my_thread,
5585 GC_unregister_my_thread, GC_malloc_many): Refine the comment.
5586 * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
5587 (that is, don't depend on GC_THREADS macro).
5588 * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
5589 with a check for GC_PTHREADS (since the former implies the
5590 latter).
5591
5592 * include/gc.h (GC_SOLARIS_THREADS): Don't check for.
5593 * include/gc.h (GC_MIN, GC_MAX): Don't define.
5594 * mallocx.c (GC_malloc_many): Add comment to #endif.
5595
5596 * configure.ac: Drop the subdir-objects Automake option, since
5597 it's incompatible with picking source files from libatomic_ops.
5598
5599 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
5600 "extern" keyword to a global variable declaration (some compilers
5601 require it).
5602 * alloc.c (GC_bytes_found, GC_unmap_threshold,
5603 GC_force_unmap_on_gcollect): Likewise.
5604 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
5605 * finalize.c (GC_fail_count): Likewise.
5606 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
5607 GC_hdr_cache_misses): Likewise.
5608 * mallocx.c (GC_bytes_found): Likewise.
5609 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
5610 * misc.c (GC_unmap_threshold): Likewise.
5611 * os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
5612 * pthread_support.c (GC_markers): Likewise.
5613 * thread_local_alloc.c (GC_gcjobjfreelist,
5614 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5615 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
5616 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
5617
5618 * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
5619 suppress misleading GC "Out of Memory!" warning printed on every
5620 GC_MALLOC(LONG_MAX) call.
5621 * tests/huge_test.c: Include "gc.h" instead of <gc.h>.
5622 * tests/huge_test.c (main): Replace K&R-style function definition
5623 with the ANSI C one.
5624
5625 * dyn_load.c (GC_register_dynamic_libraries): Always use
5626 lpMaximumApplicationAddress value for WinCE (even for old
5627 versions).
5628 * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
5629 * os_dep.c (GC_dont_query_stack_min): New global variable (only if
5630 WinCE and THREADS).
5631 * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
5632 for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
5633 GC_dont_query_stack_min for older WinCE (prior to version 5).
5634 * win32_threads.c (GC_dont_query_stack_min): Declare.
5635 * win32_threads.c (GC_get_stack_min): Rename the macro to
5636 GC_wince_evaluate_stack_min for WinCE; update the comment.
5637 * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
5638 GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
5639 WinCE and don't update thread's last_stack_min value (only if
5640 GC_dont_query_stack_min).
5641 * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
5642 GC_dont_query_stack_min (since the evaluated stack_min value may
5643 be incorrect if the stack is bigger than 64 KiB).
5644
5645 * gc_dlopen.c (GC_dlopen): Add function redirector (only if
5646 GC_USE_LD_WRAP).
5647 * include/gc.h: Include "gc_pthread_redirects.h" even if
5648 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
5649 * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
5650 define and check for (since included only from gc.h).
5651 * include/gc_pthread_redirects.h: Declare "GC_" symbols even if
5652 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
5653 * include/gc_pthread_redirects.h: Include signal.h only to get
5654 sigset_t definition.
5655
5656 * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
5657 * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
5658 NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
5659 * os_dep.c (GC_sysinfo): Remove explicit global variable
5660 initialization to "{0}" (revert back the previous change) since it
5661 might produce a warning.
5662
5663 * allchblk.c (GC_large_alloc_warn_interval): Move declaration from
5664 gc_priv.h.
5665 * allchblk.c (GC_large_alloc_warn_suppressed): Move definition
5666 from misc.c; define as STATIC.
5667 * include/private/gc_priv.h (GC_large_alloc_warn_interval,
5668 GC_large_alloc_warn_suppressed): Remove declaration.
5669 * alloc.c (GC_bytes_found): Add "defined in" comment.
5670 * mallocx.c (GC_bytes_found): Likewise.
5671 * misc.c (GC_unmap_threshold): Likewise.
5672 * os_dep.c (GC_old_allocator): Likewise.
5673 * pthread_support.c (GC_markers): Likewise.
5674 * thread_local_alloc.c (GC_gcjobjfreelist,
5675 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5676 * win32_threads.c (GC_markers): Likewise.
5677 * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
5678 be distinctive from a variable declaration).
5679 * backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
5680 * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
5681 GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
5682 * checksums.c (GC_faulted, GC_n_dirty_errors,
5683 GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
5684 GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
5685 * dbg_mlc.c (GC_smashed): Likewise.
5686 * finalize.c (GC_old_dl_entries): Likewise.
5687 * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
5688 GC_gcjdebugobjfreelist): Likewise.
5689 * mach_dep.c (GC_save_regs_ret_val): Likewise.
5690 * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
5691 GC_mark_stack_top): Likewise.
5692 * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
5693 Likewise.
5694 * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
5695 GC_old_segv_handler, GC_old_bus_handler,
5696 GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
5697 GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
5698 * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
5699 * reclaim.c (GC_leaked): Likewise.
5700 * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
5701 GC_typed_mark_proc_index, GC_array_mark_proc_index,
5702 GC_eobjfreelist, GC_arobjfreelist): Likewise.
5703 * win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
5704 GC_marker_Id): Likewise.
5705 * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
5706 * gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
5707 * os_dep.c (GC_vd_base): Likewise.
5708 * pthread_support.c (GC_mark_threads): Likewise.
5709 * reclaim.c (GC_leaked): Likewise.
5710 * typd_mlc.c (GC_bm_table): Likewise.
5711 * mark_rts.c (GC_save_regs_ret_val): Change declaration type to
5712 that of definition; add "defined in" comment.
5713 * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
5714 GC_save_regs_ret_val.
5715 * misc.c (GC_check_heap, GC_print_all_smashed,
5716 GC_start_call_back): Remove unnecessary cast (of 0).
5717 * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
5718 * misc.c (GC_large_alloc_warn_interval): Initialize to
5719 GC_LARGE_ALLOC_WARN_INTERVAL value.
5720 * misc.c (GC_tmp): Change to "static".
5721 * os_dep.c (GC_mprotect_state): Define as static.
5722 * pthread_support.c (dummy_thread_local): Prefix with "GC_".
5723 * win32_threads.c (WinMain): Remove FIXME for WinCE.
5724
5725 * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
5726
5727 * configure.ac: Rewrite the tests for external or internal
5728 libatomic_ops.
5729 * configure.ac: In particular, drop the symbolic links. Add option
5730 --with-libatomic-ops for forced selection.
5731 * Makefile.am: Adjust the path of source files from libatomic_ops
5732 to not use the links.
5733 * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
5734 be empty if we use the bundled AO sources.
5735
5736 * Makefile.am: Strip version suffix for libatomic_ops directory.
5737 * build_atomic_ops.sh: Likewise.
5738 * build_atomic_ops.sh.cygwin: Likewise.
5739 * configure_atomic_ops.sh: Likewise.
5740 * Makefile.direct: Remove AO_VERSION definition; strip version
5741 suffix for libatomic_ops directory.
5742 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5743 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5744 * NT_X64_THREADS_MAKEFILE: Likewise.
5745 * gc.mak: Likewise.
5746
5747 * libatomic_ops: Rename from "libatomic_ops-1.2".
5748
5749 * alloc.c (GC_version): Add "const" keyword.
5750 * alloc.c (GC_get_version): New public function.
5751 * include/gc.h (GC_get_version): New function declaration; update
5752 the comment for the GC version.
5753
5754 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
5755 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
5756 (for the global variable declaration) again.
5757 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
5758 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
5759 GC_mark_stack_too_small, GC_mark_state): Likewise.
5760 * include/private/gcconfig.h (GC_register_stackbottom): Likewise.
5761 * include/private/pthread_support.h (GC_threads,
5762 GC_thr_initialized, GC_in_thread_creation): Likewise.
5763 * include/private/gc_priv.h: Likewise.
5764
5765 * real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
5766
5767 * allchblk.c (GC_hblkfreelist): Define as STATIC.
5768 * blacklst.c (GC_total_stack_black_listed): Likewise.
5769 * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
5770 GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
5771 declaration.
5772 * mark_rts.c (GC_stopped_mark): Add declaration (only if
5773 THREAD_LOCAL_ALLOC).
5774 * allchblk.c (GC_fail_count): Move the declaration out of
5775 GC_allochblk_nth(); remove "extern".
5776 * alloc.c (IF_THREADS): Remove unused macro.
5777 * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
5778 * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
5779 THREAD_LOCAL_ALLOC.
5780 * alloc.c (GC_bytes_found, GC_collection_in_progress,
5781 GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
5782 Remove K&R-style "extern" for the declaration.
5783 * dbg_mlc.c (GC_free_inner): Likewise.
5784 * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
5785 GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
5786 * finalize.c (GC_fail_count): Likewise.
5787 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
5788 GC_hdr_cache_misses): Likewise.
5789 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
5790 GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
5791 Likewise.
5792 * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
5793 GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
5794 GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
5795 * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
5796 GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
5797 GC_page_size, GC_sysinfo, GC_black_list_spacing,
5798 GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
5799 GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
5800 GC_large_alloc_warn_suppressed, GC_blocked_sp,
5801 GC_activation_frame, GC_push_other_roots,
5802 GC_push_finalizer_structures, GC_push_thread_structures,
5803 GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
5804 GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
5805 GC_print_heap_obj, GC_have_errors, GC_print_stats,
5806 GC_dump_regularly, GC_backtraces, GC_print_back_height,
5807 GC_debug_generic_malloc_inner,
5808 GC_debug_generic_malloc_inner_ignore_off_page,
5809 GC_fl_builder_count, GC_mark_no, GC_help_marker,
5810 GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
5811 * include/private/gcconfig.h (GC_SysVGetDataStart,
5812 GC_FreeBSDGetDataStart, GC_register_stackbottom,
5813 GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
5814 * include/private/pthread_support.h (GC_threads,
5815 GC_thr_initialized, GC_in_thread_creation): Likewise.
5816 * malloc.c (GC_text_mapping): Likewise.
5817 * mallocx.c (GC_bytes_found): Likewise.
5818 * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
5819 * mark_rts.c (GC_save_regs_ret_val): Likewise.
5820 * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
5821 GC_setpagesize, GC_init_linux_data_start,
5822 GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
5823 * os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
5824 GC_darwin_register_mach_handler_thread): Likewise.
5825 * pthread_support.c (GC_markers, GC_collection_in_progress):
5826 Likewise.
5827 * tests/test.c (GC_amiga_free_all_mem): Likewise.
5828 * thread_local_alloc.c (GC_gcjobjfreelist,
5829 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5830 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
5831 GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
5832 * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
5833 Move the declaration out of GC_init(); remove "extern".
5834 * os_dep.c (GC_abort): Add the comment; add workaround to suppress
5835 compiler "unreachable code" warnings for ABORT callers (where
5836 ABORT is followed by a dummy return statement).
5837 * os_dep.c (GC_old_allocator): Move the declaration out of
5838 GC_default_push_other_roots(); remove "extern".
5839 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
5840 Move the declaration out of GC_stop_world() and GC_start_world()
5841 (only if MPROTECT_VDB); remove "extern".
5842
5843 * win32_threads.c (GC_get_stack_min, GC_push_stack_for,
5844 GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
5845 WinCE emulation and for custom WinCE 6 devices); add the comment.
5846 * win32_threads.c (GC_get_stack_min): Cast pointer to word instead
5847 of DWORD.
5848 * win32_threads.c (GC_get_next_stack): Don't use and maintain the
5849 latest known stack_min value for WinCE (if GC_get_stack_min is
5850 defined as a macro); update the comments.
5851 * win32_threads.c (GC_wnt): Don't declare for WinCE.
5852
5853 * Makefile.direct: Document EMPTY_GETENV_RESULTS.
5854 * gcj_mlc.c (GC_clear_stack): Remove declaration.
5855 * malloc.c (GC_clear_stack): Likewise.
5856 * mallocx.c (GC_clear_stack): Likewise.
5857 * typd_mlc.c (GC_clear_stack): Likewise.
5858 * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
5859 GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
5860 remove "lb" unnecessary cast to word.
5861 * include/private/gc_priv.h (GC_clear_stack): Add declaration.
5862 * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
5863 Move common declaration from typd_mlc.c and malloc.c; remove
5864 unnecessary result and "lb" parameter casts.
5865 * include/private/thread_local_alloc.h: Guard against duplicate
5866 header file inclusion.
5867 * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
5868 the case when USE_MMAP is not defined.
5869 * pthread_support.c (GC_is_thread_tsd_valid): New internal
5870 function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
5871 code from thread-local GC_malloc(); add FIXME for the condition.
5872 * win32_threads.c (GC_is_thread_tsd_valid): Likewise.
5873 * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
5874 match that of its definition).
5875 * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
5876 GC_gcjobjfreelist.
5877 * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
5878 Remove unused declaration; don't include pthread.h.
5879 * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
5880 (only if GC_ASSERTIONS).
5881 * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
5882 instead of GC_lookup_thread().
5883 * win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
5884 * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
5885 id different from that in os_dep.c).
5886
5887 * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
5888 with GC_INLINE.
5889 * include/private/gc_priv.h (fixed_getenv): Likewise.
5890 * alloc.c (GC_max, GC_min): Replace "static INLINE" with
5891 GC_INLINE.
5892 * mark_rts.c (rt_hash): Likewise.
5893 * win32_threads.c (GC_get_max_thread_index): Likewise.
5894 * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
5895 "static"; define for Sun CC; define for VC++ (and other
5896 compilers).
5897 * pthread_support.c: Don't define __inline__ for non-GNU compilers
5898 (not needed anymore).
5899
5900 * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
5901 * Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
5902 * Makefile.am: Likewise.
5903 * Makefile.dj: Likewise.
5904 * Makefile.direct: Likewise.
5905 * doc/README.win32: Add reference to gc.mak.
5906 * NT_X64_THREADS_MAKEFILE: Likewise.
5907
5908 * Makefile.direct: Remove references to acinclude.m4, libtool.m4.
5909
5910 * autogen.sh: Update.
5911
5912 * Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
5913 * acinclude.m4: Fix underquoting of GC_SET_VERSION.
5914 * README.QUICK: Update information for Makefile.
5915 * Makefile.am: Do not distribute the substituted bdw-gc.pc.
5916 * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
5917 * tests/tests.am: Use it here to conditionally enable tracetest
5918 when possible.
5919
5920 * dyn_load.c (GC_wnt): Update the comment.
5921 * dyn_load.c (GC_register_dynamic_libraries): Add the comment for
5922 _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
5923 macro); call GC_is_heap_base() only if check for Type succeeded.
5924
5925 * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
5926 update the comment.
5927 * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
5928
5929 * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
5930 * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
5931 ASSERT_CANCEL_DISABLED): New macros.
5932 * alloc.c (GC_maybe_gc): Assert cancellation disabled.
5933 (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
5934 Disable cancellation.
5935 (GC_add_to_our_memory): Check for overflow.
5936 * misc.c (GC_cancel_disable_count): declare.
5937 (GC_init, GC_write): Disable cancellation.
5938 (GC_init): Remove redundant GC_is_initialized test.
5939 * os_dep.c (GC_repeat_read): Assert cancellation disabled.
5940 (GC_get_stack_base): Disable cancellation.
5941 * pthread_stop_world.c (GC_suspend_handler_inner): Disable
5942 cancellation.
5943 * pthread_support.c (GC_mark_thread): Permanently disable
5944 cancellation.
5945 (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
5946 Assert cancellation disabled.
5947 (fork handling): Disable cancellation, fix comment.
5948 (GC_pthread_create): Disable cancellation.
5949 (GC_unregister_my_thread): Disable cancellation.
5950 * Makefile.direct: Document NO_CANCEL_SAFE.
5951
5952 * Makefile: Remove outdated file (Makefile.direct should be used
5953 instead).
5954
5955 * include/gc.h (GC_use_DllMain): Refine the comment.
5956
5957 * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
5958 EMPTY_GETENV_RESULTS.
5959 * configure.ac: Fix a typo.
5960 * Makefile.am: Likewise.
5961
5962 * checksums.c (GC_checksum, GC_update_check_page): Remove
5963 "register" keyword in local variable declarations (for the code
5964 used only for debugging or which is not time-critical).
5965 * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
5966 GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
5967 GC_print_smashed_obj, GC_debug_end_stubborn_change,
5968 GC_debug_invoke_finalizer): Likewise.
5969 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
5970 * mallocx.c (GC_realloc): Likewise.
5971 * mark_rts.c (GC_print_static_roots, GC_is_static_root,
5972 GC_clear_roots): Likewise.
5973 * misc.c (GC_write): Likewise.
5974 * os_dep.c (GC_print_callers): Likewise.
5975 * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
5976 variable to "j" for the nested loop (just not to hide the similar
5977 variable in the outer one).
5978 * mark_rts.c (GC_print_static_roots): Output an error message
5979 using GC_err_printf() (instead of GC_printf()).
5980
5981 * configure.ac: Move include flag from ${INCLUDE} ...
5982 * Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
5983 * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
5984 * configure.ac: Add documentation to all AC_DEFINE either directly
5985 or using AH_TEMPLATE.
5986
5987 * win32_threads.c (GC_waitForSingleObjectInfinite): New static
5988 function (only if GC_WINMAIN_REDIRECT).
5989 * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
5990 thru GC_do_blocking() instead of calling WaitForSingleObject()
5991 directly.
5992
5993 * pthread_support.c (start_mark_threads): Refine printed message.
5994 * win32_threads.c (GC_thr_init): Likewise.
5995
5996 * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
5997 * Makefile.direct (NO_GETENV): Update the comment.
5998 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
5999 * include/gc.h (GC_WinMain): Remove declaration.
6000 * include/gc.h (WinMain): Define (as GC_WinMain) if and only if
6001 GC_WINMAIN_REDIRECT.
6002 * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
6003 WinCE target unless GC_WINMAIN_REDIRECT is defined.
6004 * tests/test.c (WINMAIN_LPTSTR): New macro.
6005 * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
6006 and GC_WINMAIN_WINCE_LPTSTR.
6007 * win32_threads.c (start_mark_threads): Add the comment for
6008 MARK_THREAD_STACK_SIZE.
6009 * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
6010 * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
6011 macro (only if GC_WINMAIN_REDIRECT).
6012 * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
6013 * win32_threads.c (GC_WinMain): Add prototype (only if
6014 GC_WINMAIN_REDIRECT).
6015 * win32_threads.c (main_thread_args, WinMain): Rename
6016 GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
6017 * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
6018 use WINMAIN_THREAD_STACK_SIZE.
6019 * win32_threads.c (WinMain): Call GC_deinit() and
6020 DeleteCriticalSection() only if WinCE; add FIXME.
6021
6022 * os_dep.c (GC_get_main_stack_base): add assertion for mem_base
6023 value returned by GC_get_stack_base().
6024
6025 * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
6026 Add the comment for.
6027 * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
6028 Declare external variable (only if USE_MUNMAP).
6029 * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
6030 value to 1 if GC_force_unmap_on_gcollect and restore it before
6031 unlocking (only if USE_MUNMAP).
6032 * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
6033 information for.
6034 * include/gc.h (GC_set_force_unmap_on_gcollect,
6035 GC_get_force_unmap_on_gcollect): New public function prototype.
6036 * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
6037 recognized.
6038 * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
6039 * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
6040 internal macro (used by GC_INIT only).
6041 * misc.c (GC_force_unmap_on_gcollect): New global variable.
6042 * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
6043 environment variable (and set GC_force_unmap_on_gcollect).
6044 * misc.c (GC_set_force_unmap_on_gcollect,
6045 GC_get_force_unmap_on_gcollect): New public function.
6046 * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
6047 to force the mode on if WM_HIBERNATE; restore the mode after
6048 GC_gcollect().
6049
6050 * Makefile.direct (LARGE_CONFIG): Update information.
6051 * include/gc.h (GC_stop_func): Refine the comment.
6052
6053 * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
6054 Win32 (workaround for Wine bug).
6055
6056 * allchblk.c (GC_freehblk): Adjust local variables indentation.
6057 * mallocx.c (GC_generic_malloc_many): Likewise.
6058 * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
6059 GC_calloc_explicitly_typed): Likewise.
6060 * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
6061 brackets.
6062
6063 * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
6064 * configure.ac: Process enable_parallel_mark option for Cygwin and
6065 Win32; define THREAD_LOCAL_ALLOC for Win32.
6066
6067 * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
6068 PARALLEL_MARK (required for VC++ x86).
6069
6070 * dbg_mlc.c (GC_generate_random_backtrace): Call
6071 GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
6072 if GC is disabled then print error message and return.
6073 * include/gc.h (GC_try_to_collect): Refine the comment.
6074 * include/private/gc_priv.h (GC_never_stop_func): Fix return type;
6075 refine the comment.
6076
6077 * add_gc_prefix.c: Move the file to the new "extra" directory.
6078 * AmigaOS.c: Likewise.
6079 * gcname.c: Likewise.
6080 * if_mach.c: Likewise.
6081 * if_not_there.c: Likewise.
6082 * MacOS.c: Likewise.
6083 * msvc_dbg.c: Likewise.
6084 * setjmp_t.c: Likewise.
6085 * threadlibs.c: Likewise.
6086 * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
6087 * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
6088 if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
6089 with "extra" directory.
6090 * Makefile.am: Likewise.
6091 * Makefile.direct: Likewise.
6092 * Makefile.dj: Likewise.
6093 * Makefile.in: Likewise.
6094 * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
6095 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6096 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6097 * NT_X64_THREADS_MAKEFILE: Likewise.
6098 * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
6099 * gc.mak: Likewise.
6100 * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
6101 directory.
6102 * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
6103 directory.
6104 * doc/simple_example.html: Update for threadlibs.c.
6105 * os_dep.c: Prepend included AmigaOS.c with "extra" directory.
6106
6107 * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
6108 function prototype.
6109 * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
6110 single-threaded case) with an assertion check for the state to be
6111 not a "do-blocking" one.
6112 * include/private/gc_priv.h (blocking_data): Move the structure
6113 definition from pthread_support.c; change "fn" return type to void
6114 pointer.
6115 * include/private/gc_priv.h (GC_activation_frame_s): New structure
6116 type.
6117 * include/private/gc_priv.h (GC_push_all_stack_frames): New
6118 function declaration (only if THREADS).
6119 * include/private/gc_priv.h (GC_world_stopped): Don't declare
6120 unless THREADS.
6121 * include/private/gc_priv.h (GC_blocked_sp,
6122 GC_activation_frame_s): New declaration (only if not THREADS).
6123 * include/private/gc_priv.h (GC_push_all_register_frames): New
6124 function declaration (only for IA-64).
6125 * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
6126 obsolete (unused) symbols.
6127 * include/private/gc_priv.h (GC_push_all_stack_partially_eager):
6128 Remove declaration (since it is static now).
6129 * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
6130 (for code locality) and make STATIC.
6131 * mark_rts.c (GC_push_all_register_frames): New function (only for
6132 IA-64).
6133 * mark_rts.c (GC_push_all_stack_frames): New function (only if
6134 THREADS).
6135 * mark_rts.c (GC_add_trace_entry): New function prototype (used by
6136 GC_push_all_stack_partially_eager(), only if TRACE_BUF).
6137 * mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
6138 * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
6139 function body (only for IA-64).
6140 * mark_rts.c (GC_push_current_stack): Call
6141 GC_push_all_stack_part_eager_frames() instead of
6142 GC_push_all_stack_partially_eager().
6143 * mark_rts.c (GC_push_current_stack): Call
6144 GC_push_all_register_frames() instead of GC_push_all_eager() for
6145 IA-64 backing store.
6146 * misc.c (GC_do_blocking_inner): Declare function (if THREADS
6147 only).
6148 * misc.c (GC_blocked_sp, GC_blocked_register_sp,
6149 GC_activation_frame): New global variables (only if not THREADS).
6150 * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
6151 function (only if not THREADS).
6152 * misc.c (GC_do_blocking): Move the function from
6153 pthread_support.c.
6154 * include/private/pthread_support.h (GC_Thread_Rep): Add
6155 "activation_frame" field.
6156 * pthread_stop_world.c (GC_push_all_stacks): Call
6157 GC_push_all_stack_frames() and GC_push_all_register_frames instead
6158 of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
6159 STACK_GROWS_UP here.
6160 * pthread_support.c (GC_do_blocking_inner): Remove "static"; store
6161 "fn" result back to "client_data" field.
6162 * pthread_support.c (GC_call_with_gc_active): New API function.
6163 * win32_threads.c (GC_call_with_gc_active): Likewise.
6164 * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
6165 "activation_frame" fields.
6166 * win32_threads.c (GC_new_thread): Add assertion checking for
6167 thread_blocked_sp is NULL.
6168 * win32_threads.c (GC_do_blocking_inner): New function.
6169 * win32_threads.c (GC_stop_world): Don't suspend a thread if its
6170 thread_blocked_sp is non-NULL.
6171 * win32_threads.c (GC_push_stack_for): Use thread
6172 "activation_frame" (if non-NULL); use "thread_blocked_sp" if
6173 non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
6174 thread before modifying its last_stack_min; call
6175 GC_push_all_stack_frames() instead of GC_push_all_stack(); update
6176 the comments.
6177
6178 * alloc.c (GC_default_stop_func): New static variable (initialized
6179 to GC_never_stop_func).
6180 * alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
6181 * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
6182 (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
6183 else call GC_default_stop_func() before getting "current_time".
6184 * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
6185 FIXME comment).
6186 * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
6187 replacing GC_never_stop_func with GC_default_stop_func (if
6188 possible).
6189 * alloc.c (GC_gcollect): Use GC_default_stop_func.
6190 * alloc.c (GC_collect_or_expand): Use GC_default_stop_func
6191 (instead of GC_never_stop_func) unless it is triggered due to out of
6192 memory; don't increment GC_fail_count and don't output warning
6193 (before trying to collect again) in case the collection has been
6194 interrupted (by GC_default_stop_func) and the heap expansion has
6195 failed too.
6196 * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
6197 prototypes.
6198
6199 * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
6200 GC_get_writable_length() result.
6201
6202 * configure.ac: Don't use -lpthread -ldl for Cygwin.
6203
6204 * NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
6205
6206 * include/private/gcconfig.h (GWW_VDB): Undefine if
6207 USE_GLOBAL_ALLOC (since incompatible).
6208 * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
6209 is defined.
6210 * os_dep.c (GC_unmap_threshold): Declare (for use in
6211 GC_init_win32) if USE_MUNMAP.
6212 * os_dep.c (GC_init_win32): Turn off memory unmapping if
6213 GlobalAlloc() is used.
6214 * os_dep.c (GC_win32_get_mem): Define and use new
6215 VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless
6216 MPROTECT_VDB is in use.
6217
6218 * Makefile: Replace "version.h" with "include/gc_version.h".
6219 * include/gc_version.h: Likewise.
6220
6221 * alloc.c (GC_collect_or_expand): Output heap size in WARN()
6222 (before returning FALSE) for convenience.
6223
6224 * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
6225 string.
6226 * pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
6227 * win32_threads.c (GC_delete_thread): Likewise.
6228 * include/private/gc_priv.h (GC_PRIdPTR): New macro.
6229 * pthread_stop_world.c (GC_suspend_handler_inner): Remove
6230 unnecessary cast for WARN argument.
6231 * pthread_support.c (start_mark_threads): if pthread_create()
6232 failed then don't try to create other marker threads and (after
6233 printing a warning) adjust GC_markers and GC_parallel values; log
6234 GC_markers value (possibly adjusted) after that.
6235
6236 * win32_threads.c (start_mark_threads): if pthread_create() is
6237 failed then don't try to create other marker threads and (after
6238 printing a warning) adjust GC_markers and GC_parallel values.
6239 * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
6240 the definition upper (to be visible in start_mark_threads()).
6241 * win32_threads.c (start_mark_threads): if CreateThread() or
6242 _beginthreadex() is failed then don't try to create other marker
6243 threads and (after printing a warning) adjust GC_markers,
6244 GC_parallel values, and destroy the event objects (either only
6245 some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
6246 not a single thread is created).
6247 * win32_threads.c (GC_thr_init): Log GC_markers value (possibly
6248 adjusted) after start_mark_threads() call.
6249
6250 * Makefile.am: Back remove "GC_" prefix for PTHREADS,
6251 DARWIN_THREADS, WIN32_THREADS (for configure.ac).
6252
6253 * include/private/gc_priv.h: Change include of config.h to
6254 private/config.h.
6255 * include/private/gc_pmark.h: Likewise.
6256 * gc_cpp.cc: Likewise.
6257 * tests/test.c: Likewise.
6258 * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
6259 undefine GC_BUILD.
6260
6261 * finalize.c (GC_general_register_disappearing_link): Return
6262 GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
6263 respectively).
6264 * include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
6265 * include/gc.h (GC_register_disappearing_link,
6266 GC_general_register_disappearing_link): Update the comment.
6267 * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
6268 * finalize.c (GC_general_register_disappearing_link,
6269 GC_register_finalizer_inner): Recalculate the hash table index
6270 after GC_oom_fn succeeded (since the table may grow while not
6271 holding the lock) and check again that the entry is still not in
6272 the table (free the unused entry otherwise unless DBG_HDRS_ALL).
6273 * finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
6274 local variable (to prevent a compiler warning).
6275 * finalize.c (GC_register_finalizer_inner): Don't modify the data
6276 pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
6277 (due to out of memory).
6278
6279 * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
6280 suppress compiler "variable might be uninitialized" warnings.
6281
6282 * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
6283 * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
6284 WinCE.
6285 * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
6286 HANDLE thru word type (to avoid a compiler warning) for WinCE.
6287 * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
6288 (only if DONT_USE_SIGNALANDWAIT).
6289 * win32_threads.c (start_mark_threads): Initialize GC_marker_Id
6290 and GC_marker_cv for each helper thread (only if
6291 DONT_USE_SIGNALANDWAIT).
6292 * win32_threads.c (GC_mark_mutex_state): New static variable (only
6293 if DONT_USE_SIGNALANDWAIT).
6294 * win32_threads.c (GC_mark_mutex_waitcnt,
6295 signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
6296 * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
6297 Use InterlockedExchange() over GC_mark_mutex_state (instead of
6298 AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
6299 * win32_threads.c (GC_wait_marker, GC_notify_all_marker):
6300 Implement wait/broadcast primitives using Win32 multiple events
6301 (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
6302 using Win32 SignalObjectAndWait).
6303 * win32_threads.c (GC_thr_init): Don't declare hK32 local
6304 variable, don't check for GC_wnt, and don't initialize
6305 signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
6306
6307 * alloc.c (GC_finish_collection): Call GC_print_finalization_stats
6308 if GC_print_stats (after getting "done_time").
6309 * finalize.c (GC_old_dl_entries): New static variable (only if not
6310 SMALL_CONFIG).
6311 * finalize.c (GC_finalize): Save current GC_dl_entries value (only
6312 if not SMALL_CONFIG).
6313 * finalize.c (GC_print_finalization_stats): Define if and only if
6314 not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
6315 instead of GC_printf(); use "%lu" (instead of "%u") print format
6316 specifier; use unsigned long type for "ready" counter (for LP64
6317 targets).
6318 * misc.c (GC_dump): No longer call GC_print_finalization_stats()
6319 here (since it is called from GC_finish_collection()).
6320 * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
6321 ECOS).
6322
6323 * alloc.c (GC_expand_hp): Replace GC_init_inner() call with
6324 GC_init() one.
6325 * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
6326 * mallocx.c (GC_generic_malloc_many): Likewise.
6327 * misc.c (GC_enable_incremental): Likewise.
6328 * alloc.c (GC_expand_hp): Update the comment.
6329 * mark.c (GC_obj_kinds): Likewise.
6330 * win32_threads.c (GC_allow_register_threads): Likewise.
6331 * private/gc_priv.h (GC_init_inner): Remove function declaration.
6332 * misc.c (GC_init_inner): Replace with public GC_init().
6333
6334 * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
6335 * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
6336 GC_gcj_fake_mark_proc (aborting with the appropriate message)
6337 instead.
6338
6339 * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
6340 to out of memory) then don't increment GC_n_heap_bases and don't
6341 call VirtualAlloc() again (with MEM_COMMIT).
6342 * os_dep.c (GC_remap): Abort with a more informatory message if
6343 VirtualAlloc() fails due to out of memory; update FIXME.
6344
6345 * Makefile: Fix typo for msvc_dbg.c.
6346 * Makefile.direct: Likewise.
6347 * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
6348 "GC_".
6349 * Makefile.dj: Don't reference remove files (nursery.c,
6350 gc_nursery.h, gc_copy_descr.h).
6351 * NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
6352 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6353 * NT_THREADS_MAKEFILE: Likewise.
6354 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6355 * NT_X64_THREADS_MAKEFILE: Likewise.
6356 * gc.mak: Likewise.
6357 * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
6358 defined in the source files).
6359 * NT_THREADS_MAKEFILE: Likewise.
6360 * NT_X64_THREADS_MAKEFILE: Likewise.
6361 * gc.mak: Likewise.
6362 * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
6363 * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
6364 GC_THREADS.
6365 * NT_THREADS_MAKEFILE: Likewise.
6366 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6367 * NT_X64_THREADS_MAKEFILE: Likewise.
6368 * gc.mak: Likewise.
6369 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
6370 compiler warnings.
6371 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6372 * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
6373 before "$*.C" (and "$*.CPP").
6374 * NT_X64_THREADS_MAKEFILE: Likewise.
6375
6376 * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
6377 * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
6378 * doc/README.win64: Add info about mingw-w64; add note for VC++
6379 warnings suppression.
6380
6381 * os_dep.c (GC_forward_exception): Fix logic in several places.
6382 (OSX-specific)
6383
6384 * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
6385
6386 * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
6387 from Makefile.
6388 * Makefile: Remove the information about "define arguments" (which
6389 is incomplete and outdated compared to that in Makefile.direct);
6390 add help reference to Makefile.direct.
6391 * Makefile.dj: Likewise.
6392
6393 * alloc.c (world_stopped_total_time, world_stopped_total_divisor):
6394 Replace "STATIC" with "static" in the definition (since the
6395 symbols aren't prefixed with "GC_").
6396 * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
6397 start_mark_threads, mark_mutex, builder_cv, mark_cv,
6398 mark_mutex_event, signalObjectAndWait_func, main_thread_start):
6399 Likewise.
6400 * pthread_support.c (GC_wait_builder): Define as STATIC.
6401 * win32_threads.c (GC_wait_builder): Likewise.
6402
6403 * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
6404 API function.
6405 * include/gc_pmark.h (GC_get_heap_size_inner,
6406 GC_get_free_bytes_inner): New function declaration.
6407
6408 * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
6409 * include/gc_config_macros.h: Likewise.
6410 * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
6411 * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
6412 internal use).
6413 * include/gc_config_macros.h: Always include stddef.h if GCC.
6414 * include/gc_config_macros.h (GC_API): Define for CeGCC in the
6415 same way as for MinGW.
6416 * include/gc_config_macros.h (GC_API): Group the definition for
6417 all cases together (check for GC_DLL only once).
6418 * include/gc_pthread_redirects.h: Group non-Darwin code together.
6419 * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
6420
6421 * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
6422 GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
6423 GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
6424 comment for.
6425 * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
6426 macro).
6427 * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
6428 FIXME and the comment for WinCE.
6429 * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
6430 (new macro).
6431 * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
6432 WinCE (since backtrace() is unimplemented).
6433 * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
6434 (since static).
6435 * os_dep.c (GC_n_heap_bases): Define as STATIC; move the
6436 definition to be above GC_is_heap_base().
6437 * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
6438 (both for MinGW and CeGCC toolchains).
6439 * include/private/gcconfig.h: Recognize __CEGCC__ and
6440 __MINGW32CE__ (as synonyms for __WIN32_WCE).
6441 * include/private/gcconfig.h: If SH4 then don't set config
6442 parameters for SH.
6443 * include/private/thread_local_alloc.h (GC_key_create): Don't
6444 abort on failures, just return -1 in these cases (this also
6445 prevents compilation error for targets where ABORT is defined
6446 indirectly as an inline assembler sequence).
6447 * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
6448 the GCC-based cross-compiler.
6449 * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
6450 WRAP_MARK_SOME is defined; define also for WinCE case; don't
6451 check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
6452 * mark.c (GC_mark_some): Use __try/__except also for WinCE; update
6453 the comment.
6454 * misc.c: Include signal.h after gc_pmark.h included; check for
6455 MSWINCE instead of _WIN32_WCE.
6456 * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
6457 * misc.c: Don't include <crtdbg.h> for WinCE targets.
6458 * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
6459 CeGCC toolchain).
6460 * misc.c (GC_write): Use OutputDebugStringW() instead of
6461 _CrtDbgReport() for WinCE targets.
6462 * os_dep.c (GC_least_described_address): Define as STATIC.
6463 * os_dep.c (GC_register_data_segments): Fix code indentation.
6464 * os_dep.c (GC_wince_get_mem): Initialize "result" local variable
6465 (to prevent a compiler warning).
6466 * os_dep.c (GC_dirty_init): Add comment for WinCE target.
6467 * tests/test.c: Don't include winbase.h directly if GCC for WinCE,
6468 include assert.h instead.
6469 * tests/test.c (tiny_reverse_test): Define and use
6470 TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
6471 useful for WinCE.
6472 * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
6473 for WinCE (since thread Id is used as a "real" thread handle).
6474 * win32_threads.c (THREAD_HANDLE): New macro.
6475 * win32_threads.c (GC_register_my_thread_inner): Don't recognize
6476 DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
6477 WinCE.
6478 * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
6479 * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
6480 for MSWINCE.
6481 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
6482 close thread handle on WinCE (since it's a thread Id).
6483 * win32_threads.c (GC_suspend): Don't check for MSWINCE in the
6484 MPROTECT-related code (for the case if MPROTECT_VDB would be
6485 implemented for WinCE).
6486 * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
6487 Use THREAD_HANDLE(t) to obtain thread handle.
6488 * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
6489 implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
6490 pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
6491 GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
6492 parallel mark support).
6493 * win32_threads.c (start_mark_threads): Use int type for "i" local
6494 variable (instead of "unsigned") to prevent a compiler warning.
6495 * win32_threads.c (start_mark_threads): Don't check CreateThread()
6496 result for -1; call CloseHandle() for the handle created by
6497 CreateThread() (on WinCE); don't use errno (since errno.h is
6498 missing on some targets like WinCE) when printing warning on a
6499 marker thread creation failure.
6500 * win32_threads.c (signalObjectAndWait_func): Define for WinCE.
6501 * win32_threads.c (GC_wait_marker): Remove unnecessary assertion
6502 for non-zero signalObjectAndWait_func (to make the code compilable
6503 for WinCE).
6504 * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
6505 use GC_sysinfo to get processors count if WinCE; don't check for
6506 SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
6507 GC_PTHREADS_PARAMARK.
6508 * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
6509 macro (useful for testing parallel marking on WinCE).
6510 * win32_threads.c (GC_win32_start, main_thread_start): Define as
6511 STATIC.
6512 * win32_threads.c: Don't define main_thread_args,
6513 main_thread_start(), WinMain() for WinCE if GC_DLL.
6514 * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
6515 (since the stack size parameter is ignored on WinCE).
6516 * win32_threads.c (main_thread_start): Remove forward declaration;
6517 place its definition before WinMain() one.
6518 * win32_threads.c (WinMain): Abort if GC_CreateThread() or
6519 WaitForSingleObject() failed (for the main thread).
6520
6521 * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
6522 a function.
6523 * allchblk.c (GC_unmap_threshold): New global variable definition
6524 (initialized to MUNMAP_THRESHOLD).
6525 * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
6526 MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
6527 * doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
6528 * misc.c (GC_unmap_threshold): New variable declaration.
6529 * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
6530 environment variable to set GC_unmap_threshold value (only if
6531 USE_MUNMAP).
6532
6533 * dbg_mlc.c (OFN_UNSET): New macro (to detect
6534 GC_register_finalizer() failures).
6535 * dbg_mlc.c (store_old): Add a check for register_finalizer()
6536 failure caused by an out-of-memory event (leave *ofn and *ocd
6537 unmodified in that case).
6538 * dbg_mlc.c (GC_debug_register_finalizer,
6539 GC_debug_register_finalizer_no_order,
6540 GC_debug_register_finalizer_unreachable,
6541 GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
6542 to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
6543 as in GC_register_finalizer_inner()).
6544
6545 * Makefile.direct (GC_DLL): Add the comment for.
6546 * doc/README.macros: Fix a typo.
6547 * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
6548 * doc/README.macros (__STDC__): Remove info.
6549 * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
6550 GC_generate_random_valid_address, GC_print_backtrace,
6551 GC_generate_random_backtrace, GC_register_describe_type_fn): Add
6552 GC_API and GC_CALL to function definition.
6553 * malloc.c (GC_generic_malloc): Likewise.
6554 * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
6555 * mark.c (GC_mark_and_push): Likewise.
6556 * misc.c (GC_new_free_list_inner, GC_new_free_list,
6557 GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
6558 Likewise.
6559 * include/gc_backptr.h (GC_get_back_ptr_info,
6560 GC_generate_random_heap_address, GC_generate_random_valid_address,
6561 GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
6562 GC_CALL to function prototype.
6563 * include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
6564 GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
6565 GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
6566 GC_register_describe_type_fn): Likewise.
6567 * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
6568 GC_generic_malloc_words_small): Likewise.
6569 * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
6570 * include/private/gc_pmark.h: Likewise.
6571 * include/private/gc_priv.h: Likewise.
6572 * tests/test.c: Likewise.
6573 * gc_cpp.cc: Define GC_BUILD.
6574 * include/private/gc_pmark.h: Likewise.
6575 * include/private/gc_priv.h: Likewise.
6576 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
6577 * gc_dlopen.c (dlopen): Add GC_API to the wrapper function
6578 definition.
6579 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
6580 GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
6581 pthread_detach, pthread_create): Likewise.
6582 * win32_threads.c (GC_pthread_join, GC_pthread_create,
6583 GC_pthread_sigmask, GC_pthread_detach): Likewise.
6584 * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
6585 * include/gc_backptr.h: Include "gc.h".
6586 * include/gc_backptr.h: Use extern "C" for the exported functions.
6587 * include/gc_mark.h: Likewise.
6588 * include/gc_config_macros.h (GC_THREADS): Define the macro if any
6589 GC_XXX_THREADS is defined.
6590 * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
6591 Move the definitions below the place where GC_NETBSD_THREADS and
6592 GC_DGUX386_THREADS are defined.
6593 * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
6594 is defined) for GCC.
6595 * include/gc_config_macros.h (GC_API): Define for Cygwin (in the
6596 same way as for VC++); define for GCC v4+ (other than already
6597 recognized MinGW/Cygwin) as a "default" visibility attribute if
6598 GC_DLL is defined.
6599 * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
6600 New macro.
6601 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
6602 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
6603 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
6604 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
6605 GC_debug_malloc_atomic, GC_debug_strdup,
6606 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
6607 GC_debug_malloc_ignore_off_page,
6608 GC_debug_malloc_atomic_ignore_off_page,
6609 GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
6610 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
6611 GC_gcj_malloc_ignore_off_page): Likewise.
6612 * include/gc.h (GC_malloc, GC_malloc_atomic,
6613 GC_malloc_uncollectable, GC_malloc_stubborn,
6614 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
6615 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
6616 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
6617 GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
6618 GC_debug_malloc_atomic_ignore_off_page,
6619 GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
6620 (for the first argument).
6621 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
6622 GC_gcj_malloc_ignore_off_page): Likewise.
6623 * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
6624 GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
6625 (for the second argument).
6626 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
6627 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
6628 GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
6629 GC_realloc, GC_expand_hp, GC_set_max_heap_size,
6630 GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
6631 GC_register_displacement, GC_debug_register_displacement,
6632 GC_try_to_collect, GC_malloc_ignore_off_page,
6633 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
6634 GC_debug_malloc_atomic, GC_debug_strdup,
6635 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
6636 GC_debug_malloc_ignore_off_page,
6637 GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
6638 GC_debug_realloc, GC_debug_malloc_replacement,
6639 GC_debug_realloc_replacement, GC_finalization_proc,
6640 GC_register_finalizer, GC_debug_register_finalizer,
6641 GC_register_finalizer_ignore_self,
6642 GC_debug_register_finalizer_ignore_self,
6643 GC_register_finalizer_no_order,
6644 GC_debug_register_finalizer_no_order,
6645 GC_register_finalizer_unreachable,
6646 GC_debug_register_finalizer_unreachable,
6647 GC_register_disappearing_link,
6648 GC_general_register_disappearing_link,
6649 GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
6650 GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
6651 GC_call_with_alloc_lock, GC_stack_base_func,
6652 GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
6653 GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
6654 GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
6655 GC_malloc_many, GC_CreateThread, GC_beginthreadex,
6656 GC_endthreadex): Comment out (or remove if single and meaningless)
6657 function argument names (to avoid identifiers out of the name
6658 space).
6659 * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
6660 GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
6661 * include/gc.h (GC_try_to_collect): Update the comment.
6662 * include/gc.h (GC_size, GC_register_my_thread): Add const
6663 qualifier for the argument referent.
6664 * misc.c (GC_size): Likewise.
6665 * pthread_support.c (GC_register_my_thread_inner,
6666 GC_register_my_thread): Likewise.
6667 * win32_threads.c (GC_register_my_thread_inner,
6668 GC_register_my_thread): Likewise.
6669 * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
6670 (define instead of GC_INIT() for Cygwin and AIX).
6671 * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
6672 GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
6673 GC_INITIAL_HEAP_SIZE): Recognize new macro.
6674 * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
6675 GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
6676 GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
6677 GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
6678 * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
6679 * include/gc_mark.h: Prefix GC_H with '_'.
6680 * include/gc_mark.h (GC_least_plausible_heap_addr,
6681 GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
6682 for the public variable declaration.
6683 * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
6684 GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
6685 * include/gc_pthread_redirects.h (GC_pthread_create,
6686 GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
6687 Use GC_API for the wrapper prototype.
6688 * include/gc_pthread_redirects.h (pthread_create, pthread_join,
6689 pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
6690 before redirecting.
6691 * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
6692 GC_incr_bytes_freed(); remove FIXME.
6693 * include/private/gc_priv.h (GC_make_closure,
6694 GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
6695 function.
6696 * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
6697 the target.
6698
6699 * finalize.c (GC_general_register_disappearing_link,
6700 GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
6701 guard for LOCK/UNLOCK().
6702 * finalize.c (GC_general_register_disappearing_link,
6703 GC_register_finalizer_inner): Get GC_oom_fn value before releasing
6704 the lock (to prevent data races).
6705 * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
6706 GC_gcj_malloc_ignore_off_page): Likewise.
6707 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
6708 * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
6709 instead of GC_oom_fn (to prevent data races).
6710 * malloc.c (GC_generic_malloc): Likewise.
6711 * mallocx.c (GC_memalign): Likewise.
6712 * pthread_support.c (pthread_create): Likewise.
6713 * gcj_mlc.c (maybe_finalize): Acquire the lock before setting
6714 last_finalized_no value to prevent data races.
6715 * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
6716 GC_set_find_leak, GC_set_finalize_on_demand,
6717 GC_set_java_finalization, GC_set_finalizer_notifier,
6718 GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
6719 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
6720 GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
6721 the comment.
6722 * misc.c (GC_set_oom_fn): Likewise.
6723 * include/gc.h (GC_general_register_disappearing_link): Refine the
6724 comment (replace "soft" word with "weak").
6725 * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
6726 GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
6727 * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
6728 GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
6729
6730 * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
6731 "private/dbg_mlc.h" before it.
6732 * malloc.c: Likewise.
6733 * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
6734 for WinCE (since deprecated); evaluate strlen() only once; don't
6735 set errno for WinCE.
6736 * malloc.c (GC_strdup): Likewise.
6737 * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
6738 * include/gc.h (GC_unregister_my_thread): Refine the comment.
6739 * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
6740 Don't declare for WinCE.
6741 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
6742 * include/gc.h (GC_WinMain): Remove GC_API.
6743 * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
6744 lpCmdLine.
6745 * tests/test.c (GC_WinMain): Likewise.
6746 * win32_threads.c (main_thread_args, GC_WinMain): Likewise.
6747 * include/gc_config_macros.h (ptrdiff_t): Guard with
6748 ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
6749 * include/private/gc_locks.h: Guard include "atomic_ops.h" with
6750 ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
6751 * mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
6752 * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
6753 * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
6754 * include/private/gc_locks.h: Use include "atomic_ops.h" instead
6755 of include <atomic_ops.h>.
6756 * include/private/gc_priv.h: Likewise.
6757 * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
6758 Don't export (replace GC_API to "extern").
6759 * win32_threads.c (GC_allocate_ml): Don't export.
6760 * include/private/gc_priv.h (DebugBreak): Define as macro for
6761 WinCE (if not UNDER_CE and DebugBreak is not defined yet).
6762 * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
6763 (since "UNALIGNED" is defined in winnt.h of WinCE).
6764 * mark.c (UNALIGNED): Likewise.
6765 * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
6766 * include/private/gcconfig.h (ALIGNMENT): Check always defined.
6767 * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
6768 * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
6769 for WinCE (since __declspec(thread) is unsupported).
6770 * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
6771 Define for WinCE (if undefined).
6772 * malloc.c (GC_malloc): Remove outdated comment about disabling
6773 signals.
6774 * misc.c: Don't include <tchar.h> (since not used anymore and may
6775 break TEXT() macro defined in winnt.h).
6776 * misc.c (GC_init_inner): Don't use GetModuleHandle() and
6777 InitializeCriticalSectionAndSpinCount() for WinCE.
6778 * misc.c (GC_init_inner): Replace GetModuleHandleA() with
6779 GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
6780 * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
6781 * misc.c (GC_CreateLogFile): New static function (Win32/WinCE
6782 only); move the code from GC_write(); replace GETENV() with
6783 GetEnvironmentVariable(); replace CreateFileA() with
6784 CreateFile(); use TEXT() macro (for Unicode support); replace
6785 strcat() with memcpy() (since deprecated in WinCE).
6786 * misc.c (GC_write): Define as STATIC.
6787 * win32_threads.c (GC_attached_thread): Likewise.
6788 * misc.c (GC_write): Use GC_CreateLogFile().
6789 * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
6790 * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
6791 (Win32 only) if DONT_USE_USER32_DLL is defined.
6792 * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
6793 WinCE).
6794 * misc.c (GC_abort): Use a more user-friendly abort if
6795 NO_DEBUGGING (Win32 only).
6796 * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
6797 THREADS).
6798 * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
6799 (for Unicode support); check GetModuleHandle() result.
6800 * tests/test.c: Don't define assert for WinCE (since may be
6801 redefined by "assert.h" included from libatomic_ops).
6802 * tests/test.c (FAIL): Define as ABORT for all targets (except
6803 for PCR).
6804 * tests/test.c (n_tests): Don't use AO_t.
6805 * tests/test.c (check_heap_stats): Don't cast n_tests.
6806 * tests/test.c (inc_int_counter): New function (for n_tests atomic
6807 incrementation).
6808 * tests/test.c (run_one_test): Test GC_memalign() for all targets.
6809 * tests/test.c (run_one_test): Avoid unbalanced brackets in
6810 #if-#else-#endif blocks.
6811 * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
6812 private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
6813 * tests/test.c (check_heap_stats): Replace
6814 "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
6815 "unreachable code" compiler warning.
6816 * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
6817 "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
6818 * tests/test.c (thr_window): Replace "L" string prefix with
6819 TEXT().
6820 * thread_local_alloc.c: Check THREADS is defined (to prevent other
6821 compiler errors and warnings otherwise).
6822 * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
6823 GC_use_DllMain()).
6824 * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
6825 the comments for.
6826 * win32_threads.c (GC_register_my_thread_inner): Recognize
6827 DONT_IMPORT_GETCURTHREAD macro.
6828 * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
6829 DllMain support if needed).
6830 * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
6831 thread registration is unsupported for a given configuration.
6832 * win32_threads.c (GC_use_DllMain): Update the comment; refine
6833 ABORT message.
6834 * win32_threads.c (GC_use_DllMain,
6835 GC_started_thread_while_stopped, GC_register_my_thread_inner,
6836 GC_lookup_thread_inner, GC_delete_gc_thread,
6837 GC_allow_register_threads, GC_lookup_pthread,
6838 GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
6839 Check for GC_NO_DLLMAIN.
6840 * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
6841 DllMain): Don't define if GC_NO_DLLMAIN.
6842 * win32_threads.c (GC_stop_world): Declare "i" and "max" local
6843 variables only if not GC_NO_DLLMAIN (to suppress compiler
6844 warning).
6845 * win32_threads.c (GC_mark_thread, start_mark_threads): Use
6846 CreateThread() instead of _beginthreadex() for WinCE.
6847 * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
6848 New macros defined (used by start_mark_threads(), WinMain()).
6849 * win32_threads.c (GC_thr_init): Exclude parallel-specific code on
6850 WinCE for now (since getenv(), GetProcessAffinityMask() and
6851 SignalObjectAndWait() are missing on WinCE).
6852 * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
6853 GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
6854 TEXT() macro (for Unicode support).
6855
6856 * include/gc.h (GC_has_static_roots_func): New typedef (user filter
6857 callback).
6858 * include/gc.h (GC_register_has_static_roots_callback): Use
6859 GC_has_static_roots_func type.
6860 * dyn_load.c (GC_has_static_roots,
6861 GC_register_has_static_roots_callback): Likewise.
6862 * dyn_load.c (GC_has_static_roots,
6863 GC_register_has_static_roots_callback): Define on all platforms.
6864 * dyn_load.c (GC_register_dynlib_callback,
6865 GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
6866 functions definition with the ANSI C one.
6867 * dyn_load.c (GC_register_dynlib_callback): Use new local variable
6868 "callback" (initialized from GC_has_static_roots) to minimize data
6869 races.
6870 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
6871 GC_cond_add_roots): Define as STATIC.
6872 * mark_rts.c (GC_remove_roots_inner): Likewise.
6873 * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
6874 sections smaller than pointer size (just to avoid acquiring the
6875 lock unnecessarily).
6876 * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
6877 only for DARWIN_DEBUG).
6878 * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
6879 LOCK + GC_add_roots_inner() + UNLOCK.
6880 * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
6881 callback (if set) holding the lock; if it returns 0 then don't call
6882 GC_add_roots_inner() for that region.
6883 * dyn_load.c (GC_register_has_static_roots_callback): Put
6884 "callback" value to GC_has_static_roots on all platforms.
6885 * dyn_load.c (GC_has_static_roots): Update the comments.
6886 * include/gc.h (GC_exclude_static_roots, GC_add_roots,
6887 GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
6888 * include/private/gc_priv.h (struct roots): Likewise.
6889 * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
6890 to mark_rts.c and declare it as STATIC.
6891 * include/private/gc_priv.h (GC_exclude_static_roots_inner): New
6892 prototype.
6893 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
6894 GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
6895 * misc.c (GC_init_inner): Likewise.
6896 * mark_rts.c (GC_exclude_static_roots_inner): New function (move
6897 all the code from GC_exclude_static_roots(); add the comment.
6898 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
6899 add alignment assertion for the lower bound; add assertion for the
6900 lower bound to be less than the upper one.
6901 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
6902 the upper bound (round down to be of a pointer-aligned value);
6903 return in case of an empty range.
6904 * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
6905 GC_exclude_static_roots_inner().
6906 * mark_rts.c (GC_remove_roots): Quickly check the bounds and return
6907 in case of a do-nothing case (before acquiring the lock).
6908
6909 * finalize.c (GC_fail_count): New external variable declaration.
6910 * finalize.c (GC_reset_finalizer_nested,
6911 GC_check_finalizer_nested): New function declarations (if THREADS
6912 only).
6913 * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
6914 static global variables (used internally by GC_finalize() and
6915 GC_check_finalizer_nested()).
6916 * finalize.c (GC_check_finalizer_nested): New static function
6917 definition (only if not THREADS, used internally by
6918 GC_notify_or_invoke_finalizers() to minimize the probability of
6919 a deep recursion when a client finalizer tries to allocate GC
6920 memory).
6921 * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
6922 call GC_reset_finalizer_nested()) if last heap expansion failed.
6923 * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
6924 GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
6925 last_finalizer_notification variables holding the lock (to avoid
6926 data races).
6927 * finalize.c (GC_finalizer_notifier): Add comment.
6928 * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
6929 for an empty finalization queue (only if THREADS and not
6930 KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
6931 * finalize.c (GC_notify_or_invoke_finalizers): Call
6932 GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
6933 if appropriate.
6934 * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
6935 finalizer_nested and finalizer_skipped fields (for internal use
6936 by the multi-threaded GC_check_finalizer_nested()).
6937 * win32_threads.c (GC_Thread_Rep): Likewise.
6938 * pthread_support.c (GC_reset_finalizer_nested,
6939 GC_check_finalizer_nested): New function definitions (the
6940 multi-threaded variants of that in finalize.c).
6941 * win32_threads.c (GC_reset_finalizer_nested,
6942 GC_check_finalizer_nested): Likewise.
6943
6944 * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
6945 anymore and GCC produces a warning for it).
6946 * alloc.c (GC_stopped_mark): Adjust printf argument type
6947 specifier.
6948 * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
6949 the case when the configuration information comes from a config.h
6950 file).
6951 * checksums.c: Likewise.
6952 * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
6953 keyword instead of "unused".
6954 * include/gc_allocator.h: Fix typos in comments.
6955 * thread_local_alloc.c: Likewise.
6956 * include/javaxfc.h (GC_finalize_all): Update comment.
6957 * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
6958 GC_API and serves only as a marker for the private but exported
6959 symbols used by test.c only).
6960 * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
6961 GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
6962 GC_API_PRIV one.
6963 * include/private/gc_priv.h (GC_fo_entries): Don't export it
6964 outside a DLL.
6965 * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
6966 designated to check the arguments correctness of printf-like
6967 functions (currently works only for GCC v3+).
6968 * include/private/gc_priv.h (GC_printf, GC_err_printf,
6969 GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
6970
6971 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
6972 Define for FreeBSD 7.0+.
6973
6974 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
6975
6976 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
6977 comment.
6978
6979 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent
6980 free blocks have different mapping status. Correctly handle gap
6981 between blocks.
6982 (GC_split_block): Remove dead code setting hb_flags. Add comment.
6983 (GC_allochblk): Split blocks also in generational-only mode.
6984 * os_dep.c (GC_unmap_gap): Don't really use munmap.
6985
6986 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
6987 not USE_MUNMAP case.
6988
6989 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
6990 USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
6991 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
6992 PARALLEL_MARK, STATIC): Update the comments.
6993 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
6994 recognized (only if MPROTECT_VDB).
6995 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
6996 Add the comments for.
6997 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
6998 environment variable (only if MPROTECT_VDB, if the variable is
6999 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
7000 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
7001 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
7002 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
7003 the future).
7004 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
7005 space returned to OS (GC_unmapped_bytes).
7006 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
7007 comments.
7008 * misc.c (GC_get_unmapped_bytes): New API function.
7009 * include/gc.h (GC_get_unmapped_bytes): New API prototype.
7010 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
7011 "ifdef MSWIN32" one (for Cygwin).
7012
7013 * pthread_support.c (GC_allow_register_threads): New API function.
7014 * win32_threads.c (GC_allow_register_threads): Likewise.
7015 * include/gc.h (GC_allow_register_threads): New API prototype.
7016 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
7017 Update the comments.
7018 * pthread_support.c (GC_register_my_thread): Check the collector
7019 is in the multi-threaded mode.
7020 * win32_threads.c (GC_register_my_thread): Likewise.
7021
7022 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
7023 instead, following Ivan's original patch.
7024
7025 * allchblk.c (GC_allochblk_nth): Add assertion.
7026 * checksums.c: Add GC_record_fault, GC_was_faulted,
7027 CC_n_faulted_dirty_errors.
7028 (GC_check_dirty): Remove register declarations, print
7029 dirty bit errors on faulted pages.
7030 * os_dep.c (GC_write_fault_handler): Call GC_record_fault().
7031 * os_dep.c (GC_remove_protection): Compute index correctly.
7032
7033
7034 == [7.2alpha2] 2009-06-12 ==
7035
7036 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
7037 calls into a single one (for output atomicity).
7038 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
7039 GC_finalization_failures variable; check the result of
7040 GC_general_register_disappearing_link() (for lack of memory)
7041 instead.
7042 * finalize.c (GC_finalization_failures): Remove unused global
7043 variable.
7044 * finalize.c (GC_general_register_disappearing_link,
7045 GC_general_register_disappearing_link): Don't update the value of
7046 GC_finalization_failures (since unused).
7047 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
7048 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
7049 word type now (as FIXUP_POINTER requires numeric argument).
7050 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
7051 requires the first parameter of word type.
7052 * mark.c (PUSH_GRANULE): Likewise.
7053 * mark.c (GC_push_one, GC_push_all_eager): Likewise.
7054 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
7055 GC_finalizer_notifier directly, instead
7056 of GC_INVOKE_FINALIZERS() to prevent infinite looping.
7057 * include/javaxfc.h: Clarify GC_finalize_all comment.
7058 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
7059 after) for configuration information.
7060 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
7061 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
7062 variable for NULL before dereferencing it, return GC_oom_fn() in
7063 this case.
7064 * typd_mlc.c (GC_malloc_explicitly_typed,
7065 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
7066 suppress compiler warning (for uninitialized "lg" variable).
7067
7068 * win32_threads.c (GC_unregister_my_thread): add false assertion
7069 in unreachable code.
7070
7071 * pthread_support.c (GC_inner_start_routine): Don't release the
7072 GC lock between GC_register_my_thread_inner() and
7073 GC_init_thread_local() calls (post the "registered" even after
7074 calling GC_init_thread_local()).
7075 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
7076 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
7077 acquire the GC lock only once.
7078 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
7079 directly instead of GC_register_my_thread() since I_HOLD_LOCK
7080 and our (main) thread is not registered yet (add assertion for it).
7081 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
7082 directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
7083 * win32_threads.c (GC_lookup_thread): Remove unused function.
7084 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
7085 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
7086 also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
7087 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
7088 (for Cygwin).
7089 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
7090 (inside GC_ASSERT) to prevent compiler warning.
7091 * win32_threads.c (GC_push_all_stacks): Remove FIXME for
7092 PARALLEL_MARK.
7093 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
7094 to a place before GC_get_next_stack().
7095 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
7096 as in pthread_support.c).
7097 * win32_threads.c (marker_last_stack_min): New static arrays (the
7098 same semantics as for last_stack_min of GC_Thread_Rep).
7099 * win32_threads.c (GC_get_next_stack): Handle marker threads.
7100 * win32_threads.c (GC_mark_thread): Save the current stack pointer
7101 to marker_[b]sp.
7102 * win32_threads.c (start_mark_threads): Initialize
7103 marker_last_stack_min elements (to "unset" value).
7104
7105 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
7106 GC_set_finalize_on_demand, GC_set_java_finalization,
7107 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
7108 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
7109 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
7110 Change return type to void (these API functions no longer return
7111 the old value).
7112 * include/gc.h: Likewise.
7113 * tests/test.c (main, WinMain, test): Remove explicit cast to void
7114 for GC_set_warn_proc().
7115 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
7116 GC_get_finalize_on_demand, GC_get_java_finalization,
7117 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
7118 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
7119 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
7120 API functions (to get the current value of the corresponding R/W
7121 public variables).
7122 * include/gc.h: Likewise.
7123 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
7124 Update the comment.
7125 * misc.c (GC_ignore_warn_proc): New API call-back function.
7126 * include/gc.h (GC_ignore_warn_proc): Likewise.
7127 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
7128 GC_get_non_gc_bytes): New API setter and getter functions (for the
7129 public GC_find_leak and GC_non_gc_bytes variables, respectively).
7130 * include/gc.h: Likewise.
7131 * include/gc.h (GC_memalign): Add proto to GC API.
7132 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
7133 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
7134 remove GC_memalign() proto.
7135 * misc.c (GC_write): Use multi-byte (A) variants of Win32
7136 GetModuleFileName() and CreateFile().
7137 * tests/test.c (main): Replace K&R-style function definition with the
7138 ANSI C one.
7139
7140 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
7141 recognized (for Linux on ARM32 without glibc).
7142 * include/private/gcconfig.h (STRTOULL): Define for all targets
7143 (define as "strtoul" for most targets except for LLP64/Win64).
7144 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
7145 (cast the result to word type) to decode values of "GC_TRACE",
7146 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
7147 variables.
7148
7149 * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
7150 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
7151
7152 * win32_threads.c (GC_release_mark_lock): Correct misspelling of
7153 AO_load in assertion.
7154
7155 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
7156 is defined as FALSE (otherwise the size of dll_thread_table is near
7157 200 KiB for 32-bit).
7158 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
7159 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
7160 backing_store_ptr fields for IA64 support.
7161 * win32_threads.c (GC_register_my_thread_inner): Set
7162 backing_store_end field to reg_base value for IA64 (same as in
7163 pthread_support.c).
7164 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
7165 "right" places, remove ';'.
7166 * win32_threads.c (GC_fault_handler_lock): Declare only
7167 if MPROTECT_VDB (and not WinCE).
7168 * win32_threads.c (GC_suspend): Acquire and release
7169 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
7170 * win32_threads.c (GC_suspend): Define as STATIC.
7171 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
7172 (should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
7173 * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
7174 calls into a single one (for output atomicity).
7175 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
7176 before altering its last_stack_min ("thread" variable is added).
7177 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
7178 "s" is non-NULL.
7179 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
7180 if WinCE.
7181 * win32_threads.c (GC_get_next_stack): Pass current_min value to
7182 GC_get_stack_min as-is (without -1).
7183 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
7184 version of AO_fetch_and_sub1().
7185 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
7186 to pointer (and vice versa) thru word type to suppress warnings.
7187 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
7188 access atomically.
7189 * misc.c: Change GC_THREADS tests back to THREADS.
7190
7191 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
7192 a group of printf() calls into a single one (for output atomicity).
7193 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
7194 GC_set_time_limit): New prototypes.
7195 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
7196 GC_set_time_limit): New public setter/getter functions.
7197 * include/gc.h: Fix (and remove outdated) comments for thread-local
7198 allocation.
7199 * include/gc.h: Fix typos in comments.
7200 * misc.c (GC_init_inner, GC_printf): Likewise.
7201 * include/gc.h (GC_unregister_disappearing_link): Refine comment.
7202 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
7203 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
7204 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
7205 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
7206 GC_bytes_allocd_at_reset): Define as STATIC.
7207 * misc.c (GC_get_heap_size, GC_get_free_bytes,
7208 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
7209 avoid data races.
7210 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
7211 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
7212 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
7213 set the default initial value of initial_heap_sz.
7214 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
7215 * misc.c (GC_init_inner): Fix WARN() format specifier (should be
7216 word-compliant, "%p" is used w/o "0x").
7217 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
7218 environment variable if SMALL_CONFIG.
7219 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
7220 variable to set initial GC_full_freq value (if not SMALL_CONFIG).
7221 * doc/README.environment (GC_FULL_FREQUENCY): Add information.
7222 * doc/README.environment (GC_MARKERS): Refine information.
7223 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
7224 possible.
7225 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
7226 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
7227 * misc.c (GC_abort): Don't define if SMALL_CONFIG.
7228 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
7229 (to prevent possible infinite recursion).
7230
7231 * finalize.c (finalization_mark_proc): Replace K&R-style declaration
7232 with ANSI C one.
7233 * finalize.c (GC_grow_table, GC_register_finalizer_inner,
7234 GC_enqueue_all_finalizers): Remove outdated comments about disabling
7235 signals.
7236 * finalize.c (GC_general_register_disappearing_link): Fix assertion
7237 to catch NULL "obj" value.
7238 * finalize.c (GC_unregister_disappearing_link): Check "link"
7239 alignment before gaining the lock.
7240 * finalize.c (GC_finalize): Refine comment.
7241 * finalize.c (GC_finalize): Fix WARN() format specifier (should be
7242 word-compliant, "%p" is used w/o "0x").
7243 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
7244 variable (to 0) to suppress compiler warning.
7245 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
7246 * include/gc_gcj.h: add "extern C" header and tail.
7247 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
7248 GC_help_wanted, GC_helper_count, GC_active_count declarations (move
7249 the comments to the place where these symbols are defined in mark.c).
7250 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
7251 GC_mark_some_inner, if PARALLEL_MARK only).
7252 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
7253 GC_active_count, GC_do_parallel_mark): Define as STATIC.
7254 * pthread_support.c (GC_mark_thread): Likewise.
7255 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
7256 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
7257 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
7258 GC_arobjfreelist): Likewise.
7259 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
7260 for HBLKSIZE to GC_STATIC_ASSERT.
7261 * mark.c (GC_noop): Define for Borland C the same as for Watcom.
7262 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
7263 * pthread_support.c (GC_do_blocking_inner): Likewise.
7264 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
7265 switch branch to suppress compiler warning.
7266 * mark.c (GC_return_mark_stack): Append new-line to printf message.
7267 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
7268 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
7269 suppress compiler warning.
7270 * pthread_support.c (start_mark_threads): Move the code limiting
7271 "GC_markers" value (and printing a warning) to GC_thr_init().
7272 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
7273 if based on the number of CPUs.
7274 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
7275 values as one.
7276 * pthread_support.c (GC_register_my_thread_inner): Add a check for
7277 "stack_end" is non-NULL (the same as in win32_threads.c).
7278 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
7279 with ENOMEM.
7280 * thread_local_alloc.c (return_single_freelist): Convert "for" loop
7281 to "while" one to suppress "possible extraneous ';'" warning.
7282
7283 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
7284 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
7285 (Darwin only).
7286 * include/private/gcconfig.h: Add machine-specific part for DARWIN.
7287 * include/private/gcconfig.h (ARM32): Define config parameters for
7288 DARWIN (iPhone).
7289
7290 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
7291 GC_TIME_LIMIT): New macros (used to control the default initial
7292 values of GC_full_freq variable, GC_dont_expand,
7293 GC_free_space_divisor, GC_time_limit respectively).
7294 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
7295 with GC_TIME_LIMIT in alloc.c).
7296 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
7297 Define as STATIC.
7298 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
7299 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
7300 Move the prototypes to alloc.c, make STATIC.
7301 * include/private/gc_priv.h (GC_push_current_stack,
7302 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
7303 (move the comments to the places where these functions are defined).
7304 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
7305 as STATIC.
7306 * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
7307 GC_print_heap_sects): Convert a group of printf() calls into
7308 a single one (for output atomicity).
7309 * mark_rts.c (GC_print_static_roots): Likewise.
7310 * alloc.c (GC_stopped_mark): Output blank line (when logging) for
7311 convenience to delimit collections.
7312 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
7313 make "frames" local variable volatile (to prevent optimization).
7314 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
7315 GC_finish_collection, GC_allocobj): Remove outdated comments about
7316 disabling signals.
7317 * include/private/gc_priv.h (GC_register_displacement_inner,
7318 GC_gcollect_inner): Likewise.
7319 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
7320 GC_finish_collection): Initialize "start_time" local variable (to 0)
7321 to suppress compiler warning.
7322 * mark_rts.c (GC_add_roots_inner): Likewise.
7323 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
7324 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
7325 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
7326 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
7327 K&R-style function prototypes with ANSI C one.
7328 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
7329 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
7330 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
7331 macros.
7332 * include/private/gc_priv.h (GC_noop): Declare for Borland C the
7333 same as for Watcom.
7334 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
7335
7336 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
7337 outdated comment about disabling signals.
7338 * mallocx.c (GC_malloc_uncollectable,
7339 GC_malloc_atomic_uncollectable): Likewise.
7340 * os_dep.c: Likewise.
7341 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
7342 Add ARGSUSED tag.
7343 * pthread_stop_world.c (GC_suspend_handler,
7344 GC_suspend_handler_inner): Likewise.
7345 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
7346 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
7347 switch branch to suppress compiler warning.
7348 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
7349 * include/private/darwin_semaphore.h (sem_init): Likewise.
7350 * include/javaxfc.h: Replace "GC_H" with "_GC_H".
7351 * include/private/dbg_mlc.h (GC_has_other_debug_info,
7352 GC_store_debug_info): Replace K&R-style function prototypes with ANSI
7353 C one.
7354 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
7355 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
7356 * include/private/pthread_support.h (GC_stop_init): Likewise.
7357 * include/private/gcconfig.h: Refine comment about setting
7358 GC_stackbottom.
7359 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
7360 "right" places.
7361 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
7362 for "stack_end" field.
7363 * mallocx.c (GC_malloc_uncollectable,
7364 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
7365 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
7366 GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
7367 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
7368 format specifier (should be word-compliant, "%p" is used w/o "0x").
7369 * pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
7370 * os_dep.c (GC_dirty_init): Append new-line to printf messages.
7371 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
7372 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
7373 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
7374 as STATIC.
7375 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
7376 "thread_blocked" is not set for the current thread.
7377 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
7378 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
7379 suppress compiler warning.
7380
7381 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
7382
7383 * win32_threads.c: restructure parallel marking mutex initialization.
7384 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
7385 pthread_stop_world.c, pthread_support.c: Add runtime conditions
7386 on GC_parallel were appropriate.
7387 * pthread_support.c: Condition marker_bsp on ia64.
7388 (GC_segment_is_thread_stack): Fix loop upper bound.
7389 * reclaim.c: Limit some assertions to PARALLEL_MARK.
7390 * pthread_support.c: Don't acquire mark lock for thread-local
7391 allocation.
7392 * include/private/gc_priv.h: Don't define parallel mark sync
7393 support just for THREAD_LOCAL_ALLOC.
7394
7395 * include/private/gcconfig.h: refine MINGW32 test.
7396 * mark.c: Add win64/gcc tests.
7397
7398 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
7399 typed_test, run_one_test, check_heap_stats, main, test): Replace
7400 all K&R-style function definitions with ANSI C ones.
7401 * trace_test.c (main): Likewise.
7402 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
7403 THREAD_LOCAL_ALLOC.
7404 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
7405 or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
7406 * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
7407 local variables (to suppress "assigned value is never used"
7408 compiler warning).
7409 * test.c (tree_test): Use public GC_noop1() instead of private
7410 GC_noop().
7411 * test.c (typed_test): Likewise.
7412 * test.c (check_heap_stats): Define and assign value to
7413 "late_finalize_count" local variable only if its value is used
7414 (if FINALIZE_ON_DEMAND defined).
7415 * test.c (main): Remove DJGPP-specific initialization of
7416 GC_stackbottom (not needed anymore, handled in gcconfig.h).
7417 * trace_test.c: Guard #define GC_DEBUG with #ifndef.
7418 * trace_test.c: Include "gc_backptr.h".
7419 * trace_test.c (main): Call GC_INIT().
7420 * trace_test.c (main): Add "return 0" statement.
7421
7422 * dyn_load.c (GC_register_dynlib_callback): Use new index j
7423 instead of i in the inner loop.
7424
7425 * tests/test.c: Increment n_tests with fetch_and_add when possible,
7426 avoiding need to export lock.
7427
7428 * include/gc_pthread_redirects.h:
7429 - dlfcn.h is included for dlopen() proto before undefining
7430 "dlopen" (so, it's possible now to include dlfcn.h after
7431 gc.h from user code);
7432 - GC_dlopen() proto is added (except for Darwin as
7433 it's missing there);
7434 - "dlopen" is explicitly undefined (before its redefinition).
7435 * include/gc.h:
7436 - "process.h" is included besides "windows.h"
7437 (for _beginthreadex/_endthreadex); win32 only.
7438 - GC_NO_THREAD_DECLS is moved to the right place
7439 (before closing "extern C").
7440 * pthread_support.c: Fix out of memory handling for Thread_Reps.
7441 * win32_threads.c: Don't include process.h on winCE,
7442 improve out of memory handling for thread structures, don't
7443 define GC_beginthreadex and GC_endthreadex for winCE.
7444
7445 * tests/test.c: Change gcj vtable decriptor type from size_t to
7446 GC_word.
7447
7448 * gcj_mlc.c: Add comment.
7449 * tests/test.c: Change NTEST to NTHREADS. Fork 5 threads by default.
7450 Run reverse_test a second time in each thread.Add comments.
7451 Don't rely on AO_fetch_and_add.
7452
7453 * dyn_load.c (GC_register_dynlib_callback,
7454 GC_register_dynamic_libraries_dl_iterate_phdr): Add support
7455 for GNU_PT_RELRO relocations.
7456
7457 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
7458 by GC_SOLARIS_THREADS.
7459 * include/gc.h: Improve finalizer documentation.
7460 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
7461 * pthread_stop_world.c, Makefile.dj: Fix typos.
7462
7463 * win32_threads.c (GC_new_thread): Make first_thread
7464 visible to the whole file.
7465 (UNPROTECT): New macro.
7466 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect
7467 thread structures before writing.
7468 (GC_suspend): Acquire GC_fault_handler_lock before suspending
7469 thread.
7470 * os_dep.c: export GC_fault_handler_lock.
7471 (GC_remove_protection): Check if already unprotected.
7472
7473 * doc/README.win32: Add OpenWatcom warning.
7474 * include/private/gcconfig.h: Really check it in.
7475
7476 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
7477 code from gcc version.
7478 * os_dep.c: make gc compilable (optionally) for Cygwin with
7479 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
7480 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
7481 * mark.c (GC_noop): fix declaration definition mismatch for DMC.
7482 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
7483 Watcom (Win32 only). It works.
7484
7485 * mach_dep.c: Don't use __builtin_unwind_init for register
7486 state on PowerPC/Darwin.
7487
7488 * doc/gcdescr.html: Improve description of object freelist
7489 structure.
7490 * include/private/gc_priv.h: Fix comment for _size_map.
7491
7492 * os_dep.c (GC_linux_stack_base): Relax sanity test.
7493
7494 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
7495 MARK_BIT_PER_OBJ): Add missing backslash before eoln.
7496
7497 * misc.c (GC_set_warn_proc): Implicitly initialize GC on
7498 non-Cygwin win32.
7499
7500 * configure.ac: Enable thread-local allocation for sparc-linux.
7501
7502 * alloc.c (GC_try_to_collect): Remove duplicate initialization
7503 check.
7504 * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
7505 threaded warnings.
7506 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
7507
7508 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
7509 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
7510 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
7511 thread_local_alloc.c.
7512 * misc.c: Refine comment.
7513
7514 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently. Add FIXME
7515 comment.
7516
7517 * win32_threads.c (GC_push_stack_for): Yet another attempt
7518 at the stack_min finding logic. Try to clean up the existing code
7519 while minimizing VirtualQuery calls.
7520 (GC_win32_start_inner): Register thread before GC_printf.
7521 Produce more output with DEBUG_THREADS.
7522 *include/gc.h: Update obsolete comments.
7523
7524 * tests/test.c:
7525 (gcj_class_struct2): Use cast instead of l suffix.
7526 Cast GetLastError to int in various places.
7527 Avoid unused result warning from incr/decr macros.
7528 Add cast for fake_gcj_mark_proc.
7529 Cast GC_gc_no to unsigned in printf.
7530
7531 * include/gc.h: Fix two typos in comments.
7532
7533 * finalize.c: Fix typo in comment.
7534
7535 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
7536 with lock.
7537
7538 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
7539 if we are checking for leaks.
7540
7541 * win32_threads.c: Remove mark lock spinning.
7542 * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
7543 GC_spin_count, and GC_block_count using atomic operations.
7544 * tests/test.c: Declare n_tests as AO_t only if we have threads.
7545
7546 * win32_threads.c: Support PARALLEL_MARK. Make printf arg
7547 types agree with format specifiers.
7548 Add STATIC for GC_threads.
7549 * include/private/gcconfig.h: Add FIXME comment.
7550 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
7551 AO_fetch_and_add1_full. Declare n_tests as AO_t.
7552 (WinMain): Don't call GC_use_DllMain.
7553 with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
7554
7555 * alloc.c (GC_try_to_collect_inner): Don't print redundant
7556 GC_bytes_allocd and GC_gc_no.
7557 (GC_stopped_mark): Print average world stop time.
7558 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
7559
7560 * misc.c, doc/README.environment: Add support for
7561 GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
7562 * include/gc.h: Make GC_set_free_space_divisor correspond to
7563 (somewhat unfortunate) reality.
7564
7565 (Mostly improves LLP64 support.)
7566 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
7567 misc.c, reclaim.c: Changed some int and long type to word or size_t
7568 (and vice versa where appropriate)
7569 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
7570 include/private/thread_local_alloc.h, mark.c,
7571 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
7572 casts to word type when casting from int to pointer (or pointer
7573 to int, or data pointer to code pointer) - just to remove the
7574 corresponding compiler warning.
7575 * ptr_chck.c (GC_is_visible): cast int const to word type to
7576 prevent left shift overflow.
7577 * os_dep.c: change the type of GC_mem_top_down global variable
7578 (containing a flag) to DWORD.
7579 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
7580 is defined on SunOS/x64.
7581 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
7582 for VC++ 2008 x64 (v15.00.21022.08 for x64) compiler bug
7583 (the compiler gets hung if invoked with -Ox -D
7584 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
7585 * backgraph.c: cast GC_gc_no value to unsigned short when
7586 assigned/compared to height_gc_no field of back_edges.
7587 * os_dep.c (GC_remove_protection): Add ARGSUSED.
7588 * win32_threads.c (GC_thread_exit_proc): Remove unused local
7589 variable.
7590 * mark.c (GC_check_dirty): Move declaration out of func body.
7591
7592 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
7593 * include/gc.h (GC_register_my_thread): Improve comment.
7594
7595 * Makefile.direct: Add comment for -DCHECKSUMS.
7596
7597 * thread_local_alloc.c, include/private/thread_local_alloc.h:
7598 Fix typos in comments.
7599 * finalize.c: Declare mark_procs and GC_register_finalizer_inner
7600 STATIC.
7601 * malloc.c (GC_free): Move size calculation below assertion.
7602
7603 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
7604 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
7605 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
7606
7607 * finalize.c (GC_general_register_disappearing_link): Add
7608 assertion.
7609 * malloc.c (GC_generic_malloc): Round lb to granules, not words.
7610 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
7611 granules, not words.
7612
7613 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
7614 * configure.ac: Define mach_dep for sparc-linux.
7615
7616 * mark_rts.c (GC_approx_sp): Use volatile to avoid common
7617 warning.
7618
7619 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
7620 order.
7621
7622 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
7623 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
7624 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
7625 include/javaxfc.h, include/private/gc_locks.h,
7626 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
7627 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
7628 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
7629 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
7630 * test.c: Remove some old K&R code.
7631
7632 * win32_threads.c (GC_may_be_in_stack): New. (GC_Thread_Rep):
7633 Add last_stack_min. (GC_push_stack_for): Use last_stack_min.
7634 (GC_get_next_stack): Add limit argument, use_last_stack_min.
7635 (GC_suspend): make stack_base assignment conditional.
7636 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to
7637 GC_get_next_stack.
7638 * configure_atomic_ops.sh: Remove.
7639 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
7640 Makefile.direct: Partially support build directories whose path
7641 name contains blanks.
7642 * Makefile.am: Support new files (build_atomic_ops.sh,
7643 build_atomic_ops.sh.cygwin)
7644
7645 * include/private/gc_locks.h, include/private/gc_pmark.h,
7646 include/private/gc_priv.h, include/private/gcconfig.h,
7647 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
7648 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
7649 Fix comments.
7650
7651 * pthread_support.c: Comment out LOCK_STATS.
7652 * include/gc.h: Fix comments.
7653
7654 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
7655 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
7656 * os_dep.c (GC_get_main_stack_base): Use alternate definition
7657 with USE_MMAP.
7658 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
7659
7660 * doc/README: Make it clearer when Makefile.direct is assumed.
7661 * cord/cord.am: install include/cord.h.
7662
7663 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
7664 Remove unused variables.
7665 * darwin_stop_world.c: Always declare GC_thr_init().
7666 * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
7667 SHORT_DBG_HDRS is defined.
7668 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
7669 mark, USE_MARK_BITS version): Refer to correct parameter name.
7670
7671 * finalize.c (GC_general_register_disappearing_link): Remove
7672 redundant code.
7673 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
7674 * os_dep.c: (GC_write_fault_handler): Remove remaining
7675 references to deleted variable "code". Remove redundant
7676 FREEBSD definitions.
7677 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
7678 defined for x86. (STATIC): Define as "static" with NO_DEBUGGING.
7679
7680 * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
7681
7682 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
7683 smashed string, (GC_debug_free_inner): Mark as free.
7684 * mallocx.c (GC_malloc_many): Always clear new block if
7685 GC_debugging_started.
7686 * reclaim.c: Move GC_debugging_started from
7687 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
7688 which is also called directly.
7689 * doc/README: Fix spelling error. Update license summary.
7690 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
7691 * tests/test.c: Don't define GC_DEBUG if already defined.
7692
7693 * doc/simple_example.html: update --enable-full-debug reference,
7694 Make HTML formatting standards compliant.
7695 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
7696 * doc/gcinterface.html: specify encoding.
7697
7698 * doc/simple_example.html: Update thread-local allocation
7699 description.
7700
7701 * configure.ac: Check for gc-debug earlier; replace remaining
7702 full-debug tests.
7703 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
7704 Use signed offset type. Use ptr_t internally.
7705 * doc/gcinterface.html: Update LOCAL_MALLOC description.
7706 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
7707 Fix full-debug reference.
7708 * include/gc.h: Rewrite GC_..._INCR and friends.
7709 * tests/test.c: Minimally test GC_..._INCR and friends.
7710
7711 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
7712 GC_push_next_marked_uncollectable): Never invoke GC_push_marked
7713 on free hblk.
7714 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
7715 (GC_header_cache_miss): Always blacklist pointers for free
7716 hblks. Add assertion and comment.
7717 * pthread_support.c (GC_register_my_thread): Fix #if indentation.
7718 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
7719 Delete it.
7720 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
7721
7722 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
7723
7724 * configure.ac: Set win32_threads on MinGW.
7725
7726 Ivan's description of the patch follows. Note that a few pieces like
7727 the GC_malloc(0) patch, were not applied since an alternate had been
7728 previously applied. A few differed stylistically from the rest of
7729 the code (mostly casts to void * instead of target type),
7730 or were classified as too minor to bother. Note that
7731 all of Ivan's static declarations which did not correct outright
7732 naming bugs (as a few did), where replaced by STATIC, which is
7733 ignored by default.
7734
7735 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
7736 GC_malloc(0));
7737 - addition of missing getter/setter functions for public variables
7738 (may be useful if compiled as Win32 DLL);
7739 - addition of missing GC_API for some exported functions;
7740 - addition of missing "static" declarator for internal functions
7741 and variables (where possible);
7742 - replacement of all remaining K&R-style definitions with ANSI
7743 C ones (__STDC__ macro is not used anymore);
7744 - addition of some Win32 macro definitions (that may be missing in
7745 the standard headers supplied with a compiler) for GWW_VDB mode;
7746 - elimination of most compiler warnings (except for
7747 "uninitialized data" warning);
7748 - several typos correction;
7749 - missing parenthesis addition in macros in some header files of
7750 "libatomic_ops" module.
7751
7752 My highlights based on reading the patch:
7753
7754 * allchblk.c: Remove GC_freehblk_ptr decl.
7755 Make free_list_index_of() static.
7756 * include/gc.h: Use __int64 on Win64, define GC_oom_func,
7757 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
7758 add getter and setters: GC_get_gc_no, GC_get_parallel,
7759 GC_set_oom_fn, GC_set_finalize_on_demand,
7760 GC_set_java_finalization, GC_set_dont_expand,
7761 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
7762 GC_set_finalizer_notifier. Always define GC_win32_free_heap.
7763 gc_config_macros.h: Define _REENTRANT after processing
7764 GC_THREADS.
7765 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
7766 handling of operator new[] for old Windows compilers.
7767 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
7768 around arguments.
7769 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
7770 * mark.c (GC_mark_and_push_stack): Fix source argument for
7771 blacklist printing.
7772 * misc.c: Fix log file naming based on environment variable
7773 for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor
7774 just return current value with 0 argument. Add DONT_USE_USER32_DLL.
7775 Add various getters and setters as in gc.h.
7776 * os_dep.c: Remove no longer used GC_disable/enable_signals
7777 implementations. (GC_get_stack_base): Add pthread_attr_destroy
7778 call. No longer set GC_old_bus_handler in DARWIN workaround.
7779 * pthread_support.c: GC_register_my_thread must also
7780 call GC_init_thread_local.
7781
7782 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
7783 * mach_dep.c: Include signal.h.
7784 * gc_priv.h: Factor out INLINE declaration.
7785
7786 * include/private/gcconfig.h: Update MIPS/LINUX config.
7787 * doc/gcdescr.html: Fix typo.
7788 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
7789 for MIPS/LINUX.
7790
7791 * configure.ac: SPARC fixes.
7792 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
7793 size 0, except for gcj.
7794 * doc/gc.man: Expand C++ cautions.
7795 * include/gc_inline.h: Fix comments.
7796
7797
7798 == [7.1] 2008-05-03 ==
7799
7800 * doc/gcinterface.html: Improve C++ interface documentation.
7801
7802 * allchblk.c (GC_allochblk): Check for overflow during size
7803 rounding.
7804 * tests/huge_test.c: New.
7805 * Makefile.direct, tests/tests.am: Add huge_test.c
7806
7807 * pthread_support.c: Fix typo in comment.
7808 * os_dep.c (GC_win32_get_mem): Add heap section only if
7809 allocation succeeded.
7810
7811 * malloc.c: (free replacement) Fix caller address space check.
7812
7813 * finalize.c (GC_grow_table): Dereference table in null-check.
7814
7815 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
7816 Consistently call CloseHandle. (GC_suspend): Call
7817 GC_delete_gc_thread.
7818 * tests/test.c: Don't reference GC_print_stats if not exported.
7819
7820 * tests/test.c (run_one_test): Don't mention pthread_self().
7821 * misc.c: Declare GC_thr_init().
7822
7823 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
7824 and refine assertions to handle huge unmergeable blocks.
7825 (GC_allochblk_nth): Add comment.
7826
7827 * include/private/gcconfig.h: Add missing FREEBSD macro
7828 consistency test.
7829
7830 * allchblk.c (GC_enough_large_bytes_left): No longer take
7831 parameters; return free list index bound.
7832 (GC_merge_unmapped): Don't access nexthdr until after null test.
7833 (Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate
7834 when splitting is allowable only once here, not when considering each
7835 block. (GC_allochblk_nth): Accept new may_split parameter.
7836 Avoid some redundant tests for exact size matches.
7837 * alloc.c (GC_should_collect): Cache min_bytes_allocd.
7838 (GC_maybe_gc): Make locking assertion testable.
7839 * mark_rts.c: Fix indentation.
7840 * pthread_stop_world.c: Replace old GC_err_printf1 reference.
7841 * tests/test.c: Remove (void) casts. Optionally print some
7842 timing information.
7843
7844 * windows-untested/gc.def: Remove CreateThread line.
7845 * windows-untested/README: New file.
7846 * win32_threads.c (GC_use_DllMain): Force collector initialization.
7847 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
7848 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
7849 * include/gc_cpp.h: Add matching placement delete overloads
7850 everywhere.
7851 * include/private/gc_locks.h (NO_THREAD): Add cast.
7852 * include/private/gcconfig.h: Add test for __HP_aCC.
7853 * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX.
7854
7855 * doc/README.win32: Fix typo.
7856 * configure.ac: Fix printing of enable-shared result.
7857
7858 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when
7859 defined. (GC_call_with_stack_base): Add GC_API.
7860 * os_dep.c (GC_get_stack_base): Add GC_API.
7861 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
7862 Add GC_API.
7863 * include/gc.h: Add GC_API annotations.
7864 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
7865 PCR.
7866 * include/private/gc_pmark.h: Fix comments.
7867
7868 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
7869 Add GC_push_typed_structures() to push GC_ext_descriptors.
7870
7871 * tests/test.c: Call GC_INIT for DARWIN; test system type using
7872 gcconfig.h-defined macros.
7873
7874 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
7875 blocks large enough that their size, when interpreted as a signed
7876 value, would be negative.
7877 * include/private/gc_priv.h: Comment hb_sz range limit.
7878
7879 * mark.c (GC_push_next_marked): correct comment.
7880 * Makefile.direct: document NO_PROC_STAT.
7881 * include/private/gcconfig.h: Accommodate NO_PROC_STAT.
7882
7883
7884 == [7.1alpha2] 2008-01-10 ==
7885
7886 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
7887 again. Refer to build directory as ".".
7888
7889 * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
7890 * darwin_stop_world.c: Add FIXME comment for parallel marker.
7891
7892 * include/private/gc_priv.h: Update MAX_ROOT_SETS
7893 and LOG_PHT_ENTRIES to handle larger heaps.
7894
7895 * include/gc.h (GC_INIT,GC_init): Update comments.
7896
7897 * allchblk.c, alloc.c, include/private/gc_priv.h:
7898 Track GC_bytes_dropped and use in GC triggering decisions.
7899 * alloc.c (min_bytes_allocd): Weight atomic blocks less.
7900
7901 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
7902 adjusting p.
7903
7904 * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
7905
7906 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
7907 * alloc.c: Add declaration for GC_add_current_malloc_heap.
7908 * win32_threads.c (GC_beginthreadex): Clean up error
7909 return code.
7910 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
7911 Add NT_X64_THREADS_MAKEFILE.
7912
7913 * alloc.c: Define GC_version instead of in version.h.
7914 * version.h: Remove.
7915 * include/gc_version.h: Move most of version.h here.
7916 * include/gc.h: Include gc_version.h.
7917 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
7918 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
7919 Adjust for version.h rename.
7920
7921 * configure.ac: Put libatomic_ops links in build directory.
7922 * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
7923 as nodist sources.
7924
7925 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
7926 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
7927
7928 * alloc.c: Deal correctly with address wrapping for
7929 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
7930 * finalize.c, include/gc.h (GC_register_disappearing_link,
7931 GC_register_finalizer_inner): Improve out-of-memory handling.
7932 * include/private/gc_pmark.h: Fix comment spelling.
7933
7934 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
7935 in other contexts.
7936
7937 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
7938
7939 * gc_cpp.cc: Don't include gc_cpp.h from local directory.
7940
7941 * allchblk.c, configure.ac (add --enable-munmap)
7942
7943 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
7944 GC_GETSECTBYNAME instead.
7945 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
7946 architecture (Darwin).
7947
7948 * reclaim.c (GC_bytes_found): Expand comment.
7949 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
7950 granules, not bytes, to GC_FAST_MALLOC_GRANS.
7951 * include/gc.h: Never include gc_local_alloc.h.
7952 * tests/test.c: Add size zero allocation tests.
7953
7954 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
7955 * allchblk.c: Sanity check GC_max_large_allocd_bytes.
7956
7957 * Makefile.direct: Invoke $(MAKE) instead of make.
7958
7959 * doc/scale.html: Reflect gc7 thread local allocation behavior.
7960
7961 * include/extra/gc.h, include/extra/gc_cpp.h: New.
7962 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
7963 again.
7964
7965 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
7966 for HURD.
7967
7968 * include/private/gcconfig.h: Add Linux/mips-64 support.
7969
7970 * dbg_mlc.c: Use random() on all glibc systems.
7971 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
7972 HURD. Add comment.
7973 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
7974 systems without SA_SIGINFO.
7975
7976 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
7977 * tests/test.c (run_one_test): Add GC_PTR_STORE test.
7978 No longer test for RS6000.
7979
7980 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
7981 Maintain GC_our_memory and GC_n_memory.
7982 * dbg_mlc.c (GC_print_smashed_obj): Improve message.
7983 (GC_print_all_smashed_proc): Pass client object address instead of
7984 base.
7985 * dyn_load.c (sort_heap_sects): New. (GC_register_map_entries):
7986 Register sections that are contiguous and merged with our heap.
7987 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name
7988 of libraries.
7989 * malloc.c (calloc): Check for special callers even with
7990 USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary
7991 malloc/free tracing.
7992 * misc.c: No longer call GC_init_lib_bounds explicitly.
7993 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
7994 initialize on demand.
7995 * tests/test.c: Call GC_INIT only when required.
7996
7997 * Makefile.direct: Remove comment fragment.
7998 * tests/tests.am: Add smashtest.
7999 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
8000 * pthread_support.c: Fix comment spelling.
8001 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
8002 GC_LINUX_THREADS and REDIRECT_MALLOC.
8003 * tests/smash_test.c: Initial check-in.
8004 * obj_map.c: Print log entry to correct file.
8005 * include/private/thread_local_alloc.h: Add TlsAlloc error check.
8006
8007 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
8008 while world is still running.
8009 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
8010 with world stopped.
8011 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
8012 * misc.c (GC_init/GC_init_inner): Perform all work in
8013 GC_init_inner.
8014 * Makefile.direct: Expand -DUSE_MUNMAP comment.
8015
8016 * include/gc.h: Define uintptr_t explicitly for VC++6.
8017 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
8018 exist.
8019
8020
8021 == [7.0] 2007-07-02 ==
8022
8023 * include/gc_config_macros.h: Also check for IA64 when setting
8024 GC_HPUX_THREADS.
8025 * mallocx.c: Change my_bytes_allocd to signed_word.
8026 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads
8027 (as opposed to pthreads) support.
8028
8029 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
8030 on ARM/Linux. Check getcontext() return value.
8031
8032 * backgraph.c (per_object_func): Make argument types consistent.
8033 (GC_traverse_back_graph): Mark GC_deepest_obj.
8034
8035 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
8036 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
8037
8038 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst
8039 anachronisms.
8040 * dyn_load.c: Partially support cygwin, but don't enable it yet.
8041
8042 * Makefile.am: Use -no-undefined for libgc.
8043 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
8044 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
8045 consistently.
8046 * misc.c: Fix some WARN calls. Move GC_is_initialized setting and
8047 GC_thr_init() call.
8048 * os_dep.c: Consistently use WARN where appropriate.
8049 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
8050 remove inappropriate pthread.h include.
8051 * doc/README.linux: Remove some anachronisms.
8052
8053 * alloc.c: Also use GC_check_tls on non-Linux systems.
8054 * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
8055 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
8056 with prototype.
8057
8058 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
8059 (GC_print_heap_sects): Use size_t instead of unsigned long.
8060 * thread_local_alloc.c (GC_lookup_thread): Define in the correct
8061 context.
8062 * win32_threads.c, include/gc_config_macros.h: The last of Romano
8063 Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h.
8064 * include/gc_inline.h: Avoid gc_priv.h dependencies.
8065 * tests/test.c (check_heap_stats): Replace unsigned long with size_t.
8066
8067 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
8068 * mark_rts.c (GC_push_roots): Fix kind type.
8069
8070 * doc/README.win64: New file.
8071 * doc/doc.am, Makefile.direct: Add README.win64.
8072
8073 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
8074 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
8075 * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
8076 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
8077 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
8078 win32_threads.c, cord/de_win.c, include/gc_mark.h,
8079 include/private/gc_hdrs.h, include/private/gc_pmark.h,
8080 include/private/gc_priv.h, tests/test_cpp.cc:
8081 Replace old style function declarations. Clean up integral types.
8082 Remove register declarations. The change in malloc.c and the
8083 "int descr" declaration in mark.c are the most likely to have
8084 been real bugs outside of Win64.
8085 * msvc_dbg.c: Disable on Win64.
8086 * win32_threads.c: Add x64 support.
8087 * include/gc.h: no backtrace on x64 for now.
8088
8089 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
8090
8091 * include/gc.h: (GC_word, GC_signed_word): Fix Win64 definitions.
8092 Don't include windows.h in an extern "C" context.
8093 * include/private/gcconfig.h: Fix Win64 configuration.
8094 * tests/test.c: Eliminate more old style function definitions.
8095 Cleanup pointer and integer casts for Win64.
8096 * tests/test_cpp.cc: Don't include gc_priv.h.
8097 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
8098 * NT_X64_STATIC_THREADS_MAKEFILE: New.
8099
8100 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore
8101 FINISHED threads for suspension. (GC_pthread_join): Add
8102 pthread_self() cast. (GC_pthread_start_inner): Execute cleanup
8103 handler when popping it.
8104 * include/private/gc_locks.h: Inline THREAD_EQUAL for
8105 GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have
8106 pthreads.
8107
8108 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
8109 tests/test.c: Accommodate GC_WIN32_PTHREADS.
8110 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
8111 * include/gc_config_macros.h: Define both PTHREADS and
8112 GC_WIN32_THREADS.
8113 * include/private/gc_locks.h: Nonstandard definitions of
8114 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
8115 * doc/README.win32, Makefile.direct: Include documentation
8116 for GC_WIN32_PTHREADS.
8117 * Makefile.direct: Remove some anachronisms in the documentation.
8118
8119 * Makefile.am: Move includes to bottom. Add better library
8120 dependencies. Increment library version. Remove "SUBDIRS += .".
8121 * cord/cord.am, tests/tests.am: Add better library dependencies.
8122 Remove now unnecessary dependencies.
8123 * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
8124 Move to define on all Windows platforms. (_beginthread): define
8125 to generate error if used.
8126
8127 * include/private/gc_locks.h: Format to 80 columns.
8128
8129 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
8130 * NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars
8131 rc.
8132 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
8133 case.
8134 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
8135 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
8136 * include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API.
8137 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
8138 * tests/test.c: Add GC_reachable_here() call.
8139
8140 * alloc.c (GC_try_to_collect): Call GC_init if necessary.
8141 * tests/thread_leak_test.c: Don't unconditionally define
8142 GC_LINUX_THREADS.
8143
8144 * Makefile.am: Remove extra_ldflags_libgc definition.
8145
8146 * include/private/gc_priv.h: Define AO_REQUIRE_CAS.
8147
8148 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
8149 value.
8150
8151
8152 == [7.0alpha9] 2007-05-15 ==
8153
8154 * Some gc6.9 changes.
8155 * Change FindTopOfStack decl in darwin_stop_world.c.
8156 * Move some static tests from misc.c to gcconfig.h. Use #error.
8157 * Add GC_print_free_list() function (thanks to Bruce Hoult).
8158 * Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
8159 Barry DeFreese, and possibly other Debian maintainers).
8160 * __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
8161 Peter Wang).
8162 * Integrated various MacOSX patches and tried to reconcile them (thanks to
8163 Allan Hsu, several contributors at Apple, and probably others).
8164 * Added some casts to powerpc.h in libatomic_ops to silence warnings.
8165
8166 * Makefile.am: Include NT_STATIC_THREADS_MAKEFILE in dist.
8167 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
8168 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now
8169 unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
8170 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
8171 NUMERIC_THREAD_ID, THREAD_EQUAL.
8172 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
8173 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
8174 ARM.
8175
8176 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
8177 GC_debug_register_finalizer_unreachable() patch from gcc tree.
8178 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
8179 to check GC has been initialized.
8180
8181 * include/gc_cpp.h: Documentation updates.
8182 * include/gc_config_macros.h: Don't check for __ppc__ to set
8183 DARWIN_THREADS.
8184 * Makefile.am: Include configure_atomic_ops.sh in dist.
8185
8186 * Makefile.am: Don't distribute copied atomic_ops files. Include
8187 libatomic_ops with "make dist".
8188 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
8189 * win32_threads.c: Report error for Cygwin + GC_DLL.
8190
8191 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
8192 * cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove
8193 MakeProcInstance anachronism.
8194 * doc/README.macros: Officially remove elif prohibition.
8195 Remove documentation for defunct SRC_M3 support.
8196 * include/gc.h: Remove more SRC_M3 references.
8197 * include/private/gcconfig.h: Remove still more SRC_M3 references.
8198 GC_SOLARIS_THREADS no longer needs to be checked separately.
8199
8200 * thread_local_alloc.c, include/private/thread_local_alloc.h:
8201 Spell __declspec correctly.
8202 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
8203
8204 * doc/README.win32: Adjust GC_win32_dll_threads rules again.
8205
8206 * mark.c (GC_mark_some wrapper): Restructure for readability, handle
8207 GC_started_thread_while_stopped.
8208 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
8209 * win32_threads.c: (client_has_run): remove,
8210 GC_started_thread_while_stopped, GC_attached_thread: add.
8211 (GC_push_all_stacks): Add verbose output.
8212 (DllMain): Avoid initializing collector or the like.
8213 Never update both thread tables.
8214 * doc/README.win32: Adjust GC_win32_dll_threads rules.
8215
8216 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
8217 GC_PRINT_VERBOSE_STATS.
8218
8219 * configure.ac: Comment out redundant
8220 AC_DEFINE(NO_EXECUTE_PERMISSION).
8221 * sparc_mach_dep.S: Remove single quote in comment.
8222 * include/private/gcconfig.h: Fix DATAEND for NONSTOP.
8223 * win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain.
8224 (GC_use_DllMain): Fix assertion.
8225
8226 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
8227 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
8228 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
8229 targets. Remove comments.
8230 Prepare ppc64 support for Darwin.
8231
8232 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
8233 Make i unsigned.
8234 (GC_stop_world): Likewise. Remove unused GC_thread p.
8235 (GC_start_world): Likewise.
8236
8237 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
8238 Remove double SIG_HNDLR_PTR definition.
8239 (GC_forward_exception): Fix compiler warnings, make i unsigned.
8240 Initialize thread_state to NULL.
8241 (catch_exception_raise): Fix compiler warnings, make i unsigned.
8242
8243 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
8244 also define for X86_64.
8245 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
8246 * README.changes: Point to ChangeLog.
8247
8248 * darwin_stop_world.c: Move THREAD_FLD defines to ...
8249 * include/private/gc_priv.h: ... here.
8250 Fix THREAD_STATE definitions for ppc64.
8251 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
8252 access.
8253
8254 * configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
8255 HAS_X86_THREAD_STATE32_*.
8256 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
8257 HAS_X86_THREAD_STATE64_*.
8258 Added value 1 in the above AC_DEFINE's. Important for the upcoming
8259 Leopard.
8260 * include/private/gcconfig.h: Modified X86_64 define for Darwin.
8261 Removed __x86_64__ check in POWERPC section. Added base definitions
8262 for the X86_64 Darwin port.
8263 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
8264 to distinguish between 32 and 64-bit applications. Added definitions
8265 for X86_64 Darwin.
8266 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
8267 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
8268 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
8269 !DARWIN_DONT_PARSE_STACK. Maybe obsolete.
8270 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
8271 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
8272 Distinguish between getsectbynamefromheader_64 and
8273 getsectbynamefromheader.
8274 * os_dep.c (catch_exception_raise): Introduce exception definition for
8275 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
8276 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
8277
8278
8279 == [7.0alpha7] 2006-09-19 ==
8280
8281 * More 6.7 changes.
8282 * Declare GC_dump() in gc.h.
8283 * Add --enable-large-config, which just defines the LARGE_CONFIG macro.
8284 * Make GlobalAlloc address alignment a bit more intuitive (thanks to
8285 Charles Mills).
8286 * Use #elif in the definitions of GET_MEM.
8287 * Overhaul porting.html. Remove corresponding text from README.
8288 * Fix typo in DARWIN section of gcconfig.h.
8289 * Fix Darwin thread memory leak (thanks to Bruce Mitchener).
8290 * Update x86 AO_test_and_set implementation to use "=q".
8291 * Add $(EXEEXT) to many tests in tests/tests.am. (Corresponds to a
8292 6.7 fix, which no longer applied.)
8293 * Fix Darwin/PPC port.
8294 * Fix Cygwin/threads port.
8295 * Fix gcj malloc support.
8296 * For GNU-style make, don't build libatomic_ops unless threads are requested.
8297 This should allow single-threaded builds on platforms which do not
8298 currently support libatomic_ops.
8299 * Clean up and hopefully fix the CFLAGS calculation for GNU build.
8300 (Substantially improves things on HP/UX.)
8301 * Integrated Andrei Polushin's Visual C++ patches. These provide for
8302 stack traces, better C++ debug support, and better log file handling.
8303 Note that these change the location of the log file to a the path of the
8304 executable with a .log extension. To get the old behavior back, define
8305 OLD_WIN32_LOG_FILE. For the time being, I'm checking his project
8306 files and the like into a windows-untested subdirectory. They
8307 are almost certainly already out of date, but better than what we had
8308 before.
8309 * Fixed some win32 threads bugs, and added support for _beginthreadex.
8310 * Fix zero size thread local allocation so that explicit deallocation
8311 works correctly.
8312 * Removed serious bug in GC_malloc_uncollectable(large size).
8313 * Do not try to do thread-local gcj allocation in incremental mode. There
8314 are races in setting up the descriptor.
8315 * Add GC_INIT() to middle.c, fix some more GC_printfn calls.
8316 * Some assertions erroneously used I_HOLD_LOCK() negatively, even though
8317 it can now spuriously return TRUE.
8318 * Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
8319 * On Linux and some Un*x variants, allocate memory by first trying sbrk,
8320 and then switching to mmap if that fails.
8321 * Fixed /proc/x/maps reading to deal with asynchronous deletions.
8322 * Fix REDIRECT_MALLOC with threads on Linux. It now usually seems to work
8323 with ugly hacks that include having calloc behave differently when it is
8324 called from ld.so or the pthreads library. A reasonable amount of
8325 infrastructure was added to support some of this. (Thanks to Roland McGrath
8326 for ideas and information.)
8327 * Import various updated build scripts.
8328 * Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
8329 * Fix serious bugs in GC_malloc_atomic_uncollectable().
8330 * Return GC_SUCCESS form GC_get_stack_base().
8331 * Fix several atomic_ops problems on IA64 with HP Compiler.
8332 * Update to atomic_ops-1.2.
8333 * Fix hb_n_marks description and reclaim.c assertion.
8334 * Various additional win32 threads fixes.
8335 * Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
8336
8337
8338 == [7.0alpha5] 2005-09-29 ==
8339
8340 * More 6.6, 6.7 changes.
8341 * Some Solaris fixes, including some more general changes in how
8342 the assembly pieces of mach_dep.c are handled.
8343 * Removed a lot of SOLARIS_THREADS-specific code that was only
8344 needed with the old implementation. This included many (mostly no-op)
8345 versions of GC_is_fresh.
8346 * Don't use atomic_ops in gc_locks.h unless we need threads.
8347 * Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
8348 * Removed Solaris GC_INIT hack. It's a workaround for a long dead bug,
8349 and it seemed to be wrong anyway.
8350 * Changed win32_threads.c to require preprocessor-based interception
8351 of thread routines by default. A client call to GC_use_DllMain is
8352 now required to get the old behavior in which DllMain is used to implicitly
8353 register threads. This was done for uniformity with other platforms, and
8354 because the DllMain solution seemed to require very tricky code which,
8355 at least in the past, imposed hard bounds on the number of threads.
8356 * Many small changes to make thread support work again on Cygwin.
8357 * Moved definition of allocator lock etc. to pthread_support.c and
8358 win32_threads.c for those two cases.
8359 * Got rid of the FASTLOCK() machinery. It doesn't seem useful on modern
8360 platforms.
8361 * Cleaned up the uncollectible allocation routines, speeding up the
8362 slower paths. The code did enough unnecessary work off the critical path
8363 that the underlying logic was getting hard to extract.
8364 * No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL. Indications
8365 are it just works, and I think the reasons for it not working disappeared
8366 a while ago.
8367 * Fixed bugs in hb_n_marks calculation and assertion.
8368 * Don't use __builtin_expect for pre-3.0 gcc.
8369 * Define GWW_VDB only for recent Microsoft tool chains.
8370 * Add overview.html to doc directory.
8371 * Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
8372 * Made thread local allocation sort of work with Cygwin. The code should
8373 be there to deal with other Windows variants, But non-Cygwin Windows
8374 threads need more bug fixes.
8375
8376
8377 == [7.0alpha4] 2005-08-02 ==
8378
8379 * Various 6.5, 6.6 changes.
8380 * Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
8381 (thanks to Ben Maurer).
8382 * Integrated build patches from Davide Angelocola and Petter Urkedal.
8383 * Fix dynamic-linker-based pthread call redirection.
8384 * Renamed RS6000 to POWERPC/AIX.
8385 * Allow recovery from SIGSEGV in marker on Linux. This works around
8386 a race in thread stack marking if /proc is used to find roots. We do
8387 that by default with malloc redirection and threads. This involved
8388 moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
8389 * Added doc/porting.html file.
8390 * Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
8391 memory overwrite errors.
8392 * Added trivial NO_INCREMENTAL flag to facilitate debugging.
8393 * Added GC_getattr_np-based GC_get_stack_base (untested).
8394 * Separated thread local allocation into a separate file and added the
8395 beginning of win32 support for that.
8396
8397
8398 == [7.0alpha3] 2005-04-28 ==
8399
8400 * Added support for dlopen-based interception of pthread functions.
8401 This is only half done. The gc.h redefinitions currently interfere.
8402 * Integrated major automake overhaul from Petter Urkedal.
8403
8404
8405 == [7.0alpha2] 2005-04-07 ==
8406
8407 * GC_bytes_allocd was incremented by a possibly uninitialized variable
8408 in GC_generic_malloc_inner. (Bug introduced in gc7.0alpha1. Thanks
8409 to Ben Hutchings for tracking it down.)
8410 * Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
8411 * Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
8412 implementation for win32.
8413 * Removed pc_gc.tar and floppy targets in Makefile.direct. Removed
8414 pc_excludes file.
8415 * No longer include GC_bytes_wasted when evaluating allocation progress.
8416 Since we are now counting live memory, it no longer makes sense.
8417 * Applied Davide Angelocola's configure patch. There are now separate
8418 Makefile.am's in the cord and tests subdirectory, more tests, etc.
8419 * Renamed configure.in to configure.ac.
8420 * Merged a very small number of Nathanael Nerode's configure.ac
8421 cleanups from the gcc tree. Unfortunately, that file is a bit
8422 different from ours.
8423 * Changed EINTR handling in sem_wait slightly.
8424 * Restructure the root marking code. Remove all traces of
8425 USE_GENERIC_PUSH_REGS, and effectively make it the default.
8426 Make it easier to pass a context pointer to the mark routine, in
8427 case we ever want to do precise stack marking.
8428 * Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
8429 This remains undocumented, and only implemented for pthreads. But it
8430 removes an otherwise unavoidable race with stores of callee-save
8431 registers.
8432 * Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case. This
8433 resulted in bogus complaints in heap dumps.
8434 * Upgrade to libatomic_ops-1.0, and update build structure to match.
8435 * Remove SRC_M3 support. Clean up lock initialization code in misc.c.
8436 * Removed gc_local_alloc.h. If THREAD_LOCAL_ALLOC is defined, the
8437 thread local allocation routines are now called automatically.
8438 * Renamed gc_inl.h back to gc_inline.h. Changed the interface appreciably
8439 since locking has turned into a dominant issue, and in-line allocation
8440 only makes sense if it's no worse than thread-local allocation.
8441 Gc_inline.h is now also used to implement thread-local allocation.
8442 * Finished replacing stubborn allocation with manual write barrier.
8443 Untested.
8444 * Use thread-local allocation code by default.
8445 * Added GC_register_my_thread and friends for Posix and win32.
8446 * Patch for GWW_VDB from Ben Hutchings.
8447 * Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
8448 redefines GC_malloc.
8449 * Removed now unused AIX memory allocation code.
8450 * Various minor fixes for bugs introduced in 7.0alpha1.
8451
8452
8453 == [7.0alpha1] 2004-11-09 ==
8454
8455 * Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler
8456 and use ANSI constructs unconditionally.
8457 * Introduce #elif and #error in some of the appropriate places.
8458 * Remove GC_printf cruft. Use stdargs.
8459 * Remove separate Solaris threads support. Use the more generic Posix
8460 implementation.
8461 * Use atomic_ops for atomic operations and memory barriers.
8462 * Clean up MPROTECT_VDB implementation. Use SA_SIGINFO wherever
8463 possible.
8464 * Remove broken SIGNALS stuff.
8465 * Use size_t instead of word, where appropriate.
8466 * Add .S.o rule to Makefile.am.
8467 * Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
8468 A/UX, HP), IBM PC/RTs and RISCOS/Irix4. (I doubt the old code worked.
8469 If anyone cares, these should be easy to resurrect.)
8470 * Add EXPECT() in some critical places.
8471 * Redefined hb_sz and hb_body to deal with bytes rather than words.
8472 This affected a great deal of code. I would like to consistently use
8473 byte offsets and sizes where there's not a convincing reason to do
8474 otherwise.
8475 * Redefined several other variables (GC_mem_found, GC_words_allocd)
8476 etc. to use units of bytes. Most of these were also renamed to
8477 reflect that fact.
8478 * Killed as many "register" declarations as possible.
8479 * Partially replaced stubborn allocation with manual write barrier.
8480 It's currently broken.
8481 * Restructured mark code, to allow mark bits to be kept either on
8482 a per allocation granule or per object basis. The emphasis is
8483 now on the -DUSE_MARK_BYTES option, since individual bits perform
8484 quite badly on hyper-threaded P4s, and are probably suboptimal on
8485 other architectures. -DUSE_MARK_BITS is currently broken, and may
8486 be resurrected only for the single-threaded case. This significantly
8487 reduced the cache footprint required by auxiliary GC data structures.
8488 It also reduces space overhead for small heaps. It probably slows
8489 things down slightly if interior pointers are very common.
8490 * As part of the above, we now maintain an approximate count of set
8491 mark bits in each heap block.
8492 * As part of the above, the semantics of hb_map changed drastically.
8493 For MARK_BIT_PER_OBJ, it doesn't exist. For MARK_BIT_PER_GRANULE,
8494 it is purely a way to replace a mod instruction with a table lookup.
8495 (Somewhat to my surprise, this still wins on modern hardware.)
8496 * Removed PRINTSTATS, GATHERSTATS, and SILENT macros. Everything is
8497 now controlled by GC_print_stats variable and GC_PRINT_STATS
8498 and new GC_PRINT_VERBOSE_STATS environment variables.
8499 * Add GC_log_printf and use it consistently for logging output.
8500 * Unconditionally count the objects we reclaim in the sweep phase.
8501 For thread local allocation, we need that anyway, and we expect
8502 that's increasingly the only case that matters. And it simplifies
8503 the code. In general expect minor performance hacks that benefit
8504 only the single-threaded case to disappear.
8505 * Remove GC_quiet from gc.h and elsewhere.
8506 * Changed the heap expansion heuristic, and the definition of
8507 GC_free_space_divisor, to refer to live data size, instead of total
8508 heap size. I believe this is much more robust. It wasn't previously
8509 possible, because we didn't have access to live data size.
8510 * Thread local allocation added the extra byte in twice: Once in
8511 thread_local_alloc, and once in malloc_many.
8512 * Removed GC_malloc_words_small and GC_gcj_fast_malloc. A new
8513 mechanism based on the thread local allocation data structures
8514 is expected to be added instead. This should allow inlined code
8515 that is both fast and doesn't rely on collector internals.
8516 * Changed both free lists and reclaim lists to be indexed by granules
8517 instead of words, norming halving their size.
8518 * MERGE_SIZE is now the only option, and the macro was removed.
8519 (Without it, we need a memory reference to GC_all_interior_pointers
8520 anyway. Thus it costs us nothing.)
8521 * Change GC_size_map to map to granules instead of words. Make sure
8522 that every possible size up to TINY_FREELISTS is present.
8523 * Split of macros need for fast inline allocation into gc_tiny_fl.h
8524 in anticipation of a new inline allocator that doesn't rely on GC
8525 internals.
8526 * Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
8527 in anticipation of a merge with the inline allocation code.
8528 * Removed ALIGN_DOUBLE. This is mostly handled by GRANULE_BYTES.
8529 * Make locking on most platforms conditional on GC_need_to_lock.
8530
8531
8532 == [6.9] ==
8533
8534 * Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
8535 * Fix M68K LINUX port (thanks to Debian packagers).
8536 * __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
8537 * Integrated Allan Hsu's patch for OS X VM deallocation problems.
8538 * Applied FreeBSD/X86_64 patch.
8539
8540
8541 == [6.8] 2006-07-08 ==
8542
8543 * Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
8544 Thomas Klausner).
8545 * Improvements to the HP/UX section of configure.in/configure.ac (thanks
8546 to Andreas Tobler).
8547 * GC_unix_get_mem could neglect to release the malloc lock on Irix, under
8548 extremely unlikely circumstances. (Thanks to Jean-Baptiste Nivois for
8549 some careful code inspection.)
8550 * Added support for kFreeBSD + glibc (thanks to Petr Salinger).
8551 * Fix more MacOS threads memory leaks (thanks to Allan Hsu).
8552 * Added initial Solaris/x64 support (thanks to Rainer Orth).
8553
8554
8555 == [6.7] 2006-03-03 ==
8556
8557 * Add "int" to Solaris "end" and "etext" declaration in gc.h. Declared
8558 the symbols with underscores and as arrays, since that's what's actually
8559 used. Perhaps this could all just be removed. (Thanks to John Bowman.)
8560 * Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
8561 * Added casts for assignments to hb_last_reclaimed, which truncate the
8562 value. Added a cast to GC_adj_words_allocd. Use GetModuleHandleA
8563 when retrieving a handle to kernel32.dll under win32.
8564 * Added Tandem S-Series support. (Thanks to Craig McDaniel. A modified
8565 version of his patch was applied, and hence breakage is probably not
8566 his fault.)
8567 * Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
8568 to Hanno Boeck).
8569 * Changed a test for LINUX in config_macros.h to one for __linux__.
8570 * Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
8571 David Ayers).
8572 * Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
8573 (thanks to Andreas Tobler).
8574 * Add support for Darwin/x86 (thanks to Geoff Norton and the Mono
8575 developers).
8576 * Merge in some recent gcc fixes. Add ppc64 asm code. (Thanks to
8577 Bryce McKinlay and other GCJ developers.)
8578 * Scan MEM_PRIVATE sections under Windows ME and predecessors.
8579 * Interior pointers with some largish offsets into large objects could
8580 be ignored, if GC_all_interior_pointers was set. (Oddly this worked
8581 correctly for stack references if it was not set. Otherwise it failed
8582 for both stack and heap references. Thanks to Andrew McKinlay for the
8583 critical test case.)
8584 * Integrated Tatsuya Bizenn's NETBSD threads support, with some
8585 untested changes.
8586 * Added GC_strdup and friends to make leak detection work correctly
8587 for strdup clients (thanks to Jon Moore). Fixed the existing strdup
8588 with malloc redirection to handle a null malloc return correctly.
8589
8590
8591 == [6.6] 2005-09-09 ==
8592
8593 * Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
8594 * Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
8595 * Integrated Andreas Tobler's FreeBSD/PowerPC patch.
8596 * Don't access the GC thread structure from the restart handler. It's
8597 unsafe, since the handler may run too late. (Thanks to Ben Maurer for
8598 tracking this down.)
8599 * Applied Christian Thalinger's patch to change comment syntax in
8600 alpha_mach_dep.S.
8601 * Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
8602 Juan Jose Garcia-Ripoll).
8603 * Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
8604 Sugioka Toshinobu and Christian Thalinger).
8605 * Rewrote GC_parse_map_entry. This assumed a fixed column layout of
8606 /proc/self/maps on Linux. This ceased to be true about 2 years ago.
8607 The old code is probably quite problematic with -DREDIRECT_MALLOC. It
8608 is also used by default for IA64, though I haven't seen actual failures
8609 there.
8610 * More consistently define HBLKSIZE to 4096 on 64 bit architectures with
8611 4K pages (thanks to Andrew Haley).
8612 * With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
8613 to Ben Hutchings for the observation and patch).
8614 * Move up struct callinfo declaration to make gcc 4.0.2 happy.
8615
8616
8617 == [6.5] 2005-05-22 ==
8618
8619 * Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
8620 * Make GC_approx_sp() write to dummy location to ensure that stack
8621 is grown here, when sp looks reasonable, rather than later, when
8622 it might look like a bad memory reference. (Problem was never
8623 observed that I know of. But on rereading the code it seemed
8624 dubious.)
8625 * Separate out GC_with_callee_saves_pushed and sometimes call
8626 it from GC_suspend_handler in pthread_stop_world.c. Callee-save
8627 register values sometimes failed to get traced under HP/UX on
8628 PA-RISC. Linux/IA64 had the same problem, though non-stacked
8629 callee-save registers seem to be so rarely used there that nobody
8630 ever noticed.
8631 * Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
8632 from Andreas Tobler, which I had lost.
8633 * Fix compare_and_exchange implementation for gcc/IA64 to deal with
8634 pickier compiler versions.
8635 * Fixed Itanium 32-bit ABI support (HP/UX). In particular, the
8636 compare_and_exchange implementation didn't consider that possibility.
8637 * Undefine GC_pthread_detach in win32_threads.c (thanks to
8638 Tommaso Tagliapietra).
8639 * Fixed inclusion of frame.h for NETBSD in os_dep.c.
8640 * Applied Dan Bonachea's patch to use mmap on AIX.
8641 * Several fixes to resurrect the Irix port on recent OS versions.
8642 * Change ALPHA to use LINUX_STACKBOTTOM.
8643 * Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential
8644 bad values of __libc_stack_end on that platform (thanks to David Miller).
8645 * Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
8646 (Unnecessary in 7.0)
8647 * Force a define of __STDC__=0 for the IBM compiler on AIX, so that
8648 we get prototypes. (Unnecessary in 7.0)
8649 * GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
8650 which are only defined in private include files.
8651 * Integrated some small gcconfig.h patches from Dan Bonachea. Also
8652 relaxed assertion about FreeBSD stack size in pthread_support.c.
8653 * Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
8654 support. This may need additional work.
8655 * Avoided potentially infinite recursion in GC_save_callers if
8656 the system backtrace calls malloc. The workaround currently requires
8657 __thread support if this code is used with threads.
8658 * Avoided another similar infinite recursion by conditionally
8659 invoking GC_save_callers in alloc.c (thanks to Matthias Andree
8660 for helping to track down both of these).
8661 * Removed all traces of aix_irix_threads.c. AIX and Irix now use
8662 pthread_support.c and pthread_stop_world.c. The old code appeared
8663 to be unreliable for AIX, and was not regularly maintained.
8664 * On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
8665 they're not always safe to read.
8666 * Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
8667 in GC_remove_from_fl.
8668 * Fix stack_size assertion in GC_pthread_create.
8669 * Fix assertion in GC_steal_mark_stack.
8670
8671
8672 == [6.4] 2004-12-21 ==
8673
8674 * Merge gcconfig.h changes from gcc tree.
8675 * Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
8676 aix_irix_threads.c, and solaris_threads.c to get thread definitions.
8677 * Start marker threads in GC_thr_init, so that they get started even
8678 if no other threads are ever started. (Oddly enough, the parallel
8679 collector worked correctly, though not well, with no helper threads.)
8680 * Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
8681 is set (thanks to Alexander Petrossian).
8682 * GC_PRINT_BACK_HEIGHT would deadlock with thread support.
8683 * Let in_progress_space in backgraph.s grow dynamically.
8684 * Fix README.solaris2. The GC_thr_init() hack doesn't work anymore.
8685 * Convert GC_finalizer_mem_freed to bytes in allchblk.c.
8686 * Add missing declaration for GC_generic_malloc_words_small_inner.
8687 Without it, s390x breaks. (Thanks to Ulrich Weigand.)
8688 * Applied several MacOSX patches to support older tool chains (thanks
8689 to Stefan Ring).
8690 * Bug fix for NetBSD/x64 (thanks to Marc Recht).
8691 * Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
8692 * Fixed an uninitialized variable in cordprnt.c.
8693 * Eliminated some, but not all, gcc -Wall warnings.
8694 * Changed some old style casts to reinterpret_cast in new_gc_alloc.h
8695 (thanks to Dan Grayson).
8696 * GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
8697 GC_DONT_ADD_BYTE_AT_END is set.
8698 * Changed some (long) casts to (word) in preparation for Win64 (thanks
8699 to Peter Colson).
8700 * Changed "int stack_size" declaration in pthread_support.c to use
8701 size_t. (Only mattered with GC_ASSERTIONS enabled.)
8702 * Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
8703 * Removed GC_IGNORE_FB frame buffer recognition, and replaced
8704 it with a check that the mapping type is MEM_IMAGE.
8705 In theory, this should work much better, but it is a high
8706 risk change for win32. (Thanks to Ashley Bone for the crucial
8707 experimental data behind this, and to Rutger Ovidius for
8708 some further experiments.)
8709 * GC_allochblk_nth incremented GC_words_wasted by bytes rather than
8710 words.
8711 * Consider GC_words_wasted in GC_adj_words_allocd only if it is within
8712 reason. (A hack to avoid some extremely unlikely scenarios in which
8713 we manage to allocate only "wasted" space. 7.0 has a better fix.)
8714 * Changed PowerPC GC_clear implementation to use lwsync instead of
8715 eieio, since the documentation recommends against eieio, and
8716 it seems to be incorrect if the preceding memory op is a load.
8717 * Fixed print_block_list to print the correct kind number for
8718 STUBBORN (thanks to Rutger Ovidius).
8719 * Have configure.in generate an error if it is asked to support
8720 pthreads, but doesn't know how to.
8721 * Added Kazuhiro Inaoka's patch for Renesas M32R support.
8722 * Have the GNU build mechanism link with -ldl. Rename THREADLIBS
8723 to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.)
8724 * Added Hannes Mehnert's patch for FreeBSD/SPARC support.
8725 * Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
8726 (Thanks to John Merryweather Cooper.)
8727 * Define MPROTECT_VDB on MACOSX only if threads are being used, since the
8728 dirty page tracking mechanism uses threads. (This avoids an undefined
8729 reference to _GC_darwin_register_mach_handler_thread.)
8730 * By popular demand, use __libc symbols only if we are built with
8731 USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
8732 * Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
8733 The GC itself will dirty lots of pages in this cases, probably making
8734 it counterproductive on all platforms. And the DARWIN port crashes.
8735
8736
8737 == [6.3] 2004-07-08 ==
8738
8739 * Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
8740 * Very large allocations could cause a collector hang. Correct
8741 calculation of GC_collect_at_heapsize.
8742 * GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
8743 was defined.
8744 * Include gc_config_macros.h in threadlibs.c.
8745 * Correct MacOSX thread stop code (thanks to Dick Porter).
8746 * SMALL_OBJ definition was off by one. This could cause crashes
8747 at startup. (Thanks to Zoltan Varga for narrowing this down to
8748 a trivial test case.)
8749 * Integrate Paolo Molaro's patch to deal with a race in the Darwin
8750 thread stopping code.
8751 * Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
8752 implementation. The old approach appears to have been broken by
8753 recent kernels.
8754 * Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
8755 to Andrew Begel).
8756 * Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
8757 * Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
8758
8759
8760 == [6.3alpha6] 2004-05-06 ==
8761
8762 * Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
8763 * Fixed the x64 PREFETCH macros to correctly handle ia32e (which uses
8764 different prefetch instructions on x64). (Thanks to H.J. Lu.)
8765 * GC_config_macros.h did not correctly define GC_WIN32_THREADS from
8766 GC_THREADS.
8767 * Added simple_example.html.
8768 * Merged Andrew Gray's patch to correctly restore signal handlers on
8769 FreeBSD.
8770 * Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
8771 on x86-64. Added some other casts so that the PREFETCH macros
8772 always get a ptr_t argument. Removed some casts in the PREFETCH
8773 implementations.
8774 * Added a header guard for gc_allocator.h and changed GC_debug_free to
8775 clobber contents of deallocated object (suggested by Jesse Jones).
8776 * The signal masking code in pthread_stop_world.c contained some errors.
8777 In particular SIGSEGV was masked in the handler, in spite of the fact that
8778 it wrote to the heap. This could lead to an uncaught SIGSEGV, which
8779 apparently became much more likely in Linux 2.6. Also fixed some
8780 typos, and reduced code duplication in the same area.
8781 * Remove ltconfig, clean up configure messages for DG/UX (thanks to
8782 Adrian Bunk for the patches).
8783 * Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
8784
8785
8786 == [6.3alpha5] 2004-03-30 ==
8787
8788 * Fix & vs && typo in GC_generic_malloc and
8789 GC_generic_malloc_ignore_off_page. (Propagated from the gcc tree.)
8790 * Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
8791 (According to Christian Limpach, the NetBSD problem is fixed.
8792 Presumably so is the Solaris 2.3 problem.)
8793 * Removed placement delete from gc_cpp.h for the SGI compiler (thanks
8794 to Simon Gornall for the patch).
8795 * Changed semantics of the GC_IGNORE_FB environment variable, based
8796 on experimentation by Nicolas Cannasse pointing out that the old
8797 interpretation was useless. We still need help in identifying win32
8798 graphics memory mappings. The current "solution" is a hack.
8799 * Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
8800 It probably made more sense in the gcc context.
8801 * Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
8802 * Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
8803 supports the same extension on various platforms.
8804 * Added some basic (completely untested) defines for Win64, in support
8805 of future work.
8806 * Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
8807 a memory overwrite bug on Solaris and perhaps other platforms.
8808 * Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
8809 Jakub Jelinek for the patch and explaining the problem).
8810 Otherwise pre-linking could cause the collector to fail.
8811 * Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
8812 for HP/UX with gcc. The compiler-based implementation appears to work
8813 only with the vendor compiler.
8814 * Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
8815 making client mark code cleaner and less dependent on GC version.
8816 * Export several new procedures and GC_generic_malloc from gc_mark.h
8817 to support user-defined kinds. Use the new procedures to replace existing
8818 code in gcj_mlc.c and typd_mlc.c.
8819 * Added support for GC_BACKTRACES.
8820 * Fixed a remaining problem in CORD_str with signed characters (thanks
8821 to Alexandr Petrosian for the patch).
8822 * Removed supposedly redundant, but very buggy, definitions of finalizer
8823 macros from javaxfc.h. Fortunately this file probably has no users.
8824 The correct declarations were already in gc.h.
8825 * Also need to set GC_in_thread_creation while waiting for GC during
8826 thread termination, since it is also possible to collect from an
8827 unregistered thread in that case.
8828 * Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
8829 Plus some other minor WinCE fixes (thanks to Alain Novak).
8830 * Added GC_register_describe_type_fn.
8831 * Arrange for debugging finalizer registration to ignore non-heap
8832 registrations, since the regular version of the routine also behaves
8833 that way.
8834 * GC_gcj_malloc and friends need to check for finalizers waiting to be run.
8835 One of the more obscure allocation routines with missing a LOCK() call.
8836 * Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
8837 to work with VS.NET.
8838 * Cleaned up GC_INIT calls in test. Updated gc.man to encourage GC_INIT
8839 use in portable code.
8840 * Taught the GC to use libunwind if --enable-full-debug is specified on
8841 IA64 and libunwind is present.
8842 * The USE_MUNMAP code could get confused about the age of a block and
8843 prematurely unmap it. GC_unmap_old had a bug related to wrapping of
8844 GC_gc_no. GC_freehblk and GC_merge_unmapped didn't maintain
8845 hb_last_reclaimed reasonably when blocks were merged. The code was
8846 fixed to reflect original intent, but that may not always be an
8847 improvement.
8848
8849
8850 == [6.3alpha4] 2004-01-01 ==
8851
8852 * USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
8853 * Darwin support was broken in alpha3 as a result of my mis-integration of
8854 Andrew Begel's patches. Fixed with another patch from Andrew Begel.
8855 * A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
8856 overly aggressive. We may collect from an unregistered thread during
8857 thread creation. Fixed by explicitly checking for that case. (Added
8858 GC_in_thread_creation.)
8859
8860
8861 == [6.3alpha3] 2003-12-20 ==
8862
8863 * Removed -DSMALL_CONFIG from BCC_MAKEFILE.
8864 * Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
8865 * Mostly applied a DJGPP patch from Doug Kaufman. Especially Makefile.dj
8866 had suffered from serious bit rot.
8867 * Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
8868 and a call to alloca (for lcc compatibility).
8869 * Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
8870 the memory with PROT_NONE instead of unmapping it. The latter risks
8871 an intervening mmap grabbing the address space out from underneath us.
8872 Updated this code to reflect a cleaner patch from Ulrich Drepper.
8873 * Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
8874 (Patch from Andrew Begel.)
8875 * Dynamically choose whether or not lock should spin on win32 (thanks
8876 to Maurizio Vairani for the patch). This may be a significant performance
8877 improvement for win32.
8878 * Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
8879 in the distribution (thanks to Maurizio Vairani).
8880 * Maybe_install_looping_handler() was accidentally exported, violating
8881 our name space convention.
8882 * Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD. (Thanks to
8883 Christian Limpach. I generalized the patch to use sigsetjmp on all
8884 UNIX_LIKE platforms, admittedly a slightly risky move. But it may avoid
8885 similar problems on some other platforms. I also cleaned up the definition
8886 of UNIX_LIKE a bit.)
8887 * Integrated Andrew Begel's Darwin threads patch, adjusted according to
8888 some of Fergus Hendersons's comments. (Patch didn't apply cleanly,
8889 errors are possible.)
8890 * Added another test or two for the Intel 8.0 compiler to avoid
8891 confusing it with gcc. The single-threaded collector should now build
8892 with icc, at least on ia64.
8893
8894
8895 == [6.3alpha2] 2003-11-04 ==
8896
8897 * Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
8898 * Put back the WINABI qualifier for GC_CreateThread. (Thanks to
8899 Danny Smith for the patch. 6.3alpha1 had the qualifier in one place
8900 but not elsewhere, which was clearly wrong.)
8901 * Sometimes explicitly define __private_extern__ before DARWIN dyld.h
8902 include. (Thanks to Andreas Tobler for posting the patch.)
8903 * Included signal.h from pthread_support.c. Removed GC_looping_handler,
8904 which was dead code.
8905 * GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
8906 defined (thanks to Glauco Masotti for testing and reporting this).
8907 Changed GC_find_start to never just return 0. According to its
8908 comment it doesn't, and it's unclear that's correct.
8909 * GC_alloc_large had several largely compensating bugs in the
8910 computation of GC_words_wasted. (It was confused about bytes vs.
8911 words in two places.)
8912 * Integrated Slava Sysoltsev's patch to support more recent versions of
8913 the Intel compiler on IA64/Linux.
8914 * Changed win32 spinlock initialization to conditionally set a spin count.
8915 (Emmanual Stumpf pointed out that enabling this makes a large performance
8916 difference on win32 multiprocessors.) Also cleaned up the win32 spinlock
8917 initialization code a bit.
8918 * Fixed thread support for HP/UX/IA64. The register backing store base for
8919 the main thread was sometimes not set correctly. (Thanks to
8920 Laurent Morichetti.)
8921 * Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
8922 * Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
8923 avoid 64-bit size mismatches (thanks to Bernie Solomon).
8924 * Fixed GC_generic_push_regs to avoid a potential and very unfortunate
8925 tail call optimization. This could lead to prematurely reclaimed
8926 objects on configurations that used the generic routine and the new
8927 build infrastructure (which potentially optimizes mach_dep.c).
8928 This was a serious bug, but it's unclear whether it has resulted in
8929 any real failures.
8930 * Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
8931 for noticing the problem and supplying the patch).
8932 * Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
8933 to Anthony Green).
8934 * Partially merged a win32 patch from Ben Hutchings, and substantially
8935 revised other parts of win32_threads.c. It had several problems.
8936 Under MinGW with a statically linked library, the main thread was
8937 not registered. Cygwin detached threads leaked thread descriptors.
8938 There were several race conditions. For now, unfortunately the
8939 static threads limit remains, though we increased it, and made table
8940 traversal cost depend on the actual thread count.
8941 There is also still some code duplication with pthread_support.c.
8942 (Thread descriptors did become much smaller, since Ben Hutchings
8943 removed the thread context from them.)
8944 * Integrated a Solaris configure.in patch from Rainer Orth.
8945 * Added GC_IGNORE_FB and associated warning to very partially address
8946 the issue of the collector treating a mapped frame buffer as part
8947 of the root set. (Thanks to David Peroutka for providing some
8948 insight. More would be helpful. Is there anything that can be used
8949 to at least partially identify such memory segments?)
8950
8951
8952 == [6.3alpha1] 2003-07-26 ==
8953
8954 * Integrated some NetBSD patches by Marc Recht. These
8955 were already in the NetBSD package.
8956 * GC_pthread_create waited for the semaphore even if pthread_create failed.
8957 (Thanks to Dick Porter for the pthread_support.c patch.) Applied the
8958 analogous fix for aix_irix_threads.c.
8959 * Added Rainer Orth's Tru64 fixes.
8960 * The check for exceeding the thread table size in win32 threadDetach
8961 was incorrect (thanks to Alexandr Petrosian for the patch).
8962 * Applied Andrew Begel's patch to correct some reentrancy issues
8963 with dynamic loading on Darwin.
8964 * GC_CreateThread() was neglecting to duplicate the thread handle in
8965 the table (thanks to Tum Nguyen for the patch).
8966 * Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
8967 Roger Sayle for the patch).
8968 * Applied more AIX threads patches from Scott Ananian.
8969
8970
8971 == [6.2] 2003-06-21 ==
8972
8973 * Integrated a second round of Irix/AIX patches from Dan Bonachea.
8974 Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
8975 the Irix assembler to do the C preprocessing; gcc -E doesn't work.
8976 * Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
8977 * There was a race between GC_pthread_detach and thread exit that could
8978 result in a thread structure being deallocated by GC_pthread_detach
8979 even though it was still needed by the thread exit code (thanks to
8980 Dick Porter for the small test case that allowed this to be debugged).
8981 * Fixed version parsing for non-alpha versions in acinclude.m4 and
8982 version checking in version.h.
8983 * Issues identified (not yet fixed):
8984 - A dynamic libgc.so references dlopen unconditionally, but doesn't link
8985 against libdl.
8986 - GC_proc_fd for Solaris is not correctly updated in response to a
8987 fork() call. Thus incremental collection in the child won't work
8988 correctly. (Thanks to Ben Cottrell for pointing this out.)
8989 - --enable-redirect-malloc is mostly untested and known not to work
8990 on some platforms.
8991 - There seem to be outstanding issues on Solaris/x86, possibly with
8992 finding the data segment starting address.
8993 - Very large root set sizes (> 16 MB or so) could cause the collector
8994 to abort with an unexpected mark stack overflow. (Thanks to
8995 Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial
8996 size.
8997 - The SGI version of the collector marks from mmapped pages, even
8998 if they are not part of dynamic library static data areas. This
8999 causes performance problems with some SGI libraries that use mmap
9000 as a bitmap allocator. NOT YET FIXED. It may be possible to turn
9001 off DYNAMIC_LOADING in the collector as a workaround. It may also
9002 be possible to conditionally intercept mmap and use GC_exclude_static_roots.
9003 The real fix is to walk rld data structures, which looks possible.
9004 - Incremental collector should handle large objects better. Currently,
9005 it looks like the whole object is treated as dirty if any part of it is.
9006
9007
9008 == [6.2alpha6] 2003-06-05 ==
9009
9010 * There was an extra underscore in the name of GC_save_registers_in_stack
9011 for NetBSD/SPARC (thanks to Jaap Boender for the patch).
9012 * Integrated Brian Alliet's patch for Darwin. This restructured the
9013 linuxthreads/pthreads support to separate generic pthreads support
9014 from more the system-dependent thread-stopping code. I believe this
9015 should make it easier to eliminate the code duplication between
9016 pthreads platforms in the future. The patch included some other
9017 code cleanups.
9018 * Integrated Dan Bonachea's patch to support AIX threads. This required
9019 substantial manual integration, mostly due to conflicts with other
9020 recent threads changes. It may take another iteration to
9021 get it to work.
9022 * Removed HPUX/PA-RISC support from aix_irix_threads.c. It wasn't used
9023 anyway and it cluttered up the code. And anything we can do to migrate
9024 towards generic pthreads support is a good thing.
9025 * Added a more explicit test for tracing of function arguments to test.c.
9026 * Added Akira Tagoh's PowerPC64 patch.
9027 * Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
9028 pointing it out). gc.h now includes just windows.h, not winbase.h.
9029 * Declared GC_save_regs_in_stack() in gc_priv.h. Remove other declarations.
9030 * Changed --enable-cplusplus to use automake consistently. The old way
9031 confused libtool. "Make install" didn't work correctly for the old version.
9032 Previously --enable-cplusplus was broken on cygwin.
9033 * Changed the C version of GC_push_regs to fail at compile time if it is
9034 generated with an empty body. This seems to have been the cause of one
9035 or two subtle failures on unusual platforms. Those failures should
9036 now occur at build time and be easily fixable.
9037
9038
9039 == [6.2alpha5] 2003-05-14 ==
9040
9041 * GC_invoke_finalizers could, under rare conditions, set
9042 GC_finalizer_mem_freed to an essentially random value. This could
9043 possibly cause unbounded heap growth for long-running applications
9044 under some conditions. (The bug was introduced in 6.1alpha5, and
9045 is not in gcc3.3.)
9046 * Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared.
9047 GC_DLL is used instead. All internal tests are now on GC_DLL.
9048 README.macros is now more precise about the intended meaning.
9049 * Include DllMain in the multi-threaded win32 version only if the
9050 collector is actually built as a dll (thanks to Mohan Embar for
9051 a version of the patch).
9052 * Hide the cygwin threadAttach/Detach functions. They were violating our
9053 namespace rules.
9054 * Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT
9055 (thanks again to Ben Hutchings).
9056 * Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
9057 * CORD_cat was not rebalancing unbalanced trees in some cases, violating
9058 a CORD invariant. Also tweaked the re-balancing rule for
9059 CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report
9060 and patch.)
9061 * Added hand-coded structured exception handling support to mark.c.
9062 This should enable support of dynamic libraries under win32 with
9063 gcc-compiled code. (Thanks to Ranjit Mathew for the patch.)
9064 Turned on dynamic library scanning for gcc on Win32.
9065 * Removed some remnants of read wrapping (thanks to Kenneth Schalk).
9066 GC_USE_LD_WRAP was probably broken in recent versions.
9067 * The build could fail on some platforms since gcconfig.h could include
9068 declarations mentioning ptr_t, which was not defined, e.g. when if_mach
9069 was built (thanks to Yann Dirson for pointing this out). Also
9070 cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
9071 * The GC_LOOP_ON_ABORT environment variable interfered with incremental
9072 collection, since the write fault handler was erroneously overridden.
9073 Handlers are now set up in the correct order.
9074 * It used to be possible to call GC_mark_thread_local_free_lists() while
9075 the world was not stopped during an incremental GC. This was not safe.
9076 Fortunately, it was also unnecessary. Added GC_world_stopped flag
9077 to avoid it. (This caused occasional crashes in GC_set_fl_marks
9078 with thread local allocation and incremental GC. This probably happened
9079 primarily on old, slow multiprocessors.)
9080 * Allowed overriding of MAX_THREADS in win32_threads.c from the build
9081 command line (thanks to Yannis Bres for the patch).
9082 * Taught the IA64/linux code to determine the register backing store base from
9083 /proc/self/maps after checking the __libc symbol, but before guessing.
9084 (__libc symbols are on the endangered list, and the guess is likely to not
9085 always be right for 2.6 kernels.) Restructured the code to read and parse
9086 /proc/self/maps so it only exists in one place (all platforms).
9087 * The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it
9088 also registered the main data segment, but didn't actually do so. (I don't
9089 think anyone actually uses this configuration, but ...)
9090 * Made another attempt to get --enablecplusplus to do the right thing.
9091 Since there are unavoidable problems with C programs linking against a
9092 dynamic library that includes C++ code, I separated out the c++ code into
9093 libgccpp.
9094
9095
9096 == [6.2alpha4] 2003-03-10 ==
9097
9098 * Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS. (See Debian bug
9099 # 177204)
9100 * Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
9101 * Integrated Grzegorz Jakacki's substantial GNU build patch. "Make dist"
9102 should now work for the GNU build process. Documentation files
9103 are installed under share/gc.
9104 * Tweaked gc_cpp.h to again support the Borland compiler (thanks to
9105 Rene Girard for pointing out the problems).
9106 * Updated BCC_MAKEFILE (thanks to Rene Girard).
9107 * Added GC_ASSERT check for minimum thread stack size.
9108 * Added --enable-gc-assertions.
9109 * Added some web documentation to the distribution. Updated it in the
9110 process.
9111 * Separate gc_conf_macros.h from gc.h.
9112 * Added generic GC_THREADS client-defined macro to set the appropriate
9113 GC_XXX_THREADS internal macro. (gc_config_macros.h.)
9114 * Add debugging versions of _ignore_off_page allocation primitives.
9115 * Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
9116 from gc.h to gc_priv.h.
9117 * Reset GC_fail_count even if only a small allocation succeeds.
9118 * Integrated Brian Alliet's patch for dynamic library support on Darwin.
9119 * gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
9120 when it should have called the lower case version, since it was
9121 explicitly computing a base pointer.
9122
9123
9124 == [6.2alpha3] 2003-01-30 ==
9125
9126 * Don't include execinfo.h in os_dep.c when it's not needed, and may not
9127 exist.
9128
9129
9130 == [6.2alpha2] ==
9131
9132 * Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
9133 Hironori Sakamoto for the patch).
9134 * Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
9135 * Attempted to work around the problems with .S filenames and the SGI
9136 compiler. (Untested.)
9137 * Worked around an HP/UX make issue with the GNU-style build process.
9138 * Fixed the --enable-cplusplus build machinery to allow builds without
9139 a C++ compiler. (That was always the intent ...)
9140 * Changed the debugging allocation macros to explicitly pass the return
9141 address for Linux and XXXBSD on hardware for which we can't get stack
9142 traces. Use __builtin_return_address(0) to generate it when possible.
9143 Some of the configuration work was cleaned up (good) and moved to gc.h
9144 (bad, but necessary). This should make leak detection more useful
9145 on a number of platforms. (Thanks to Fabian Thylman for the suggestion.)
9146 * Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
9147 * Bumped revision number for dynamic library.
9148
9149
9150 == [6.2alpha1] 2003-01-23 ==
9151
9152 * Guard the test for GC_DUMP_REGULARLY in misc.c with
9153 "#ifndef NO_DEBUGGING". Otherwise it fails to build with NO_DEBUGGING
9154 defined. (Thanks to Manuel Serrano.)
9155 * Message about retrying suspend signals was incorrectly generated even when
9156 flag was not set.
9157 * Cleaned up MACOSX/NEXT root registration code. There was apparently a
9158 separate ifdef case in GC_register_data_segments() for no reason.
9159 * Removed MPROTECT_VDB for MACOSX port, based on one negative report.
9160 * Arrange for gc.h and friends to be correctly installed with GNU-style
9161 "make install".
9162 * Enable the GNU-style build facility include C++ support in the library
9163 with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
9164 * Mark from GC_thread_key in linux_threads.c, in case that's allocated
9165 from the garbage collected heap, as it is with our own thread-specific
9166 storage implementation (thanks to Jeff Sturm).
9167 * Mark all free list header blocks if they are heap allocated. This avoids
9168 some unnecessary tracing. And it remains correct if we clear the
9169 root set. (Thanks to Jeff Sturm for identifying the bug.)
9170 * Improved S390/Linux support. Add S390/Linux 64-bit support (thanks to
9171 Ulrich Weigand).
9172 * Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
9173 GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h. This is technically
9174 an interface change. Based on the fact that nobody reported this,
9175 I suspect/hope there were no clients.
9176 * Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
9177 when appropriate, (2) doesn't generate references to undefined internal
9178 macros, and (3) allows easier manual construction of descriptors.
9179 * Close the file descriptor used by GC_print_address_map().
9180 * Set the "close-on-exec" bit for various file descriptors maintained
9181 for the collector's internal use.
9182 * Added a hack to find memory segments owned by the system allocator
9183 under win32. Based on my tests, this tends to eventually find all
9184 segments, though it may take a while. There appear to be cleaner,
9185 but slower solutions under NT/XP. But they rely on an API that's
9186 unsupported under 9X.
9187 * Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM. (Thanks
9188 to Akira Tagoh for pointing out that HEURISTIC1 does not work on
9189 64-bit kernels.)
9190 * Added GC_set_free_space_divisor to avoid some Windows dll issues.
9191 * Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
9192 of candidate pointers for tagging, etc.
9193 * Always lock around GC_notify_full_gc(). Simplified code for
9194 invoking GC_notify_full_gc().
9195 * Changed the way DATASTART is defined on FreeBSD to be robust against
9196 an unmapped page after etext. (Thanks to Hironori Sakamoto for
9197 tracking down the intermittent failure.)
9198 * Made GC_enable() and GC_disable() official. Deprecated direct update
9199 of GC_dont_gc. Changed GC_gcollect to be a noop when garbage collection
9200 is disabled.
9201 * Call GC_register_dynamic_libraries before stopping the world on Linux,
9202 in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
9203 * Introduced a more general mechanism for platform-dependent code to
9204 decide whether the main data segment should be handled separately
9205 from dynamic libraries, or registered by GC_register_dynamic_libraries.
9206 The latter is more reliable and easier on Linux with dl_iterate_phdr.
9207
9208
9209 == [6.1] ==
9210
9211 * Added GC_MAXIMUM_HEAP_SIZE environment variable.
9212 * Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
9213 * Double page hash table size for -DLARGE_CONFIG.
9214 * Integrated Bo Thorsen's x64 support.
9215 * STACKBOTTOM definition for LINUX/MIPS was partially changed back
9216 (thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
9217 * Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
9218 SEARCH_FOR_DATA_START. It doesn't hurt to fall back to a search.
9219 And __data_start doesn't seem to get defined correctly of the GC
9220 library is loaded with LD_PRELOAD, e.g. for leak detection.
9221 * If the GC_find_leak environment variable is set, do a
9222 atexit(GC_gcollect) to give us at least one chance to detect leaks.
9223 This may report some very benign leaks, but ...
9224 * Addeded REDIRECT_FREE. It's necessary if we want leak detection with
9225 LD_PRELOAD.
9226 * Defer printing of leaked objects, as for smashed objects.
9227 * Fixed process and descriptor leak in GC_print_callers. Try for
9228 line number even if we got function name.)
9229 * Ported parallel GC support and thread local allocation to Alpha.
9230 Not yet well-tested.
9231 * Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
9232 * Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
9233 alpha_mach_dep.s.
9234 * Incorporated a change to new_gc_alloc.h,
9235 which should make it work with gcc3.1.
9236 * Use alpha_mach_dep.S only on Linux. (It's not clear that this is
9237 optimal, but it otherwise didn't build on Tru64. Thanks to Fergus Henderson.)
9238 * Added ifdef to guard free() in os_dep.c. Otherwise we get a
9239 compilation error on Irix (thanks to Dai Sato).
9240 * Added an experimental version of GC_memalign to mallocx.c. This can't
9241 always work, since we don't handle alignment requests in the hblk-level
9242 allocator, and we can't handle arbitrary pointer displacements unless
9243 GC_all_interior_pointers is enabled. But it should work for alignment
9244 requests up to HBLKSIZE. This is not yet documented in the standard
9245 places.
9246 * Finally debugged the OSF1/Tru64 thread support. This needs more testing,
9247 since I needed to add a somewhat unconvincing workaround for signal
9248 delivery issues that I don't yet completely understand. But it does
9249 pass my tests, even in parallel GC mode. Incremental GC support is
9250 disabled if thread support is enabled, due to the signal issues.
9251 * Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
9252 * Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
9253 declarations to gc.h. On IA64, this is required for REDIRECT_MALLOC
9254 to work correctly with these.
9255 * Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
9256
9257
9258 == [6.1alpha5] 2002-06-19 ==
9259
9260 * Added GC_finalizer_mem_freed, and changed some of the code that
9261 decided on heap expansion to look at it. Memory explicitly
9262 deallocated by finalizers essentially needs to be counted as reclaimed
9263 by the GC. Otherwise there are cases in which the heap can grow
9264 infinitely. (Thanks to Mark Reichert for the test case.)
9265 * Integrated Adam Megacz patches to not scan dynamic libraries if
9266 we are compiling with gcc on win32. Otherwise we need structured
9267 exception handling to deal with asynchronously unmapped root
9268 segments, and gcc doesn't directly support that.
9269 * Integrated Anthony Green's patch to support Wine.
9270 * GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
9271 places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
9272 * Integrated Loren J. Rittle's Alpha FreeBSD patches. These also
9273 changed the declarations of symbols like _end on many platforms to
9274 that they wouldn't mistakenly be declared as short data symbols (suggested by
9275 Richard Henderson).
9276 * Integrated changes from the Debian distribution (thanks to Ryan Murray
9277 for pointing these out).
9278 Fix C++ comments in POWERPC port. Add ARM32
9279 incremental GC support. Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
9280 this time for real. Use va_copy to get rid of cord printf problems
9281 (finally).
9282 * Close file descriptor used to count CPUs (thanks to Jeff Sturm for
9283 pointing out the omission).
9284 * Don't just drop gcj free lists in GC_start_reclaim, since that can
9285 eventually cause the marker to see a bogus mark descriptor in the
9286 dropped objects. The usual symptom was a very intermittent segmentation
9287 fault in the marker. This mattered only if one of the GC_gcj_malloc
9288 variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
9289 Tom Tromey for helping to track this down).
9290 * Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
9291 Jeff Sturm, Tom Tromey, and Christian Joensson).
9292 * Fixed a typo in strdup definition (thanks to Gerard A Allan).
9293 * Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
9294 This is needed on Linux. I'm not sure whether it's better or worse
9295 on Tru64.
9296 * Changed gc_cpp.h once more to declare operator new and friends only in
9297 a Microsoft environment. This may need further fine tuning (thanks to
9298 Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
9299 * Don't ever override strdup if it's already macro defined (thanks to
9300 Adnan Ali for pointing out the problem).
9301 * Changed gc_cpp.h yet again to also overload placement new. Due to the
9302 C++ overloading rules, the other overloaded new operations otherwise hide
9303 placement new, which causes many STL uses to break (thanks to Reza Shahidi
9304 for reporting this, and to Matt Austern for proposing a fix).
9305 * Integrated cygwin pthreads support from Dan Bonachea.
9306 * Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
9307 * Changed printing code to print more complete GC times.
9308 * Applied Mark Mitchell's Irix patch to correct some bit rot.
9309 * Clarified which object-printing routines in dbg_mlc.c should hold
9310 the allocation lock. Restructured the code to allow reasonable object
9311 printing with -DREDIRECT_MALLOC.
9312 * Fix the Linux mmap code to always start with 0x1000 as the initial hint.
9313 Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
9314 Jeffrey Mark Siskind).
9315 * Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
9316 with a system header (thanks to Philip Brown).
9317 * Cause win32_threads.c to handle an out of range stack pointer correctly,
9318 though currently with a warning. (Thanks to Jonathan Clark for
9319 observing that Windows applications may temporarily use the stack
9320 pointer for other purposes, and suggesting a fix. Unfortunately, it's
9321 not clear that there is a complete solution to this problem.)
9322
9323
9324 == [6.1alpha4] 2002-06-16 ==
9325
9326 * Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
9327 building. Increased 64-bit heap size limit in test.c slightly, since
9328 a functional SPARC collector seems to slightly exceed the old limits.
9329 * Use NPRGREG in solaris_threads.c, thus printing all registers if things
9330 go wrong.
9331 * Added GC_MARKERS environment variable to allow use of a single marker
9332 thread on an MP without confusing the lock implementation.
9333 * Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
9334 This is really a purely generational mode, and we can afford to
9335 postpone the collection until the heap is (nearly) full.
9336 * Remove read() wrapper for MPROTECT_VDB. It was causing more harm than
9337 good. It is often no longer needed if system calls avoid writing to
9338 pointerful heap objects.
9339 * Fix MACOSX test in gcconfig.h (thanks to John Clements).
9340 * Change GC_test_and_set so that it consistently has one argument.
9341 Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
9342 Ryan Murray).
9343 * Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort()
9344 declaration (thanks to Michael Smith).
9345 * Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START().
9346 * Added win32 recognition code in configure.in. Changed some of the
9347 dllimport/export defines in gc.h (thanks to Adam Megacz).
9348 * GC_malloc_many didn't set hb_last_reclaimed when it called
9349 GC_reclaim_generic. (I'm not sure this matters much, but ...)
9350 * Allocating uncollectible objects with debug information sometimes
9351 allocated objects that were one byte too small, since uncollectible
9352 objects don't have the extra byte added at the end (thanks to
9353 Wink Saville for pointing this out).
9354 * Added a bit more assertion checking to make sure that gcj objects
9355 on free lists never have a nonzero second word.
9356 * Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
9357 * Upgraded libtool, configure.in and some related files to hopefully
9358 support NetBSD/SPARC (thanks to Adrian Bunk). Unfortunately,
9359 libtool 1.4.2 seemed to be buggy due to missing quotes in several
9360 "test" invocations. Fixed those in the ltmain.sh script.
9361 * Some win32-specific patches, including the introduction of
9362 GC_CreateThread (thanks to Adam Megacz).
9363 * Merged in gcj changes from Anthony Green to support embedded systems.
9364 * Tried to consistently rename preprocessed assembly files with a capital
9365 .S extension.
9366 * Use alpha_mach_dep.S on ALPHA again. It doesn't really matter, but this
9367 makes our distribution consistent with the gcc one, avoiding future merge
9368 problems.
9369 * Move GET_MEM definition into gcconfig.h. Include gcconfig.h slightly
9370 later in gc_priv.h to avoid forward references to ptr_t.
9371 * Add some testing of local allocation to test.c.
9372 * Change definition of INVALID_QTID in specific.h. The -1 value was used
9373 inconsistently, and too likely to collide with a valid stack address.
9374 Some general clean-up of specific.[ch]. Added assertions. (Thanks
9375 to Michael Smith for tracking down an intermittent bug to this
9376 general area. I'm not sure it has been squashed yet, however.)
9377 * On Pthread systems it was not safe to call GC_malloc() between fork()
9378 and exec(). According to the applicable standards, it doesn't appear
9379 to be safe to call malloc() or many other libc functions either, thus
9380 it's not clear this is fixable. Added experimental support for
9381 -DHANDLE_FORK in linux_threads.c which tries to support it. It may
9382 succeed if libc does the right thing. I'm not sure whether it does.
9383 (Thanks to Kenneth Schalk for pointing out this issue.)
9384 * Documented thread local allocation primitives to require an
9385 explicit GC_init call. GC_init_parallel is no longer declared to
9386 be a constructor function, since that isn't portable and often
9387 seems to lead to initialization order problems.
9388 * Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
9389 compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
9390 * Some more patches for Linux on HP PA-RISC.
9391 * Added include/gc_allocator.h. It implements (hopefully) standard
9392 conforming (as opposed to SGI-style) allocators that allocate
9393 collectible (gc_allocator) or GC-traceable, but not collectible
9394 (traceable_allocator) objects. This borrows heavily from libstc++,
9395 which borrows heavily from the SGI implementation, this part of
9396 which was written by Matt Austern. Changed test_cpp.cc to very
9397 minimally test this.
9398 * On Linux/x86, retry mmap with a different start argument. That should
9399 allow the collector to use more (closer to 3GB) of the address space.
9400 * Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
9401 patch to the gcc tree).
9402 * Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
9403 to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
9404 * Compensated for the fact that current versions of glibc set
9405 __libc_stack_end incorrectly on Linux/IA64 while initialization code
9406 is running. This could cause the collector to miss 16 bytes of
9407 the memory stack if GC_malloc or friends where called before main().
9408 * Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
9409 This will probably take another iteration to work, since his
9410 patch conflicted with the libtool upgrade.
9411 * Added README.arm.cross containing some information about cross-
9412 compiling to an ARM processor from Margaret Fleck (original code provided by
9413 Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
9414 Tilman Vogel; also ported for iPAQ by Oliver Kurth).
9415
9416
9417 == [6.1alpha3] 2002-02-07 ==
9418
9419 * Minor cleanup on the gcconfig.h section for SPARC.
9420 * Minor fix to support Intel compiler for Linux/x86 (thanks to
9421 Sven Hartrumpf).
9422 * Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
9423 * Restructured the way in which we determine whether or not to keep
9424 call stacks for debug allocation. By default SAVE_CALL_COUNT is
9425 now zero on all platforms. Added SAVE_CALL_NARGS parameters.
9426 If possible, use execinfo.h to capture call stack. (This should
9427 add support for a number of new platforms, though often at
9428 considerable runtime expense.)
9429 * Try to print symbolic information for call stacks. On Linux, we
9430 do this with a combination of execinfo.h and running addr2line in
9431 a separate process. This is both much more expensive and much more
9432 useful. Amazingly, it seems to be fast enough for most purposes.
9433 * Redefined strdup if -DREDIRECT_MALLOC is given.
9434 * Changed incremental collector and MPROTECT_VDB implementation so that,
9435 under favorable conditions, pointer-free objects are not protected.
9436 Added GC_incremental_protection_needs() to determine ahead of time whether
9437 pointer-free objects may be protected. Replaced GC_write_hint() with
9438 GC_remove_protection().
9439 * Added test for GC_ENABLE_INCREMENTAL environment variable.
9440 * Made GC_time_limit runtime configurable. Added GC_PAUSE_TIME_TARGET
9441 environment variable.
9442 * Eliminated GC_page_sz, a duplicate of GC_page_size.
9443 * Caused the Solaris and Irix thread creation primitives to call
9444 GC_init_inner().
9445
9446
9447 == [6.1alpha2] 2001-12-20 ==
9448
9449 * No longer wrap read by default in multi-threaded applications. It was
9450 pointed out on the libgcj list that this holds the allocation lock for
9451 way too long if the read blocks. For now, reads into the heap are
9452 broken with incremental collection. It's possible to turn this back on
9453 if you make sure that read calls don't block (e.g. by calling select
9454 first).
9455 * Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
9456 * Added check for environment variable GC_IGNORE_GCJ_INFO.
9457 * Added printing of stop-the-world GC times if GC_PRINT_STATS environment
9458 variable is set.
9459 * The calloc definition in leak_detector.h was missing parentheses, and
9460 realloc was missing a second argument to GC_REALLOC (thanks to
9461 Elvenlord Elrond).
9462 * Added GC_PRINT_BACK_HEIGHT environment variable and associated
9463 code, mostly in the new file backgraph.c. See doc/README.environment.
9464 * Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
9465 Jonathan Clark).
9466 * Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
9467 different address-space layout). This may help for other machines with
9468 holes in the data segment. (Thanks to Hironori Sakamoto.)
9469 * Changed the order in which GC_push_roots and friends push things onto
9470 the mark stack. GC_push_all calls need to come first, since we can't
9471 necessarily recover if those overflow the mark stack. (Thanks to
9472 Matthew Flatt for tracking down the problem.)
9473 * Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
9474
9475
9476 == [6.1alpha1] 2001-09-22 ==
9477
9478 * Non-debug, atomic allocations could result in bogus smashed object
9479 reports with debugging on (thanks to Patrick Doyle for the small test case).
9480 * Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
9481 2.2.4 bug.
9482 * Initial port to HP/UX on Itanium. Thread support and both 32 and 64
9483 bit ABIs appear to work. Parallel mark support doesn't yet, due to
9484 some inline assembly code issues. Thread local allocation does appear
9485 to work.
9486 * ifdef'ed out glibc2.1/Itanium workaround. I suspect nobody is using
9487 that combination anymore.
9488 * Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
9489 Dimitris Vyzovitis for the patch).
9490 * Debugged 64-bit support on HP/UX PA-RISC.
9491 * Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
9492 * Unregistering of finalizers with debugging allocation was broken (thanks
9493 to Jani Kajala for the test case).
9494 * Old finalizers were not returned correctly from GC_debug_register_finalizer.
9495 * Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
9496 * Cleaned up some statistics gathering code in reclaim.c (thanks to
9497 Walter Bright).
9498 * Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
9499 * Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
9500 traversal to dyn_load.c. Changed it to weakly reference dl_iterate_phdr,
9501 so that the old code is still used with old versions of glibc.
9502 * Cleaned up feature test macros for various threads packages and
9503 integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
9504 It's likely that the cleanup broke something, since it touched lots of
9505 code. It's also likely that it fixed some unreported bugs in the
9506 less common thread implementations, since some of the original code
9507 didn't stand up to close scrutiny. Support for the next pthreads
9508 implementation should be easier to add.
9509
9510
9511 == [6.0] 2001-07-26 ==
9512
9513 * Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
9514 * Fixed a stack clearing problem that resulted in SIGILL with a
9515 misaligned stack pointer for multi-threaded SPARC builds.
9516 * Integrated another HURD patch (thanks to Igor Khavkine).
9517
9518
9519 == [6.0alpha9] ==
9520
9521 * added README.macros.
9522 * Made gc.mak a symbolic link to work around winzip's tendency to ignore
9523 hard links.
9524 * Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
9525 it on untested platforms.
9526 * Integrated initial GNU HURD port (thanks to Chris Lingard and
9527 Igor Khavkine).
9528 * A few more fixes for Digital Mars compiler (by Walter Bright).
9529 * Fixed gcc version recognition. Renamed OPERATOR_NEW_ARRAY to
9530 GC_OPERATOR_NEW_ARRAY. Changed GC_OPERATOR_NEW_ARRAY to be the default.
9531 It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
9532 Cesar Eduardo Barros).
9533 * Changed the byte size to free-list mapping in thread local allocation
9534 so that size 0 allocations are handled correctly.
9535 * Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
9536 * Changed finalization registration to invoke GC_oom_fn when it runs out
9537 of memory.
9538 * Removed lvalue cast in finalize.c. This caused some debug configurations
9539 not to build with some non-gcc compilers.
9540
9541
9542 == [6.0alpha8] 2001-06-15 ==
9543
9544 * Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
9545 so that they compile under Irix (thanks to Dave Love).
9546 * Updated powerpc_macosx_mach_dep.s so that it works if the collector
9547 is in a dynamic library (thanks to Andrew Begel).
9548 * Transformed README.debugging into debugging.html, updating and
9549 expanding it in the process. Added gcdescr.html and tree.html
9550 from the web site to the GC distribution.
9551 * Fixed several problems related to PRINT_BLACK_LIST. This involved
9552 restructuring some of the marker macros.
9553 * Fixed some problems with the sizing of objects with debug information.
9554 Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST. Reduced the
9555 object size with SHORT_DEBUG_HDRS by another word.
9556 * The "Needed to allocate blacklisted ..." warning had inadvertently
9557 been turned off by default, due to a buggy test in allchblk.c. Turned
9558 it back on.
9559 * Removed the marker macros to deal with 2 pointers in interleaved fashion.
9560 They were messy and the performance improvement seemed minimal. We'll
9561 leave such scheduling issues to the compiler.
9562 * Changed Linux/PowerPC test to also check for __powerpc__ in response
9563 to a discussion on the gcc mailing list.
9564 * Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
9565 (suggested by Matthew Flatt). This was causing problems in
9566 systems that register all of their own roots. It looks far more correct
9567 to me without the "static" anyway.
9568 * Fixed several problems with thread local allocation of pointer-free or
9569 typed objects. The collector was reclaiming thread-local free lists, since
9570 it wasn't following the link fields.
9571 * There was apparently a long-standing race condition related to
9572 multi-threaded incremental collection. A collection could be started and
9573 a thread stopped between the memory unprotect system call and the setting of
9574 the corresponding dirt bit. I believe this did not affect Solaris or PCR,
9575 which use a different dirty-bit implementation. Fixed this by installing
9576 signal handlers with sigaction instead of signal, and disabling the thread
9577 suspend signal while in the write-protect handler. (It is unclear
9578 whether this scenario ever actually occurred.)
9579 * Incremental collection did not cooperate correctly with the PARALLEL_MARK
9580 implementation of GC_malloc_many or the local_malloc primitives. It still
9581 doesn't work well, but it shouldn't lose memory anymore.
9582 * Integrated some changes from the gcc source tree that I had previously
9583 missed (thanks to Bryce McKinlay for the reminder and patch).
9584 * Added Makefile.direct as a copy of the default Makefile, which would
9585 normally be overwritten if configure is run.
9586 * Changed the gc.tar target in Makefile.direct to embed the version number
9587 in the gc directory name. This will affect future tar file distributions.
9588 * Changed the Irix dynamic library finding code to no longer try to
9589 eliminate writable text segments under Irix6.x, since that is probably no
9590 longer necessary, and can apparently be unsafe on occasion (thanks to
9591 Shiro Kawai for pointing this out).
9592 * GC_cleanup with GC_DEBUG enabled passed a real object base address to
9593 GC_debug_register_finalizer_ignore_self, which expected a pointer past the
9594 debug header. Call GC_register_finalizer_ignore_self instead, even with
9595 debugging enabled (thanks to Jean-Daniel Fekete for catching this).
9596 * The collector didn't build with call chain saving enabled but NARGS=0.
9597 * Fixed up the GNU-style build files enough so that they work in some
9598 obvious cases (thanks to Maarten Thibaut).
9599 * Added initial port to Digital Mars compiler for win32 (thanks to Walter
9600 Bright).
9601
9602
9603 == [6.0alpha7] 2001-04-19 ==
9604
9605 * Added GC_finalizer_notifier. Fixed GC_finalize_on_demand. (The variable
9606 actually wasn't being tested at the right points. The build-time flag
9607 was.)
9608 * Added Tom Tromey's S390 Linux patch.
9609 * Added code to push GC_finalize_now in GC_push_finalizer_structures
9610 (thanks to Matthew Flatt).
9611 * Added GC_push_gc_structures() to push all GC internal roots.
9612 * Integrated some FreeBSD changes from Matthew Flatt.
9613 * It looks like USRSTACK is not always correctly defined under Solaris.
9614 Hacked gcconfig.h to attempt to work around the problem. The result
9615 is not well tested. (Thanks again to Matthew Flatt for pointing this out.)
9616 * Added Ji-Yong Chung's win32 threads and C++ fixes.
9617 * Arranged for hpux_test_and_clear.s to no longer be needed or built.
9618 It was causing build problems with gas, and it's not clear this is
9619 better than the pthreads alternative on this platform.
9620 * Some MINGW32 fixes from Hubert Garavel.
9621 * Added initial Hitachi SH4 port from Kaz Kojima.
9622 * Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
9623 * Made include/gc_mark.h more public and separated out the really private
9624 pieces. This is probably still not quite sufficient for clients that
9625 want to supply their own kind of type information. But it's a start.
9626 This involved lots of identifier renaming to make it namespace clean.
9627 * Added GC_dont_precollect for clients that need complete control over
9628 the root set.
9629 * GC_is_visible didn't do the right thing with gcj objects. (Not that
9630 many people are likely to care, but ...)
9631 * Don't redefine read with GC_USE_LD_WRAP.
9632 * Initial port to LINUX/HP_PA. Incremental collection and threads are not
9633 yet supported. (Incremental collection should work if you have the
9634 right kernel. Threads may work with a sufficiently patched pthread
9635 library.)
9636 * Changed gcconfig.h to recognize __i386__ as an alternative to x86 in
9637 many places (thanks to Benjamin Lerman).
9638 * Made win32_threads.c more tolerant of detaching a thread that it didn't
9639 know about (thanks to Paul Nash).
9640 * Added Makefile.am and configure.in from gcc to the distribution, with
9641 minimal changes. For the moment, those are just placeholders. In the
9642 future, we're planning to switch to a GNU-style build environment for
9643 Un*x-like systems, though the old Makefile will remain as a backup.
9644 * Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
9645 option.
9646 * Redistributed some functions between malloc.c and mallocx.c, so that
9647 simple statically linked apps no longer pull in mallocx.o.
9648 * Changed large object allocation to clear the first and last few words
9649 of each block before releasing the lock. Otherwise the marker could see
9650 objects with nonsensical type descriptors.
9651 * Fixed a couple of subtle problems that could result in not recognizing
9652 interior pointers from the stack. (I believe these were introduced
9653 in 6.0alpha6.)
9654 * GC_debug_free_inner called GC_free, which tried to reacquire the
9655 allocator lock, and hence deadlocked. (DBG_HDRS_ALL probably never worked
9656 with threads.)
9657 * Fixed several problems with back traces. Accidental references to a free
9658 list could cause the free list pointer to be overwritten by a back pointer.
9659 There seemed to be some problems with the encoding of root and finalizer
9660 references.
9661
9662
9663 == [6.0alpha6] ==
9664
9665 * Changed the definition of DATASTART on ALPHA and IA64, where data_start
9666 and __data_start are not defined by earlier versions of glibc. This might
9667 need to be fixed on other platforms as well.
9668 * Changed the way the stack base and backing store base are found on IA64.
9669 This should now remain reliable on future kernels. But since it relies
9670 on /proc, it will no longer work in the simulated NUE environment.
9671 * Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
9672 on the OS. On non-Unix systems, rand() should be used instead. Handled
9673 small RAND_MAX (thanks to Peter Ross for pointing this out).
9674 * Fixed the cord make rules to create the cord subdirectory, if necessary
9675 (thanks to Doug Moen).
9676 * Changed fo_object_size calculation in finalize.c. Turned finalization
9677 of non-heap object into a no-op. Removed anachronism from GC_size()
9678 implementation.
9679 * Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
9680 It was missed in a previous renaming (thanks to Vladimir Tsichevski
9681 for pointing this out).
9682 * Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
9683 * Added GC_no_dls hook for applications that want to register their own
9684 roots.
9685 * Integrated Kjetil Matheussen's Amiga changes.
9686 * Added FREEBSD_STACKBOTTOM. Changed the FreeBSD/x86 port to use it
9687 (thanks to Matthew Flatt).
9688 * Added pthread_detach interception for platforms supported by linux_threads.c
9689 and irix_threads.c.
9690 * Changed the USE_MMAP code to check for the case in which we got the
9691 high end of the address space, i.e. mem_ptr + mem_sz == 0. It appears
9692 that this can happen under Solaris 7. It seems to be allowed by what
9693 I would claim is an oversight in the mmap specification. (Thanks to
9694 Toshio Endo for pointing out the problem.)
9695 * Cleanup of linux_threads.c. Some code was originally cloned from
9696 irix_threads.c and now unnecessary. Some comments were obviously wrong.
9697 * (Mostly) fixed a longstanding problem with setting of dirty bits from
9698 a signal handler. In the presence of threads, dirty bits could get lost,
9699 since the getting of a bit in the bit vector was not atomic with respect
9700 to other updates. The fix is 100% correct only for platforms for which
9701 GC_test_and_set is defined. The goal is to make that all platforms with
9702 thread support. Matters only if incremental GC and threads are both
9703 enabled.
9704 * made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
9705 initialization time, instead of build-time option. This is a
9706 nontrivial, high risk change. It should slow down the code measurably
9707 only if MERGE_SIZES is not defined, which is a very nonstandard
9708 configuration.
9709 * Added doc/README.environment, and implemented what it describes. This
9710 allows a number of additional configuration options to be set through
9711 the environment. It documents a few previously undocumented options.
9712 * Integrated Eric Benson's leak testing improvements.
9713 * Removed the option to throw away the beginning of each page (DISCARD_WORDS).
9714 This became less and less useful as processors enforce stricter alignment.
9715 And it hadn't been tested in ages, and was thus probably broken anyway.
9716
9717
9718 == [6.0alpha5] ==
9719
9720 * Changed the definition of GC_pause in linux_threads.c to use a volatile
9721 asm. Some versions of gcc apparently optimize away writes to local volatile
9722 variables. This caused poor locking behavior starting at about
9723 4 processors.
9724 * Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
9725 to linux_threads.c.
9726 The first two calls could be used to generally avoid sending GC signals to
9727 blocked threads, avoiding both premature wakeups and unnecessary overhead.
9728 * Fixed a serious bug in thread-local allocation. At thread termination,
9729 GC_free could get called on small integers. Changed the code for thread
9730 termination to more efficiently return left-over free-lists.
9731 * Integrated Kjetil Matheussen's BeOS support.
9732 * Rearranged the directory structure to create the doc and tests
9733 subdirectories.
9734 * Sort of integrated Eric Benson's patch for OSF1. This provided basic
9735 OSF1 thread support by suitably extending hpux_irix_threads.c. Based
9736 on earlier email conversations with David Butenhof, I suspect that it
9737 will be more reliable in the long run to base this on linux_threads.c
9738 instead. Thus I attempted to patch up linux_threads.c based on Eric's code.
9739 The result is almost certainly broken, but hopefully close enough that
9740 someone with access to a machine can pick it up.
9741 * Integrated lots of minor changes from the NetBSD distribution. (These
9742 were supplied by David Brownlee. I'm not sure about the original
9743 authors.)
9744 * Hacked a bit more on the HP/UX thread-support in linux_threads.c. It
9745 now appears to work in the absence of incremental collection. Renamed
9746 hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
9747 support HPUX there.
9748 * Changed gc.h to define _REENTRANT in cases in which it should already
9749 have been defined. It is still safer to also define it on the command
9750 line.
9751
9752
9753 == [6.0alpha4] ==
9754
9755 * Moved up the detection of mostly full blocks to the initiation of the
9756 sweep phase. This eliminates some lock contention in the PARALLEL_MARK case,
9757 as multiple threads try to look at mostly full blocks concurrently.
9758 * Restored the code in GC_malloc_many that grabs a prefix of the global
9759 free list. This avoids the case in which every GC_malloc_many call
9760 tries and fails to allocate a new heap block, and the returns a single
9761 object from the global free list.
9762 * Some minor fixes in new_hblk.c. (Attempted to build free lists in order
9763 of increasing addresses instead of decreasing addresses for cache performance
9764 reasons. But this seems to be only a very minor gain with -DEAGER_SWEEP,
9765 and a loss in other cases. So the change was backed out.)
9766 * Fixed some of the documentation (thanks in large part to Fergus Henderson).
9767 * Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
9768 large numbers of mmaps (thanks to Eric Benson). Also fixed that code to
9769 deal with short reads.
9770 * Added GC_get_total_bytes().
9771 * Fixed leak detection mode to avoid spurious messages under linuxthreads.
9772 (This should also now be easy for the other supported threads packages.
9773 But the code is tricky enough that I'm hesitant to do it without being able
9774 to test. Everything allocated in the GC thread support itself should be
9775 explicitly deallocated.)
9776 * Made it possible (with luck) to redirect malloc to GC_local_malloc.
9777
9778
9779 == [6.0alpha3] 2000-09-26 ==
9780
9781 * Fixed the /proc/self/maps code to not seek, since that apparently is not
9782 reliable across all interesting kernels.
9783 * Fixed some compilation problems in the absence of PARALLEL_MARK
9784 (introduced in alpha2).
9785 * Fixed an algorithmic problem with PARALLEL_MARK. If work needs to
9786 be given back to the main mark "stack", the BOTTOM entries of the local
9787 stack should be given away, not the top ones. This has substantial
9788 performance impact, especially for > 2 processors, from what I can tell.
9789 * Extracted gc_lock.h from gc_priv.h. This should eventually make it a
9790 bit easier to avoid including gc_priv.h in clients.
9791 * Moved all include files to include/ and removed duplicate links to the
9792 same file. The old scheme was a bad idea because it was too easy to get the
9793 copies out of sync, and many systems don't support hard links.
9794 Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
9795 the process, although I tried to update them appropriately.
9796 * Removed the partial support for a copied nursery. It's not clear that
9797 this would be a tremendous win, since we don't consistently lose to
9798 generational copying collectors. And it would significantly complicate
9799 many things. May be reintroduced if/when it really turns out to win.
9800 * Removed references to IRIX_JDK_THREADS, since I believe there never
9801 were and never will be any clients.
9802 * Added some code to linux_threads.c to possibly support HPUX threads
9803 using the Linux code. Unfortunately, it doesn't work yet, and is
9804 currently disabled.
9805 * Added support under Linux/x86 for saving the call chain, both in (debug)
9806 objects for client debugging, and in GC_arrays._last_stack for GC
9807 debugging. This was previously supported only under Solaris. It is
9808 not enabled by default under x86, since it requires that code be compiled
9809 to explicitly gave frame pointers on the call stack. (With gcc this
9810 currently happens by default, but is often turned off explicitly.)
9811 To turn it on, define SAVE_CALL_CHAIN.
9812
9813
9814 == [6.0alpha2] ==
9815
9816 * Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
9817 for which that's expensive.
9818 * Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
9819 * Added a missing volatile to OR_WORD and renamed the parameter to
9820 GC_compare_and_swap so it's not a C++ reserved word (thanks to
9821 Toshio Endo for pointing out both of those).
9822 * Changed Linux dynamic library registration code to look at /proc/self/maps
9823 instead of the rld data structures when REDIRECT_MALLOC is defined.
9824 Otherwise some of the rld data data structures may be prematurely garbage
9825 collected.
9826 * Fixed USE_LD_WRAP a bit more, so it should now work without threads.
9827 * Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
9828 Temporarily added some backward compatibility definitions. Renamed
9829 USE_LD_WRAP to GC_USE_LD_WRAP.
9830 * Many MACOSX POWERPC changes, some additions to the gctest output, and
9831 a few minor generic bug fixes (thanks to Dietmar Planitzer).
9832
9833
9834 == [6.0alpha1] ==
9835
9836 * Added HP/PA prefetch support.
9837 * Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
9838 the reliability of generating pointer backtrace information, e.g. in
9839 the Bigloo environment.
9840 * Added parallel marking support (-DPARALLEL_MARK). This currently
9841 works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
9842 to other platforms. This is intended to be a lighter-weight (less
9843 new code, probably not as scalable) solution than the work by Toshio Endo
9844 et al, at the University of Tokyo. A number of their ideas were
9845 reused, though the code wasn't, and the underlying data structure
9846 is significantly different. In particular, we keep the global mark
9847 stack as a single shared data structure, but most of the work is done
9848 on smaller thread-local mark stacks.
9849 * Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
9850 with -DPARALLEL_MARK.
9851 * Added full support for thread local allocation under Linux
9852 (-DTHREAD_LOCAL_ALLOC). This is a thin veneer on GC_malloc_many, and
9853 should be easily portable to other platforms, especially those that
9854 support pthreads.
9855 * CLEAR_DOUBLE was not always getting invoked when it should have been.
9856 * GC_gcj_malloc and friends used different out of memory handling than
9857 everything else, probably because I forgot about one when I implemented
9858 the other. They now both call GC_oom_fn(), not GC_oom_action().
9859 * Integrated Jakub Jelinek's fixes for Linux/SPARC.
9860 * Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
9861 GC_arrays, and separately registered the first two as excluded roots.
9862 This makes code compiled with gc_inl.h less dependent on the
9863 collector version. (It would be nice to remove the inclusion of
9864 gc_priv.h by gc_inl.h completely, but we're not there yet. The
9865 locking definitions in gc_priv.h are still referenced.)
9866 This change was later conditioned on SEPARATE_GLOBALS, which
9867 is not defined by default, since it involves a performance hit.
9868 * Register GC_obj_kinds separately as an excluded root region. The
9869 attempt to register it with GC_arrays was usually failing. (This wasn't
9870 serious, but seemed to generate some confusion.)
9871 * Moved backptr.h to gc_backptr.h.
9872
9873
9874 == [5.4] ==
9875
9876 * Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
9877 Shawn Wagner for actually testing this).
9878 * Fixed GC_is_thread_stack in solaris_threads.c. It forgot to return a value
9879 in the common case.
9880 * Fixed another silly syntax problem in GC_double_descr (thanks to
9881 Fergus Henderson for finding it).
9882 * Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
9883
9884
9885 == [5.3] 2000-09-24 ==
9886
9887 * Fixed _end declaration for OSF1.
9888 * There were lots of spurious leak reports in leak detection mode, caused
9889 by the fact that some pages were not being swept, and hence unmarked
9890 objects weren't making it onto free lists. (This bug dated back to 5.0.)
9891 * Fixed a typo in the liblinuxgc.so Makefile rule.
9892 * Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
9893 around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
9894
9895
9896 == [5.2] ==
9897
9898 * dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
9899 was defined as a macro. This prevented the collector from building on
9900 Irix.
9901 * We quietly assumed that indirect mark descriptors were never 0.
9902 Our own typed allocation interface violated that. This could result
9903 in segmentation faults in the marker with typed allocation.
9904 * Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
9905 Ben Hutchings for the patch).
9906 * Taught the collector about VC++ handling array operator new (thanks to
9907 Ben Hutchings for the patch).
9908 * The two copies of gc_hdrs.h had diverged. Made one a link to the other
9909 again.
9910
9911
9912 == [5.1] ==
9913
9914 * Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
9915 * Fixed a typo in GC_double_descr in typd_mlc.c.
9916 This probably could result in objects described by array descriptors not
9917 getting traced correctly (thanks to Ben Hutchings for pointing this out).
9918 * The block nearly full tests in reclaim.c were not correct for 64 bit
9919 environments. This could result in unnecessary heap growth under unlikely
9920 conditions.
9921
9922
9923 == [5.0] ==
9924
9925 * Fixed threadlibs.c for linux threads. -DUSE_LD_WRAP was broken and
9926 -ldl was omitted. Fixed Linux stack finding code to handle
9927 -DUSE_LD_WRAP correctly.
9928 * Added MSWIN32 exception handler around marker, so that the collector
9929 can recover from root segments that are unmapped during the collection.
9930 This caused occasional failures under Windows 98, and may also be
9931 an issue under Windows NT/2000.
9932
9933
9934 == [5.0alpha7] ==
9935
9936 * -DREDIRECT_MALLOC was broken in alpha6. Fixed.
9937 * Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
9938 accept it.
9939 * Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
9940 linked into every executable.
9941 * Added PREFETCH to bitmap marker. Changed it to use the header cache.
9942 * GC_push_marked sometimes pushed one object too many, resulting in a
9943 segmentation fault in GC_mark_from_mark_stack. This was probably an old
9944 bug. It finally showed up in gctest on win32.
9945 * Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
9946 when SMALL_CONFIG was defined. This was no doubt a major performance bug for
9947 the default win32 configuration.
9948 * Removed -DSMALL_CONFIG from NT_MAKEFILE. It seemed like an anachronism now
9949 that the average PC has 64MB or so.
9950 * Integrated Bryce McKinlay's patches for linux threads and dynamic loading
9951 from the libgcj tree. Turned on dynamic loading support for Linux/PPC.
9952 * Changed the stack finding code to use environ on HP/UX (thanks
9953 to Gustavo Rodriguez-Rivera for the suggestion). This should
9954 probably be done on other platforms, too. Since I can't test those, that'll
9955 wait until after 5.0.
9956
9957
9958 == [5.0alpha6] ==
9959
9960 * GC_malloc_explicitly_typed and friends sometimes failed to
9961 initialize first word.
9962 * Added allocation routines and support in the marker for mark descriptors
9963 in a type structure referenced by the first word of an object. This was
9964 introduced to support gcj, but hopefully in a way that makes it
9965 generically useful.
9966 * Added GC_requested_heapsize, and inhibited collections in non-incremental
9967 mode if the actual used heap size is less than what was explicitly
9968 requested.
9969 * The Solaris pthreads version of GC_pthread_create didn't handle a NULL
9970 attribute pointer. Solaris thread support used the wrong default thread
9971 stack size (thanks to Melissa O'Neill for the patch).
9972 * Changed PUSH_CONTENTS macro to no longer modify first parameter.
9973 This usually doesn't matter, but it was certainly an accident waiting
9974 to happen ...
9975 * Added GC_register_finalizer_no_order and friends to gc.h. They're
9976 needed by Java implementations.
9977 * Integrated a fix for a win32 deadlock resulting from clock() calling
9978 malloc (thanks to Chris Dodd).
9979 * Integrated Hiroshi Kawashima's port to Linux/MIPS. This was designed
9980 for a handheld platform, and may or may not be sufficient for other
9981 machines.
9982 * Fixed a va_arg problem with the %c specifier in cordprnt.c. It appears
9983 that this was always broken, but recent versions of gcc are the first to
9984 report the (statically detectable) bug.
9985 * Added an attempt at a more general solution to dlopen races/deadlocks.
9986 GC_dlopen now temporarily disables collection. Still not ideal, but ...
9987 * Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
9988 prefetch instructions. May improve performance measurably, but I'm not
9989 sure the code will run correctly on processors that don't support the
9990 instruction. Won't build except with very recent gcc.
9991 * Added caching for header lookups in the marker. This seems to result
9992 in a barely measurable performance gain. Added support for interleaved
9993 lookups of two pointers, but unconfigured that since the performance
9994 gain is currently near zero, and it adds to code size.
9995 * Changed Linux DATASTART definition to check both data_start and
9996 __data_start, since nothing else seems to be portable.
9997 * Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
9998 wrapping mechanism. Probably currently useful only on Linux.
9999 * Moved some variables for the scratch allocator into GC_arrays (suggested
10000 by Martin Hirzel).
10001 * Fixed a win32 threads bug that caused the collector to not look for
10002 interior pointers from one of the thread stacks without
10003 ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
10004 * Added Mingw32 support (thanks to Jeff Sturm for the patch).
10005 * Changed the alpha port to use the generic register scanning code instead
10006 of alpha_mach_dep.s. Alpha_mach_dep.s doesn't look for pointers in fp
10007 registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
10008 for helping debug this). Changed the IA64 code to
10009 do something similar for similar reasons.
10010
10011
10012 == [5.0alpha4] 1999-10-30 ==
10013
10014 * Added protection fault handling patch for Linux/M68K from Fergus
10015 Henderson and Roman Hodek.
10016 * Removed the tests for SGI_SOURCE in new_gc_alloc.h. This was causing that
10017 interface to fail on non-SGI platforms.
10018 * Changed the Linux stack finding code to use /proc, after changing it
10019 to use HEURISTIC1 (thanks to David Mosberger for pointing out /proc hook).
10020 * Added HP/UX incremental GC support and HP/UX 11 thread support.
10021 Thread support is currently still flaky.
10022 * Added basic Linux/IA64 support.
10023 * Integrated Anthony Green's PicoJava support.
10024 * Integrated Scott Ananian's StrongARM/NetBSD support.
10025 * Fixed some fairly serious performance bugs in the incremental
10026 collector. These have probably been there essentially forever.
10027 (Mark bits were sometimes set before scanning dirty pages.
10028 The reclaim phase unnecessarily dirtied full small object pages.)
10029 * Changed the reclaim phase to ignore nearly full pages to avoid
10030 touching them.
10031 * Limited GC_black_list_spacing to roughly the heap growth increment.
10032 * Changed full collection triggering heuristic to decrease full GC
10033 frequency by default, but to explicitly trigger full GCs during
10034 heap growth. This doesn't always improve things, but on average it's
10035 probably a win.
10036 * GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
10037 bug report and fix).
10038
10039
10040 == [5.0alpha3] 1999-09-15 ==
10041
10042 (Also known as 4.15alpha3.)
10043 * Added some highly incomplete code to support a copied young generation.
10044 Comments on nursery.h are appreciated.
10045 * Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
10046 so the same effect could be obtained with a runtime switch. This is
10047 a step towards standardizing on a single dynamic GC library.
10048 * Significantly changed the way leak detection is handled, as a consequence
10049 of the above.
10050
10051
10052 == [5.0alpha2] 1999-07-23 ==
10053
10054 * Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
10055 * Added -DKEEP_BACK_PTRS and backptr.h interface. (The implementation
10056 idea came from Alan Demers.)
10057
10058
10059 == [5.0alpha1] 1999-06-30 ==
10060
10061 (Also known as 4.15alpha1.)
10062 * Reworked large block allocator. Now uses multiple doubly linked free
10063 lists to approximate best fit.
10064 * Changed heap expansion heuristic. Entirely free blocks are no longer
10065 counted towards the heap size. This seems to have a major impact on
10066 heap size stability; the old version could expand the heap way too
10067 much in the presence of large block fragmentation.
10068 * added -DGC_ASSERTIONS and some simple assertions inside the collector.
10069 This is mainlyt for collector debugging.
10070 * added -DUSE_MUNMAP to allow the heap to shrink. Supported on only
10071 a few UNIX-like platforms for now.
10072 * added GC_dump_regions() for debugging of fragmentation issues.
10073 * Changed PowerPC pointer alignment under Linux to 4.
10074 * Changed the Linux/Alpha port to walk the data segment backwards until
10075 it encounters a SIGSEGV. The old way to find the start of the data
10076 segment broke with a recent release.
10077 * cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
10078 GC_register_finalizer, so that it would continue to work with GC_DEBUG.
10079 * allochblk sometimes cleared the wrong block for debugging purposes
10080 when it dropped blacklisted blocks. This could result in spurious
10081 error reports with GC_DEBUG.
10082 * added MACOS X Server support (thanks to Andrew Stone).
10083 * Changed the Solaris threads code to ignore stack limits > 8 MB with
10084 a warning. Empirically, it is not safe to access arbitrary pages
10085 in such large stacks. And the dirty bit implementation does not
10086 guarantee that none of them will be accessed.
10087 * Integrated Martin Tauchmann's Amiga changes.
10088 * Integrated James Dominy's OpenBSD/SPARC port.
10089
10090
10091 == [4.14] 1999-04-16 ==
10092
10093 * changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
10094
10095
10096 == [4.14alpha2] 1999-03-26 ==
10097
10098 * -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
10099 Recycling the mark stack during expansion could result in a size
10100 zero heap segment, which confused things. (This was probably also an
10101 issue with the normal config and huge pages.)
10102 * Did more work to make sure that callee-save registers were scanned
10103 completely, even with the setjmp-based code. Added USE_GENERIC_PUSH_REGS
10104 macro to facilitate testing on machines I have access to.
10105 * Added code to explicitly push register contents for win32 threads.
10106 This seems to be necessary. (Thanks to Pierre de Rop.)
10107
10108
10109 == [4.14alpha1] 1999-03-10 ==
10110
10111 * Fixed GC_print_source_ptr to not use a prototype.
10112 * generalized CYGWIN test.
10113 * gc::new did the wrong thing with PointerFreeGC placement (thanks to
10114 Rauli Ruohonen).
10115 * In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
10116 values could fail to be scanned if the register was saved and
10117 reused in a GC frame. This showed up in verbose mode with gctest
10118 compiled with an unreleased SGI compiler. I vaguely recall an old
10119 bug report that may have been related. The bug was probably quite old.
10120 (The problem was that the stack scanning could be deferred until
10121 after the relevant frame was overwritten, and the new save location
10122 might be outside the scanned area. Fixed by more eager stack scanning.)
10123 * PRINT_BLACK_LIST had some problems. A few source addresses were garbage.
10124 * Replaced Makefile.dj and added -I flags to cord make targets (thanks to
10125 Gary Leavens).
10126 * GC_try_to_collect was broken with the non-incremental collector.
10127 * gc_cleanup destructors could pass the wrong address to
10128 GC_register_finalizer_ignore_self in the presence of multiple
10129 inheritance (thanks to Darrell Schiebel).
10130 * Changed PowerPC Linux stack finding code.
10131
10132
10133 == [4.13] 1999-02-19 ==
10134
10135 * Fixed a crucial bug in the Watcom port. There was a redundant declaration
10136 of GC_push_one in gc_priv.h.
10137 * Added FINALIZE_ON_DEMAND.
10138 * Fixed some pre-ANSI cc problems in test.c.
10139 * Removed getpagesize() use for Solaris. It seems to be missing in one
10140 or two versions.
10141 * Fixed bool handling for SPARCCompiler version 4.2.
10142 * Fixed some files in include that had gotten unlinked from the main
10143 copy.
10144 * Some RS/6000 fixes (missing casts). (Thanks to Toralf Foerster.)
10145 * Fixed several problems in GC_debug_realloc, affecting mostly the
10146 FIND_LEAK case.
10147 * GC_exclude_static_roots contained a buggy unsigned comparison to
10148 terminate a loop (thanks to Wilson Ho).
10149 * CORD_str failed if the substring occurred at the last possible position.
10150 (Only affects cord users.)
10151 * Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
10152 os_dep.c code for dealing with various Linux versions.
10153 * Added workaround for Irix pthreads sigaction bug and possible signal
10154 misdirection problems.
10155
10156
10157 == [4.13alpha3] 1998-12-08 ==
10158
10159 * Fixed MSWIN32 recognition test, which interfered with cygwin.
10160 * Removed unnecessary gc_watcom.asm from distribution. Removed
10161 some obsolete README.win32 text.
10162 * Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
10163 for code for retrieving the fault address in a signal handler).
10164 Changed Linux signal handler context argument to be a pointer.
10165 * Took care of some new warnings generated by the 7.3 SGI compiler.
10166 * Integrated Phillip Musumeci's FreeBSD/ELF fixes.
10167 * -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
10168
10169
10170 == [4.13alpha2] 1998-08-08 ==
10171
10172 * Fixed more Linux threads problems.
10173 * Changed default GC_free_space_divisor to 3 with new large block allocation
10174 (thanks to Matthew Flatt for some measurements that suggest the old
10175 value sometimes favors space too much over time).
10176 * More CYGWIN32 fixes.
10177 * Integrated Tyson Dowd's Linux-M68K port.
10178 * Minor HP PA and DEC UNIX fixes from Fergus Henderson.
10179 * Integrated Christoffe Raffali's Linux-SPARC changes.
10180 * Allowed for one more GC fixup iteration after a full GC in incremental
10181 mode. Some quick measurements suggested that this significantly
10182 reduces pause times even with smaller GC_RATE values.
10183 * Moved some more GC data structures into GC_arrays. This decreases
10184 pause times and GC overhead, but makes debugging slightly less convenient.
10185 * Fixed namespace pollution problem ("excl_table").
10186 * Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
10187 that slightly.
10188 * Added some win32 threads fixes.
10189 * Integrated Ivan Demakov and David Stes' Watcom fixes.
10190 * Various other minor fixes contributed by many people.
10191 * Renamed config.h to gcconfig.h, since config.h tends to be used for
10192 many other things.
10193 * Integrated Matthew Flatt's support for 68K MacOS "far globals".
10194 * Fixed up some of the dynamic library Makefile targets for consistency
10195 across platforms.
10196 * Fixed a USE_MMAP typo that caused out-of-memory handling to fail
10197 on Solaris.
10198 * Added code to test.c to test thread creation a bit more.
10199 * Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
10200 * Fixed Solaris 2.7 stack base finding problem. (This may actually
10201 have been done in an earlier alpha release.)
10202
10203
10204 == [4.13alpha1] 1998-02-17 ==
10205
10206 * Changed RS6000 STACKBOTTOM.
10207 * Integrated Patrick Beard's Mac changes.
10208 * Alpha1 didn't compile on Irix m.n, m < 6.
10209 * Replaced Makefile.dj with a new one from Gary Leavens.
10210 * Added Andrew Stitcher's changes to support SCO OpenServer.
10211 * Added PRINT_BLACK_LIST, to allow debugging of high densities of false
10212 pointers.
10213 * Added code to debug allocator to keep track of return address
10214 in GC_malloc caller, thus giving a bit more context.
10215 * Changed default behavior of large block allocator to more
10216 aggressively avoid fragmentation. This is likely to slow down the
10217 collector when it succeeds at reducing space cost.
10218 * Integrated Fergus Henderson's CYGWIN32 changes. They are untested,
10219 but needed for newer versions.
10220 * USE_MMAP had some serious bugs. This caused the collector to fail
10221 consistently on Solaris with -DSMALL_CONFIG.
10222 * Added Linux threads support (thanks to Fergus Henderson).
10223
10224
10225 == [4.12] 1997-08-26 ==
10226
10227 * Fixed ElfW definition in dyn_load.c.
10228 This prevented the dynamic library support from compiling on some
10229 older ELF Linux systems.
10230 * Fixed UTS4 port (which I apparently mangled during the integration).
10231 (Thanks to Alistair Crooks.)
10232 * "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
10233 Fixed in gc_priv.h.
10234 * Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
10235 The current state of things should suffice for at least some
10236 applications.
10237 * Changed the out of memory retry count handling. (This matters only
10238 if GC_max_retries > 0, which is no longer the default.)
10239 * If a /proc read failed repeatedly, GC_written_pages was not updated
10240 correctly (thanks to Peter Chubb for diagnosing this).
10241 * Under unlikely circumstances, the allocator could infinite loop in
10242 an out of memory situation (thanks to Kenjiro Taura for
10243 identifying the problem and supplying a fix).
10244 * Fixed a syntactic error in the DJGPP code. Also fixed a test program
10245 problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
10246 * Atomic uncollectible objects were not treated correctly by the
10247 incremental collector. This resulted in weird log statistics and
10248 occasional performance problems (thanks to Peter Chubb for pointing this out).
10249 * Fixed some problems resulting from compilers that don't define
10250 __STDC__. In this case void * and char * were used inconsistently
10251 in some cases. (Void * should not have been used at all. If
10252 you have an ANSI superset compiler that does not define __STDC__,
10253 please compile with -D__STDC__=0. Thanks to Manuel Serrano and others
10254 for pointing out the problem.)
10255 * Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
10256 Also fixed some other IRIX_THREADS problems which may or may not have
10257 had observable symptoms.
10258 * Fixed an HP PA compilation problem in dyn_load.c (thanks to
10259 Philippe Queinnec).
10260 * SEGV fault handlers sometimes did not get reset correctly (thanks
10261 to David Pickens).
10262 * Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
10263 This probably needs more work to become functional.
10264 * Fixed struct sigcontext_struct in os_dep.c for compilation under
10265 Linux 2.1.X (thanks to Fergus Henderson).
10266 * Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
10267 (by Kristian Kristensen). These may still not be right, but it is
10268 it is likely to work more often than what was there before. They may
10269 even be exactly right.
10270 * Added a #include <string.h> to test_cpp.cc. This appears to help
10271 with HP/UX and gcc (thanks to Assar Westerlund).
10272 * Version 4.11 failed to run in incremental mode on recent 64-bit Irix
10273 kernels. This was a problem related to page unaligned heap segments.
10274 Changed the code to page align heap sections on all platforms.
10275 (I had mistakenly identified this as a kernel problem earlier.
10276 It was not.)
10277 * Version 4.11 did not make allocated storage executable, except on
10278 one or two platforms, due to a bug in a #if test (thanks to David Grove
10279 for pointing this out).
10280 * Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
10281 * Added GC_exclude_static_roots.
10282 * Fixed the object size mapping algorithm. This shouldn't matter,
10283 but the old code was ugly.
10284 * Heap checking code could die if one of the allocated objects was
10285 larger than its base address. (Unsigned underflow problem. Thanks
10286 to Clay Spence for isolating the problem.)
10287 * Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
10288 to Fred Stearns).
10289 * Added Fergus Henderson's patches for improved robustness with large
10290 heaps and lots of blacklisting.
10291 * Added Peter Chubb's changes to support Solaris Pthreads, to support
10292 MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
10293 through /proc, to add malloc_typed_ignore_off_page, and a few other
10294 minor features and bug fixes.
10295 * The Solaris 2 port should not use sbrk. I received confirmation from
10296 Sun that the use of sbrk and malloc in the same program is not
10297 supported. The collector now defines USE_MMAP by default on Solaris.
10298 * Replaced the djgpp makefile with Gary Leavens' version.
10299 * Fixed MSWIN32 detection test.
10300 * Added Fergus Henderson's patches to allow putting the collector into
10301 a DLL under GNU win32.
10302 * Added Ivan V. Demakov's port to Watcom C on x86.
10303 * Added Ian Piumarta's Linux/PowerPC port.
10304 * Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
10305 Brian Burton). This is of course unsafe, and may be controversial.
10306 On the other hand, it seems to be needed often enough that it's worth
10307 adding as a standard facility.
10308 * Add Lars Farm's suggestions on building the collector for MacOS.
10309
10310
10311 == [4.12alpha2] ==
10312
10313 (Changes not specified.)
10314
10315
10316 == [4.11] 1996-12-03 ==
10317
10318 * Rationalized (hopefully) GC_try_to_collect in an incremental collection
10319 environment. It appeared to not handle a call while a collection was in
10320 progress, and was otherwise too conservative.
10321 * Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
10322 code.
10323 * Added Patrick Beard's Mac fixes, with substantial completely untested
10324 modifications.
10325 * Fixed the MPROTECT_VDB code to deal with large pages and imprecise
10326 fault addresses (as on an UltraSPARC running Solaris 2.5). Note that this
10327 was not a problem in the default configuration, which uses PROC_VDB.
10328 * The DEC Alpha assembly code needed to restore $gp between calls (thanks to
10329 Fergus Henderson for tracking this down and supplying a patch).
10330 * The write command for "de" was completely broken for large files.
10331 I used the easiest portable fix, which involved changing the semantics
10332 so that f.new is written instead of overwriting f. That's safer anyway.
10333 * Added README.solaris2 with a discussion of the possible problems of
10334 mixing the collector's sbrk allocation with malloc/realloc.
10335 * Changed the data segment starting address for SGI machines. The
10336 old code failed under IRIX6.
10337 * Required double word alignment for MIPS.
10338 * Various minor fixes to remove warnings.
10339 * Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
10340 In particular, the collector could try to fork a thread with the
10341 world stopped as part of GC_thr_init. It also failed to deal with
10342 the case in which the original thread terminated before the whole
10343 process did.
10344 * Added -DNO_EXECUTE_PERMISSION. This has a major performance impact
10345 on the incremental collector under Irix, and perhaps under other
10346 operating systems.
10347 * Added some code to support allocating the heap with mmap. This may
10348 be preferable under some circumstances.
10349 * Integrated dynamic library support for HP (thanks to Knut Tvedten).
10350 * Integrated James Clark's win32 threads support, and made a number
10351 of changes to it (many of which suggested by Pontus Rydin). This is still
10352 not 100% solid.
10353 * Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
10354 370-class machine.
10355 * Fixed a serious bug in explicitly typed allocation. Objects requiring
10356 large descriptors where handled in a way that usually resulted in
10357 a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
10358 for helping to track this down).
10359 * Added partial support for GNU win32 development (thanks to
10360 Fergus Henderson).
10361 * Added optional support for Java-style finalization semantics (thanks to
10362 Patrick Bridges). This is recommended only for Java implementations.
10363 * GC_malloc_uncollectable faulted instead of returning 0 when out of
10364 memory (thanks to Daniel R. Grayson for noticing).
10365 * Calls to GC_base before the collector was initialized failed on a
10366 DEC Alpha (thanks to Matthew Flatt).
10367 * Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
10368 (thanks to Jeremy Fitzhardinge).
10369 * GC_debug_realloc failed for uncollectible objects (thanks to
10370 Jeremy Fitzhardinge).
10371 * Explicitly typed allocation could crash if it ran out of memory (thanks to
10372 Jeremy Fitzhardinge).
10373 * Added minimal support for a DEC Alpha running Linux.
10374 * Fixed a problem with allocation of objects whose size overflowed
10375 ptrdiff_t. (This now fails unconditionally, as it should.)
10376 * Added the beginning of Irix pthread support.
10377 * Integrated Xiaokun Zhu's fixes for djgpp 2.01.
10378 * Added SGI-style STL allocator support (gc_alloc.h).
10379 * Fixed a serious bug in README.solaris2.
10380 Multi-threaded programs must include
10381 gc.h with SOLARIS_THREADS defined.
10382 * Changed GC_free so it actually deallocates uncollectible objects (thanks
10383 to Peter Chubb for pointing out the problem).
10384 * Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
10385 * Changed the Borland cc configuration so that the assembler is not
10386 required.
10387 * Fixed a bug in the C++ test that caused it to fail in 64-bit
10388 environments.
10389
10390
10391 == [4.10t3] 1996-11-18 ==
10392
10393 Some changes related to threads support.
10394
10395
10396 == [4.10] 1996-02-19 ==
10397
10398 * Fixed a typo around a call to GC_collect_or_expand in alloc.c. It broke
10399 handling of out of memory. (Thanks to Patrick C. Beard for noticing.)
10400
10401
10402 == [4.9] 1996-02-12 ==
10403
10404 * More README.debugging fixes.
10405 * Objects ready for finalization, but not finalized in the same GC
10406 cycle, could be prematurely collected. This occasionally happened
10407 in test_cpp.
10408 * Too little memory was obtained from the system for very large
10409 objects. That could cause a heap explosion if these objects were
10410 not contiguous (e.g. under PCR), and too much of them was blacklisted.
10411 * Due to an improper initialization, the collector was too hesitant to
10412 allocate blacklisted objects immediately after system startup.
10413 * Moved GC_arrays from the data into the bss segment by not explicitly
10414 initializing it to zero. This significantly
10415 reduces the size of executables, and probably avoids some disk accesses
10416 on program startup. It's conceivable that it might break a port that I
10417 didn't test.
10418 * Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
10419 occurred a while ago.
10420
10421
10422 == [4.8] 1995-11-20 ==
10423
10424 * Changed a "comment" in a MacOS specific part of mach_dep.c that caused
10425 gcc to fail on other platforms.
10426
10427
10428 == [4.7] 1995-11-18 ==
10429
10430 * Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
10431 * Updated some Mac specific files (to synchronize with Patrick C. Beard).
10432 * Fixed a serious bug for machines with non-word-aligned pointers.
10433 (Thanks to Patrick C. Beard for pointing out the problem. The collector
10434 should fail almost any conceivable test immediately on such machines.)
10435
10436
10437 == [4.6] 1995-11-09 ==
10438
10439 * Added Linux ELF support (thanks to Arrigo Triulzi).
10440 * GC_base crashed if it was called before any other GC_ routines.
10441 This could happen if a gc_cleanup object was allocated outside the heap
10442 before any heap allocation.
10443 * The heap expansion heuristic was not stable if all objects had finalization
10444 enabled. Fixed finalize.c to count memory in finalization queue and
10445 avoid explicit deallocation. Changed alloc.c to also consider this count.
10446 (This is still not recommended. It's expensive if nothing else. Thanks
10447 to John Ellis for pointing this out.)
10448 * GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
10449 this out).
10450 * The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
10451 pointing this out). The current workaround is ugly, but expected to be
10452 temporary.
10453 * Fixed a formatting problem for SPARC stack traces.
10454 * Fixed some '=='s in os_dep.c that should have been assignments.
10455 Fortunately these were in code that should never be executed anyway (thanks
10456 to Fergus Henderson).
10457 * Fixed the heap block allocator to only drop blacklisted blocks in small
10458 chunks. Made BL_LIMIT self adjusting. (Both of these were in response
10459 to heap growth observed by Paul Graham.)
10460 * Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
10461 Patrick C. Beard).
10462 * Significantly updated README.debugging.
10463 * Fixed some problems with longjmps out of signal handlers, especially under
10464 Solaris. Added a workaround for the fact that siglongjmp doesn't appear to
10465 do the right thing with -lthread under Solaris.
10466 * Added MSDOS/djgpp port (thanks to Mitch Harris).
10467 * Added "make reserved_namespace" and "make user_namespace". The
10468 first renames ALL "GC_xxx" identifiers as "_GC_xxx". The second is the
10469 inverse transformation. Note that doing this is guaranteed to break all
10470 clients written for the other names.
10471 * descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
10472 defined should be -ALIGNMENT not WORDS_TO_BYTES(-1). This is
10473 a serious bug on machines with pointer alignment of less than a word.
10474 * GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
10475 end of the object correctly. Caused failures of the C++ test on a DEC Alpha
10476 with g++.
10477 * gc_inl.h still had problems. Partially fixed. Added warnings at the
10478 beginning to hopefully specify the remaining dangers.
10479 * Added DATAEND definition to config.h.
10480 * Fixed some of the .h file organization. Fixed "make floppy".
10481
10482
10483 == [4.5] 1995-06-14 ==
10484
10485 * Fixed many minor and one major README bugs (thanks to Franklin Chen
10486 for pointing out many of them).
10487 * Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
10488 * Added incremental GC support (MPROTECT_VDB) for Linux (with some
10489 help from Bruno Haible).
10490 * Altered SPARC recognition tests in gc.h and config.h (mostly as
10491 suggested by Fergus Henderson).
10492 * Added basic incremental GC support for win32, as implemented by
10493 Windows NT and Windows 95. GC_enable_incremental is a no-op
10494 under win32s, which doesn't implement enough of the VM interface.
10495 * Added -DLARGE_CONFIG.
10496 * Fixed GC_..._ignore_off_page to also function without
10497 -DALL_INTERIOR_POINTERS.
10498 * (Hopefully) fixed RS/6000 port. (Only the test was broken.)
10499 * Fixed a performance bug in the non-incremental collector running
10500 on machines supporting incremental collection with MPROTECT_VDB
10501 (e.g. SunOS 4, DEC AXP). This turned into a correctness bug under
10502 win32s with win32 incremental collection. (Not all memory protection
10503 was disabled.)
10504 * Fixed some ppcr related bit rot.
10505 * Caused dynamic libraries to be unregistered before re-registering.
10506 The old way turned out to be a performance bug on some machines.
10507 * GC_root_size was not properly maintained under MSWIN32.
10508 * Added -DNO_DEBUGGING and GC_dump.
10509 * Fixed a couple of bugs arising with SOLARIS_THREADS +
10510 REDIRECT_MALLOC.
10511 * Added NetBSD/M68K port (thanks to Peter Seebach).
10512 * Fixed a serious realloc bug. For certain object sizes, the collector
10513 wouldn't scan the expanded part of the object. (Thanks to Clay Spence
10514 for noticing the problem, and helping me to track it down.)
10515
10516
10517 == [4.4] 1995-02-18 ==
10518
10519 * ASM_CLEAR_CODE was erroneously defined for HP
10520 PA machines, resulting in a compile error.
10521 * Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
10522 * Gc_cleanup objects didn't work if they were created on
10523 the stack. Fixed.
10524 * One copy of Gc_cpp.h in the distribution was out of
10525 synch, and failed to document some known compiler
10526 problems with explicit destructor invocation. Partially
10527 fixed. There are probably other compilers on which
10528 gc_cleanup is miscompiled.
10529 * Fixed Makefile to pass C compiler flags to C++ compiler.
10530 * Added Mac fixes.
10531 * Fixed os_dep.c to work around what appears to be
10532 a new and different VirtualQuery bug under newer
10533 versions of win32s.
10534 * GC_non_gc_bytes was not correctly maintained by
10535 GC_free. Fixed (thanks to James Clark).
10536 * Added GC_set_max_heap_size.
10537 * Changed allocation code to ignore blacklisting if it is preventing
10538 use of a very large block of memory. This has the advantage
10539 that naive code allocating very large objects is much more
10540 likely to work. The downside is you might no
10541 longer find out that such code should really use
10542 GC_malloc_ignore_off_page.
10543 * Changed GC_printf under win32 to close and reopen the file
10544 between calls. FAT file systems otherwise make the log file
10545 useless for debugging.
10546 * Added GC_try_to_collect and GC_get_bytes_since_gc. These
10547 allow starting an abortable collection during idle times.
10548 This facility does not require special OS support. (Thanks to
10549 Michael Spertus of Geodesic Systems for suggesting this. It was
10550 actually an easy addition. Kumar Srikantan previously added a similar
10551 facility to a now ancient version of the collector. At the time
10552 this was much harder, and the result was less convincing.)
10553 * Added some support for the Borland development environment (thanks
10554 to John Ellis and Michael Spertus).
10555 * Removed a misfeature from checksums.c that caused unexpected
10556 heap growth (thanks to Scott Schwartz).
10557 * Changed finalize.c to call WARN if it encounters a finalization cycle.
10558 WARN is defined in gc_priv.h to write a message, usually to stdout.
10559 In many environments, this may be inappropriate.
10560 * Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
10561 naming convention.
10562 * Added GC_set_warn_proc to intercept warnings.
10563 * Fixed Amiga port (thanks to Michel Schinz).
10564 * Fixed a bug in mark.c that could result in an access to unmapped
10565 memory from GC_mark_from_mark_stack on machines with unaligned
10566 pointers.
10567 * Fixed a win32 specific performance bug that could result in scanning of
10568 objects allocated with the system malloc.
10569 * Added REDIRECT_MALLOC.
10570
10571
10572 == [4.3] 1994-12-23 ==
10573
10574 * Fixed SPARC alignment problem with GC_DEBUG.
10575 * Fixed Solaris threads /proc workaround. The real
10576 problem was an interaction with mprotect.
10577 * Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
10578 * Slightly improved allocator space utilization by
10579 fixing the GC_size_map mechanism.
10580 * Integrated some Sony News and MIPS RISCos 4.51
10581 patches (thanks to Nobuyuki Hikichi at Software Research Associates,
10582 Inc., Japan).
10583 * Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
10584 * Added GC_same_obj and friends. Changed GC_base
10585 to return 0 for pointers past the end of large objects.
10586 Improved GC_base performance with ALL_INTERIOR_POINTERS
10587 on machines with a slow integer mod operation.
10588 Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
10589 for preprocessor.
10590 * changed the default on most UNIX machines to be that
10591 signals are not disabled during critical GC operations.
10592 This is still ANSI-conforming, though somewhat dangerous
10593 in the presence of signal handlers. But the performance
10594 cost of the alternative is sometimes problematic.
10595 Can be changed back with a minor Makefile edit.
10596 * renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
10597 following my own naming convention. Added the function
10598 CORD_to_const_char_star.
10599 * Fixed a gross bug in GC_finalize. Symptom: occasional
10600 address faults in that function (thanks to Anselm Baird-Smith).
10601 * Added port to ICL DRS6000 running DRS/NX. Restructured
10602 things a bit to factor out common code, and remove obsolete
10603 code. Collector should now run under SUNOS5 with either
10604 mprotect or /proc dirty bits. (Thanks to Douglas Steel.)
10605 * More bug fixes and workarounds for Solaris 2.X. (These were
10606 mostly related to putting the collector in a dynamic library,
10607 which didn't really work before. Also SOLARIS_THREADS
10608 didn't interact well with dl_open.) (Thanks to Brian Lewis.)
10609 * Fixed a serious performance bug on the DEC Alpha. The text
10610 segment was getting registered as part of the root set.
10611 (Amazingly, the result was still fast enough that the bug
10612 was not conspicuous.) The fix works on OSF/1, version 1.3.
10613 Hopefully it also works on other versions of OSF/1 ...
10614 * Fixed a bug in GC_clear_roots.
10615 * Fixed a bug in GC_generic_malloc_words_small that broke
10616 gc_inl.h (reported by Antoine de Maricourt).
10617 * Fixed some problems with cord/de under Linux.
10618 * Fixed some cord problems, notably with CORD_riter4.
10619 * Added DG/UX port (thanks to Ben A. Mesander).
10620 * Added finalization registration routines with weaker ordering
10621 constraints. (This is necessary for C++ finalization with
10622 multiple inheritance, since the compiler often adds self-cycles.)
10623 * Filled the holes in the SCO port (thanks to Michael Arnoldus).
10624 * Completely rewritten the documentation in the interface gc_c++.h
10625 (later renamed gc_cpp.h) making it both clearer and more precise (done by
10626 John Ellis).
10627 * The definition of accessibility now ignores pointers from a finalizable
10628 object (an object with a clean-up function) to itself (done by John Ellis).
10629 This allows objects with virtual base classes to be finalizable by the
10630 collector. Compilers typically implement virtual base classes using
10631 pointers from an object to itself, which under the old definition of
10632 accessibility prevented objects with virtual base classes from ever
10633 being collected or finalized.
10634 * gc_cleanup now includes gc as a virtual base. This was enabled by
10635 the change in the definition of accessibility (by John Ellis).
10636 * Added support for operator new[] (by John Ellis). Since most compilers
10637 don't yet support operator new[], it is conditionalized on
10638 -DOPERATOR_NEW_ARRAY. The code is untested, but it's trivial and looks
10639 correct.
10640 * The test program test_gc_c++ (later renamed test_cpp.cc)
10641 tries to test for the C++-specific functionality not tested by the
10642 other programs.
10643 * Added unistd.h include to misc.c. (Needed for ppcr.)
10644 * Added PowerMac port (thanks to Patrick C. Beard).
10645 * Fixed "srcdir"-related Makefile problems. Changed things so
10646 that all externally visible include files always appear in the
10647 include subdirectory of the source. Made gc.h directly
10648 includable from C++ code (thanks to Per Bothner).
10649 * Changed Intel code to also mark from ebp (thanks to Kevin Warne).
10650 * Renamed C++ related files so they could live in a FAT
10651 file system (thanks to Charles Fiterman).
10652 * Changed Windows NT Makefile to include C++ support in
10653 gc.lib. Added C++ test as Makefile target.
10654
10655
10656 == [4.2] 1994-08-03 ==
10657
10658 * Multiple bug fixes/workarounds in the Solaris threads version.
10659 (It occasionally failed to locate some register contents for
10660 marking. It also turns out that thr_suspend and friends are
10661 unreliable in Solaris 2.3. Dirty bit reads appear
10662 to be unreliable under some weird
10663 circumstances. My stack marking code
10664 contained a serious performance bug. The new code is
10665 extremely defensive, and has not failed in several CPU
10666 hours of testing. But no guarantees ...)
10667 * Added MacOS support. (Thanks to Patrick C. Beard.
10668 David Chase suggested several improvements.)
10669 * Fixed several syntactic bugs in gc_c++.h and friends. (These
10670 didn't bother g++, but did bother most other compilers.)
10671 Fixed gc_c++.h finalization interface.
10672 * 64 bit alignment for allocated objects was not guaranteed in a
10673 few cases in which it should have been.
10674 * Added GC_malloc_atomic_ignore_off_page.
10675 * Added GC_collect_a_little.
10676 * Added some prototypes to gc.h.
10677 * Some other minor bug fixes (notably in Makefile).
10678 * Fixed OS/2 / EMX port (thanks to Ari Huttunen).
10679 * Fixed AmigaDOS port (thanks to Michel Schinz).
10680 * Fixed the DATASTART definition under Solaris. There
10681 was a 1 in 16K chance of the collector missing the first
10682 64K of static data (and thus crashing).
10683 * Fixed some blatant anachronisms in the README file.
10684 * Fixed PCR-Makefile for upcoming PPCR release.
10685
10686
10687 == [4.1] 1994-05-20 ==
10688
10689 * Changed finalization implementation to guarantee that
10690 finalization procedures are called outside of the allocation
10691 lock, making direct use of the interface a little less dangerous.
10692 MAY BREAK EXISTING CLIENTS that assume finalizers
10693 are protected by a lock. Since there seem to be few multi-threaded
10694 clients that use finalization, this is hopefully not much of
10695 a problem.
10696 * Fixed a gross bug in CORD_prev.
10697 * Fixed a bug in blacklst.c that could result in unbounded
10698 heap growth during startup on machines that do not clear
10699 memory obtained from the OS (e.g. win32s).
10700 * Ported de editor to Win32 and win32s. (This is now the only
10701 version with a mouse-sensitive UI. Thanks to Rob Haack for the
10702 implementation based on the generic Windows application template.)
10703 * Added GC_malloc_ignore_off_page to allocate large arrays
10704 in the presence of ALL_INTERIOR_POINTERS.
10705 * Changed GC_call_with_alloc_lock to not disable signals in
10706 the single-threaded case.
10707 * Reduced retry count in GC_collect_or_expand for garbage
10708 collecting when out of memory.
10709 * Made uncollectible allocations bypass black-listing, as they
10710 should.
10711 * Fixed a bug in typed_test in test.c that could cause (legitimate)
10712 GC crashes.
10713 * Fixed some potential synchronization problems in finalize.c
10714 * Fixed a real locking problem in typd_mlc.c.
10715 * Worked around an AIX 3.2 compiler feature that results in
10716 out of bounds memory references.
10717 * Partially worked around an IRIX5.2 beta problem (which may
10718 or may not persist to the final release).
10719 * Fixed a bug in the heap integrity checking code that could
10720 result in explicitly deallocated objects being identified as
10721 smashed. Fixed a bug in the dbg_mlc stack saving code
10722 that caused old argument pointers to be considered live.
10723 * Fixed a bug in CORD_ncmp (and hence CORD_str).
10724 * Repaired the OS2 port, which had suffered from bit rot
10725 in 4.0. Worked around what appears to be CSet/2 V1.0
10726 optimizer bug.
10727 * Fixed a Makefile bug for target "c++".
10728
10729
10730 == [4.0] 1994-04-07 ==
10731
10732 * Added support for Solaris threads (which was possible
10733 only by reimplementing some fraction of Solaris threads,
10734 since Sun doesn't currently make the thread debugging
10735 interface available).
10736 * Added non-threads Win32 and win32s support.
10737 * (Grudgingly, with suitable muttering of obscenities) renamed
10738 files so that the collector distribution could live on a FAT
10739 file system. Files that are guaranteed to be useless on
10740 a PC still have long names. Gc_inline.h and gc_private.h
10741 still exist, but now just include gc_inl.h and gc_priv.h.
10742 * Fixed a really obscure bug in finalization that could cause
10743 undetected mark stack overflows. (I would be surprised if
10744 any real code ever tickled this one.)
10745 * Changed finalization code to dynamically resize the hash
10746 tables it maintains. (This probably does not matter for well-
10747 -written code. It no doubt does for C++ code that overuses
10748 destructors.)
10749 * Added typed allocation primitives. Rewrote the marker to
10750 accommodate them with more reasonable efficiency. This
10751 change should also speed up marking for GC_malloc allocated
10752 objects a little. See gc_typed.h for new primitives. (Thanks to
10753 Zhong Shao performed much of the experimentation that led to the
10754 current typed allocation facility.)
10755 * Improved debugging facilities slightly. Allocation time
10756 stack traces are now kept by default on SPARC/SUNOS4. (Thanks to
10757 Scott Schwartz.)
10758 * Added better support for small heap applications.
10759 * Significantly extended cord package. Fixed a bug in the
10760 implementation of lazily read files. Printf and friends now
10761 have cord variants. Cord traversals are a bit faster.
10762 * Made ALL_INTERIOR_POINTERS recognition the default.
10763 * Fixed de so that it can run in constant space, independent
10764 of file size. Added simple string searching to cords and de.
10765 * Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
10766 * Added dynamic library support for OSF/1 (thanks to Alan Dosser and
10767 Tim Bingham at DEC).
10768 * Changed argument to GC_expand_hp to be expressed
10769 in units of bytes instead of heap blocks. (Necessary
10770 since the heap block size now varies depending on
10771 configuration. The old version was never very clean.)
10772 * Added GC_get_heap_size(). The previous "equivalent"
10773 was broken.
10774 * Restructured the Makefile a bit.
10775 * Added FreeBSD port (provided by Jeffrey Hsu).
10776
10777
10778 == [3.7] 1994-03-15 ==
10779
10780 * Added a workaround for an HP/UX compiler bug.
10781 * Fixed another stack clearing performance bug. Reworked
10782 that code once more.
10783
10784
10785 == [3.6] 1994-01-14 ==
10786
10787 * fixed a bug in the mark stack growth code that was introduced
10788 in 3.4.
10789 * fixed Makefile to work around DEC AXP compiler tail recursion
10790 bug.
10791
10792
10793 == [3.5] ==
10794
10795 * Minor collections now mark from roots only once, if that
10796 doesn't cause an excessive pause.
10797 * The stack clearing heuristic was refined to prevent anomalies
10798 with very heavily recursive programs and sparse stacks.
10799 * Fixed a bug that prevented mark stack growth in some cases.
10800 GC_objects_are_marked should be set to TRUE after a call
10801 to GC_push_roots and as part of GC_push_marked, since
10802 both can now set mark bits. I think this is only a performance
10803 bug, but I wouldn't bet on it. It's certainly very hard to argue
10804 that the old version was correct.
10805 * Fixed an incremental collection bug that prevented it from
10806 working at all when HBLKSIZE != getpagesize()
10807 * Changed dynamic_loading.c to include gc_priv.h before testing
10808 DYNAMIC_LOADING. SunOS dynamic library scanning
10809 must have been broken in 3.4.
10810 * Object size rounding now adapts to program behavior.
10811 * Added a workaround (provided by Manuel Serrano and
10812 colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
10813 that I had incorrectly assumed to have been squished.
10814 The collector was broken if the text segment size was within
10815 32 bytes of a multiple of 8K bytes, and if the beginning of
10816 the data segment contained interesting roots. The workaround
10817 assumes a demand-loadable executable. The original may have
10818 have "worked" in some other cases.
10819 * Added dynamic library support under IRIX5.
10820 * Added support for EMX under OS/2 (thanks to Ari Huttunen).
10821 * Added support of Motorola 88K processor running CX/UX (by Brent Benson).
10822
10823
10824 == [3.4] ==
10825
10826 * Fixed a performance bug in GC_realloc.
10827 * Updated the amiga port.
10828 * Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
10829 * Added cord library.
10830 * Added trivial performance enhancement for
10831 ALL_INTERIOR_POINTERS (do not scan last word).
10832
10833
10834 == [3.3] 1993-10-02 ==
10835
10836 * PCR-specific bugs (thanks to Neil Sharman).
10837 * Missing locking in GC_free, redundant FASTUNLOCK
10838 in GC_malloc_stubborn, and 2 bugs in
10839 GC_unregister_disappearing_link (pointed out by Neil Sharman).
10840 * Common symbols allocated by the SunOS4.X dynamic loader
10841 were not included in the root set.
10842 * Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
10843 * Merged Amiga port from Jesper Peterson (untested).
10844 * Merged NeXT port from Thomas Funke (significantly
10845 modified and untested). (Also thanks to Brian D. Carlstrom for
10846 the supplied the NeXT ports.)
10847
10848
10849 == [3.2] ==
10850
10851 Fixed a serious and not entirely repeatable bug in
10852 the incremental collector. It appeared only when dirty bit info
10853 on the roots was available, which is normally only under Solaris.
10854 It also added GC_general_register_disappearing_link, and some
10855 testing code. Interface.c disappeared.
10856
10857
10858 == [3.1] ==
10859
10860 * A workaround for a SunOS 4.X SPARC C compiler
10861 misfeature that caused problems when the collector was turned into
10862 a dynamic library.
10863 * A fix for a bug in GC_base that could result in a memory fault.
10864 * A fix for a performance bug (and several other misfeatures) pointed
10865 out by Dave Detlefs and Alan Dosser.
10866 * Use of dirty bit information for static data under Solaris 2.X.
10867 * DEC Alpha/OSF1 support (thanks to Alan Dosser).
10868 * Incremental collection on more platforms.
10869 * A more refined heap expansion policy. Less space usage by default.
10870 * Various minor enhancements to reduce space usage, and to reduce
10871 the amount of memory scanned by the collector.
10872 * Uncollectible allocation without per object overhead.
10873 * More conscientious handling of out-of-memory conditions.
10874 * Fixed a bug in debugging stubborn allocation.
10875 * Fixed a bug that resulted in occasional erroneous reporting of smashed
10876 objects with debugging allocation.
10877 * Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
10878
10879
10880 == [3.0] ==
10881
10882 Added generational/incremental collection and stubborn objects.
10883
10884
10885 == [2.6] 1993-04-27 ==
10886
10887 (Changes not specified.)
10888
10889
10890 == [2.5] ==
10891
10892 * Removed an explicit call to exit(1)
10893 * Fixed calls to GC_printf and GC_err_printf, so the correct number of
10894 arguments are always supplied. The OS/2 C compiler gets confused if
10895 the number of actuals and the number of formals differ. (ANSI C
10896 doesn't require this to work. The ANSI sanctioned way of doing things
10897 causes too many compatibility problems.)
10898
10899
10900 == [2.4] 1993-01-26 ==
10901
10902 Added GC_free_space_divisor as a tuning knob, added
10903 support for OS/2 and linux, and fixed the following bugs:
10904 * On machines with unaligned pointers (e.g. Sun 3), every 128th word could
10905 fail to be considered for marking.
10906 * Dynamic_load.c erroneously added 4 bytes to the length of the data and
10907 bss sections of the dynamic library. This could result in a bad memory
10908 reference if the actual length was a multiple of a page. (Observed on
10909 Sun 3. Can probably also happen on a Sun 4.)
10910 (Thanks to Robert Brazile for pointing out that the Sun 3 version
10911 was broken. Dynamic library handling is still broken on Sun 3s
10912 under 4.1.1U1, but apparently not 4.1.1. If you have such a machine,
10913 use -Bstatic.)
10914
10915
10916 == [2.3] ==
10917
10918 * Added ALL_INTERIOR_POINTERS.
10919 * Missing declaration of etext in the A/UX version.
10920 * Some PCR root-finding problems.
10921 * Blacklisting was not 100% effective, because the plausible future
10922 heap bounds were being miscalculated.
10923 * GC_realloc didn't handle out-of-memory correctly.
10924 * GC_base could return a nonzero value for addresses inside free blocks.
10925 * test.c wasn't really thread safe, and could erroneously report failure
10926 in a multi-threaded environment. (The locking primitives need to be
10927 replaced for other threads packages.)
10928 * GC_CONS was thoroughly broken.
10929 * On a SPARC with dynamic linking, signals stayed disabled while the
10930 client code was running (thanks to Manuel Serrano).
10931
10932
10933 == [2.2] ==
10934
10935 * GC_realloc could fail to extend the size of the object for certain large
10936 object sizes.
10937 * A blatant subscript range error in GC_printf, which unfortunately
10938 wasn't exercised on machines with sufficient stack alignment constraints.
10939 * GC_register_displacement did the wrong thing if it was called after
10940 any allocation had taken place.
10941 * The leak finding code would eventually break after 2048 byte
10942 byte objects leaked.
10943 * interface.c didn't compile.
10944 * The heap size remained much too small for large stacks.
10945 * The stack clearing code behaved badly for large stacks, and perhaps
10946 on HP/PA machines.
10947
10948
10949 == [2.1] ==
10950
10951 * The first stable version since 1.9.
10952 * Added support for PPCR.
10953
10954
10955 == [2.0] ==
10956
10957 * Introduced a consistent naming convention for collector
10958 routines and added support for registering dynamic library data segments
10959 in the standard mark_roots.c (original code supporting the SunOS dynamic
10960 loader provided by Bill Janssen). Most of the data structures were revamped.
10961 The treatment of interior pointers was completely changed. Finalization
10962 was added. Support for locking was added. Object kinds were added.
10963 We added a black listing facility to avoid allocating at addresses known
10964 to occur as integers somewhere in the address space. Much of this
10965 was accomplished by adapting ideas and code from the PCR collector.
10966 The test program was changed and expanded.
10967
10968
10969 == [1.9] 1992-01-29 ==
10970
10971 * fixed a major bug in gc_realloc.
10972
10973
10974 == [1.8] ==
10975
10976 * added ULTRIX support in gc_private.h. (Robert Brazile originally supplied
10977 the ULTRIX code. Alan Dosser and Regis Cridlig subsequently provided updates
10978 and information on variation between ULTRIX systems.)
10979
10980
10981 == [1.5] ==
10982
10983 * ensure 8 byte alignment for objects allocated on a sparc based machine.
10984
10985
10986 == [1.4] ==
10987
10988 * Does not use compile time determined values
10989 for the stack base. This no longer works on Sun 3s, since Sun 3/80s use
10990 a different stack base. We now use a straightforward heuristic on all
10991 machines on which it is known to work (incl. Sun 3s) and compile-time
10992 determined values for the rest. There should really be library calls
10993 to determine such values.
10994
10995
10996 == [1.3] ==
10997
10998 * Fixed spurious
10999 assembly language assignments to TMP_SP. Only the assignment in the PC/RT
11000 code is necessary. On other machines, with certain compiler options,
11001 the assignments can lead to an unsaved register being overwritten.
11002 Known to cause problems under SunOS 3.5 WITHOUT the -O option. (With
11003 -O the compiler recognizes it as dead code. It probably shouldn't,
11004 but that's another story.)
11005 The SPARC-specific code was originally contributed by Mark Weiser.
11006 The Encore Multimax modifications were supplied by Kevin Kenny.
11007 The adaptation to the IBM PC/RT is largely
11008 due to Vernon Lee, on machines made available to Rice by IBM.
11009 Much of the HP specific code and a number of good suggestions for improving
11010 the generic code are due to Walter Underwood.
11011 Parag Patel supplied the A/UX code.
11012 Manuel Serrano supplied linux and Sony News specific code.