1 2 == [8.3.0] (development) ==
3 4 * Acquire allocator lock in GC_is_tmp_root and GC_register_disclaim_proc
5 * Add 'lib' prefix to build artifact names in Makefile.direct
6 * Add API to get total stopped-world marking time
7 * Add I_HOLD_LOCK assertion to callers of GC_get_maps (refactoring)
8 * Add Linux example to cmake.md
9 * Add assertion about kind argument range in GC_register_describe_type_fn
10 * Add assertion about minimal value of GC_GCJ_MARK_DESCR_OFFSET
11 * Add assertion in GC_set_fl_marks that there is no loop in freelist
12 * Add assertion on GC_envfile_length value in GC_envfile_getenv()
13 * Add assertion that GC_high_water is initialized in GC_clear_stack
14 * Add assertion that custom setspecific is not called to overwrite value
15 * Add assertion that result is not forwarding address in GC_install_header
16 * Add assertion that value stored to GC_obj_map[] fits element type
17 * Add assertion to GC_maybe_gc that GC is not in progress
18 * Add assertion to ensure GC_unmapped_bytes cannot underflow
19 * Add assertion to verify GC_threads hash table entries are chained properly
20 * Add assertions about GC_mark_state to alloc.c and mark.c
21 * Add assertions about hidden ptr lowest bit in toggle-refs implementation
22 * Add callback API to support ephemeron marking
23 * Add check that gc_hdrs.h and gc_locks.h are included only from gc_priv.h
24 * Add check-deps goal to Makefiles to build the tests but not execute them
25 * Add debug logging to GC_clear_exclusion_table and GC_exclude_static_roots
26 * Add minimal testing of GC_allow_register_threads
27 * Add missing cast in GC_is_init_called (refactoring)
28 * Add missing undef GC_NO_THREAD_REDIRECTS in threaded tests
29 * Add support of wasm32-wasi target
30 * Add testing of remaining API functions (gctest and leaktest)
31 * Add verbose logging of events of getting memory from OS
32 * Add visionOS simulator support
33 * Adjust comments in block_unmap_inner
34 * Adjust comments referring glibc version (documentation)
35 * Adjust header includes in cord .c files (refactoring)
36 * Adjust indent inside case statements in configure.ac (reformatting)
37 * Adjust indentation in C preprocessor directives (reformatting)
38 * Adjust naming of Win32/64 and x86/64 words in comments and documentation
39 * Adjust pointer-to-int cast in GC_register_dynamic_libraries for WinCE
40 * Adjust printing on amount of unmapped memory after GC
41 * Allow GC_push_roots to work even when no exclusions registered
42 * Allow custom AO_SRC_DIR, CURSES, EXEEXT, HOSTCC/CFLAGS for Makefile.direct
43 * Allow disable USE_PROC_FOR_LIBRARIES even if malloc is redirected on Linux
44 * Allow gc_allocator<T> and friends to be defined in namespace boehmgc
45 * Allow incremental GC on OpenBSD
46 * Allow mprotect-based incremental GC on AIX and for all Linux targets
47 * Allow passing custom CC and CXX to Makefile.direct
48 * Allow passing custom CFLAGS[_EXTRA] to Makefile.direct
49 * Allow single signal usage for both world suspend and resume in gctest
50 * Allow testing of retry-signals functionality
51 * Allow to build with forced WRAP_MARK_SOME
52 * Allow to compile tests with custom NTHREADS set to zero
53 * Allow to cross-compile for MacOS X with missing mach-o/getsect.h
54 * Allow to omit operator new/delete definitions in gc_cpp
55 * Allow to randomly choose a CPU core if AO ops are emulated with locks
56 * Allow to skip heap expansion in GC_init
57 * Allow to unmap memory block right in GC cycle where block is freed
58 * Allow to use print/check_marks_int_list() in gctest
59 * Allow to use same signal for thread suspend and restart (default on E2K)
60 * Always declare GC_set_and_save_fault_handler before its definition
61 * Always invoke pending finalizers in GC_generic_malloc_uncollectable
62 * Always print error details message when gctest fails
63 * Always set only one bit past end in GC_set_hdr_marks
64 * Always specify relative path for private headers mentioned in .md docs
65 * Assert SET_HDR does not write to GC_all_nils
66 * Assert allocator lock held in GC_add_roots_inner and its callers
67 * Assert allocator lock held in GC_reset_finalizer_nested
68 * Assert allocator lock held in add_leaked/smashed, check_heap_proc
69 * Assert allocator lock held in scratch_alloc/recycle and their callers
70 * Assert allocator lock held in start/continue_reclaim and reclaim_all
71 * Assert allocator lock held to ensure no race on reveal hidden pointers
72 * Assert allocator lock held while GC_our_memory is updated
73 * Assert in typed_mark_proc that allocator lock held by some collecting thread
74 * Assert that bm_table is already initialized when GC_double_descr used
75 * Assert that disappearing links are accessible during registration and GC
76 * Assert that size of element of a typed object is nonzero (refactoring)
77 * Assume argument of GC_set_fl_marks is non-null (refactoring)
78 * Avoid code duplication between pthread_support.c and win32_threads.c
79 * Avoid code duplication in GC_core_gcj_malloc (refactoring)
80 * Avoid code duplication in GC_dyld_image_add/remove on Darwin (refactoring)
81 * Avoid code duplication in GC_incremental_protection_needs (refactoring)
82 * Avoid code duplication in GC_make_array_descriptor (refactoring)
83 * Avoid code duplication in HAVE_FLAG_WNO_FRAME_ADDRESS of CMake script
84 * Avoid code duplication in IGNORE_OFF_PAGE-specific malloc functions
85 * Avoid code duplication regarding GC_push_roots in GC_mark_some_inner
86 * Avoid duplication of magic numbers in disclaim.c, weakmap.c (refactoring)
87 * Avoid fn call inlining in GC_call_with_stack_base/gc_active
88 * Avoid static variable name duplication in GC_is_static/tmp_root
89 * Avoid unmap of memory allocated during GC init regardless of threshold
90 * Better document GC_generate_random_heap/valid_address API functions
91 * Better document GC_no_dls and NO_DEBUGGING macro
92 * Better document GC_print_free_list regarding allocator lock
93 * Better document and simplify define CAN_SAVE_CALL_ARGS in gcconfig.h
94 * Better document link argument of GC_general_register_disappearing_link
95 * Better document missing debugging version for aligned allocation routines
96 * Better document preprocessor-related pointer checking routines in gc.h
97 * Better document why REVEAL_POINTER should be used with allocator lock held
98 * Better separate libgc build- and use-time macro descriptions in README
99 * Build cord/de test by WCC_MAKEFILE on Win32
100 * Build extra/gc.c in digimars.mak
101 * Build with GC_wcsdup support if wcslen exists
102 * Call GC_init_parallel only from GC_init (refactoring)
103 * Call syscall() to get E2K procedure stack directly in caller function
104 * Change GC_Thread_Rep in pthread_support.h to match that of win32_threads.c
105 * Change GC_build_fl prototype to accept size in granules (refactoring)
106 * Change GC_gcj_malloc and friends to accept const pointer to descriptor
107 * Change GC_warn_proc API to accept const C string
108 * Change NOT_MARKED value to nonzero (refactoring)
109 * Change default GC_time_limit value from 50 to 15 ms
110 * Change default value of max_prior_attempts to 3
111 * Change enable_threads default to off if threads are unsupported (CMake)
112 * Change file extension of README.* to lower case in doc/platforms
113 * Change minimum heap growth to one block if requested explicitly
114 * Change p local variable to current_p in push_all/conditional_eager
115 * Change return type of GC_get_memory_use() from size_t to word
116 * Change type of GC_collecting variable to match atomic operations over it
117 * Change type of GC_find_header() argument to a const typeless pointer
118 * Change type of client_data of GC_iterate_free_hblks from word to a pointer
119 * Change type of collect_a_little_inner argument from int to size_t
120 * Change type of hb_sz field (of hblkhdr) from word back to size_t
121 * Change type of internal variables from word to size_t where applicable
122 * Check highest bit of word using SIGNB instead of cast to signed_word
123 * Check out-of-memory and set in_thread_creation inside GC_new_thread
124 * Check pointer tag in all mark procedures (E2K)
125 * Clear GC_thread_key thread-local value on unregistering the thread
126 * Clear stack in GC_core_gcj_malloc only after releasing allocator lock
127 * Code refactoring to support pointers larger than word (CHERI)
128 * Collapse arch macro defines where possible (refactoring)
129 * Comment out argument names of functions in cord public headers
130 * Compile gc_dlopen.c and specific.c conditionally in Makefile.am
131 * Compute local variables in GC_reclaim_small_nonempty_block only if needed
132 * Consistent naming of GC_thread local variables (refactoring)
133 * Consistent naming of variables of obj_kind type (refactoring)
134 * Consistent use of CHECK_OUT_OF_MEMORY() in tests (refactoring)
135 * Consistently use GC_word (instead of word) type in tests (refactoring)
136 * Declare GC_noop1 as public function unconditionally
137 * Declare GC_register_stackbottom symbol as internal on IA64 (refactoring)
138 * Declare variables and arguments as pointer to const where applicable
139 * Define ALIGNMENT macro based on CPP_PTRSZ value by default (refactoring)
140 * Define AO_t to size_t instead of word (refactoring)
141 * Define GC_GCJ_MARK_DESCR_OFFSET public macro
142 * Define GC_GLIBC_PREREQ internal macro (refactoring)
143 * Define GC_GRANULE_BYTES macro based on GC_GRANULE_PTRS value (refactoring)
144 * Define GC_VERSION_VAL_T public macro (refactoring)
145 * Define GC_get_parallel and GC_set_markers_count in single-threaded GC
146 * Define GC_print_stats as GC_INNER (refactoring)
147 * Define GC_save_regs_ret_val variable only if used on IA64 (refactoring)
148 * Define GC_self_thread_inner to lookup GC_thread of current thread
149 * Define GC_thread type in a single place both for pthreads and Win32
150 * Define HBLK_PAGE_ALIGNED() macro for internal use (refactoring)
151 * Define LAZY_THRESHOLD const value as long in cord (refactoring)
152 * Define and use GC_find_starting_hblk inline function (refactoring)
153 * Define and use SIGNAL_BASED_STOP_WORLD macro internally (refactoring)
154 * Define clear/set_all_fl_marks internal functions (refactoring)
155 * Define counter variables as static in gctest (refactoring)
156 * Define internal macro NO_SEH_AVAILABLE where SEH is absent (refactoring)
157 * Define internal macro for pointers rounding up by a mask (refactoring)
158 * Define macros in gcconfig.h to use sigaction for SIGSEGV and SIGBUS
159 * Define marker_[b]sp only if needed (refactoring)
160 * Define op and nwords/lpw local variables consistently across typd_mlc.c
161 * Define public GC_GRANULE_PTRS macro
162 * Define public GC_MALLOC_EXPLICITLY_TYPED_IGNORE_OFF_PAGE()
163 * Define public GC_[p]valloc() and redirect to them in leak_detector.h
164 * Define sized delete operator in 'gc' class
165 * Define tunable values in cordtest as macro (refactoring)
166 * Describe strategies to scan data roots on stack (Emscripten)
167 * Detect overflow of size_t value addition before the operation in cordbscs
168 * Detect presence of pthread_sigmask() in configure and cmake scripts
169 * Disable H/W tag checking in mark procedures by default (E2K)
170 * Disable memory unmapping explicitly in gcconfig.h for Emscripten
171 * Disallow explicit unregister of non-main thread if registered by DllMain
172 * Discard sections with pseudo-paths except heap in register_map_entries
173 * Do incremental mark some in GC_collect_a_little even if GC is disabled
174 * Do not add extra byte to large ignore-off-page and uncollectible objects
175 * Do not check INV_SZ_COMPUTATION_CHECK macro (refactoring)
176 * Do not check dl_iterate_phdr presence by build scripts on OS X and Win32
177 * Do not check presence of getcontext and dl_iterate_phdr by cmake on Win32
178 * Do not compile pthread_start.c on Cygwin even if build shared libs (CMake)
179 * Do not compile pthread_stop_world.c on Darwin (CMake)
180 * Do not count time spent processing toggle-refs in stopped_mark
181 * Do not define GC_pthread_start/exit for Orbis and Sony PSP (refactoring)
182 * Do not define GETPAGESIZE on Win32 (refactoring)
183 * Do not define SIG_HNDLR_PTR on Darwin unless really used
184 * Do not define THREAD_SANITIZER if GC is built w/o threads support
185 * Do not do unnecessary GC_read_dirty() from GC_enable_incremental
186 * Do not expose GC_nacl_gc_thread_self variable outside pthread_stop_world.c
187 * Do not flush registers before reading procedure stack on E2K
188 * Do not free entry in GC_delete_gc_thread to match that on Win32
189 * Do not hard-code page size for wasm32-wasi (refactoring)
190 * Do not include gcconfig.h from extra/symbian source files (refactoring)
191 * Do not include sched.h from pthread_start.c (refactoring)
192 * Do not invoke GC_approx_sp() repeatedly in GC_stopped_mark (refactoring)
193 * Do not invoke finalizers during thread creation or destruction
194 * Do not iterate over heap blocks in GC_get_memory_use
195 * Do not prohibit threaded builds with malloc redirection on non-Linux
196 * Do not put atomic_ops[_sysdeps].o to libgc.a in Makefile.direct
197 * Do not reference internal files in comments of public header files
198 * Do not set SIGBUS handler to catch write faults on Linux
199 * Do not store E2K procedure stack to GC heap (refactoring)
200 * Do not treat warnings as errors by default in digimars.mak
201 * Do not use GC lock in GC_print_callers (refactoring)
202 * Do not use _CrtDbgReport() if NO_CRTDBGREPORT macro defined (MSVC/debug)
203 * Do not use atomic intrinsic in assertion of GC_reclaim_generic
204 * Do not use deprecated _dyld_bind_fully_image_containing_address (Darwin)
205 * Do not use deprecated get_etext and get_end on Darwin
206 * Do not use deprecated getsectbynamefromheader_64 (Darwin)
207 * Do not use integer division in GC_soft_read_dirty
208 * Do not wrap mark_some to catch faults if libraries registration is off
209 * Document GC_ENABLE_SUSPEND_THREAD better in configure
210 * Document GC_print_free_list shortly in gc_inline.h
211 * Document GC_with_callee_saves_pushed better
212 * Document argument of GC_is_marked in gc_mark.h
213 * Document assumption about allocator lock for GC_clear_exclusion_table
214 * Document macros in config.h not referring to README (configure)
215 * Document that GC_is_X API functions may return only zero or one
216 * Document that GC_unregister_my_thread result value is dummy
217 * Eliminate 'array subscript has type char' compiler warnings in os_dep
218 * Eliminate 'atomic_thread_fence is unsupported with tsan' gcc-11 warning
219 * Eliminate 'boolean result used in bitwise op' cppcheck FP in GC_thr_init
220 * Eliminate 'cast discards const from target ptr type' clang warning in cord
221 * Eliminate 'cast discards const/volatile from target type' warnings in libgc
222 * Eliminate 'cast discards volatile from type' warnings in cordxtra, gctest
223 * Eliminate 'checking if 1U<<12 is less than zero' cppcheck FP warning
224 * Eliminate 'compound assignment with volatile left operand' g++ warning
225 * Eliminate 'conversion may change sign' clang warnings in cord and tests
226 * Eliminate 'increment for volatile-qualified type deprecated' g++ warning
227 * Eliminate 'n obtained from untrusted source' code defect FP in test_cpp
228 * Eliminate 'no previous prototype' clang warnings
229 * Eliminate 'obj_displ scope can be reduced' cppcheck warning in gc_pmark.h
230 * Eliminate 'parameter can be declared as const pointer' cppcheck warnings
231 * Eliminate 'scope of p variable could be reduced' cppcheck warning in de.c
232 * Eliminate 'skipping config since static_assert is unknown' cppcheck FP
233 * Eliminate 'struct treenode member is never used' cppcheck warning
234 * Eliminate 'volatile-qualified arg parameter' g++ warning in mach_dep.c
235 * Eliminate code duplication in GC_PREFETCH_FOR_WRITE generic definition
236 * Eliminate data race FP reported in need_unreachable_finalization by TSan
237 * Eliminate duplicate use of GC_obj_kinds[k] in GC_generic_malloc_many
238 * Enable HBLKSIZE values up to 64K
239 * Enable prefetch for MSVC (Windows/x86 and Windows/x64)
240 * Enable prefetch loop in GC_mark_from on E2K
241 * Enable without_libatomic_ops for targets requiring atomic_ops.c (CMake)
242 * Ensure GC is initialized when GC_push_all_stacks() is called (refactoring)
243 * Ensure GC_enable_incremental variable is accessed holding the lock
244 * Ensure GC_n_set_marks() does not count extra bits in hb_marks
245 * Ensure a collection occurs between adjacent heap expansions
246 * Ensure all macros defined in public cord_pos.h have 'CORD_' prefix
247 * Ensure const value has proper type before negation operation in msvc_dbg
248 * Ensure every test prints a message on success
249 * Ensure that GC_init does not allocate any object itself (refactoring)
250 * Explicitly check that word has at least 32 bits in shifts by 20+ bits
251 * Export CORD_ec_append_cord(), CORD_ec_flush_buf() from cord shared library
252 * Export CORD_oom_fn public variable from cord shared library
253 * Export GC_apply_to_all_blocks() and GC_is_black_listed() as public API
254 * Export get/set_abort_func even in case of SMALL_CONFIG
255 * Export get/set_manual_vdb_allowed even in case of SMALL_CONFIG
256 * Export setter and getter for pointer checking print procedures
257 * Expose functions to enable pushing of custom proc and ranges
258 * Fail threadkeytest on pthread_create error in main loop
259 * Fix 'destructor is not marked with override specifier' cppcheck warning
260 * Fix 'possibly undefined macro AC_ENABLE_SHARED' autoreconf error
261 * Fix 'unexpected heap growth' fail in gctest if GC_INITIAL_HEAP_SIZE is set
262 * Fix digimars.mak to build 'all' by default
263 * Fix double call of unregister_my_thread if thread registered by DllMain
264 * Fix gctest failure for non-default MARK_DESCR_OFFSET
265 * Fix missing hyphenation in documentation
266 * Fix thread_id variable definition placement in main of subthreadcreatetest
267 * Fix undefined behavior caused by potential overflow in MAKE_COOLER
268 * Force pthread_mutex_lock usage for allocator lock if ThreadSanitizer
269 * Get libpthread.so '.text' mapping only for glibc prior to v2.34 (Linux)
270 * Group NEED_FIND_LIMIT definitions in gcconfig.h (refactoring)
271 * Group all thread id fields together in GC_thread (refactoring)
272 * Group char-width fields together in GC_arrays (refactoring)
273 * Group functional pointers in struct finalizable_object (refactoring)
274 * Group functions related to GC_calloc_explicitly_typed (refactoring)
275 * Implement LONG_MULT in portable way using multiplication of 32-bit words
276 * Implement shared locks and provide enable_rwlock build script option
277 * Improve ABORT message in GC_darwin_sigbus
278 * Improve GC_memalign and friends to always return object base pointer
279 * Include gc/gc[_cpp].h directly except for cord and tests (refactoring)
280 * Include gc_inline.h from gc_priv.h (refactoring)
281 * Include signal.h conditionally
282 * Include stdio.h and stdlib.h only from gc_priv.h (refactoring)
283 * Include sys/types.h and unistd.h from a single place (refactoring)
284 * Increase number of iterations in leak and middle tests
285 * Increase object kinds limit (to 24 items)
286 * Increment allocated objects count after GC_memalign in gctest
287 * Initial support of KOS/arm64
288 * Initialize GC_retry_signals to true in GC_stop_init (refactoring)
289 * Install ChangeLog among doc files
290 * Introduce READER_LOCK/UNLOCK macros (refactoring)
291 * Make abort message unique in write_fault_handler
292 * Make all functions static in msvc_dbg.c except for backtrace[_symbols]
293 * Make comparisons to the lowest heap boundary strict
294 * Make links to mentioned platforms/README files in doc .md files
295 * Make shift size smaller in GC_CLANG/GNUC/GLIBC_PREREQ (refactoring)
296 * Mark GC_add_roots_inner() as GC_INNER (refactoring)
297 * Mention CMake-based build in README.md and README.QUICK
298 * Mention all doc files in overview document
299 * Mention gc_allocator.h in README.win32 (documentation)
300 * Mention proper CURSES value in Makefile.direct to build cord/de test
301 * Minimize THREADS-specific code in GC_invoke_finalizers (refactoring)
302 * Minimize code difference between GC_push_marked/unconditionally
303 * More clear message about total duration of full collections in gctest
304 * Move GC_NO_THREADS_DISCOVERY definition to gcconfig.h (refactoring)
305 * Move GC_unblock_gc_signals to pthread_stop_world.c (refactoring)
306 * Move HAVE_CLOCK_GETTIME definition from gc_priv.h to gcconfig.h
307 * Move fields common between Concatenation and Function to Generic structure
308 * Move increment of GC_bytes_allocd to GC_alloc_large (refactoring)
309 * Move internals of GC_[signed_]word definition to gc_config_macros.h
310 * Move non-cord [pkg]include_HEADERS assignments to include.am (refactoring)
311 * Move non-license info from LICENSE file to README and vice versa
312 * Move platform-dependent getspecific() call to a dedicated function
313 * Move platform-specific README files to doc/platforms
314 * Move pthread_atfork() call to a separate function (refactoring)
315 * Move public header files to include/gc in source tree
316 * Move stack-related fields out of GC_thread to GC_stack_context_t
317 * Move thread-only functions to pthread_support.c (refactoring)
318 * Move used blocks total size checking from check_dirty to print_block_list
319 * Name all tests consistently (refactoring)
320 * Never use mmap() for storing procedure stack on E2K (refactoring)
321 * New API for disappearing links registration accepting interior pointers
322 * New API for more optimal usage of GC_calloc_explicitly_typed
323 * New API function (GC_get_hblk_size) to get HBLKSIZE value
324 * New API function (GC_set_interrupt_finalizers) to break finalizer loop
325 * New API function to check if collector is built with DONT_ADD_BYTE_AT_END
326 * New CMake option to link with external libatomic_ops (system library)
327 * New GC_count_set_marks_in_hblk and GC_iterate_free_hblks API functions
328 * New macro (DONT_PROTECT_PTRFREE) to never protect pointer-free pages
329 * New macro (NO_MANUAL_VDB) to disallow manual VDB mode
330 * New public function (get_supported_vdbs) to list available VDB techniques
331 * New public function GC_get_actual_vdb
332 * Order libgc .c files lexicographically in build scripts
333 * Output finalization information by GC_dump
334 * Pass ATOMIC_OPS_LIBS to tests using AO primitives directly (Automake)
335 * Perform overflow/underflow checks before operation on a pointer
336 * Prefix size_t and ptrdiff_t with namespace 'std' in C++ files
337 * Preserve doc folders structure on package install
338 * Preserve provenance of capability to heap block (CHERI)
339 * Prevent requesting blocks past max_heapsize in GC_collect_or_expand
340 * Prevent result of MAKE_COOLER to be NULL
341 * Print heap size in bytes (not MB) in out-of-memory warning if small heap
342 * Print in-use heap statistic on heap growth
343 * Print iteration number on thread creation or join failure in tests
344 * Print objs_in_block as zero for large objects in GC_print_block_list
345 * Print thread number on marker thread creation failure
346 * Print value of links in GC_dump_finalization_links
347 * Provide GC_HIDE/REVEAL_NZ_POINTER public macros
348 * Provide GC_init_gcj_malloc_mp with argument of GC_mark_proc type
349 * Provide a macro to check dirty bits consistency between MPROTECT/SOFT_VDB
350 * Provide debugging variant of GC_toggleref_add
351 * Provide global non-throwing operator new/delete in gccpp library
352 * Provide mechanism to track allocations with heap profiling tools
353 * Provide one flag in each add_compile_options/definitions of CMake script
354 * Put faq.html to codebase, update it and convert it to Markdown format
355 * Put gc_badalc/cpp.cpp instead of .cc ones in CMake script (MSVC/BCC/WCC)
356 * Really ignore bad GC_INITIAL/MAXIMUM_HEAP_SIZE values
357 * Redirect GC_gcj_malloc_ignore_off_page to GC_gcj_malloc for small objects
358 * Redirect GC_malloc_explicitly_typed_ignore_off_page for small objects
359 * Redirect _aligned_malloc/free() in leak_detector.h
360 * Redirect aligned_alloc() and reallocarray() in leak_detector.h
361 * Redirect malloc_size() and _msize() in leak_detector.h
362 * Reduce number of iterations in disclaim and cpp tests
363 * Reduce scope of local variables used for assertion checking in add_to_fl
364 * Reduce size of heap block per-granule maps twice for 4KB heap blocks
365 * Reduce some of big constants in tests to fit into 16-bit int type
366 * Refactoring of GC_n_set_marks and GC_print_block_descr
367 * Refactoring of GC_protect_heap
368 * Refactoring of rt_hash()
369 * Refine WARN message in GC_proc_read_dirty regarding buffer size
370 * Refine column names output by GC_print_block_list
371 * Refine comment about call stack saving and gcc option for i686 in os_dep.c
372 * Refine comment of LOG_PHT_ENTRIES for the case of impossible collisions
373 * Refine comments in code regarding DllMain-based threads registration
374 * Refine comparisons to GC_greatest_plausible_heap_addr
375 * Refine debug message in GC_suspend_handler_inner
376 * Refine documentation of GC_MALLOC_WORDS_KIND
377 * Refine documentation of GC_init_gcj_malloc and GC_get_back_ptr_info
378 * Refine documentation of GC_register_disclaim_proc and GC_finalized_malloc
379 * Refine gcinterface.md that the allocator belongs to SGI STL
380 * Refine main README about the ways available to build the library
381 * Refine that GC_save_regs_in_stack is used by save_callers only on SPARC
382 * Reformat code of GC_save_callers()
383 * Relax required dependencies for atomicopstest (CMake)
384 * Remove -o option where not needed in Makefile.direct (refactoring)
385 * Remove CORD_max_len debugging symbol
386 * Remove EXPORTED_FUNCTIONS linker flag for gctest (Emscripten)
387 * Remove GC_copyright symbol
388 * Remove GC_mark_threads variable (refactoring)
389 * Remove GC_min/max() and simplify heap bounds update in expand_hp_inner
390 * Remove GC_save/print_callers duplicate declaration (refactoring)
391 * Remove GC_world_is_stopped variable (refactoring)
392 * Remove IF_IA64 macro in pthread_stop_world (refactoring)
393 * Remove LOGWL, BYTES_PER_WORD, MAXOBJWORDS and various unused CPP_x macros
394 * Remove MAIN_THREAD flag in GC_thread (refactoring)
395 * Remove MARK_BIT_PER_GRANULE macro (refactoring)
396 * Remove OpenBSD uthreads (GC_OPENBSD_UTHREADS) support
397 * Remove STACK_GROWS_DOWN explicit definitions in gcconfig.h (refactoring)
398 * Remove STACK_GROWS_DOWN macro usage (refactoring)
399 * Remove Symbian makefile
400 * Remove USED_HEAP_SIZE macro (refactoring)
401 * Remove ancient OS2_MAKEFILE
402 * Remove code duplication in GC_free[_inner] (refactoring)
403 * Remove code duplication in gcconfig.h for Hurd (refactoring)
404 * Remove comment from gc_cpp.h about bugs in ancient compilers
405 * Remove commented out code in de_win
406 * Remove de_win.h dependency on cord.h (refactoring)
407 * Remove doc.am, and move gc.man to base folder (refactoring)
408 * Remove duplicate 'called once' check in GC_init_lib_bounds (refactoring)
409 * Remove duplicate documentation of GC_UNDERSCORE_STDCALL in configure
410 * Remove duplication of random numbers generator formula (refactoring)
411 * Remove empty default cases in configure (refactoring)
412 * Remove extra parentheses in return statement (refactoring)
413 * Remove extra space after sizeof (reformatting)
414 * Remove extra variable and rename argument of GC_new_hblk (refactoring)
415 * Remove main_altstack group of static variables (refactoring)
416 * Remove main_pthread_id variable (refactoring)
417 * Remove msvc_dbg.h file (refactoring)
418 * Remove obsolete AC_PROG_LIBTOOL in configure.ac (refactoring)
419 * Remove oom_fn internal type from cord source (refactoring)
420 * Remove outdated info from README about Linux/m68k bug
421 * Remove private pthread_stop_world.h and darwin_stop_world.h (refactoring)
422 * Remove redundant 'private' prefix in include directives in include/private
423 * Remove redundant GC_ATTR_UNUSED for GC_mark_and_push
424 * Remove redundant HOST_TIZEN macro check for SEARCH_FOR_DATA_START
425 * Remove redundant Linux/SPARC checks (refactoring)
426 * Remove redundant check a predefined macro of BCC (refactoring)
427 * Remove redundant includes from tools and disclaim tests (refactoring)
428 * Remove redundant pointer casts to void pointer (refactoring)
429 * Remove specific DATASTART definition for ancient OpenBSD/m68k
430 * Remove thread_blocked field in GC_thread (refactoring)
431 * Remove trailing dot in WARN messages
432 * Remove unneeded cast to word in GC_PUSH_ONE_HEAP/STACK (refactoring)
433 * Remove unneeded casts in GC_PUSH_ALL_SYM (refactoring)
434 * Remove unneeded n_blocks local variable in malloc.c and reclaim.c
435 * Remove unneeded pointer casts of HDR() argument (refactoring)
436 * Remove unprefixed GRANULE_BYTES, TINY_FREELISTS, WORDSZ macros
437 * Remove unreachable code in GC_lookup_pthread (refactoring)
438 * Remove unused DCL_LOCK_STATE (refactoring)
439 * Remove use of emscripten_scan_stack (refactoring)
440 * Remove volatile qualifier for GC_dirty_pages except for MPROTECT_VDB
441 * Remove volatile qualifier for GC_threads (pthreads)
442 * Remove warning at GC_init about USE_PROC_FOR_LIBRARIES and Linux threads
443 * Rename GC_[inner_]start_routine to match that for Win32 (refactoring)
444 * Rename GC_enclosing_mapping to GC_enclosing_writable_mapping (refactoring)
445 * Rename MAP_LEN internal macro to OBJ_MAP_LEN (refactoring)
446 * Rename MARK_BITS_SZ internal macro to HB_MARKS_SZ (refactoring)
447 * Rename README.QUICK to LICENSE and install it by default
448 * Rename README.rs6000 to README.aix
449 * Rename ROUNDED_UP_GRANULES macro to ALLOC_REQUEST_GRANS (refactoring)
450 * Rename doc folder to docs
451 * Rename mark_stack_ptr argument to mark_stack_top globally (refactoring)
452 * Rename p argument to base in dbg_mlc.c/h (refactoring)
453 * Rename size argument in GC_build_fl (refactoring)
454 * Rename stack[_size] in GC_Thread_Rep and GC_register_altstack (refactoring)
455 * Rename thread_args and GC_main_thread in win32_threads.c (refactoring)
456 * Reorder macro definitions for rare architectures in gcconfig.h
457 * Replace C style comments to C++ ones in gc_allocator.h
458 * Replace C-style casts in C++ headers and cpptest (refactoring)
459 * Replace GC_MARK_FO macro with inline functions (refactoring)
460 * Replace comments about GC is held or not with relevant assertions
461 * Replace hard-coded 0x80000000 to SIGNB for pointer-sized values
462 * Replace init_netbsd_elf with init_linux_data_start on NetBSD (refactoring)
463 * Replace obsolete AC_TRY_COMPILE/LINK/RUN in configure.ac (refactoring)
464 * Replace target names with '$@' in Makefile.direct (refactoring)
465 * Report 'none' if no machine-dependent code-to-use detected in configure
466 * Require to specify CPP_WORDSZ in gcconfig.h for each supported arch
467 * Return free memory to OS explicitly before getting new memory from OS
468 * Roundup size passed to GC_expand_hp
469 * Set name of GC marker threads on OpenBSD
470 * Simplify code of GC_allochblk_nth (refactoring)
471 * Simplify code to define USE_x_SPECIFIC macros in thread_local_alloc.h
472 * Simplify expression to clear extra bits in add_ext_descriptor (refactoring)
473 * Simplify gcconfig code to define IRIX5 and ULTRIX on mips (refactoring)
474 * Simplify test_basics() and test_extras() in cordtest (refactoring)
475 * Specify GC_CALLBACK calling conventions for GC_mark_proc
476 * Specify all public headers without path prefix in documentation
477 * Specify that error conditions are unlikely to be true in threads code
478 * Specify that internal allocations failure is unlikely (refactoring)
479 * Specify that out-of-memory is unlikely in typed alloc and make descriptor
480 * State explicitly that license is MIT-style
481 * Support 32-bit mode on E2K
482 * Support CFLAGS_EXTRA in rare build scripts (NT/WCC_MAKEFILE, digimars.mak)
483 * Support Embox/x86 (single-threaded)
484 * Support GC_memalign with alignments greater than HBLKSIZE
485 * Support Linux/sw_64 (sunway-linux)
486 * Support QNX on arm[64] and x86[_64]
487 * Support ThreadSanitizer (GCC)
488 * Support building with Zig (experimental)
489 * Support client stop function properly in maybe_gc and collect_a_little
490 * Support disable_single_obj_compilation option in cmake script
491 * Support malloc redirection on E2K
492 * Support pointer mask/shift set at runtime
493 * Support saving procedure stack at an offset on E2K (multi-threaded only)
494 * Suppress a data race report in debug-related GC_n_set_marks
495 * Test garbage collection from a deep recursion in gctest
496 * Test manual self-suspend in gctest
497 * Test realloc() in leaktest
498 * Test that CORD_oom_fn variable could be set from cordtest
499 * Test world stop while other thread in deep recursion in gctest (pthreads)
500 * Treat GC_arrays as a part of internal memory when printing its size
501 * Treat warnings as errors in C++ code if configure --enable-werror
502 * Treat zero requested size in GC_malloc_many same as that in GC_malloc
503 * Try find libatomic_ops installed by cmake if with_libatomic_ops (CMake)
504 * Turn on MAKE_BACK_GRAPH for all Linux architectures in cmake and configure
505 * Undefine PUSHn macros after use in win32_threads.c (refactoring)
506 * Uniform usage of IS_FORWARDING_ADDR_OR_NIL() and FORWARDED_ADDR()
507 * Uniform use of GC_lookup_by_pthread in GC_pthread_join/detach (refactoring)
508 * Uniformly name Linux/i686 and Linux/x86_64 in documentation
509 * Unify GC_Thread_Rep and thread id type in win32_threads.c (refactoring)
510 * Unify GC_[mark_]lock_holder variable definition (refactoring)
511 * Unify comments about the allocator lock (documentation)
512 * Update information and better describe call stack saving support
513 * Update next_random_no state using AO primitive
514 * Update time statistics about stopped marking even if abandoned
515 * Use AO primitive in GC_noop1 instead of no_sanitize attribute
516 * Use AO primitives in GC_RAND_NEXT instead of no_sanitize attribute
517 * Use AO_t type for hb_marks, hb_sz, hb_descr fields (refactoring)
518 * Use AS_HELP_STRING consistently for AC_ARG_WITH in configure (refactoring)
519 * Use BZERO in GC_save_callers (refactoring)
520 * Use BZERO() to clear jmp_buf variable in GC_with_callee_saves_pushed
521 * Use LIKELY in GC_add_to_heap, GC_lookup_thread, GC_lookup_by_pthread
522 * Use LIKELY in checks of MAIN_THREAD bit (refactoring)
523 * Use GC_HIDE_NZ_POINTER() for hiding ci_arg value in GC_save_callers
524 * Use GC_debug_generic_or_special_malloc in GC_debug_realloc (refactoring)
525 * Use GC_delete_thread instead of GC_delete_gc_thread_no_free (refactoring)
526 * Use GC_printf in cpptest consistently (refactoring)
527 * Use IS_PTRFREE() consistently (refactoring)
528 * Use __typeof__ in GC_PTR_ADD and similar if MS Clang
529 * Use a dedicated integer type to hold function pointers (refactoring)
530 * Use a macro internally to designate Cygwin and MSWin/WinCE (refactoring)
531 * Use a macro internally to designate Free/Net/OpenBSD (refactoring)
532 * Use cast to void instead of the attribute to indicate unused arguments
533 * Use consistent variables naming in typd_mlc.c (refactoring)
534 * Use distinct MACH_TYPE for WebAssembly (refactoring)
535 * Use hdr identifier only for the type (refactoring)
536 * Use hexadecimal format for logging of traced pointer descriptor
537 * Use inline keyword in GC_INLINE (bcc)
538 * Use lb, lg and k argument names uniformly (refactoring)
539 * Use modHBLKSZ where possible (refactoring)
540 * Use ptr_t instead of word internally where appropriate (refactoring)
541 * Use register_my_thread_inner to add initial thread in pthread_support.c
542 * Use signed_word instead of ptrdiff_t for pointers delta (refactoring)
543 * Use single-argument suspend_handler for E2K, HP_PA, IA64, M68K
544 * Use size_t in GC_repeat_read, GC_get_file_len and generic GC_write
545 * Use size_t instead of int where applicable in allchblk.c (refactoring)
546 * Use unsigned32 type for all internal 32-bit variables and literals
547 * Warn if heap has grown while GC was disabled
548 * Workaround 'C-style casting' cppcheck warning in cpptest
549 * Workaround 'GC_arrays._static_roots[] accessed out of bounds' cppcheck FP
550 * Workaround 'GC_parallel_mark_disabled is always false' cppcheck FP
551 * Workaround 'TEXT is unknown macro' cppcheck FP warning
552 * Workaround 'address of a symbol cannot be null' cppcheck FP
553 * Workaround 'condition !setup_header() is always false' cppcheck FP
554 * Workaround 'condition 0!=back_ptr is always true' cppcheck FP
555 * Workaround 'condition weakmap_trylock()!=0' is always false' cppcheck FP
556 * Workaround 'data access w/o lock' code defect FP in GC_incr_bytes_freed
557 * Workaround 'if condition is same as previous if condition' cppcheck FP
558 * Workaround 'integer overflow occurs in GC_make_descriptor' code defect FP
559 * Workaround 'null ptr dereference' cppcheck FP in remove_all_threads_but_me
560 * Workaround 'out-of-bounds access' code defect FP in GC_allochblk_nth
561 * Workaround 'parameter can be declared as pointer to const' cppcheck FP
562 * Workaround 'returning pointer to local variable base' cppcheck FP in misc
563 * Workaround 'scope of sz can be reduced' cppcheck warning in GC_n_set_marks
564 * Workaround 'struct member link_map::l_name is never used' cppcheck warning
565 * Workaround 'total_time<0 is always false' cppcheck FP warning
566 * Workaround 'uninitialized variable bs_lo' cppcheck FP (E2K)
567 * Workaround 'uninitialized variable pos.cur_pos' cppcheck FP in cord files
568 * Workaround 'uninitialized variable sp' cppcheck FP in setjmp_t.c
569 * Workaround 'unsigned int underflow' code defect FP in GC_clear_fl_marks
570 * Workaround an integer overflow code defect in GC_make_descriptor
571 * Workaround integer overflow code defect FP in GC_write, GC_repeat_read
572 * Workaround unsupported 'X' asm constraint in tcc
573 574 575 == [8.2.8] 2024-09-08 ==
576 577 * Allow GC_size() argument to be null
578 * Disable backtrace saving at garbage collections if DONT_SAVE_TO_LAST_STACK
579 * Eliminate 'cast signed to bigger unsigned' CSA warnings in GC_find_limit
580 * Eliminate 'x might be clobbered by longjmp' gcc warning in setjmp_t.c
581 * Fix 'un-mprotect vdb failed' abort with out-of-memory reason on Linux
582 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
583 * Fix GC_debug_realloc to support custom kind
584 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
585 * Fix GC_print_trace_inner to print the last element of the circular buffer
586 * Fix cordtst2.tmp file deletion in cordtest on Windows
587 * Fix double lock in GC_malloc called from backtrace()
588 * Fix handling of page-unaligned boundaries in soft_set_grungy_pages
589 * Fix heap blocks size computation by GC_get_memory_use
590 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
591 * Fix infinite resend lost signals if a thread is restarted by SIGQUIT
592 * Fix null pointer dereference in GC_is_visible if type_descr is null
593 * Fix per_object_helper() after changing hb_sz units
594 * Fix pointer relational comparison in GC_do_enumerate_reachable_objects
595 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
596 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
597 * Fix potential address overflow in GC_add_to_heap
598 * Fix potential buffer overrun during read in GC_text_mapping
599 * Fix various typos in comments
600 * Prevent GC_noop_sink from scanning by the collector
601 * Prevent redirected malloc call from a garbage collection routine
602 * Redirect malloc_usable_size() in leak_detector.h
603 * Remove redundant dirty/reachable_here calls in GC_malloc_explicitly_typed
604 * Update and fix diagrams describing the tree structure for pointer lookups
605 * Use atomic store to set GC_first_nonempty in GC_do_parallel_mark
606 * Use atomic store to set entry id and update cache_ptr in slow_getspecific
607 * Workaround '.obj file not found' error reported by watcom wlib
608 609 610 == [8.2.6] 2024-02-04 ==
611 612 * Avoid unexpected heap growth in gctest for the case of VERY_SMALL_CONFIG
613 * Change gc.man to include gc/gc.h
614 * Check for out-of-memory on every memory allocation in tests
615 * Do not compile pthread_start.c on Cygwin even if build shared libs (CMake)
616 * Eliminate 'alloc_small declared but unused' gcc warning in gctest
617 * Eliminate 'make_key is defined but unused' gcc warning in threadkeytest
618 * Eliminate 'old_segv_handler is defined but unused' gcc warning on OpenBSD
619 * Eliminate 'rand() may return deterministic values' warning
620 * Eliminate 'unused parameter' compiler warnings reported by MS clang
621 * Eliminate 'unused parameter' gcc warning in free() if IGNORE_FREE
622 * Eliminate 'unused value' gcc warnings in init_global_static_roots (Symbian)
623 * Eliminate GCC warning of unsafe __builtin_return_address(1) in Cmake script
624 * Eliminate compiler warning of missing cast in LONG_MULT after shift
625 * Eliminate warning of unused expression result in GC_FreeBSDGetDataStart
626 * Ensure _GNU_SOURCE is defined if HAVE_DLADDR is defined by configure
627 * Fix 'g++ not found' error on OpenBSD (Makefile.direct)
628 * Fix 'implicit declaration of function pthread_atfork' gcc error on MinGW
629 * Fix 'implicit declaration of function sbrk' gcc error on Symbian
630 * Fix 'implicit declaration of iscntrl()' warning in cord/de_win (MinGW)
631 * Fix 'info' buffer potential overrun in GC_save_callers
632 * Fix 'l-value specifies const object' MSVC error in GC_push_many_regs
633 * Fix 'linker input unused' error inside check_c_compiler_flag (CMake)
634 * Fix 'missing binary operator before token' gcc error in gcconfig.h
635 * Fix 'missing sysconf() prototype' gcc error in setjmp_t tool (OpenBSD)
636 * Fix 'sigset_t undeclared' MS VC error if pthreads-w32 is used
637 * Fix 'undefined reference' linker errors if shared build on OpenBSD (CMake)
638 * Fix 'unused GC_set_and_save_fault_handler' warning on OS X
639 * Fix GC_push_stack_for() to push also Xmm registers on Windows/x64
640 * Fix GC_set_handle_fork(1) on Darwin when MPROTECT_VDB but no threads
641 * Fix MACH_TYPE macro redefinition on Symbian/arm
642 * Fix SVR4 macro definition order
643 * Fix asm constraint in LONG_MULT for gcc/x86
644 * Fix assertion violation in GC_get_maps on Linux if malloc redirection
645 * Fix back graph and checksums support in WCC_MAKEFILE
646 * Fix bitwise negation and rounding direction in setjmp_t tool
647 * Fix checksums GC_record_fault invocation on Darwin
648 * Fix closing bracket placement for case statement in configure
649 * Fix deprecation warning about support of CMake older than v3.5
650 * Fix extra 'extern C' for include signal.h in gcconfig.h
651 * Fix getcontext() detection by CMake on OpenBSD
652 * Fix handling of GC_gc_no counter wrap in GC_clear_stack
653 * Fix handling of GC_gc_no counter wrap in GC_notify_or_invoke_finalizers
654 * Fix indent of a closing curly brace in GC_forward_exception
655 * Fix lock assertion violation in GC_try_to_collect_inner on OS X
656 * Fix missing GC_pthread_sigmask on FreeBSD and NetBSD
657 * Fix missing _setjmp() on djgpp
658 * Fix missing atomic barriers in CORD_from_file_lazy
659 * Fix missing outermost parentheses in CORD_pos_cur_char_addr and hugetest
660 * Fix missing redirect and implementation of pthread_sigmask() on OpenBSD
661 * Fix missing type widening before left shift in GC_MAKE_PROC
662 * Fix misspelled GC_HEADERS_H macro in gc_priv.h
663 * Fix null dereference in check_finalizer_nested if redirect malloc on Linux
664 * Fix posix_memalign() to overwrite pointer storage only on success
665 * Fix race in init_lib_bounds on Linux with glibc v2.34+ if redirect malloc
666 * Fix skipped removal of page protection in case of address hash collision
667 * Fix typos in comments
668 * Fix undefined GC_real_pthread_sigmask if redirect malloc on OS X
669 * Fix update of last_back_trace_gc_no if KEEP_BACK_PTRS is not defined
670 * Handle GC_gc_no counter overflow properly in GC_print_trace
671 * Include Darwin CoreFoundation.h only if 32-bit ARM
672 * Make gc_allocator<void> members public
673 * Re-enable incremental mode on OS X (arm64)
674 * Remove .log and cordtest .tmp files by 'make clean' (Makefile.direct)
675 * Remove a redundant check of HOST_ANDROID in gcconfig.h
676 * Remove duplication of random numbers generator formula
677 * Specify constexpr in GC allocators if C++20 or later
678 * Support NetBSD/riscv64
679 * Support non-msys MinGW build by CMake
680 * Turn on handle fork by default on Darwin (multi-threaded only)
681 * Use AO primitives in GC_RAND_NEXT instead of no_sanitize attribute
682 * Workaround 'malloc inconsistent dll linkage' MS VC error in CMake script
683 * Workaround MS Clang failure to compile de_win.rc
684 * Workaround mark stack overflow in GC_push_finalizer_structures on MinGW
685 686 687 == [8.2.4] 2023-05-26 ==
688 689 * Abort with appropriate message if first call of mmap fails with EPERM
690 * Adjust CORD_ec comment placement in ec.h
691 * Adjust WoW64 workaround to work on UWP/WinRT
692 * Adjust naming of Win32/64 and x86/64 words in comments and documentation
693 * Avoid potential race between realloc and GC_block_was_dirty
694 * Do not double-clear first two words of object in GC_generic_malloc
695 * Do not mention FASTLOCK in comment
696 * Do not mix debug and non-debug allocations in disclaim tests
697 * Do not prohibit threaded builds with malloc redirection on non-Linux
698 * Do not prohibit zero proc argument in GC_register_disclaim_proc
699 * Eliminate '&array may not produce intended result' wcc warnings
700 * Eliminate 'GC_unmap_end declared but unused' bcc warning in disclaim_bench
701 * Eliminate 'ISO C++17 does not allow register specifier' gcc warning
702 * Eliminate 'cast signed to bigger unsigned' CSA warning in WARNs, new_thread
703 * Eliminate 'n obtained from untrusted source' code defect FP in test_cpp
704 * Eliminate 'skipping config since MAXSIG/_NSIG is unknown' cppcheck FP
705 * Eliminate data race FP between remove_protection and write_fault_handler
706 * Eliminate data race FP reported in need_unreachable_finalization by TSan
707 * Ensure 'new' system header is included by gc_cpp.h if GC_INCLUDE_NEW
708 * Ensure GC_NO_PTHREAD_SIGMASK defined if no GC_pthread_sigmask prototype
709 * Fix 'EMSCRIPTEN macro redefined' compile error
710 * Fix 'ISO C90 forbids mixed decl and code' warning in SOFT_VDB dirty_init
711 * Fix 'call to undeclared pthread_setname_np' errors in configure and cmake
712 * Fix 'failed to create new win32 semaphore' Cygwin fatal error at fork
713 * Fix 'operator new is missing throw(bad_alloc)' clang warning in gc_cpp.h
714 * Fix 'overflow in conversion from word' g++ warning in GC_init
715 * Fix 'unknown option --no-undefined' linker error in cmake script (OS X)
716 * Fix 'unresolved _end' linker error when targeting Android bitcode
717 * Fix CORD_next() indent inside loop in test_basics() of cordtest
718 * Fix DCL_LOCK_STATE placement in GC_set_oom_fn
719 * Fix GC_excl_table overrun on overflow in GC_exclude_static_roots
720 * Fix GC_thread_is_registered for finished threads
721 * Fix GC_unreachable_finalize_mark_proc to ensure its unique address
722 * Fix GC_unregister_my_thread call before GC functions usage in gctest
723 * Fix IRIX5 defined wrongly on FreeBSD/mips, WinCE/mips, Tandem S-Series
724 * Fix allocated objects count increment in alloc8bytes of gctest
725 * Fix alt-stack handling in GC_push_all_stacks if stack grows up
726 * Fix comparisons to heap boundary in GC_get_back_ptr_info and GC_mark_from
727 * Fix data race in GC_heapsize_at_forced_unmap variable
728 * Fix description of client promise for IGNORE_OFF_PAGE allocated objects
729 * Fix disabling of automatic dynamic libraries registration
730 * Fix double initialization of main thread local free lists on Win32
731 * Fix gccpp and gctba library names in gcinterface.md
732 * Fix infinite loop in disable_gc_for_dlopen and GC_wait_for_gc_completion
733 * Fix infinite wait in pthread_join/detach if thread already finished (Win32)
734 * Fix joinable threads shutdown on NaCl
735 * Fix loop condition over dll_thread_table in GC_lookup_pthread (Win32)
736 * Fix missing GC_CALLBACK for GC_waitForSingleObjectInfinite
737 * Fix missing extern C for __asan_default_options
738 * Fix missing libalphagc.so dependency in Makefile.direct
739 * Fix missing lock while updating GC_in_thread_creation in GC_exit_check
740 * Fix missing recovery from faults in GC_mark_some on Win64 if MinGW
741 * Fix missing result check of pthread_attr_getdetachstate in pthread_create
742 * Fix mistyped function name in documentation of REDIRECT_REALLOC
743 * Fix negative heap size values reported in WARN
744 * Fix null pointer dereference in TRACE_TARGET
745 * Fix of GC_bytes_allocd increment in GC_generic_malloc_inner
746 * Fix overlapping region assertion in mark_some if malloc redirect on Linux
747 * Fix potential SIGSEGV on out-of-memory in gctest
748 * Fix signals delivery fail in find-leak mode if init from non-main thread
749 * Fix stack top/bottom print order in GC_push_all_stacks if stack grows up
750 * Fix store-and-dirty call in GC_CONS
751 * Fix unregistering of thread created by intercepted pthread_create on NaCl
752 * Fix unused GC_parse_version if no SOFT_VDB and no parallel mark on Linux
753 * Fix use of unset errno after pthread_create/sigmask calls
754 * Fix various typos in comments and documentation
755 * Increment allocated objects count after GC_GCJ_MALLOC() in gctest
756 * Invoke GC_oom_fn if GC_make_array_descriptor failed because of no memory
757 * Make Emscripten Asyncify feature optional
758 * Mention gctba library in README.cmake
759 * Prevent 'function should return a value' BCC error in CMake script
760 * Provide meaningful error message in case of Emscripten threaded build
761 * Reduce local variable scope in resend_lost_signals_retry for cppcheck
762 * Remove disable-warning options from WCC_MAKEFILE unrecognized by wcc v2.0
763 * Remove false warning of missing libpthread.so on Linux
764 * Remove redundant 'ifdef THREADS' around LOCK/UNLOCK in call_with_alloc_lock
765 * Remove redundant GC_ATTR_UNUSED for GC_mark_and_push
766 * Remove unused GC_old_sig_mask from gc_locks.h
767 * Replace WARN in GC_mark_some wrapper back to GC_COND_LOG_PRINTF
768 * Specify throw and noexcept for operator new/delete in gc_cpp.h for MS VC
769 * Support Hurd/x86_64
770 * Support client-defined stack pointer adjustment before thread stack push
771 * Suppress 'unreachable code' wcc warning in I_HOLD_LOCK assertion (CMake)
772 * Update autotools for release preparation (ac-2.71, am-1.16.5, m4-1.14.19)
773 * Update dump function name in GC_DUMP_REGULARLY variable documentation
774 * Use emscripten_stack_get_base instead of emscripten_scan_stack
775 * Use sbrk() to get OS memory on Emscripten
776 * Workaround 'writing into region of size 0' gcc warning in suspend_handler
777 * Workaround CSA null pointer dereference FP in invalidate_map of cord/de
778 * Workaround a malfunction of soft-dirty bits clearing on Power9
779 780 781 == [8.2.2] 2022-08-26 ==
782 783 * Abort if no progress with thread suspend/resume signals resending
784 * Add CMake option to force libatomic_ops headers usage
785 * Add _PROP suffix to CORD/GC[CPP]_VERSION variables in CMake script
786 * Allow not to bypass pthread_cancel hardening in pthread_start
787 * Allow to start marker threads in child of single-threaded client
788 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
789 * Avoid potential signal loss before sigsuspend in suspend_handler if TSan
790 * Define SUNOS5SIGS macro for kFreeBSD
791 * Distribute gc_gcj.h and some other headers in single-obj-compilation
792 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
793 * Do not call SET_HDR() to remove forwarding counts if none exists in hblk
794 * Do not call mprotect/mmap to GC_unmap/remap (Linux)
795 * Do not count unmapped regions if GC_unmap is madvise-based (Linux)
796 * Do not define NEED_FIND_LIMIT in case of OpenBSD user threads
797 * Do not fail tests if pthread_create returns resource unavailable error
798 * Do not name GCC intrinsics as C11 ones
799 * Do not probe to find main data root start if dl_iterate_phdr exists
800 * Do not send signal to thread which is suspended manually
801 * Do not use usleep between signals resend if ThreadSanitizer
802 * Eliminate '-pedantic is not option that controls warnings' GCC-6.3 message
803 * Eliminate '/GS cannot protect parameters' MS VC warning in msvc_dbg
804 * Eliminate 'R_AARCH64_ABS64 used with TLS symbol' linker warning (clang)
805 * Eliminate 'buffer overflow detected' FP error in realloc_test
806 * Eliminate 'extension used' clang warning in sparc_mach_dep.S (configure)
807 * Eliminate 'function/data pointer conversion in expression' MSVC warning
808 * Eliminate 'implicit decl of _setjmp' gcc warning if -std=c11 on Cygwin
809 * Eliminate 'layout of aggregates has changed in GCC 5' warning in test_cpp
810 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
811 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
812 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
813 * Eliminate 'potentially uninitialized local variable tc' warning (MSVC)
814 * Eliminate 'skipping config since MAX_HEAP_SECTS is unknown' cppcheck FP
815 * Eliminate 'unused but set variable' gcc warnings in cpptest
816 * Eliminate 'value exceeds maximum size' warnings in debug_malloc, huge_test
817 * Eliminate 'writing into region of size 0' gcc FP warning in realloc
818 * Eliminate ASan stack-buffer-underflow FP in GC_mark_and_push_stack (E2K)
819 * Eliminate code defect about incorrect size of allocated object (leaktest)
820 * Eliminate data race reported by TSan in GC_have_errors
821 * Eliminate division-by-zero FP warning in GC_ASSERT in reclaim_block
822 * Eliminate stringop-overflow gcc-12 warning in CORD__next
823 * Ensure typed objects descriptor is never located in the first word
824 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
825 * Fix 'GC_text_mapping not used' GCC warning if redirect malloc w/o threads
826 * Fix 'ISO C forbids conversion of function pointer to object' warning
827 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
828 * Fix 'undefined reference to __data_start' linker error on Linux/aarch64
829 * Fix 'unresolved __imp__wsprintfA' linker error in msvc_dbg.c (MSVC)
830 * Fix 'unresolved symbol GetModuleHandle' error in win32_threads.c (UWP)
831 * Fix (workaround) stack overflow in gctest on Alpine Linux/s390x
832 * Fix GC_ATTR_NO_SANITIZE_THREAD definition for GCC
833 * Fix GC_allocate_ml incorrect cleanup in GC_deinit if pthreads (MinGW)
834 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
835 * Fix GC_make_descriptor for zero length argument
836 * Fix GC_suspend_thread if called before thread destructor
837 * Fix GC_unmapped_bytes update in GC_unmap for Sony PS/3
838 * Fix SIGSEGV caused by dropped stack access from child process in gctest
839 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
840 * Fix abort in Win32 DllMain if PARALLEL_MARK
841 * Fix abort when GC_repeat_read returns zero
842 * Fix assertion about built-in AO_test_and_set_acquire on sparc64 (gcc-12)
843 * Fix assertion violation in GC_allow_register_threads on Windows
844 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
845 * Fix comment in GC_init regarding GC_init_parallel call
846 * Fix context saving when GC_suspend_thread(self)
847 * Fix data race in fail_proc1 of gctest
848 * Fix hang in GC_free if GC_PREFER_MPROTECT_VDB (Mingw64)
849 * Fix hang in select() called from suspend signal handler if TSan
850 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
851 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
852 * Fix incremental mode enabling in gctest if TEST_MANUAL_VDB
853 * Fix linking of tests in case of finalization is off
854 * Fix lock assertion violation in GC_find_limit if always multi-threaded
855 * Fix memory return to OS in GC_unmap
856 * Fix missing lock when GC_generate_random_valid_address is called
857 * Fix missing write() declaration if CONSOLE_LOG (Watcom)
858 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
859 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
860 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
861 * Fix potential race if start_mark_threads called from threads in child
862 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
863 * Fix pthread_setname_np and dladdr detection by CMake
864 * Fix race between calloc_explicitly_typed and push_complex_descriptor
865 * Fix typos in comments and debugging.md
866 * Fix undefined __stack_base__ on UWP/arm64 (llvm-mingw)
867 * Force GC_with_callee_saves_pushed in suspend_handler if NO_SA_SIGACTION
868 * Link with rt library to get clock_gettime where necessary
869 * Make finalizer_closure pointer read/write atomic in malloc and callback
870 * Move platform-specific sleep call to GC_usleep (refactoring)
871 * Pass -lrt linker option in CMake script on HP/UX, NetBSD
872 * Prevent (fix) parallel custom mark procs run in single-threaded clients
873 * Prevent changing of GC_markers_m1 value while collection in progress
874 * Refer to Makefile.direct instead of deleted Makefile file in README
875 * Relax assertion of hb_n_marks in reclaim_block if more than two markers
876 * Remove IF_IA64 macro in pthread_stop_world (refactoring)
877 * Remove checking of RS6000 completely
878 * Remove duplicate check of MSWIN_XBOX1 in os_dep.c
879 * Remove duplicate include gc_tiny_fl.h in gc_priv.h
880 * Remove non-working check of M68K in gctest
881 * Remove useless TSan W/A about read of mark_lock_holder for Windows
882 * Replace RAISE_SIGNAL macro with a static function (refactoring)
883 * Replace SSH cloning with HTTPS one in README
884 * Retry pthread_kill if EAGAIN (Linux)
885 * Revert "Check real-symbols are already initialized in pthread_join/detach"
886 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
887 * Revert addition of msvc_dbg.h in include.am
888 * Set default build type to RelWithDebInfo (CMake)
889 * Start configure help messages with a lower case letter
890 * Support 'z' format modifier by CORD_vsprintf
891 * Support Elbrus 2000 (Linux/e2k)
892 * Support GCC MCF thread model (mcfgthreads) in configure (MinGW)
893 * Support GC_remove_roots on Win32
894 * Support OpenBSD/riscv64
895 * Support build using Makefile.direct on Linux/sparc
896 * Support space-separated flags in CFLAGS_EXTRA passed to CMake
897 * Update README.win32 about default build configuration (configure, cmake)
898 * Update documentation of GC_RATE and MAX_PRIOR_ATTEMPTS
899 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
900 * Use SIGUSR1/2 on FreeBSD/arm64
901 * Use compiler TLS on NetBSD only if at least gcc-4.4 or clang-3.9
902 * Workaround 'info is not assigned' cppcheck FP if assertions on (OS X)
903 * Workaround SIG_SUSPEND delivery to thread inside mutex_lock fail if TSan
904 * Workaround TSan FP about race between generic_malloc and array_mark_proc
905 * Workaround TSan FP in acquire_mark_lock called from fork_prepare_proc
906 * Workaround TSan FP warning in finalized_malloc, push_unconditionally
907 * Workaround TSan FP warning in fork_prepare_proc
908 * Workaround TSan FP warning in push_marked1/2/4, ptr_store_and_dirty
909 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
910 * Workaround call stack size exceeded in gctest (Wasm)
911 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage
912 * Workaround gctest hang if test compiled as C++ code by MSVC (CMake)
913 * Workaround msvc_dbg.c build failure on arm[64] (MSVC)
914 915 916 == [8.2.0] 2021-09-29 ==
917 918 * Add API for accessing incremental GC time limit with nanosecond precision
919 * Add API function to force start of incremental collection
920 * Add GC_ prefix to scan_ptr and some other static variables (refactoring)
921 * Add GC_get/set_disable_automatic_collection API
922 * Add I_HOLD_LOCK assertion to expand_hp_inner and related functions
923 * Add assertion on free-list argument and result of GC_new_kind
924 * Add assertion that GC is initialized to base incremental_protection_needs
925 * Add assertions that GC_page_size is initialized
926 * Add cordtest, staticrootstest, test_cpp, tracetest, disclaim tests (CMake)
927 * Add debug messages on thread suspend/resume (Win32)
928 * Add dummy testing of GC_incr_bytes_allocd/freed
929 * Add table of contents in gcdescr.md
930 * Add testing of GC_CALLOC/MALLOC_EXPLICITLY_TYPED (gctest)
931 * Adjust formatting of numbered lists in README.md to match other .md files
932 * Adjust highlighting of API prototypes in gcinterface.md
933 * Adjust macro def/usage for AVR32, CRIS, NETBSD, OPENBSD, SH4 in gcconfig.h
934 * Adjust printf calls in gctest check_heap_stats so that each has new-line
935 * Allow incremental GC on Cygwin
936 * Allow memory unmapping in case of MPROTECT_VDB
937 * Allow to disable GWW or mprotect-based VDB at build
938 * Allow to disable Glibc FPU exception mask and TSX workarounds (Linux)
939 * Allow to disable __builtin_return_address(1) usage (x86 and x64)
940 * Allow to specify custom value of LOG_PHT_ENTRIES
941 * Always abort on failure to access /proc/self/maps (Linux)
942 * Always define default_push_other_roots (code refactoring)
943 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
944 * Avoid initial 3ms pause on world stop/start with GC_retry_signals (Linux)
945 * Build cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE
946 * Build gc as a shared multi-threaded library by default (CMake)
947 * Build gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE
948 * Build gctba library
949 * Build shared libraries by default (WCC_MAKEFILE)
950 * Change CLOCK_TYPE to timespec for Nintendo Switch (code refactoring)
951 * Change EMSCRIPTEN macro for internal use to no-underscore format
952 * Change log_size fields of finalizer to unsigned type (code refactoring)
953 * Change type of toggleref_array_size/capacity to size_t (code refactoring)
954 * Check leak of objects allocated by CRT malloc in gctest (MS VC)
955 * Check real-symbols are already initialized in pthread_join/detach
956 * Collapse multiple includes of windows.h (code refactoring)
957 * Comments reformatting in mark.c to properly delimit sentences
958 * Compile de test GUI app with resources (CMake)
959 * Compile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)
960 * Compile msvc_dbg.c by CMake script (MS VC)
961 * Declare API function and print amount of memory obtained from OS
962 * Define GC_win32_free_heap API function for all Windows targets
963 * Define STATIC macro to static by default
964 * Depend number of fork_a_thread calls on NTHREADS (gctest)
965 * Detect dladdr() presence in CMake script
966 * Detect presence of execinfo.h system header in CMake script
967 * Detect presence of getcontext and dl_iterate_phdr in CMake script
968 * Detect sigsetjmp() availability in CMake script
969 * Disable Clang/GCC aliasing optimization in CMake script by default
970 * Do not build tests by default (Makefile.direct and other Makefiles)
971 * Do not build the tests by default (CMake)
972 * Do not call GC_push_conditional unless PROC_VDB
973 * Do not call add_to_our_memory with null pointer (refactoring)
974 * Do not compile pthread_*.c files in Cygwin or MSYS (CMake)
975 * Do not define GC_write_cs for Xbox One target
976 * Do not define HAVE_NO_FORK for all Unix-like systems
977 * Do not hard-code CMAKE_DL_LIBS value and install paths (CMake)
978 * Do not hard-code finalizable objects limit which triggers GC
979 * Do not update scratch_last_end_ptr unless used by reg dynamic libraries
980 * Document GC_incr_bytes_allocd/freed API function
981 * Eliminate '(long)size<=0 is always false' cppcheck FP
982 * Eliminate 'Consecutive return is unnecessary' cppcheck style warning
983 * Eliminate 'accessing GC_dont_gc without lock' in GC_init code defect FP
984 * Eliminate 'bytes_freed access w/o lock in incr_bytes_free' code defect FP
985 * Eliminate 'checking if unsigned i < 0' cppcheck FP in is_heap_base
986 * Eliminate 'hash_val value is never used' cppcheck false positive
987 * Eliminate 'passing tainted var maps_buf to tainted sink' code defect FP
988 * Eliminate 'retry_cnt is assigned value but never used' cppcheck FP
989 * Eliminate 'stop variable is always 0' compiler warning in print_callers
990 * Eliminate 'struct member os_callback is never used' cppcheck warning
991 * Eliminate 't->flags not atomically updated' code defect FP
992 * Eliminate 'tmpl might be accessed at non-zero index' cppcheck error
993 * Eliminate GCC warning of unsafe __builtin_return_address(1)
994 * Eliminate code duplication in reclaim_clear and disclaim_and_reclaim
995 * Eliminate double lock code defect false positive in generic_lock
996 * Eliminate memory leak reported in add_current_malloc_heap at exit (Win32)
997 * Emscripten single-threaded support (detect stack base, push registers)
998 * Enable CMake-based build for Borland and Watcom compilers
999 * Enable compilation without C runtime (Win32)
1000 * Enable fork testing in single-thread builds (Unix-like)
1001 * Enable mprotect-based incremental GC for Linux/arm and Linux/aarch64
1002 * Enable true incremental collection even if parallel marker is on
1003 * Enable use of __builtin_unwind_init() if clang-8 or later
1004 * Ensure ELFSIZE is defined in dyn_load.c for OpenBSD (code refactoring)
1005 * Ensure add_to_heap_inner arguments are valid (refactoring)
1006 * Ensure all getters and setters are run at least once by gctest (pthreads)
1007 * Export CMake targets with namespace BDWgc
1008 * Fix 'const obj must be initialized if not extern' error in gc_alloc_ptrs.h
1009 * Fix ./libgc.la dependency on FreeBSD (Automake)
1010 * Fix HOST determination in CMake script
1011 * Fix copyright message in de_win.rc, gc_cpp.cc, ec.h and specific.h
1012 * Fix missing OS_TYPE definition for some targets
1013 * Fix mmap(PROT_NONE) failure if RLIMIT_AS value is low (Linux)
1014 * Generate cordtest and de executable files in GC base folder
1015 * Generate pkg-config metadata file (CMake)
1016 * Get rid of some non-ELF ifdefs (code refactoring)
1017 * Handle potential incomplete buffer read in GC_linux_main_stack_base
1018 * Implement GET_TIME for Nintendo Switch
1019 * Increase NTHREADS value in tests if code coverage analysis
1020 * Install docs and man page if enable_docs (CMake)
1021 * Install gc_gcj.h and gc_pthread_redirects.h only if appropriate
1022 * Log abort message details even if not print_stats (unless SMALL_CONFIG)
1023 * Mark buffer returned by get_maps as const (code refactoring)
1024 * Move C++ GC_ATTR_EXPLICIT and GC_NOEXCEPT definition to gc_config_macros.h
1025 * Move GC state non-pointer variables into GC_arrays (code refactoring)
1026 * Move GC state pointer variables into GC_arrays
1027 * Move GC_scratch_recycle_inner() to alloc.c (refactoring)
1028 * Move GC_throw_bad_alloc definition to new C++ file
1029 * Move QNX and Emscripten macro definitions to proper place in gcconfig.h
1030 * Move definition of GC_n_mark_procs and GC_n_kinds from mark.c to misc.c
1031 * New API (GC_set_markers_count) to control number of parallel markers
1032 * New API function to clear GC exclusion table
1033 * New API function to get size of object debug header
1034 * New API standalone functions to acquire and release the allocator lock
1035 * New CMake option (disable_gc_debug) to remove debugging code
1036 * New CMake option (disable_handle_fork) to disable fork handling completely
1037 * New macro (CONSOLE_LOG) to enable logging to console on Win32
1038 * New macro (GCTEST_PRINT_VERBOSE) to enable verbose logging in test.c only
1039 * New macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)
1040 * OpenBSD does not use ELF_CLASS (code refactoring)
1041 * Pass -D GC_DLL -fvisibility=hidden if default configure build is requested
1042 * Pass -no-undefined linker flag if building shared libraries (CMake)
1043 * Print pid of child processes if verbose logging (gctest)
1044 * Read environment variables from a file on WinCE (CMake script)
1045 * Reduce stack-allocated buffer in get_nprocs from 4KB to 1.7KB
1046 * Refine flags field comment in pthread_support.h
1047 * Reflect result of VDB selection at runtime in incremental_protection_needs
1048 * Reformat code of GC_push_roots
1049 * Reformat gc.man (wrap long lines)
1050 * Reformatting and code refactoring of CMake script
1051 * Remove 'current users' section from overview.md
1052 * Remove 'distributed ports', 'scalable versions' sections from overview.md
1053 * Remove AC_MSG_RESULT for THREADDLLIBS (dgux386)
1054 * Remove Borland-specific Makefile and gc.mak script
1055 * Remove GC_eobjfreelist variable in typd_mlc.c (code refactoring)
1056 * Remove GC_gcj_malloc_initialized variable (code refactoring)
1057 * Remove Linux-specific commands for building cord/de from Makefile.direct
1058 * Remove Win32 main_thread static variable if threads discovery is disabled
1059 * Remove code duplication between GC_unmap and GC_unmap_gap (refactoring)
1060 * Remove code duplication between PROTECT and UNPROTECT macros (refactoring)
1061 * Remove commented out assignment of gc_use_mmap in configure (refactoring)
1062 * Remove dash characters comprising prefix of some verbose logs (gctest)
1063 * Remove dependency on user32.dll import library from static libgc (Win32)
1064 * Remove documentation specific to particular old BDWGC releases
1065 * Remove duplicate Linux-related macro definitions in gcconfig.h
1066 * Remove duplicate macro definitions in gcconfig.h except for Linux
1067 * Remove gcmt-dll generation, rename libgc-lib.a to libgc.a (CMake)
1068 * Remove goto statement in print_callers (code refactoring)
1069 * Remove limit on number of heap sections
1070 * Remove new_gc_alloc.h file
1071 * Remove redundant GC_with_callee_saves_pushed call in multi-threaded builds
1072 * Remove redundant check of GC_free argument in register_finalizer
1073 * Remove redundant type casts in backgraph HEIGHT_UNKNOWN/IN_PROGRESS
1074 * Remove unused GC_prev_heap_addr (refactoring)
1075 * Remove unused STACK_GRAN macro definitions (code refactoring)
1076 * Remove unused sparc_sunos4_mach_dep.s file
1077 * Remove useless empty statements after block ones (refactoring)
1078 * Remove weakobj_free_list variable in disclaim_weakmap_test (refactoring)
1079 * Rename READ to PROC_READ in os_dep.c (code refactoring)
1080 * Rename cord/cord test executable to de (CMake)
1081 * Rename ext_descr to typed_ext_descr_t (code refactoring)
1082 * Rename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE
1083 * Rename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile
1084 * Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
1085 * Rename nothreads option to disable_threads in NT_MAKEFILE
1086 * Repeat run_one_test NTHREADS times by gctest if single-threaded
1087 * Replace "msecs" with "ms" in all comments and messages
1088 * Replace 'stack base' with 'stack bottom' in the documentation
1089 * Replace SN_TARGET_ORBIS to PLATFORM_* and GC_NO_* macros
1090 * Replace _M_AMD64 macro with _M_X64 (code refactoring)
1091 * Replace find_limit_openbsd to find_limit_with_bound (OpenBSD 5.2+)
1092 * Replace obsolete AC_HELP_STRING with AS_HELP_STRING (refactoring)
1093 * Replace push_one calls with push_many_regs one for Win32 thread context
1094 * Report memory region bounds and errno on GC_unmap/remap failure
1095 * Report presence of process fork testing (gctest)
1096 * Report time with a nanosecond precision where available
1097 * Retry suspend/resume signals on all platforms by default
1098 * Run tree and typed tests in child process (gctest)
1099 * Set GC_collecting hint for GC_collect_a_little_inner calls (pthreads)
1100 * Set name of GC marker threads
1101 * Set so-version for installed shared libraries (CMake)
1102 * Simplify logged message in scratch_recycle
1103 * Simplify loops of collect_a_little/stopped_mark invoking mark_some
1104 * Support -fvisibility=hidden option in CMake script
1105 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)
1106 * Support FreeBSD/RISC-V, Linux/arc, LoongArch, OpenBSD/powerpc64
1107 * Support header files installation (CMake)
1108 * Support most configure options in CMake script
1109 * Suppress warnings in test_tinyfl() of gctest reported by Watcom C complier
1110 * Take nanoseconds into account when updating full_gc_total_time
1111 * Turn off C++ API by default, export it in gccpp library (CMake)
1112 * Turn on automatic fork() handling by default on Android
1113 * Update README.cmake regarding Unix, C++ and tests
1114 * Update libgc.so version info to differentiate against v8.0.x
1115 * Update the ASCII diagrams describing the tree structure for pointer lookups
1116 * Update the documentation to match the current GC implementation
1117 * Upgrade cmake_minimum_required(version) to 3.1
1118 * Use CreateThread without GC_ prefix in gctest (code refactoring)
1119 * Use KB/MB/GB abbreviations uniformly across entire documentation
1120 * Use USE_MMAP_ANON when USE_MMAP is configured on OpenBSD
1121 * Use a specific Emscripten allocator for Tiny
1122 * Use atomic primitives for Sony PlayStation Portable 2 and PS4
1123 * Use better precision Windows timers
1124 * Use clock_gettime() instead of clock() on Cygwin and Linux
1125 * Use compiler TLS on FreeBSD and NetBSD
1126 * Use mprotect-based VDB on PowerPC and S390 (Linux)
1127 * Use soft dirty bits on Linux (x86, powerpc, s390, x64)
1128 * Workaround 'condition result<=0 is always false' cppcheck FP in get_maps
1129 * Workaround 'push_regs configured incorrectly' error (GCC-11)
1130 * Workaround 'same value in both branches of ternary operator' cppcheck FP
1131 * Workaround various cppcheck false positives
1132 1133 1134 == [8.0.14] 2024-09-07 ==
1135 1136 * Disable backtrace saving at garbage collections if DONT_SAVE_TO_LAST_STACK
1137 * Fix infinite resend lost signals if a thread is restarted by SIGQUIT
1138 1139 Also, includes 7.6.22 changes
1140 1141 1142 == [8.0.12] 2024-02-04 ==
1143 1144 * Eliminate 'make_key is defined but unused' gcc warning in threadkeytest
1145 * Ensure _GNU_SOURCE is defined if HAVE_DLADDR is defined by configure
1146 * Fix 'implicit declaration of function pthread_atfork' gcc error on MinGW
1147 * Fix 'missing binary operator before token' gcc error in gcconfig.h
1148 * Fix GC_set_handle_fork(1) on Darwin when MPROTECT_VDB but no threads
1149 * Fix checksums GC_record_fault invocation on Darwin
1150 * Fix extra 'extern C' for include signal.h in gcconfig.h
1151 1152 Also, includes 7.6.20 changes
1153 1154 1155 == [8.0.10] 2023-05-26 ==
1156 1157 * Abort with appropriate message if first call of mmap fails with EPERM
1158 * Avoid potential race between realloc and GC_block_was_dirty
1159 * Do not prohibit zero proc argument in GC_register_disclaim_proc
1160 * Eliminate '&array may not produce intended result' wcc warnings
1161 * Eliminate 'cast signed to bigger unsigned' CSA warning in GC_new_thread
1162 * Ensure 'new' system header is included by gc_cpp.h if GC_INCLUDE_NEW
1163 * Fix 'overflow in conversion from word' g++ warning in GC_init
1164 * Fix description of client promise for IGNORE_OFF_PAGE allocated objects
1165 * Fix infinite loop in disable_gc_for_dlopen and GC_wait_for_gc_completion
1166 * Fix missing extern C for __asan_default_options
1167 * Fix store-and-dirty call in GC_CONS
1168 * Fix typo in comment of GC_Thread_Rep.dummy
1169 * Fix use of unset errno after pthread_sigmask calls
1170 * Increment allocated objects count after GC_GCJ_MALLOC() in gctest
1171 * Remove redundant GC_ATTR_UNUSED for GC_mark_and_push
1172 * Workaround CSA null pointer dereference FP in invalidate_map of cord/de
1173 1174 Also, includes 7.6.18 changes
1175 1176 1177 == [8.0.8] 2022-08-26 ==
1178 1179 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
1180 * Define SUNOS5SIGS macro for kFreeBSD
1181 * Distribute gc_disclaim.h in single-obj-compilation
1182 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
1183 * Do not name GCC intrinsics as C11 ones
1184 * Do not send signal to thread which is suspended manually
1185 * Eliminate 'buffer overflow detected' FP error in realloc_test
1186 * Eliminate 'extension used' clang warning in sparc_mach_dep.S (configure)
1187 * Eliminate 'function/data pointer conversion in expression' MSVC warning
1188 * Eliminate 'implicit decl of _setjmp' gcc warning if -std=c11 on Cygwin
1189 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
1190 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
1191 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
1192 * Eliminate 'value exceeds maximum size' warnings in debug_malloc, huge_test
1193 * Eliminate 'writing into region of size 0' gcc FP warning in realloc
1194 * Eliminate division-by-zero FP warning in GC_ASSERT in reclaim_block
1195 * Eliminate stringop-overflow gcc-12 warning in CORD__next
1196 * Ensure typed objects descriptor is never located in the first word
1197 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
1198 * Fix 'GC_text_mapping not used' GCC warning if redirect malloc w/o threads
1199 * Fix 'ISO C forbids conversion of function pointer to object' warning
1200 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
1201 * Fix 'undefined reference to __data_start' linker error on Linux/aarch64
1202 * Fix GC_allocate_ml incorrect cleanup in GC_deinit if pthreads (MinGW)
1203 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
1204 * Fix GC_make_descriptor for zero length argument
1205 * Fix GC_suspend_thread if called before thread destructor
1206 * Fix GC_unmapped_bytes update in GC_unmap for Sony PS/3
1207 * Fix SIGSEGV caused by dropped stack access from child process in gctest
1208 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
1209 * Fix abort in Win32 DllMain if PARALLEL_MARK
1210 * Fix assertion about built-in AO_test_and_set_acquire on sparc64 (gcc-12)
1211 * Fix assertion violation in GC_allow_register_threads on Windows
1212 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
1213 * Fix context saving when GC_suspend_thread(self)
1214 * Fix data race in fail_proc1 of gctest
1215 * Fix get_maps failure when GC_repeat_read returns zero
1216 * Fix hang in GC_free if GC_PREFER_MPROTECT_VDB (Mingw64)
1217 * Fix hang in select() called from suspend signal handler if TSan
1218 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
1219 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
1220 * Fix incremental mode enabling in gctest if TEST_MANUAL_VDB
1221 * Fix lock assertion violation in GC_find_limit if always multi-threaded
1222 * Fix missing lock when GC_generate_random_valid_address is called
1223 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
1224 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
1225 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
1226 * Fix potential race if start_mark_threads called from threads in child
1227 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
1228 * Fix race between calloc_explicitly_typed and push_complex_descriptor
1229 * Fix stack overflow in gctest on Alpine Linux/s390x
1230 * Fix typo in debugging.html
1231 * Fix typos in comments of .c files and gc.h
1232 * Fix undefined __stack_base__ on UWP/arm64 (llvm-mingw)
1233 * Make finalizer_closure pointer read/write atomic in malloc and callback
1234 * Prevent (fix) parallel custom mark procs run in single-threaded clients
1235 * Prevent changing of GC_markers_m1 value while collection in progress
1236 * Refer to Makefile.direct instead of deleted Makefile file in README
1237 * Relax assertion of hb_n_marks in reclaim_block if more than two markers
1238 * Remove checking of RS6000 completely
1239 * Remove duplicate check of MSWIN_XBOX1 in os_dep.c
1240 * Remove non-working check of M68K in gctest
1241 * Remove useless TSan W/A about read of mark_lock_holder for Windows
1242 * Replace SSH cloning with HTTPS one in README
1243 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
1244 * Revert addition of msvc_dbg.h in include.am
1245 * Support 'z' format modifier by CORD_vsprintf
1246 * Update documentation of GC_RATE and MAX_PRIOR_ATTEMPTS
1247 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
1248 * Workaround TSan FP about race between generic_malloc and array_mark_proc
1249 * Workaround TSan FP warning in finalized_malloc, push_unconditionally
1250 * Workaround TSan FP warning in push_marked1/2/4, ptr_store_and_dirty
1251 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
1252 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage (tests)
1253 1254 1255 == [8.0.6] 2021-09-28 ==
1256 1257 * Add loop to handle abort error like in suspend logic on Darwin
1258 * Add support of OpenBSD/aarch64
1259 * Add threading libraries to bdw-gc.pc
1260 * Allocate start_info struct on the stack in GC_pthread_create
1261 * Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
1262 * Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
1263 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
1264 * Check _MSVC_LANG macro in addition to __cplusplus (MS VC)
1265 * Compile C++ code with exception handling enabled in NT_MAKEFILE
1266 * Define OS_TYPE and DATAEND for UWP targets
1267 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
1268 * Do not report 'Incremental GC incompatible' warning more than once
1269 * Do not use Manual VDB mode if C malloc is redirected
1270 * Do not use iOS private symbols
1271 * Eliminate 'GC_non_gc_bytes is deprecated' warning in new_gc_alloc.h
1272 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
1273 * Eliminate 'cast between incompatible func types' warnings for FARPROC vars
1274 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
1275 * Eliminate 'gc_pthread_redirects.h should contain header guard' code defect
1276 * Eliminate 'implicit declaration of sbrk' gcc warning if -std=c11 on Cygwin
1277 * Eliminate 'possible loss of data' BCC and MS VC warnings
1278 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
1279 * Eliminate 'unused function' compiler warnings (GC_add_map_entry, GC_lock)
1280 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
1281 * Enable sbrk-to-mmap fallback on major supported Unix-like platforms
1282 * Ensure process is running on one CPU core if AO ops are emulated with locks
1283 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
1284 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
1285 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
1286 * Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
1287 * Fix 'Wrong __data_start/_end pair' if -Bsymbolic-functions used (Linux)
1288 * Fix 'condition pred!=NULL is always true' compiler warning
1289 * Fix 'external linkage required for var because of dllimport' error on MinGW
1290 * Fix 'ulong undefined' compilation error on AIX
1291 * Fix 'undefined reference to __data_start' linker error on RISC-V
1292 * Fix 'use of undeclared BUS_PAGE_FAULT' compilation error on FreeBSD 12
1293 * Fix 'write to GC log failed' error (Cygwin)
1294 * Fix 'wrong finalization data' gctest failure on Windows
1295 * Fix CMake build on macOS Catalina
1296 * Fix GC_OPENBSD_THREADS definition (OpenBSD/hppa)
1297 * Fix GC_proc_fd value in child process at fork (Solaris)
1298 * Fix GC_with_callee_saves_pushed for Android NDK r23 (clang-12)
1299 * Fix MPROTECT_VDB definition for single-threaded GC builds
1300 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
1301 * Fix STACKBOTTOM on 32-bit HP/UX 11.11
1302 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
1303 * Fix assertion violation in register_dynlib_callback on Android
1304 * Fix build for OS X (CMake)
1305 * Fix building of shared library with C++ support on MinGW
1306 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
1307 * Fix configure message about 'AIX gcc optimization fix'
1308 * Fix cordtest build in SMakefile.amiga
1309 * Fix data race regarding *rlh value in generic_malloc_many
1310 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
1311 * Fix gc_allocator.h compilation by Clang
1312 * Fix gc_cflags variable name in configure (HP/UX)
1313 * Fix handling of areas smaller than page size in GC_scratch_recycle
1314 * Fix incorrect markup formatting in documentation
1315 * Fix misaligned tlfs passed to AO_load on m68k
1316 * Fix missing GC_quiet declaration in pcr_interface.c
1317 * Fix missing gc_dlopen.c and specific.c in CMake script
1318 * Fix missing scratch_last_end_ptr update (Irix)
1319 * Fix mmap() failures on AIX, HP/UX and Haiku
1320 * Fix overflow of scratch_free_ptr value
1321 * Fix page_was_[ever_]dirty() for static roots (Solaris)
1322 * Fix printf format specifier in simple_example.md
1323 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
1324 * Fix subexpression widening in memhash() of disclaim_weakmap_test
1325 * Fix test_cpp failure caused by arbitrary link order (Win32)
1326 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
1327 * Fix various typos mostly in documentation files
1328 * Fix word size, data start and alignment for OpenBSD/mips64(el)
1329 * Include <alloca.h> when using alloca on AIX
1330 * Limit number of unmapped regions (Linux and DragonFly)
1331 * New macro to avoid system-wide new/delete inlining in gc_cpp.h (Win32)
1332 * Prevent GetThreadContext failure (Windows)
1333 * Prevent WARN of incompatible incremental GC if default or manual VDB
1334 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
1335 * Refactoring of WoW64 workaround (Win32)
1336 * Refine GC_INIT documentation about its multiple invocation
1337 * Refine GC_parallel documentation in gc.h
1338 * Refine do_blocking() documentation in gc.h
1339 * Remove a misleading comment about Solaris in gc.h
1340 * Remove cord .h files from list of non-installed headers (Automake)
1341 * Remove dead part of condition to define NEED_FIND_LIMIT in gc_priv.h
1342 * Remove gcmt-lib generation by CMake
1343 * Support MSYS builds by CMake and configure
1344 * Update documentation about the incremental collector support
1345 * Use HEURISTIC2 on OpenBSD when single-threaded
1346 * Use pstat_getprocvm to determine main stack bottom on HP-UX
1347 * Workaround 'expression is only useful for its side effects' WCC warning
1348 * Workaround clang-3.8/s390x bug when processing __builtin_frame_address
1349 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
1350 1351 1352 == [8.0.4] 2019-03-02 ==
1353 1354 * Avoid a full GC when growing finalizer tables if in incremental mode
1355 * Avoid potential race in hb_sz access between realloc and reclaim_block
1356 * Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
1357 * Avoid unexpected heap growth in gctest caused by GC_disable
1358 * Ensure result of every variant of MS_TIME_DIFF has unsigned long type
1359 * Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
1360 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
1361 * Fix 'unexpected mark stack overflow' abort in push_all_stack
1362 * Fix 'wrong __data_start/_end pair' error on Android
1363 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
1364 * Fix GetThreadContext stale register values use if WoW64 (Win32)
1365 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
1366 * Fix thread_info() count argument value (OS X)
1367 * Support de_win.c compilation by Makefile.direct (cord/de)
1368 1369 1370 == [8.0.2] 2018-12-23 ==
1371 1372 * Abort with appropriate message if executable pages cannot be allocated
1373 * Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
1374 * Add paths to filenames mentioned in the copyright section in README
1375 * Add test using disclaim notifiers to implement a weak map
1376 * Adjust #error messages format
1377 * Allow to force executable pages allocation in gctest
1378 * Avoid potential 'macro redefinition' errors for config.h macros
1379 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
1380 * Check result of pthread_mutex_unlock in specific.c
1381 * Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
1382 * Default to non-executable memory allocation across all make scripts
1383 * Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
1384 * Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
1385 * Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
1386 * Do not use spin locks if AO test-and-set is emulated (pthreads)
1387 * Document HANDLE_FORK macro optional usage in Makefile.direct
1388 * Document assertion in the setters that used to return old value
1389 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
1390 * Eliminate 'casting signed to bigger unsigned int' CSA warning
1391 * Eliminate 'different const qualifiers' MS VC warnings in cordbscs
1392 * Eliminate 'function is never used' cppcheck warning for calloc/realloc
1393 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
1394 * Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
1395 * Eliminate 'struct member is never used' cppcheck warnings in os_dep
1396 * Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
1397 * Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
1398 * Eliminate redundant check in backwards_height
1399 * Fix 'USE_MUNMAP macro redefinition' error for NaCl
1400 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1401 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1402 * Fix 'too wide non-owner permissions are set for resource' code defect
1403 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
1404 * Fix GC_register_disclaim_proc for leak-finding mode
1405 * Fix a deadlock in write_fault_handler if AO_or is emulated
1406 * Fix comment typo in CMakeLists.txt
1407 * Fix concurrent bitmap update in GC_dirty
1408 * Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
1409 * Fix executable memory allocation in GC_unix_get_mem
1410 * Fix hbp overflow in GC_install_counts
1411 * Fix linkage with a system libatomic_ops shared library
1412 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
1413 * Fix marking of finalizer closure object
1414 * Fix marks and hb_n_marks consistency when disclaim returns true
1415 * Fix memory allocation on GCF (Linux/x64)
1416 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1417 * Fix test_cpp assertion violation in find-leak mode
1418 * Fix tests linkage with internal atomic_ops.o
1419 * Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
1420 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1421 * New macro to suppress printing of leaked objects
1422 * Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
1423 * Prefix internal durango_get_mem symbol with 'GC_'
1424 * Prevent double inclusion of javaxfc.h and private/specific.h
1425 * Print relevant message in tests not appropriate for leak detection mode
1426 * Reduce scope of local variables in GC_remove_all_threads_but_me
1427 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
1428 * Refine documentation in gc_disclaim.h
1429 * Remove extra USE_MMAP definition for Interix
1430 * Remove redundant header double-inclusion checks in the private headers
1431 * Remove strlen calls with a constant string argument in msvc_dbg
1432 * Specify register_disclaim_proc and finalized_malloc argument as non-null
1433 * Support UWP/arm64 target
1434 * Test marking of finalizer closure object in disclaim_test
1435 * Turn off leak detection mode explicitly in cord/de
1436 * Turn off parallel marker, thread-local allocation if used AO ops emulated
1437 * Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
1438 * Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
1439 * Update NO_EXECUTE_PERMISSION documentation
1440 * Update documentation about arm64 ABI in gcconfig.h
1441 * Use AO_or in async_set_pht_entry_from_index if available
1442 * Use GC_WORD_MAX macro across all C source files
1443 * Use macro to operate on a flag residing in GC_stop_count
1444 * Use standalone private macro to guard against ptr_t redefinition
1445 * Workaround '#error' cppcheck messages in backgraph and private headers
1446 * Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
1447 * Workaround 'GC_dump function is never used' cppcheck warning
1448 * Workaround 'local address assignment to a global variable' CSA warning
1449 * Workaround 'local variable end shadows outer symbol' cppcheck warnings
1450 * Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
1451 * Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
1452 * Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
1453 * Workaround 'potential non-terminated string' false positive in cordbscs
1454 * Workaround 'value of _MAX_PATH is unknown' cppcheck warning
1455 * Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
1456 1457 1458 == [8.0.0] 2018-09-05 ==
1459 1460 * Accept Android platform by both CMake and configure
1461 * Access finalize_now atomically to avoid TSan warning without no-sanitize
1462 * Acknowledge thread restart from suspend_handler (NetBSD)
1463 * Add a sanity check that load_acquire and store_release are available
1464 * Add AO primitives implementation to GC based on GCC atomic intrinsic
1465 * Add assertion for suspend_ack_sem in start_world
1466 * Add assertion to allocobj that live unmarked object cannot be reclaimed
1467 * Add assertions about held lock when accessing all_bottom_indices
1468 * Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
1469 * Add assertions to finalize and threads support for MANUAL_VDB needs
1470 * Add basic calculation of the total full-collection time
1471 * Add check that gc_cpp operator delete is called (test_cpp)
1472 * Add debug logging to new_thread about GC_threads hash table collisions
1473 * Add GC prefix to _MSVC_DBG_H macro
1474 * Add initial RISC-V support
1475 * Add Makefile target to run all tests without test-driver
1476 * Add test_atomic_ops to perform minimal testing of used atomic primitives
1477 * Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
1478 * Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
1479 * Allocate non-executable memory by default (CMake)
1480 * Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
1481 * Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
1482 * Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
1483 * Allow disabling of dynamic loading in CMake script and configure
1484 * Allow disabling of main static data registration in CMake and configure
1485 * Allow disabling of threads discovery in CMake script and configure
1486 * Allow gc_assertions enabling in CMake script
1487 * Allow gc_debug, redirect_malloc, large_config options in CMake script
1488 * Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
1489 * Allow mmap enabling in CMake script and configure
1490 * Allow passing -D DEFAULT_VDB to CFLAGS
1491 * Allow subthreadcreate_test to be compiled with zero NTHREADS
1492 * Allow to turn on spin locking even if thread-local allocations are used
1493 * Always include gc_atomic_ops.h unless threads are disabled
1494 * Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
1495 * Avoid duplication of code handling pthreads case in configure
1496 * Avoid potential data race during apply_to_each_object(reset_back_edge)
1497 * Avoid potential data race during GC_dump execution
1498 * Avoid potential race between malloc_kind and mark_thread_local_fls_for
1499 * Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
1500 * Avoid potential race in print_static_roots called by dyld_image_add/remove
1501 * Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
1502 * Avoid potential race when accessing size_map table
1503 * Avoid potential race when storing oh_back_ptr during parallel marking
1504 * Avoid SIGSEGV during GC_INIT on some Android devices
1505 * Build only shared libraries by default (configure)
1506 * Change pointer arguments of push_all[_eager]/conditional API to void* type
1507 * Change type of hb_sz field (of hblkhdr) from size_t to word
1508 * Check consistency of descr, adjust, clear arguments of GC_new_kind
1509 * Check that GC_WIN32_PTHREADS is not specified for Cygwin
1510 * Check thread_local is initialized before accessing thread_key
1511 * Collapse multiple BCOPY_EXISTS macro definitions
1512 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
1513 * Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
1514 * Compile checksums.c only if --enable-checksums is given (configure)
1515 * Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
1516 * Convert .html files to Markdown format
1517 * Convert code of .c files to valid C++ code
1518 * Decide between memory unmapping and mprotect-based dirty bits at runtime
1519 * Declare t local variable in the block where the variable is used
1520 * Define ABORT() using _CrtDbgBreak (if available) on Windows host
1521 * Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
1522 * Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
1523 * Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
1524 * Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
1525 * Define GC_THREADS instead of GC_x_THREADS in Makefiles
1526 * Define macro to specify the environment file name extension (Win32/WinCE)
1527 * Define static resend_lost_signals(), restart_all() in pthread_stop_world
1528 * Detect sigsetjmp() availability by configure
1529 * Determine whether to use compiler TLS for kFreeBSD at compile time
1530 * Do not call BCOPY and BZERO if size is zero
1531 * Do not call sem_getvalue in stop_world if one thread exists
1532 * Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
1533 * Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
1534 * Do not declare dl_iterate_phdr as weak for kFreeBSD
1535 * Do not include windows.h when compiling gc_cpp.cc
1536 * Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
1537 * Do not merge dynamic root with the existing static one in add_roots_inner
1538 * Do not print n_rescuing_pages value if incremental collections disabled
1539 * Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
1540 * Do not rebuild_root_index unless remove_root_at_pos is called
1541 * Do not specify version info for test libraries (Automake)
1542 * Do not use alternate thread library on Solaris
1543 * Do not use asm in GC_pause
1544 * Do not use PKG_CHECK_MODULES in configure
1545 * Do not use system clock consistently if NO_CLOCK
1546 * Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
1547 * Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
1548 * Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
1549 * Eliminate 'comparison is always false' code defect in get_maps
1550 * Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
1551 * Eliminate 'potential unsafe sign check of a bitwise operation' code defect
1552 * Enable alternative finalization interface (DISCLAIM) in all makefiles
1553 * Enable compilation for Cygwin with MPROTECT_VDB
1554 * Enable handle-fork and memory unmapping by default
1555 * Enable mprotect-based incremental GC for Win64 (GCC)
1556 * Expose API to control rate and max prior attempts of collect_a_little
1557 * Expose API to control the minimum bytes allocated before a GC occurs
1558 * Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
1559 * Fix 'doc' files installation folder
1560 * Fix build of cord tests as C++ files (Makefile.direct)
1561 * Fix comment typos in backgraph.c, de.c, gcconfig.h
1562 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
1563 * Fix start_world not resuming all threads on Darwin
1564 * Fix test_cpp failure in case GC_DEBUG is defined
1565 * Group common defines for POSIX platforms in configure and CMake scripts
1566 * Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
1567 * Handle pthread restart signals loss if retry_signals
1568 * Hide value stored to thread-specific entries for a test purpose
1569 * Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
1570 * Implement memory unmapping for Sony PS/3
1571 * Imply configure --single-obj-compilation if --disable-static
1572 * Include malloc.c in extra/gc.c after include gc_inline.h
1573 * Increase MAX_HEAP_SECTS (10 times) for large-config
1574 * Initial single-threaded support of Interix subsystem
1575 * Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
1576 * Initial support of TIZEN platform
1577 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1578 * Make extend_size_map() static (code refactoring)
1579 * Make subthreadcreate test compilable even without libatomic_ops
1580 * Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
1581 * Move de_win compiled resource files to cord/tests
1582 * Move pcr_interface.c, real_malloc.c to 'extra' folder
1583 * New API function (GC_dump_named) to produce named dumps
1584 * New API function (GC_is_incremental_mode)
1585 * New API function (get_expl_freed_bytes_since_gc)
1586 * New API function (get_size_map_at) to get content of size_map table
1587 * New API to stop and start the GC world externally
1588 * New API to turn on manual VDB at runtime
1589 * New field (expl_freed_bytes_since_gc) in public prof_stats_s
1590 * New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
1591 * New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
1592 * Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
1593 * Print time passed since GC initialization in GC_dump
1594 * Public API (GC_deinit) to allow Win32 critical sections deletion
1595 * Reduce probability of collision in threads hashtable for 64-bit targets
1596 * Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
1597 * Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
1598 * Reformat code and comments in gc_allocator.h
1599 * Remove 'dist' target from Makefile.direct
1600 * Remove a redundant check of __cplusplus in Symbian-specific .cpp files
1601 * Remove Android-specific code in gcconfig.h for M68K
1602 * Remove C++ WeakPointer and CleanUp API which lacks implementation
1603 * Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
1604 * Remove done_init static variable from fnlz_mlc.c
1605 * Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
1606 * Remove duplicated sample code in leak.md
1607 * Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
1608 * Remove GC code fragment (which already merged) from README.Mac
1609 * Remove GC_GNU_THREADS macro (HURD)
1610 * Remove GENERAL_MALLOC internal macro
1611 * Remove HIGH_BIT macro duplicating SIGNB
1612 * Remove lint-specific code
1613 * Remove Makefile KandRtest target (that supported K&R C compiler)
1614 * Remove MIN_WORDS macro from gc_priv.h
1615 * Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
1616 * Remove name of optional arguments of operator new and new[] in gc_cpp.h
1617 * Remove notes that K&R C compiler is unsupported
1618 * Remove PUSH_CONTENTS_HDR multi-line macro
1619 * Remove redundant check that clear_fl_marks argument is non-null
1620 * Remove redundant THREADS macro checks in alloc.c and gc_priv.h
1621 * Remove stubborn objects allocation code completely, remove stubborn.c
1622 * Remove unnecessary argument casts in add_roots_inner calls
1623 * Remove unnecessary type casts in n_set_marks
1624 * Remove unused USE_GENERIC macro definition and description
1625 * Remove version info in 'de' cord test application
1626 * Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
1627 * Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
1628 * Replace some FIXME items with TODO ones
1629 * Run command passed to if_not_there directly from Makefile.direct
1630 * Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
1631 * Skip grungy_pages update when mark state invalid to speedup read_dirty
1632 * Skip typed_test in gctest if NO_TYPED_TEST macro is defined
1633 * Support configure --disable-thread-local-alloc option (similar for CMake)
1634 * Support enable_checksums option in CMake script
1635 * Support Haiku multi-threaded build by CMake
1636 * Support threads for DragonFly in configure
1637 * Turn on 'atomic uncollectable' functionality by default (CMake)
1638 * Turn on GC assertions in NT_MAKEFILE for debug builds
1639 * Turn on gcj, disclaim and java finalization by default (CMake)
1640 * Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
1641 * Turn on incremental mode in cordtest and cord/de
1642 * Turn on incremental mode in disclaim_test, test_cpp and staticroots test
1643 * Turn on parallel marker by default for all multi-threaded builds
1644 * Update GC compilation and usage notes for Win32
1645 * Update shared libraries version info to differentiate against v7.6
1646 * Update top_index entry pointer only when the entry is constructed fully
1647 * Use __builtin_expect in SIZET_SAT_ADD macro
1648 * Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
1649 * Use __int64 instead of 'long long' in LONG_MULT if appropriate
1650 * Use __thread keyword for Android NDK r12b+ Clang (arm)
1651 * Use atomic allocation for leafs in reverse_test (gctest)
1652 * Use atomic load/store for the concurrently accessed variables in GC_lock
1653 * Use C11 static_assert if available
1654 * Use compiler atomic intrinsics by default if available (configure)
1655 * Use EXPECT FALSE for mark_from code documented as executed rarely
1656 * Use heap-allocated memory for local mark stack of non-marker thread
1657 * Use HOST_ANDROID define instead of PLATFORM_ANDROID
1658 * Use include gc.h with the angle brackets in the man page synopsis
1659 * Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
1660 * Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
1661 * Use noexcept specifier in gc_allocator and gc_cpp if C++11
1662 * Use same macro (NTHREADS) across all tests to specify number of threads
1663 * Use sigsetjmp() in setjmp_t tool if available
1664 * Use thread-local allocations for all multi-threaded builds
1665 * Use THREAD_EQUAL consistently to compare pthread_t values
1666 * Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
1667 * Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
1668 * Workaround Thread Sanitizer (TSan) false positive warnings
1669 1670 1671 == [7.6.22] 2024-09-07 ==
1672 1673 * Eliminate 'cast signed to bigger unsigned' CSA warnings in GC_find_limit
1674 * Fix GC_debug_realloc to support custom kind
1675 * Fix heap blocks size computation by GC_get_memory_use
1676 * Fix pointer relational comparison in GC_do_enumerate_reachable_objects
1677 * Prevent GC_noop_sink from scanning by the collector
1678 1679 Also, includes 7.4.28 changes
1680 1681 1682 == [7.6.20] 2024-02-03 ==
1683 1684 * Eliminate compiler warning of missing cast in LONG_MULT after shift
1685 * Fix 'sigset_t undeclared' MS VC error if pthreads-w32 is used
1686 * Fix lock assertion violation in GC_try_to_collect_inner on OS X
1687 * Fix missing outermost parentheses in macro definitions in huge test
1688 * Fix undefined GC_real_pthread_sigmask if redirect malloc on OS X
1689 1690 Also, includes 7.4.26 changes
1691 1692 1693 == [7.6.18] 2023-05-26 ==
1694 1695 * Fix IRIX5 defined wrongly on FreeBSD/mips
1696 * Fix alt-stack handling in GC_push_all_stacks if stack grows up
1697 * Fix data race in GC_heapsize_at_forced_unmap variable
1698 1699 Also, includes 7.4.24 changes
1700 1701 1702 == [7.6.16] 2022-08-26 ==
1703 1704 * Do not send signal to thread which is suspended manually
1705 * Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning
1706 * Fix 'GC_greatest_stack_base_below is defined but not used' warning (IA64)
1707 * Fix context saving when GC_suspend_thread(self)
1708 * Fix data race in fail_proc1 of gctest
1709 * Fix GC_suspend_thread if called before thread destructor
1710 * Fix hang on sem_wait in GC_suspend_thread if thread was resumed recently
1711 * Fix lock assertion violation in GC_find_limit if always multi-threaded
1712 * Fix potential race if start_mark_threads called from threads in child
1713 * Make finalizer_closure pointer read/write atomic in malloc and callback
1714 * Prevent changing of GC_markers_m1 value while collection in progress
1715 * Replace SSH cloning with HTTPS one in README
1716 * Workaround Thread Sanitizer (TSan) FP warning in is_valid_displacement
1717 1718 Also, includes 7.4.22 changes
1719 1720 1721 == [7.6.14] 2021-09-28 ==
1722 1723 * Add loop to handle abort error like in suspend logic on Darwin
1724 * Add support of OpenBSD/aarch64
1725 * Add threading libraries to bdw-gc.pc
1726 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
1727 * Do not use iOS private symbols
1728 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
1729 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
1730 * Eliminate 'possible loss of data' BCC and MS VC warnings
1731 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
1732 * Eliminate 'unused function GC_add_map_entry' compiler warning
1733 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
1734 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
1735 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
1736 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
1737 * Fix 'ulong undefined' compilation error on AIX
1738 * Fix 'undefined reference to __data_start' linker error on RISC-V
1739 * Fix 'write to GC log failed' error
1740 * Fix GC_proc_fd value in child process at fork (Solaris)
1741 * Fix MPROTECT_VDB definition for single-threaded GC builds
1742 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
1743 * Fix STACKBOTTOM on 32-bit HP/UX 11.11
1744 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
1745 * Fix assertion violation in register_dynlib_callback on Android
1746 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
1747 * Fix configure message about 'AIX gcc optimization fix'
1748 * Fix cordtest build in SMakefile.amiga
1749 * Fix data race regarding *rlh value in generic_malloc_many
1750 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
1751 * Fix gc_allocator.h compilation by Clang
1752 * Fix gc_cflags variable name in configure (HP/UX)
1753 * Fix handling of areas smaller than page size in GC_scratch_recycle
1754 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
1755 * Fix misaligned tlfs passed to AO_load on m68k
1756 * Fix missing GC_quiet declaration in pcr_interface.c
1757 * Fix missing gc_dlopen.c in CMake script
1758 * Fix missing scratch_last_end_ptr update (Irix)
1759 * Fix overflow of scratch_free_ptr value
1760 * Fix page_was_[ever_]dirty() for static roots (Solaris)
1761 * Fix printf format specifier in simple_example.html
1762 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
1763 * Fix test_cpp failure caused by arbitrary link order (Win32)
1764 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
1765 * Fix various typos mostly in documentation files
1766 * Fix word size, data start and alignment for OpenBSD/mips64(el)
1767 * Prevent GetThreadContext failure (Windows)
1768 * Prevent WARN of incompatible incremental GC if default or manual VDB
1769 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
1770 * Refactoring of WoW64 workaround (Win32)
1771 * Remove a misleading comment about Solaris in gc.h
1772 * Workaround 'expression is only useful for its side effects' WCC warning
1773 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
1774 1775 1776 == [7.6.12] 2019-03-01 ==
1777 1778 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
1779 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1780 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
1781 * Fix 'unexpected mark stack overflow' abort in push_all_stack
1782 * Fix 'wrong __data_start/_end pair' error on Android
1783 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
1784 * Fix GetThreadContext stale register values use if WoW64 (Win32)
1785 * Fix executable memory allocation in GC_unix_get_mem
1786 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
1787 * Fix thread_info() count argument value (OS X)
1788 * Update NO_EXECUTE_PERMISSION documentation
1789 1790 1791 == [7.6.10] 2018-12-13 ==
1792 1793 * Add paths to filenames mentioned in the copyright section in README
1794 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
1795 * Eliminate 'casting signed to bigger unsigned int' CSA warning
1796 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
1797 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1798 * Fix 'too wide non-owner permissions are set for resource' code defect
1799 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
1800 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
1801 * Fix GC_register_disclaim_proc for leak-finding mode
1802 * Fix a deadlock in write_fault_handler if AO_or is emulated
1803 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
1804 * Fix concurrent bitmap update in GC_dirty
1805 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
1806 * Fix hbp overflow in GC_install_counts
1807 * Fix linkage with a system libatomic_ops shared library
1808 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
1809 * Fix marking of finalizer closure object
1810 * Fix marks and hb_n_marks consistency when disclaim returns true
1811 * Fix memory allocation on GCF (Linux/x64)
1812 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1813 * Fix start_world not resuming all threads on Darwin
1814 * Fix test_cpp assertion violation in find-leak mode
1815 * Fix tests linkage with internal atomic_ops.o
1816 * Fix unneeded end_stubborn_change in disclaim_test
1817 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1818 * New macro to suppress printing of leaked objects
1819 * Prevent double inclusion of javaxfc.h and private/specific.h
1820 * Reduce scope of local variables in GC_remove_all_threads_but_me
1821 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
1822 * Refine documentation in gc_disclaim.h
1823 * Test marking of finalizer closure object in disclaim_test
1824 * Update documentation about arm64 ABI in gcconfig.h
1825 * Use AO_or in async_set_pht_entry_from_index if available
1826 * Use include gc.h with the angle brackets in the man page synopsis
1827 1828 1829 == [7.6.8] 2018-08-12 ==
1830 1831 * Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
1832 * Add NetBSD/aarch64 and initial RISC-V support
1833 * Adjust formatting of configure help messages and config.h comments
1834 * Avoid multiple 'getcontext failed' warnings if getcontext is broken
1835 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
1836 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
1837 * Do not call GC_dirty_inner unless GC_incremental
1838 * Do not use NULL in gc_inline.h
1839 * Eliminate 'cast between incompatible function types' compiler warning
1840 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
1841 * Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
1842 * Eliminate 'declaration of var hides global declaration' compiler warning
1843 * Eliminate 'language extension used' Clang warning in gc.h
1844 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
1845 * Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
1846 * Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
1847 * Eliminate 'switch statement contains no case label' compiler warning
1848 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
1849 * Eliminate duplicate clear_mark_bit call when removing disappearing link
1850 * Fast fail on invalid CPU parameter passed to NT_MAKEFILE
1851 * Fix 'collecting from unknown thread' abort in leak-finding mode
1852 * Fix 'pointer arithmetic with NULL' code defect in print_callers
1853 * Fix Borland version in documentation to match that in BCC_MAKEFILE
1854 * Fix comment about inv_sz computation in setup_header
1855 * Fix comments style in configure.ac and Makefile.am
1856 * Fix compilation by digimars.mak (DMC)
1857 * Fix compilation by WCC makefile
1858 * Fix compilation of darwin_stop_world for iOS 8+
1859 * Fix cords for MANUAL_VDB
1860 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
1861 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
1862 * Fix gctest in leak-finding mode
1863 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
1864 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
1865 * Fix mark stack overflow checking in push_selected
1866 * Fix missing GC_dirty calls for GC-allocated objects used internally
1867 * Fix missing GC_dirty invocation from debug_end_stubborn_change
1868 * Fix MSWIN32 macro redefinition (WCC)
1869 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
1870 * Fix new and delete operators definition for DigitalMars compiler
1871 * Fix NT_MAKEFILE for VS 2017
1872 * Fix potential null dereference in GC_CONS
1873 * Fix register_dynamic_libraries on Windows 10
1874 * Fix result computation in n_set_marks
1875 * Fix return type in GC_set_warn_proc API documentation
1876 * Fix tests for GC compiled with MANUAL_VDB
1877 * Fix the build for Emscripten
1878 * Fix typo in comment for CORD_ec_flush_buf prototype
1879 * Fix typos in ChangeLog and generic_malloc
1880 * Fix UNTESTED for multi-threaded API functions in gctest
1881 * Fix VirtualQuery call in case of malloc failure (Win32)
1882 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1883 * Keep pointer to the start of previous entry in remove_specific_after_fork
1884 * Move de_win compiled resource files to cord/tests
1885 * Never return null by C++ GC allocators and gc_cpp operator new
1886 * Perform thread_suspend in loop as it may be interrupted (Darwin)
1887 * Really abort if failed to read /proc for library registration (Linux)
1888 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
1889 * Remove duplicate local variable in reclaim_block
1890 * Remove information how to send bugs from README.cords file
1891 * Remove libatomic_ops license information
1892 * Remove unused USE_GENERIC macro definition and description
1893 * Suppress 'functions containing switch are not expanded inline' bcc warning
1894 * Suppress 'non-member operator new/delete may not be inline' VC++ warning
1895 * Turn on incremental collection in gctest also if MANUAL_VDB
1896 * Update copyright information in alloc.c, gc.c/h and the documentation
1897 * Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
1898 * Update NT_MAKEFILE usage information in README files for Win32 and Win64
1899 * Workaround 'class C does not have a copy constructor' cppcheck warning
1900 * Workaround 'function nested_sp is never used' cppcheck style warning
1901 * Workaround 'opposite expression on both sides of &' cppcheck style warning
1902 * Workaround 'template-id not supported in this context' compiler error (WCC)
1903 1904 1905 == [7.6.6] 2018-04-20 ==
1906 1907 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
1908 * Eliminate 'boolean result used in bitwise operation' cppcheck warning
1909 * Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
1910 * Explicitly unblock GC signals on GC initialization
1911 * Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
1912 * Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
1913 * Fix arguments delimiter in pcr_interface.c (PCR)
1914 * Fix assertion violation in DllMain of win32_threads
1915 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
1916 * Fix data race during apply_to_each_object(reset_back_edge)
1917 * Fix dbg_mlc.c/o file name in documentation
1918 * Fix gctest with musl libc on s390x
1919 * Fix include gc_gcj.h in thread_local_alloc.c
1920 * Fix man section number (3)
1921 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
1922 * Fix missing new-line in ABORT_ARG<n> definition
1923 * Fix missing SIGBUS handler setup for kFreeBSD
1924 * Fix null dereference in print_callers on backtrace_symbols failure
1925 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
1926 * Fix the collector hang when it is configured with --enable-gc-debug
1927 * Fix thread_suspend fail for threads registered from key destructor (OS X)
1928 * Fix type of local variables receiving result of PHT_HASH
1929 * Fix typo in AIX macro name
1930 * Fix typo in comment in specific.h
1931 * Fix unbounded heap growth in case of intensive disappearing links usage
1932 * Remove API symbols renaming in WCC_MAKEFILE
1933 * Support Haiku/x64 and Haiku/x86 hosts
1934 * Support threads for DragonFly in configure
1935 * Workaround 'address of auto-variable returned' cppcheck error
1936 * Workaround gctest hang on kFreeBSD (if thread-local allocations are on)
1937 1938 1939 == [7.6.4] 2018-01-26 ==
1940 1941 * Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
1942 * Change compiler invocation example in gc.man to use dynamic libgc
1943 * Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
1944 * Do not declare dl_iterate_phdr as weak for DragonFly
1945 * Fix 'cords' parallel build in Makefile.direct
1946 * Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
1947 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
1948 * Fix GC allocation mutex in child after a fork
1949 * Fix global operator delete definition for C++14 in gc_cpp
1950 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
1951 * Fix libgc version which was changed in linkage breaking way
1952 * Fix missing EOLn output in threadlibs tool
1953 * Fix threadlibs tool to output '-lpthread' for DragonFly
1954 * Prevent DATASTART redefinition for NaCl
1955 * Remove obsolete advice about linking with _DYNAMIC=0 (Linux)
1956 1957 1958 == [7.6.2] 2017-12-23 ==
1959 1960 * Add assertion that no hb_n_marks underflow occurs
1961 * Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
1962 * Add minimal testing of GC_set_bit (gctest)
1963 * Add more cases to huge_test to cover sizes close to word-type maximum
1964 * Add testing of new[]/delete[] (test_cpp)
1965 * Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
1966 * Adjust code indentation of calloc_explicitly_typed
1967 * Align local_mark_stack in help_marker explicitly
1968 * Allow custom TRACE_ENTRIES value
1969 * Allow gctest and thread_leak_test with zero NTHREADS
1970 * Avoid data race in finalized_count (gctest)
1971 * Code refactoring of divide-by-HBLKSIZE occurrences
1972 * Code refactoring of huge_test
1973 * Code refactoring of tests/subthread_create regarding AO add primitive
1974 * Compile thread_local_alloc only if multi-threaded build (Makefile.am)
1975 * Delete preprocessor output on make clean (Makefile.direct)
1976 * Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
1977 * Do not disable parallel mark for WRAP_MARK_SOME
1978 * Do not enable mprotect-based incremental mode if unmapping is on (gctest)
1979 * Do not install documentation if configure --disable-docs (new option)
1980 * Do not use tkill (Android)
1981 * Document base and size of objects allocated by finalized_malloc
1982 * Document configure 'syntax error' issue in README
1983 * Eliminate 'address of local variable returned' static analyzer warning
1984 * Eliminate 'array vs singleton' code defect in typed_test (gctest)
1985 * Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
1986 * Eliminate 'boolean result used in bitwise op' cppcheck false warning
1987 * Eliminate 'C-style pointer casting' cppcheck style warnings in test
1988 * Eliminate 'checking if unsigned variable is <0' cppcheck style warning
1989 * Eliminate 'class member var with name also defined in parent' warning
1990 * Eliminate 'comparison is always false' static analyzer warning in finalize
1991 * Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
1992 * Eliminate 'condition is always true' cppcheck style warning
1993 * Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
1994 * Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
1995 * Eliminate 'dereference of null' CSA false warning in array_mark_proc
1996 * Eliminate 'function result not used' code defect in GC_mark_local
1997 * Eliminate 'GC_collecting is set but never used' code defect (Win32)
1998 * Eliminate 'GC_record_fault is never used' cppcheck style warning
1999 * Eliminate 'integer shift by a negative amount' code defect in finalize
2000 * Eliminate 'label not used' cppcheck false warnings in GC_mark_X
2001 * Eliminate 'memory leak' code defect for scratch-allocated memory
2002 * Eliminate 'memory leak' code defect in remove_specific
2003 * Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
2004 * Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
2005 * Eliminate 'possible integer underflow' code defect (cord-de)
2006 * Eliminate 'potential overflow' static analyzer warning in test
2007 * Eliminate 'printf format specifies type void*' GCC pedantic warnings
2008 * Eliminate 'scope of variable can be reduced' cppcheck warnings
2009 * Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
2010 * Eliminate 'this statement may fall through' GCC warnings
2011 * Eliminate 'unnecessary comparison of static strings' cppcheck warning
2012 * Eliminate 'unsafe vsprintf is deprecated' compiler warning
2013 * Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
2014 * Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
2015 * Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
2016 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
2017 * Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
2018 * Eliminate 'value of DATASTART2 unknown' cppcheck info messages
2019 * Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
2020 * Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
2021 * Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
2022 * Eliminate 'write to memory that was const-qualified' code analyzer warning
2023 * Eliminate all 'scope of variable can be reduced' cppcheck style warnings
2024 * Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
2025 * Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
2026 * Eliminate CSA warning of non-virtual destructor in test_cpp base class
2027 * Eliminate CSA warning of staticroot that can be a local variable (tests)
2028 * Eliminate CSA warning of unmodified non-const static var (disclaim_test)
2029 * Eliminate redundant local variable in register_finalizer
2030 * Eliminate TSan (Thread Sanitizer) warnings in gctest
2031 * Eliminate UBSan warning of overflow during descr subtraction in mark_from
2032 * Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
2033 * Eliminate unsigned fl_builder_count underflow in mark_thread
2034 * Enable GC_is_tmp_root for all platforms
2035 * Execute more single-threaded GC tests by CMake
2036 * Expand tabs to spaces in de_win.rc (tests)
2037 * Export GC_dump_finalization/regions()
2038 * Export GC_is_tmp_root() and GC_print_trace[_inner]()
2039 * Export GC_print_free_list()
2040 * Fix '32-bit value shift followed by expansion to 64-bit' code defect
2041 * Fix 'GC_written_pages never read' code defect (GWW_VDB)
2042 * Fix 'label cannot be reached' static analyzer warning in disclaim_test
2043 * Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
2044 * Fix 'syntax error' reported by cppcheck for mach_dep
2045 * Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
2046 * Fix 'variable assigned a value that is never used' cppcheck style warnings
2047 * Fix 'void pointers in calculations: behavior undefined' cppcheck warning
2048 * Fix assertion violation about disabled cancel in try_to_collect_inner
2049 * Fix atomic_ops build in Makefile.direct for Solaris
2050 * Fix Clang static analyzer warning about not found gc_priv.h in extra files
2051 * Fix compilation error in get_main_stack_base (Emscripten)
2052 * Fix compilation for winpthreads if HANDLE_FORK
2053 * Fix compilation if configured with --enable-werror on OS X
2054 * Fix cord/de build in Makefile.direct (Linux)
2055 * Fix data race in a list referenced by A.aa (gctest)
2056 * Fix data race in collectable_count (gctest)
2057 * Fix data race in do_local_mark when comparing active_count to helper_count
2058 * Fix data race in GC_suspend/resume_thread
2059 * Fix data race in last_stop_count access (suspend_handler_inner)
2060 * Fix data race in make_descriptor when setting explicit_typing_initialized
2061 * Fix data race in mark_thread when updating mark_no
2062 * Fix data race when getting object size in explicitly-typed allocators
2063 * Fix deadlock in GC_suspend_thread
2064 * Fix gctest failure for Darwin if CPPCHECK is defined
2065 * Fix lack of barriers to synchronize memory for suspend_handler
2066 * Fix marking of disclaim-reachable objects in the incremental mode
2067 * Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
2068 * Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
2069 * Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
2070 * Fix page calculation in checksums
2071 * Fix parallel build in Makefile.direct
2072 * Fix test_cpp and c++ parallel build in Makefile.direct
2073 * Fix typo in comment of GC_mark_some
2074 * Fix typos in cdescr.html and README.sgi
2075 * Make GC_INIT optional for clients even if thread-local allocations enabled
2076 * Match uclinux pattern in configure
2077 * Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
2078 * Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
2079 * New API function (GC_is_init_called) to check if BDWGC is initialized
2080 * New target (check-cpp) in Makefile.direct
2081 * Prevent abort in register_data_segments for Symbian and Emscripten
2082 * Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
2083 * Print realloc_count value in gctest
2084 * Put invariant name in quotes to make mark_state comments clearer
2085 * Refine configure messages when checking for compiler option support
2086 * Remove extraneous semicolons after AC_MSG_WARN (configure)
2087 * Remove page_was_dirty and remove_protection duplicate definitions
2088 * Remove unnecessary type casts of printf arguments to unsigned long
2089 * Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
2090 * Rename 'test' to 'check' target in Makefile.direct
2091 * Replace deprecated rewind to fseek in cordxtra
2092 * Report gcc/clang pedantic warnings (configure)
2093 * Skip thread suspend/resume API testing for Tru64 (OSF1)
2094 * Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
2095 * Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
2096 * Suppress 'tainted string passed to vulnerable operation' false defects
2097 * Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
2098 * Test GC initialization from non-main thread on FreeBSD and NetBSD
2099 * Test GCJ object creation with length-based descriptor (gctest)
2100 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
2101 * Update README regarding make cords with Makefile.direct
2102 * Update README to use autogen.sh on build from the source repository
2103 * Update shared libraries version info to differentiate against v7.4
2104 * Use mprotect instead of mmap in GC_unmap() on Cygwin
2105 * Use same style of include gc.h in documentation
2106 * Workaround '!GC_page_size is always false' cppcheck style warning
2107 * Workaround '#error' cppcheck error messages
2108 * Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
2109 * Workaround 'array compared to 0', 'untrusted loop bound' false defects
2110 * Workaround 'bad address arithmetic' static analysis tool false positive
2111 * Workaround 'checking if unsigned value is negative' cppcheck warning
2112 * Workaround 'checking unsigned value is negative' code defect in mark_from
2113 * Workaround 'comparison of identical expressions' false code defects
2114 * Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
2115 * Workaround 'condition is always false' cppcheck warning in get_next_stack
2116 * Workaround 'condition is always true' cppcheck style warnings in GC_init
2117 * Workaround 'function is never used' cppcheck style warnings
2118 * Workaround 'insecure libc pseudo-random number generator used' code defect
2119 * Workaround 'int shift by negative amount' false code defect in finalize
2120 * Workaround 'local variable size too big' static analyzer warning
2121 * Workaround 'memory leak: result' cppcheck false error (POSIX)
2122 * Workaround 'null pointer dereference' false positive in push_next_marked
2123 * Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
2124 * Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
2125 * Workaround 'obsolete function alloca() called' cppcheck warnings
2126 * Workaround 'passing untyped NULL to variadic function' cppcheck warning
2127 * Workaround 'pointer used before comparison to null' code defect (pthread)
2128 * Workaround 'possible null pointer dereference' cppcheck warnings
2129 * Workaround 'potential multiplication overflow' code defect in de_win (cord)
2130 * Workaround 'redundant assignment of *result to itself' cppcheck warning
2131 * Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
2132 * Workaround 'same expression on both sides of ==' cppcheck style warning
2133 * Workaround 'same expression on both sides of OR' cppcheck style warning
2134 * Workaround 'struct member is never used' cppcheck style warnings
2135 * Workaround 'tainted int used as loop bound' static analysis tool warning
2136 * Workaround 'Uninitialized variable' cppcheck errors
2137 * Workaround 'unused variable' cppcheck style warnings
2138 * Workaround 'va_list used before va_start' cppcheck error in cord
2139 * Workaround 'value of macro unknown' cppcheck info messages
2140 * Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
2141 * Workaround 'value of SIGBUS unknown' cppcheck info messages
2142 * Workaround 'value of WINAPI unknown' cppcheck info messages
2143 * Workaround 'variable hides enumerator with same name' cppcheck warnings
2144 * Workaround 'variable reassigned before old value used' cppcheck warnings
2145 * Workaround 'waiting while holding lock' code defect in stop_world (Unix)
2146 * Workaround false 'uninitialized var use' code defect (initsecondarythread)
2147 2148 Also, includes 7.4.6 changes
2149 2150 2151 == [7.6.0] 2016-08-02 ==
2152 2153 * ABORT_ARGn log details at INFO level (Android)
2154 * Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
2155 * Add API function to calculate total memory in use by all GC blocks
2156 * Add API function to set/modify GC log file descriptor (Unix)
2157 * Add alloc_size attribute to GC_generic_malloc
2158 * Add alt-stack registration support
2159 * Add assertion for GC_new_kind boolean arguments
2160 * Add assertion on lock status to GC_alloc_large and its callers
2161 * Add build scripts for VC 9 (Win32/64)
2162 * Add build system plumbing for building with -Werror
2163 * Add incremental GC support for Darwin/arm64
2164 * Add profiling callback events to indicate start/end of reclaim phase
2165 * Add support for enumerating the reachable objects in the heap
2166 * Add toggle-ref support (following Mono GC API)
2167 * Added instructions to README.md for building from git
2168 * Adjust code indentation of malloc/calloc/str[n]dup
2169 * Allow fork() automatic handling on Android with API level 21+
2170 * Allow specific TLS attributes for GC_thread_key
2171 * Allow thread local allocations from within pthread TLS destructors
2172 * Allow to force GC_dump_regularly set on at compilation
2173 * Altera NIOS2 support
2174 * Change 'cord' no-argument functions declaration style to ANSI C
2175 * Check DATASTART is less than DATAEND even assertions off
2176 * Check for execinfo.h by configure
2177 * Code refactoring of GC_push_finalizer/thread/typed_structures
2178 * Code refactoring regarding 'data start' definition for FreeBSD
2179 * Consistently set type of DATASTART/END to ptr_t (code refactoring)
2180 * Consistently use int[] type for '_end' symbol (code refactoring)
2181 * Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
2182 * Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
2183 * Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
2184 * Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
2185 * Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
2186 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
2187 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
2188 * Document GC_register_my_thread returned value
2189 * Dump the block information in CSV format
2190 * Eliminate redundant *flh check for null in GC_allocobj
2191 * Enable atomic-uncollectable in operator new in gc_cpp.h
2192 * Enable build with musl libc
2193 * Enable gc.h inclusion by client without implicit include windows.h (Win32)
2194 * Enable huge_test for Win64 (and LLP64 target)
2195 * Enable thread-local storage for Android Clang
2196 * Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
2197 * Export GC_push_all_eager, GC_push_finalizer_structures
2198 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
2199 * Fix assertion in GC_mark_from for non-heap regions
2200 * Fix compilation for Android clang/arm with bfd linker
2201 * Fix integer shift undefined behavior in GC_init_explicit_typing
2202 * Fix missing new-line and redundant trailing dot in WARN messages
2203 * Fix STACKBOTTOM for Solaris 11/x86
2204 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
2205 * Fix unchecked fork() result in gctest (Unix, Cygwin)
2206 * Fix user-defined signals drop by marker threads
2207 * Fix various typos in comments and documentation
2208 * FreeBSD/arm support improvement
2209 * GC_make_descriptor code refactoring (eliminate two local variables)
2210 * GC_malloc[_atomic] global and thread-local generalization with kind
2211 * GC_malloc_[atomic_]uncollectable generalization
2212 * GC_scratch_alloc code refactoring (and WARN message improvement)
2213 * Group all compact fields of GC_arrays to fit in single page
2214 * Handle load_segs overflow in register_dynlib_callback gracefully
2215 * Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
2216 * Implement event callbacks for profiling (following Mono GC API)
2217 * Implement the finalization extension API
2218 * Implement thread suspend/resume API (Linux threads only)
2219 * Improve documentation for disappearing links in gc.h
2220 * Make heap growth more conservative after GC_gcollect_and_unmap call
2221 * Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
2222 * Move MessageBox invocation code from GC_abort to a separate routine (Win32)
2223 * NaCl/arm initial support; NaCl runtime fixes for other CPUs
2224 * New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
2225 * New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
2226 * New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
2227 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
2228 * Re-implement GC_finalized_malloc using GC_malloc_kind
2229 * Refactoring of android_thread_kill/pthread_kill calls
2230 * Refactoring of GC_Xobjfreelist (use single array to keep free lists)
2231 * Refactoring of thread-local *_freelists (use single array of free lists)
2232 * Refine description in README how to build from source repository
2233 * Refine GC_free_space_divisor comment regarding its initial value
2234 * Reformat code of gc_cpp.cc/h
2235 * Remove 'opp' local variable in GC_malloc_X
2236 * Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
2237 * Remove code commented out by 'ifdef UNDEFINED'
2238 * Remove hb_large_block field (use 1 extra bit of hb_flags instead)
2239 * Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
2240 * Remove redundant casts in GC_generic_or_special_malloc and similar
2241 * Remove unsupported FreeBSD/ia64 case from gcconfig.h file
2242 * Remove unused GC_gcjdebugobjfreelist
2243 * Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
2244 * Replace non-API occurrences of GC_word to word (code refactoring)
2245 * Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
2246 * Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
2247 * Standalone profiling callback for threads suspend/resume
2248 * Support (add machine description for) TILE-Gx and TILEPro targets
2249 * Support build for Android 64-bit (arm64, mips64, x64)
2250 * Support FreeBSD/aarch64, FreeBSD/mips
2251 * Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
2252 * Support MinGW build in scripts
2253 * Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
2254 * Use magic header on objects to improve disclaim_test
2255 * Workaround 'sa_sigaction member missing' compiler error (Android/x32)
2256 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
2257 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
2258 2259 Also, includes 7.4.4 changes
2260 2261 2262 == [7.4.28] 2024-09-07 ==
2263 2264 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
2265 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
2266 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
2267 * Fix GC_print_trace_inner to print the last element of the circular buffer
2268 * Fix cordtst2.tmp file deletion in cordtest on Windows
2269 * Fix double lock in GC_malloc called from backtrace()
2270 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
2271 * Fix null pointer dereference in GC_is_visible if type_descr is null
2272 * Fix per_object_helper() after changing hb_sz units
2273 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
2274 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
2275 * Fix potential address overflow in GC_add_to_heap
2276 * Fix potential buffer overrun during read in GC_text_mapping
2277 * Fix typos in comments
2278 * Prevent redirected malloc call from a garbage collection routine
2279 * Remove redundant dirty/reachable_here calls in GC_malloc_explicitly_typed
2280 * Update and fix diagrams describing the tree structure for pointer lookups
2281 2282 2283 == [7.4.26] 2024-02-03 ==
2284 2285 * Eliminate 'unused parameter' gcc warning in free() if IGNORE_FREE
2286 * Eliminate 'unused value' gcc warnings in init_global_static_roots (Symbian)
2287 * Fix 'implicit declaration of function sbrk' gcc error on Symbian
2288 * Fix 'unused GC_set_and_save_fault_handler' warning on OS X
2289 * Fix GC_push_stack_for() to push also Xmm registers on Windows/x64
2290 * Fix MACH_TYPE macro redefinition on Symbian/arm
2291 * Fix missing GC_pthread_sigmask on FreeBSD and NetBSD
2292 * Fix missing redirect and implementation of pthread_sigmask() on OpenBSD
2293 2294 Also, includes 7.2r changes.
2295 2296 2297 == [7.4.24] 2023-05-25 ==
2298 2299 * Adjust CORD_ec comment placement in ec.h
2300 * Do not mix debug and non-debug allocations in disclaim tests
2301 * Eliminate 'cast signed to bigger unsigned' CSA warning in WARN calls
2302 * Ensure GC_NO_PTHREAD_SIGMASK defined if no GC_pthread_sigmask prototype
2303 * Fix GC_thread_is_registered for finished threads
2304 * Fix GC_unregister_my_thread call before GC functions usage in gctest
2305 * Fix missing lock while updating GC_in_thread_creation in GC_exit_check
2306 * Fix null pointer dereference in TRACE_TARGET
2307 * Fix of GC_bytes_allocd increment in GC_generic_malloc_inner
2308 * Remove redundant 'ifdef THREADS' around LOCK/UNLOCK in call_with_alloc_lock
2309 2310 Also, includes 7.2q changes.
2311 2312 2313 == [7.4.22] 2022-08-26 ==
2314 2315 * Eliminate 'new_l may be used uninitialized' gcc warning in os_dep (Cygwin)
2316 * Eliminate 'possible loss of data' compiler warning in GC_envfile_getenv
2317 * Fix 'undeclared getpagesize' compiler warning on AIX and OSF1
2318 * Fix GC_dirty() argument in GC_malloc_explicitly_typed_ignore_off_page
2319 * Fix SIGSEGV caused by dropped stack access from child process in gctest
2320 * Fix abort in Win32 DllMain if PARALLEL_MARK
2321 * Fix assertion violation of GC_thread_key alignment if pthread-based TLS
2322 * Fix comment in GC_init regarding GC_init_parallel call
2323 * Fix stack overflow in gctest on Alpine Linux/s390x
2324 * Revert "Remove nested always-false ifdef for HPUX and FREEBSD"
2325 * Use SIGRTMIN+6 as suspend signal if sigrt-signals on OpenBSD
2326 * Workaround crash in FreeBSD rand() by avoiding its concurrent usage
2327 2328 Also, includes 7.2p changes.
2329 2330 2331 == [7.4.20] 2021-09-28 ==
2332 2333 * Do not hold GC_fault_handler_lock when in Sleep (Windows)
2334 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
2335 * Eliminate 'unused function GC_add_map_entry' compiler warning
2336 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
2337 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
2338 * Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
2339 * Fix configure message about 'AIX gcc optimization fix'
2340 * Fix cordtest build in SMakefile.amiga
2341 * Prevent GetThreadContext failure (Windows)
2342 * Refactoring of WoW64 workaround (Win32)
2343 2344 Also, includes 7.2o changes
2345 2346 2347 == [7.4.18] 2019-03-01 ==
2348 2349 * Fix 'wrong __data_start/_end pair' error on Android
2350 * Fix thread_info() count argument value (OS X)
2351 2352 Also, includes 7.2n changes
2353 2354 2355 == [7.4.16] 2018-12-13 ==
2356 2357 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
2358 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
2359 * Fix GC_register_disclaim_proc for leak-finding mode
2360 * Fix concurrent bitmap update in GC_dirty
2361 * Fix marking of finalizer closure object
2362 * Fix marks and hb_n_marks consistency when disclaim returns true
2363 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
2364 * Refine documentation in gc_disclaim.h
2365 2366 Also, includes 7.2m changes
2367 2368 2369 == [7.4.14] 2018-08-11 ==
2370 2371 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
2372 * Do not call GC_dirty_inner unless GC_incremental
2373 * Eliminate 'cast between incompatible function types' compiler warning
2374 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
2375 * Eliminate 'language extension used' Clang warning in gc.h
2376 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
2377 * Eliminate 'switch statement contains no case label' compiler warning
2378 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
2379 * Eliminate duplicate clear_mark_bit call when removing disappearing link
2380 * Fix 'collecting from unknown thread' abort in leak-finding mode
2381 * Fix compilation by digimars.mak (DMC) and by WCC makefile
2382 * Fix cords for MANUAL_VDB
2383 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
2384 * Fix gctest in leak-finding mode
2385 * Fix missing GC_dirty calls for GC-allocated objects used internally
2386 * Fix missing GC_dirty invocation from debug_end_stubborn_change
2387 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
2388 * Fix typos in ChangeLog and generic_malloc
2389 * Keep pointer to the start of previous entry in remove_specific_after_fork
2390 * New API function (GC_is_init_called) to check if BDWGC is initialized
2391 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
2392 * Remove duplicate local variable in reclaim_block
2393 * Remove libatomic_ops license information from README
2394 * Workaround 'dynamic exception specifications deprecated in C++11' warning
2395 2396 Also, includes 7.2l changes
2397 2398 2399 == [7.4.12] 2018-04-19 ==
2400 2401 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
2402 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
2403 * Fix gctest with musl libc on s390x
2404 * Fix missing new-line in ABORT_ARG<n> definition
2405 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
2406 * Fix type of local variables receiving result of PHT_HASH
2407 * Remove API symbols renaming in WCC_MAKEFILE
2408 2409 Also, includes 7.2k changes
2410 2411 2412 == [7.4.10] 2018-01-22 ==
2413 2414 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
2415 Also, includes 7.2j changes
2416 2417 2418 == [7.4.8] 2017-12-22 ==
2419 2420 * Eliminate 'this statement may fall through' GCC warnings
2421 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
2422 * Fix data race in make_descriptor when setting explicit_typing_initialized
2423 * Fix marking of disclaim-reachable objects in the incremental mode
2424 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
2425 Also, includes 7.2i changes
2426 2427 2428 == [7.4.6] 2017-10-26 ==
2429 2430 * Add configure --enable-gcov option (enable code coverage analysis)
2431 * Add configure check whether to define NO_GETCONTEXT
2432 * Adjust GC_memalign comment
2433 * Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
2434 * Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
2435 * Avoid busy waiting in mark_thread while GC_parallel is false
2436 * Better document minimum value of size argument for typed allocations
2437 * Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
2438 * Consistently use 'msec' instead of 'ms' in comments in pthread_support
2439 * Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
2440 * Do not produce .tar.bz2 distribution file (configure)
2441 * Do not require libatomic_ops for single-threaded builds (configure)
2442 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
2443 * Document GWW_VDB in gcdescr.html
2444 * Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
2445 * Eliminate 'conditional expression is always true' code defect in GC_init
2446 * Eliminate 'FP divide-by-zero' static analyzer warning
2447 * Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
2448 * Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
2449 * Eliminate 'ISO C forbids object to function pointer conversion' warning
2450 * Eliminate 'locally defined symbol imported' MS linker warnings (cord)
2451 * Eliminate 'null dereference' code defect warning in register_finalizer
2452 * Eliminate 'possible loss of data' compiler warnings (MS VC)
2453 * Eliminate 'printf format specifier mismatch' compiler warning (tools)
2454 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
2455 * Eliminate 'value stored is never read' warning of Clang static analyzer
2456 * Eliminate duplicate log messages in GC_mark_from
2457 * Eliminate most of collisions in GC_threads on Linux/x64
2458 * Ensure GC initialized when atfork_prepare is called by client
2459 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
2460 * Fix 'bogus LR' detection in FindTopOfStack (Darwin)
2461 * Fix 'execvp argument incompatible pointer type' compiler warning (tools)
2462 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
2463 * Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
2464 * Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
2465 * Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
2466 * Fix 'ISO C90 forbids mixed declarations and code' compiler warning
2467 * Fix 'missing libc-version.h' build error (uClibc/x86[_64])
2468 * Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
2469 * Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
2470 * Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
2471 * Fix (adjust) GC_scratch_alloc actual argument type
2472 * Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
2473 * Fix finalize.c compilation in 'strict ANSI' mode
2474 * Fix GC shared library tests failure related to dl_iterate_phdr (musl)
2475 * Fix gc.h compliance to strict ANSI (pthreads)
2476 * Fix GC_bytes_allocd incrementation in case of allocation failure
2477 * Fix GC_jmp_buf multiple definition
2478 * Fix GC_noop6 definition to avoid its calls to be optimized away
2479 * Fix gctest failure if PARALLEL_MARK (musl)
2480 * Fix gctest thread stack overflow (musl-gcc)
2481 * Fix initsecondarythread_test runtime failure if GC compiled w/o threads
2482 * Fix lack of 2 trailing zeros in _MSC_VER numbers
2483 * Fix local variable declarations in disclaim_bench
2484 * Fix missing #error pragma
2485 * Fix missing .exe for disclaim test filenames in Makefile (MinGW)
2486 * Fix missing atomic/[un]collectable/realloc_count increments in gctest
2487 * Fix missing new-line and redundant trailing dot in WARN messages
2488 * Fix missing new-line at format strings end in subthread_create test
2489 * Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
2490 * Fix potential overflow in decrement when computing GC_markers_m1
2491 * Fix printf format specifiers in extra files (cppcheck warnings)
2492 * Fix pthread_start compilation if single-obj-compilation (Linux)
2493 * Fix register_finalizer call in disclaim_bench for GC_DEBUG
2494 * Fix static assertion violation in LONG_MULT for 64-bit targets
2495 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
2496 * Fix thread id leaks in subthread_create and threadkey_test
2497 * Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
2498 * Fix tools/setjmp_t to prevent nested_sp inlining
2499 * Fix typo in CHECK_GCLIB_VERSION name (test)
2500 * Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
2501 * Fix unchecked fork() result in gctest (Unix, Cygwin)
2502 * Improve detection of internal libatomic_ops (configure)
2503 * Move libraries version info to the beginning of Makefile.am
2504 * Prevent abort in register_data_segments for Symbian
2505 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
2506 * Refine Makefile.direct comment about multi-threaded GC build
2507 * Refine README about library source downloading
2508 * Refine should_invoke_finalizers documentation
2509 * Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
2510 * Remove non-existent configure option in simple_example.html
2511 * Replace C++ style comments to C ones, remove commented out code (extra)
2512 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
2513 * Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
2514 * Suppress 'tainted string passed to vulnerable operation' false defects
2515 * Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
2516 * Update bdwgc mailing list online archive link in documentation
2517 * Update shared libraries version info to differentiate against v7.2
2518 * Use AC_DEFINE for defining NO_GETCONTEXT in configure
2519 * Workaround 'index out of bounds' UBSan false warning in push_marked
2520 * Workaround 'mmap() resource handle leak' static analyzer warning
2521 * Workaround 'redundant assignment of *result to itself' cppcheck warning
2522 * Workaround 'resource leak' error reported by cppcheck (tools, test)
2523 Also, includes 7.2h changes
2524 2525 2526 == [7.4.4] 2016-05-25 ==
2527 2528 * Allow GC_FAST_MALLOC_GRANS() multiple use in a function
2529 * Also enable the TSX workaround for Linux/x86
2530 * Avoid unstructured procfs on Solaris
2531 * Change cord/de main() declaration style from K-R to ANSI C
2532 * Change no-argument functions declaration style to ANSI C (cord)
2533 * Do not include sigcontext.h and asm/sigcontext.h
2534 * Eliminate 'divide by zero' compiler warning in cordtest
2535 * Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
2536 * Eliminate warnings detected by Cppcheck in cord de[_win]
2537 * Fix 'comparison of non-null parameter is always false' warning (Clang)
2538 * Fix 'CORD_iter5 unused result' code defect in cordxtra
2539 * Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
2540 * Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
2541 * Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
2542 * Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
2543 * Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
2544 * Fix 'statement unreachable' compiler warning in GC_mark_from
2545 * Fix 'statement unreachable' compiler warning in memalign
2546 * Fix 'unused label' compiler warning in cord/de
2547 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
2548 * Fix 'variable unused' warning in GC_save_callers
2549 * Fix 'visibility attribute not supported' GCC warning (IBM AIX)
2550 * Fix CMake warning about CMP0054 by unquoting instances of HOST
2551 * Fix Cygwin64 build
2552 * Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
2553 * Fix Makefile.direct for Cygwin
2554 * Fix __alloc_size__ availability detection (Clang)
2555 * Fix abort message in GC_move_long_link
2556 * Fix and code refactoring of lock elision workaround (Linux/x64)
2557 * Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
2558 * Fix data race in GC_init_explicit_typing
2559 * Fix gc.mak regarding msvc_dbg and test (MSVC)
2560 * Fix missing error handling of pthread_attr_init/getstacksize
2561 * Fix missing error handling of pthread_mutex_init and cond_wait
2562 * Fix missing numeric casts in cord
2563 * Fix potential left shift overflows in finalize.c (64-bit targets)
2564 * Fix pthreads-win32 name in comments and documentation
2565 * Fix setup_mark_lock missing prototype
2566 * Fix unchecked fcntl() result
2567 * Fix unchecked pointer dereference in check_ints (gctest)
2568 * Fix unchecked pthread_join() result in threadkey_test
2569 * Fix unchecked sigdelset() result in pthread_support
2570 * Fix undefined PTRFREE/NORMAL in gc_inline.h
2571 * Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
2572 * Relax mark_mutex attribute needed to disable elision (Linux/x64)
2573 * Remove (deprecate) TODO file
2574 * Remove code duplication in GC_realloc
2575 * Remove duplicate new-line in OUT_OF_MEMORY message (cord)
2576 * Remove references to missing linux_threads.c from documentation
2577 * Revert "Move asm machine-dependent files to 'src' folder" (partly)
2578 * Support Android API level 21
2579 * Update compiler options in gc.mak (Win32)
2580 * Use mmap instead of sbrk (Hurd)
2581 * Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
2582 * Workaround 'identical expr on both sides of bitwise op' warning
2583 * Workaround Linux NTPL lock elision bug
2584 * Workaround false warning about unreachable code path
2585 * Workaround invalid '_end' symbol on Android clang 3.5+
2586 Also, includes 7.2g changes
2587 2588 2589 == [7.4.2] 2014-06-03 ==
2590 2591 * Add config option to use STGRTMIN-based signals for thread suspend/resume
2592 * Allow parallel mark to be enabled on powerpc-linux systems
2593 * Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
2594 * Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
2595 * Fix 'attribute declaration must precede definition' warning (clang-3.1)
2596 * Fix (enable) Cygwin-64 build
2597 * Fix GC_finalized_malloc failure on disclaim_test
2598 * Fix GC_sig_suspend initialization when non-constant SIGRTMIN used
2599 * Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
2600 * Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
2601 * Fix data roots registration for Android/x86 and NDK ARM 'gold' linker
2602 * Fix find stackbottom on BlueGene P/Q systems
2603 * Fix machdep .lo files path in configure (SPARC, IA-64)
2604 * Fix ok_init assignment (missing cast) in GC_new_kind_inner
2605 * Fix typos in names in AUTHORS and ChangeLog files
2606 * Remove barrett_diagram file duplicated by tree.html
2607 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
2608 * Restore contribution information for ancient releases in ChangeLog
2609 Also, includes 7.2f changes
2610 2611 2612 == [7.4.0] 2013-11-17 ==
2613 2614 * Add 'bytes reclaimed' counters to public GC_prof_stats_s
2615 * Add AArch64 (64-bit ARM) target support
2616 * Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality
2617 * Add GC_get_prof_stats[_unsafe]() to GC public API
2618 * Add GC_push_all/conditional() to GC public API
2619 * Add assertion on number_of_objs to GC_extend_size_map
2620 * Add assertion to GC_enable() ensuring no counter underflow
2621 * Add assertion to LOCK definition that lock is not already held
2622 * Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR
2623 * Add double-lock assertion to GC_acquire_mark_lock
2624 * Add manual POSIX fork handling support (Android)
2625 * Add note about 'pkg-config' solving problem with autoconf 2.68 or older
2626 * Add public GC_set/get_abort_func to replace default GC_on_abort
2627 * Add public GC_start_mark_threads() to allow parallel marker in fork child
2628 * Add public setter and getter for GC_push_other_roots
2629 * Add support of Android logger
2630 * Add tests for GC_register/move/unregister_long_link
2631 * Add thread suspend/resume signals public setters (POSIX threads)
2632 * Added long weakref support
2633 * Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h
2634 * Adjust README.md title and references to doc .html files in it
2635 * Adjust build scripts to enable additional test library in staticrootstest
2636 * Adjust logged messages in start_mark_threads and GC_thr_init
2637 * Adjust printf format specifiers in GC_print_trace
2638 * Allow not to rely on __data_start value (Linux)
2639 * Allow pthread_kill error code logging in GC_suspend/resume (debugging)
2640 * Allow to compile GC_inner_start_routine aside from extra/gc.c
2641 * Allow to omit libc atexit() call
2642 * Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
2643 * Better document GC_warn_proc in gc.h
2644 * Call GC_on_abort (with NULL argument) on exit(1)
2645 * Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats
2646 * Change policy regarding version numbers ("micro" part instead of "alpha")
2647 * Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style
2648 * Check GC_base result in GC_print_all_smashed_proc
2649 * Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)
2650 * Check traceable_allocator.allocate result before dereference in test_cpp
2651 * Code refactoring of GC_x_printf (move shared code to macro)
2652 * Convert readme to markdown
2653 * Default to use libc_stack_end in single-threaded GC on glibc targets
2654 * Define GC_VSNPRINTF internal macro in misc.c (code refactoring)
2655 * Define functions in darwin_semaphore.h as inline instead of static
2656 * Define old_bus_handler static variable only if used (Unix)
2657 * Detect dladdr() presence by configure
2658 * Disable find-leak GC_gcollect on GC abnormal EXIT
2659 * Do not define _setjmp/_longjmp macros in mach_dep.c
2660 * Do not duplicate android_log_write output to GC log file (Android)
2661 * Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
2662 * Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
2663 * Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified
2664 * Elaborate comment on dependencies in autogen.sh
2665 * Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots
2666 * Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
2667 * Eliminate 'uninitialized variable use' warning in test_printf (cord)
2668 * Eliminate 'unused result' compiler warning in main() of test_cpp
2669 * Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
2670 * Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX)
2671 * Eliminate Clang warning for GC_pthread_exit attribute
2672 * Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
2673 * Eliminate GCC warning in GC_get_main_stack_base (OpenBSD)
2674 * Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app
2675 * Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion
2676 * Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
2677 * Eliminate warning and simplify expression in GC_init_explicit_typing
2678 * Enable 'force GC at every GC_malloc' debug-related functionality
2679 * Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
2680 * Enable prefetch operations by default (GCC 3.0+)
2681 * Enable staticrootstest for the case of GC shared library build
2682 * Enable thread-local allocation support for Clang on Cygwin
2683 * Explicitly specify that Darwin, Linux and Solaris platforms have dladdr
2684 * Fix ABORT definition for mingw32ce (WinCE)
2685 * Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1
2686 * Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
2687 * Fix GC_INIT_CONF_ROOTS in gc.h for Android
2688 * Fix GC_INLINE definition to comply with ISO C90 standard (GCC)
2689 * Fix GC_remove_all_threads_but_me for Android (fork support)
2690 * Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
2691 * Fix dyn_load.c compilation for Android 4.3
2692 * Fix make disclaim_test to link with new GNU ld linking rules
2693 * Improve GC error printing atomicity in GC_debug_X and GC_print_obj
2694 * Improve GC output atomicity in GC_print_obj, GC_print_all_errors
2695 * Improve debug-only messages of add/remove_roots and init_linux_data_start
2696 * Improve fork test logging in gctest
2697 * Improve logged messages about heap size and usage
2698 * Improve logging for Android differentiating messages by log level
2699 * Improve staticrootstest (add global data to library, add lib w/o GC_INIT)
2700 * Improve staticrootstest checks (tests)
2701 * Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
2702 * Include proper header file in 'tools' for configuration macros
2703 * Include pthread_np.h from pthread_stop_world.c on OpenBSD
2704 * Log error messages to stderr instead of stdout in tests
2705 * Make GC_generic_malloc_ignore_off_page() public
2706 * Make GC_mark_lock_holder variable static
2707 * Make GC_print_trace always thread-safe and remove 'lock' argument
2708 * Mark GC_started_thread_while_stopped() as GC_INNER
2709 * Minimize code duplication in GC_mark_and_push
2710 * Move 'include setjmp.h' from mach_dep.c to gc_priv.h
2711 * Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)
2712 * Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
2713 * Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer
2714 * Port BDWGC to Android/x86
2715 * Postpone the suspend signal in GC_dirty_init only if used to stop world
2716 * Prepend '#' symbol to GC number in logged messages
2717 * Prevent POSIX fork if mprotect_thread is started (Darwin)
2718 * Prevent abort on GC_err/warn_printf write failure
2719 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
2720 * Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined
2721 * Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC)
2722 * Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h
2723 * Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
2724 * Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h
2725 * Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD
2726 * Remove DebugBreak on WriteFile failure (Win32)
2727 * Remove GC_BUILD definition from build scripts
2728 * Remove abort on open log failure from GC_write (Win32)
2729 * Remove configure.ac outdated revision number
2730 * Remove nested EXPECT in GC_core_finalized_malloc
2731 * Remove nested always-false ifdef for HPUX and FREEBSD
2732 * Remove redundant GC_err_printf before abort
2733 * Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)
2734 * Rename subthread_create to subthreadcreate_test (Makefile)
2735 * Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages
2736 * Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()
2737 * Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
2738 * Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world
2739 * Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
2740 * Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF
2741 * Replace sprintf with defensive snprintf
2742 * Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning)
2743 * Simplify LOCK/UNLOCK macro definition for static code analysis tools
2744 * Specify GC_malloc result is unused in some tests
2745 * Specify GC_pthread_join result is unused in threadkey_test
2746 * Specify LT_INIT in configure.ac
2747 * Start of port to QNX
2748 * Support rthreads introduced in OpenBSD 5.2+
2749 * Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
2750 * Tag GC malloc routines with alloc_size attribute for Clang 3.2+
2751 * Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code
2752 * Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING
2753 * Turn on world-stop delay logging at debug level by default for Android
2754 * Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
2755 * Use GC_log_printf for logging instead of GC_[err_]printf
2756 * Use compiler TLS for Android NDK gcc/arm
2757 * Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning)
2758 * Use pthread API to operate thread-local data on Linux if no compiler TLS
2759 * Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h
2760 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
2761 Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes
2762 2763 2764 == [7.3alpha2] 2012-05-11 ==
2765 2766 * Add 'const' qualifier to pointer argument of some API functions
2767 * Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
2768 * Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API
2769 * Add GC_is_heap_ptr, GC_move_disappearing_link to GC API
2770 * Add SHORT_DBG_HDRS macro template to configure
2771 * Add Symbian port to mainline (porting done by Djamel Magri)
2772 * Add TODO file
2773 * Add assertion ensuring proper alignment of 'pushed' GC symbols
2774 * Add assertion in GC_getspecific on qtid
2775 * Add assertion to GC_incremental_protection_needs, refine documentation
2776 * Add assertion to check GC_large_free_bytes by GC_finish_collection
2777 * Add configure option to compile all library .c files into single gc.o
2778 * Add cordtest to make check
2779 * Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM)
2780 * Add finalization.html to 'doc' folder
2781 * Add javaxfc.h to the installation set of GC header files (configure)
2782 * Add on-heap-resize event notification to API
2783 * Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
2784 * Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
2785 * Allow GC_exclude_static_roots() region start to be unaligned
2786 * Allow Win32 DllMain chaining on the client side
2787 * Allow to exclude finalization support by GC_NO_FINALIZATION macro
2788 * Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin
2789 * Avoid unnecessary GC_find_limit invocation if GC_no_dls
2790 * Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest
2791 * Cast pointers to word (instead of unsigned long) in specific.h
2792 * Changed the order in autogen.sh so ltmain exists in time for automake
2793 * Declare privately and use handy GC_base_C() for constant object pointers
2794 * Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW)
2795 * Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off
2796 * Do not compile backgraph.c unless configure '--enable-gc-debug'
2797 * Do not compile pthread_stop_world.c for Cygwin/Darwin (configure)
2798 * Do not install ancient new_gc_alloc.h broken for modern STL (configure)
2799 * Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
2800 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
2801 * Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32)
2802 * Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation)
2803 * Extend thread-related debug messages
2804 * Fix 'configure --enable-cplusplus' for Cygwin/MinGW
2805 * Fix DATASTART (and other minor improvements) for NaCl target
2806 * Fix GC_setspecific to prevent garbage collection inside
2807 * Fix compiler warning in cordtest
2808 * Fix minor warnings reported by GCC with '-pedantic' option
2809 * Fix static data roots registration on Android (if GC is shared)
2810 * Implement GC_get_stack_base for Darwin for single-threaded mode
2811 * Improve GC_allochblk algorithm of block splitting when unmapping enabled
2812 * Improve GC_collect_or_expand algorithm for many finalizers registered case
2813 * In tests, print a message in case a test is a no-op
2814 * Instruct configure to hide internal libgc.so symbols if supported by GCC
2815 * Log amount of unmapped memory (if enabled) on marking-for-collection
2816 * Make __data_start a weak symbol to allow loading modules on mips
2817 * Move "cord" library tests to "cord/tests" folder
2818 * Move asm machine-dependent files to "src" folder
2819 * Move build tools sources to "tools" folder
2820 * Move cord_pos.h to public headers folder
2821 * Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin)
2822 * Optimize some functions by moving pthread_self calls out of LOCK section
2823 * Place only major per-release changes description to ChangeLog (this file)
2824 * Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin)
2825 * Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
2826 * Remove all auto-generated files from the repo
2827 * Remove binary icon file for de_win
2828 * Remove cordtest from "cord" library
2829 * Remove duplicate MacOS_Test_config.h file
2830 * Remove gc_amiga_redirects.h (included internally) from public headers
2831 * Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure)
2832 * Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX
2833 * Remove unsupported MMAP_STACKS (specific to Solaris threads)
2834 * Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros
2835 * Replace ARGSUSED comment-based annotation with GCC 'unused' attribute
2836 * Replace GC_ms_entry declaration with opaque definition for public API
2837 * Replace long GC_markers global variable with int GC_markers_m1
2838 * Replace pointer relational comparisons with non-pointer ones
2839 * Replace printf PRIxMAX specifier with '%p' for thread id debug output
2840 * Require autoconf 2.61 instead of v2.64
2841 * Simplify autogen.sh (use autoreconf)
2842 * Split GC_abort with GC_on_abort and abort() invoked from ABORT
2843 * Support GC_ATTR_MALLOC for MS VisualStudio
2844 * Tag auxiliary malloc-like API functions with 'malloc' attribute
2845 * Tag deprecated variables in GC API
2846 * Tag must-be-non-null arguments of GC API functions
2847 * Turn on "extra" GCC warnings
2848 * Turn on unused-parameter checking for GCC
2849 * Update AUTHORS file
2850 * Use EXPECT for checking various 'initialized' boolean variables
2851 * Use USE_COMPILER_TLS on Cygwin
2852 * Use pthread_key for thread-local storage on FreeBSD
2853 * Use union of AO_t and word to favor strict-aliasing compiler optimization
2854 Also, includes 7.2 changes
2855 2856 2857 == [7.2s] 2024-09-06 ==
2858 2859 * Avoid gcc stringop-overflow warning for intended overflow in smashtest
2860 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
2861 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
2862 * Eliminate warning and simplify expression in GC_init_explicit_typing
2863 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
2864 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
2865 * Fix ADD_CALL_CHAIN() placement to follow GC_store_debug_info_inner call
2866 * Fix GC_is_visible for case of arg pointing exactly to object upper bound
2867 * Fix GC_jmp_buf multiple definition
2868 * Fix GC_print_trace_inner to print the last element of the circular buffer
2869 * Fix double lock in GC_malloc called from backtrace()
2870 * Fix indent of a closing curly braces in GC_apply_to_all_blocks
2871 * Fix null pointer dereference in GC_is_visible if type_descr is null
2872 * Fix per_object_helper() after changing hb_sz units
2873 * Fix poor thread-local allocation performance because of double EXTRA_BYTES
2874 * Fix potential GC_add_roots_inner call with an overflowed pointer (Win32)
2875 * Fix potential address overflow in GC_add_to_heap
2876 * Fix potential buffer overrun during read in GC_text_mapping
2877 * Fix typos in comments
2878 * Prevent compiler warnings regarding unused argument and printf in extra
2879 * Prevent redirected malloc call from a garbage collection routine
2880 * Remove barrett_diagram file duplicated by tree.html
2881 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
2882 * Resolve GCC warning in setjmp_t.c
2883 * Update and fix diagrams describing the tree structure for pointer lookups
2884 2885 2886 == [7.2r] 2024-02-03 ==
2887 2888 * Fix 'g++ not found' error on OpenBSD (Makefile.direct)
2889 * Fix 'implicit declaration of iscntrl()' warning in cord/de_win (MinGW)
2890 * Fix 'info' buffer potential overrun in GC_save_callers
2891 * Fix 'missing sysconf() prototype' gcc error in setjmp_t tool (OpenBSD)
2892 * Fix SVR4 macro definition order
2893 * Fix asm constraint in LONG_MULT for gcc/x86
2894 * Fix assertion violation in GC_get_maps on Linux if malloc redirection
2895 * Fix bitwise negation and rounding direction in setjmp_t tool
2896 * Fix closing bracket placement for case statement in configure
2897 * Fix indent of a closing curly brace in GC_forward_exception
2898 * Fix missing outermost parentheses in CORD_pos_cur_char_addr
2899 * Fix missing type widening before left shift in GC_MAKE_PROC
2900 * Fix misspelled GC_HEADERS_H macro in gc_priv.h
2901 * Fix null dereference in check_finalizer_nested if redirect malloc on Linux
2902 * Fix posix_memalign() to overwrite pointer storage only on success
2903 * Fix skipped removal of page protection in case of address hash collision
2904 * Fix typos in comments
2905 * Fix update of last_back_trace_gc_no if KEEP_BACK_PTRS is not defined
2906 2907 2908 == [7.2q] 2023-05-25 ==
2909 2910 * Fix CORD_next() indent inside loop in test_basics() of cordtest
2911 * Fix DCL_LOCK_STATE placement in GC_set_oom_fn
2912 * Fix GC_excl_table overrun on overflow in GC_exclude_static_roots
2913 * Fix IRIX5 defined wrongly on Tandem S-Series and WinCE/mips
2914 * Fix comparisons to heap boundary in GC_get_back_ptr_info and GC_mark_from
2915 * Fix disabling of automatic dynamic libraries registration
2916 * Fix double initialization of main thread local free lists on Win32
2917 * Fix joinable threads shutdown on NaCl
2918 * Fix loop condition over dll_thread_table in GC_lookup_pthread (Win32)
2919 * Fix missing GC_CALLBACK for GC_waitForSingleObjectInfinite
2920 * Fix missing libalphagc.so dependency in Makefile.direct
2921 * Fix missing result check of pthread_attr_getdetachstate in pthread_create
2922 * Fix overlapping region assertion in mark_some if malloc redirect on Linux
2923 * Fix potential SIGSEGV on out-of-memory in gctest
2924 * Fix typos in comments and documentation
2925 * Fix unregistering of thread created by intercepted pthread_create on NaCl
2926 * Fix use of unset errno after pthread_create call
2927 * Invoke GC_oom_fn if GC_make_array_descriptor failed because of no memory
2928 2929 2930 == [7.2p] 2022-08-25 ==
2931 2932 * Avoid potential race in GC_init_real_syms after GC_allow_register_threads
2933 * Define SUNOS5SIGS macro for kFreeBSD
2934 * Do not assert that GC is initialized at DLL_THREAD_DETACH (Win32)
2935 * Ensure typed objects descriptor is never located in the first word
2936 * Fix GC_make_descriptor for zero length argument
2937 * Fix SUNOS5SIGS documentation to match macro definition in gcconfig.h
2938 * Fix assertion violation in GC_allow_register_threads on Windows
2939 * Fix get_maps failure when GC_repeat_read returns zero
2940 * Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdr
2941 * Fix missing lock when GC_generate_random_valid_address is called
2942 * Fix nodist_libgc_la_SOURCES value in Makefile.am for Solaris/sparc
2943 * Fix oldProc initialization in gc_cleanup and eliminate related warnings
2944 * Fix parallel_initialized assertion violation in initsecondarythread (Win32)
2945 * Fix propagation of out-of-memory occurred in GC_make_sequence_descriptor
2946 * Fix race between calloc_explicitly_typed and push_complex_descriptor
2947 * Fix typos in comments of .c files, gc.h and a typo in debugging.html
2948 * Refer to Makefile.direct instead of deleted Makefile file in README
2949 * Remove checking of RS6000 completely
2950 * Remove non-working check of M68K in gctest
2951 * Revert addition of msvc_dbg.h in include.am
2952 2953 2954 == [7.2o] 2021-09-28 ==
2955 2956 * Add loop to handle abort error like in suspend logic on Darwin
2957 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
2958 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
2959 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
2960 * Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
2961 * Fix 'expected function body after declarator' clang error in gc_cpp.cc
2962 * Fix 'write to GC log failed' error
2963 * Fix GC_proc_fd value in child process at fork (Solaris)
2964 * Fix assertion violation in register_dynlib_callback on Android
2965 * Fix configure message about 'AIX gcc optimization fix'
2966 * Fix data race regarding *rlh value in generic_malloc_many
2967 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
2968 * Fix fread failure after enable_incremental if malloc is redirected (Linux)
2969 * Fix gc_cflags variable name in configure (HP/UX)
2970 * Fix handling of areas smaller than page size on recycle scratch area
2971 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
2972 * Fix misaligned tlfs passed to AO_load on m68k
2973 * Fix missing GC_quiet declaration in pcr_interface.c
2974 * Fix missing gc_dlopen.c in CMake script
2975 * Fix missing scratch_last_end_ptr update (Irix)
2976 * Fix overflow of scratch_free_ptr value
2977 * Fix page_was_[ever_]dirty() for static roots (Solaris)
2978 * Fix printf format specifier in simple_example.html
2979 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
2980 * Fix various typos in comments and documentation files
2981 * Fix word size, data start and alignment for OpenBSD/mips64(el)
2982 * Prevent WARN of incompatible incremental GC if default or manual VDB
2983 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
2984 * Remove a misleading comment about Solaris in gc.h
2985 2986 2987 == [7.2n] 2019-03-01 ==
2988 2989 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
2990 * Fix 'unexpected mark stack overflow' abort in push_all_stack
2991 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
2992 * Fix GetThreadContext stale register values use if WoW64 (Win32)
2993 * Fix executable memory allocation in GC_unix_get_mem
2994 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
2995 2996 2997 == [7.2m] 2018-12-11 ==
2998 2999 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
3000 * Fix hbp overflow in GC_install_counts
3001 * Fix start_world not resuming all threads on Darwin
3002 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
3003 3004 3005 == [7.2l] 2018-08-10 ==
3006 3007 * Fix 'pointer arithmetic with NULL' code defect in print_callers
3008 * Fix Borland version in documentation to match that in BCC_MAKEFILE
3009 * Fix comment about inv_sz computation in setup_header
3010 * Fix comments style in configure.ac and Makefile.am
3011 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
3012 * Fix global operator delete definition for C++14 in gc_cpp
3013 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
3014 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
3015 * Fix mark stack overflow checking in push_selected
3016 * Fix MSWIN32 macro redefinition (WCC)
3017 * Fix potential null dereference in GC_CONS
3018 * Fix register_dynamic_libraries on Windows 10
3019 * Fix result computation in n_set_marks
3020 * Fix return type in GC_set_warn_proc API documentation
3021 * Fix typo in comment for CORD_ec_flush_buf prototype
3022 * Fix typos in ChangeLog
3023 * Fix VirtualQuery call in case of malloc failure (Win32)
3024 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
3025 * Perform thread_suspend in loop as it may be interrupted (Darwin)
3026 * Workaround 'template-id not supported in this context' compiler error (WCC)
3027 3028 3029 == [7.2k] 2018-04-19 ==
3030 3031 * Fix arguments delimiter in pcr_interface.c (PCR)
3032 * Fix assertion violation in DllMain of win32_threads
3033 * Fix data race during apply_to_each_object(reset_back_edge)
3034 * Fix dbg_mlc.c/o file name in documentation
3035 * Fix include gc_gcj.h in thread_local_alloc.c
3036 * Fix man section number (3)
3037 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
3038 * Fix missing SIGBUS handler setup for kFreeBSD
3039 * Fix null dereference in print_callers on backtrace_symbols failure
3040 * Fix the collector hang when it is configured with --enable-gc-debug
3041 * Fix thread_suspend fail for threads registered from key destructor (OS X)
3042 * Fix typo in AIX macro name
3043 * Fix typo in comment in specific.h
3044 3045 3046 == [7.2j] 2018-01-21 ==
3047 3048 * Fix GC allocation mutex in child after a fork
3049 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
3050 * Fix libgc version which was changed in linkage breaking way
3051 * Fix missing EOLn output in threadlibs tool
3052 3053 3054 == [7.2i] 2017-12-21 ==
3055 3056 * Avoid data race in finalized_count (gctest)
3057 * Fix assertion violation about disabled cancel in try_to_collect_inner
3058 * Fix data race in a list referenced by A.aa (gctest)
3059 * Fix data race in do_local_mark when comparing active_count to helper_count
3060 * Fix data race in GC_init_explicit_typing
3061 * Fix data race in last_stop_count access (suspend_handler_inner)
3062 * Fix data race in mark_thread when updating mark_no
3063 * Fix data race when getting object size in explicitly-typed allocators
3064 * Fix lack of barriers to synchronize memory for suspend_handler
3065 * Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
3066 * Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)
3067 3068 3069 == [7.2h] 2017-10-12 ==
3070 3071 * Add gctest as a test (CMake)
3072 * Change no-argument functions declaration style to ANSI C (extra files)
3073 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
3074 * Ensure oom_fn callback executed on out-of-memory in calloc
3075 * Fix '~' operator application to unsigned values shorter than word
3076 * Fix 'context local variable might be clobbered by setjmp' compiler warning
3077 * Fix 'doc' files installation folder
3078 * Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
3079 * Fix ALL_INTERIOR_POINTERS name in comments and documentation
3080 * Fix AO_SRC_DIR target name in NT_*_MAKEFILE
3081 * Fix assertion in GC_mark_from for non-heap regions
3082 * Fix assertion in GC_steal_mark_stack for non-heap regions
3083 * Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
3084 * Fix assertion violation in GC_wait_builder called from start_mark_threads
3085 * Fix assertion violation in mark_local checking GC_mark_stack_top
3086 * Fix assertion violation in return_single_freelist in child process
3087 * Fix bm_huge initialization for 64-bit targets (gctest)
3088 * Fix broken external links in documentation
3089 * Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
3090 * Fix calloc_explicitly_typed in case of lb*n overflow
3091 * Fix CMake warning about CMP0054 by unquoting instances of HOST
3092 * Fix conditional expression in pos_fetch, next non-macro definitions (cord)
3093 * Fix configure --disable-munmap handling
3094 * Fix CORD_substr_closure for the case when CORD_from_fn returns C string
3095 * Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
3096 * Fix double lock in pthread_detach (Cygwin, winpthreads)
3097 * Fix double multiplication of lb by n in calloc_explicitly_typed
3098 * Fix enable_parallel_mark condition in CMake script
3099 * Fix external libatomic_ops pkg-config-based detection
3100 * Fix gc_allocator.h file name in new_gc_alloc.h comment
3101 * Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
3102 * Fix gc_cleanup destructor for non-heap objects (gc_cpp)
3103 * Fix GC_collect_or_expand to prevent allocation size value wrap-around
3104 * Fix GC_incremental declaration/definition type mismatch
3105 * Fix GC_mark_stack_top assertion violation properly in mark_local
3106 * Fix GC_remove_specific invocation from remove_all_threads_but_me
3107 * Fix GC_requested_heapsize increment in GC_init
3108 * Fix GC_setspecific to prevent garbage collection inside
3109 * Fix GC_SIZE_MAX definition (Linux/musl-gcc)
3110 * Fix GCJ support in CMake build script
3111 * Fix gctest crash if configure --enable-handle-fork on Darwin
3112 * Fix get_maps on proc maps file asynchronous growth
3113 * Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ
3114 * Fix header filename in gcconfig.h comment
3115 * Fix infinite mark_some calls after memory mapping disappeared (Glibc)
3116 * Fix integer shift undefined behavior in GC_init_explicit_typing
3117 * Fix leak_test crash in print_callers if free() is redirected
3118 * Fix Makefile.direct recursive invocation
3119 * Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
3120 * Fix missing win32_threads.c compilation for Cygwin (CMake)
3121 * Fix MS VC warning about compiling unused checksums and thread_local_alloc
3122 * Fix name typos in GC_FAST_MALLOC_GRANS comment
3123 * Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
3124 * Fix OSF1 host pattern in CMakeLists.txt
3125 * Fix PCR-Makefile by removing compilation of a missing file
3126 * Fix potential data race in GC_SysVGetDataStart (SPARC)
3127 * Fix potential integer overflow in GC_find_limit_* functions
3128 * Fix printf arguments type in print_callers
3129 * Fix pthread_detach for threads not yet registered (Cygwin, winpthreads)
3130 * Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads)
3131 * Fix pthread_join when thread is registered in thread key destructor
3132 * Fix push_complex_descriptor to avoid unlimited global mark stack growth
3133 * Fix removal of dead threads in a child process
3134 * Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
3135 * Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME
3136 * Fix Solaris/sparc detection in case of strict C compliance is enforced
3137 * Fix STACKBOTTOM for Solaris 11/x86
3138 * Fix storage class of local variable in register_dynamic_libraries (Irix)
3139 * Fix tools/setjmp_t hang (OS X)
3140 * Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
3141 * Fix undefined HEAP_START in register_dynamic_libraries
3142 * Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32
3143 * Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h
3144 * Fix various typos in comments, documentation and printed messages
3145 * Handle load_segs overflow in register_dynlib_callback gracefully
3146 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
3147 * Replace (fix) 'objs' acronym in comments with 'objects' word
3148 * Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
3149 * Update documentation about bugs reporting and new releases notification
3150 * Update Download information in GC overview document
3151 * Update shared libraries version info (v7.2)
3152 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
3153 * Workaround missing getcontext() in Docker osrf/ubuntu_32bit
3154 3155 3156 == [7.2g] 2016-05-23 ==
3157 3158 * Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
3159 * Fix 'implicit declaration of function' compiler warnings in cord/de
3160 * Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
3161 * Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)
3162 * Fix GC initialization in cord de_win for Cygwin
3163 * Fix GC_get_stack_base if called before GC_init (Win32)
3164 * Fix OSX issue with pthread_attr_setstacksize failure
3165 * Fix Unicode Win32 API calls in cord de_win
3166 * Fix USE_COMPILER_TLS macro duplicate description in README
3167 * Fix cord de_win WndProc prototype parameters for 64-bit (Win64)
3168 * Fix file descriptor resource leak in GC_register_data_segments (OS/2)
3169 * Fix filename printing in cordtest
3170 * Fix missing cord_pos.h, ec.h among installed headers (Automake)
3171 * Fix missing GC_get_stack_base for Amiga
3172 * Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
3173 * Fix mistyped ARM_THREAD_STATE macro (Darwin/arm)
3174 * Fix null-pointer dereferences on out-of-memory in cord and tests
3175 * Fix potential multiplication overflow in check_heap_stats (gctest)
3176 * Fix race (and potential deadlock) at marker threads initialization
3177 * Fix signedness of char values passed to isspace, iscntrl, isxdigit
3178 * Fix typo (items numbering) in GC_finalize_all documentation
3179 * Fix typos in ERROR_FL, GC_malloc_uncollectable comments
3180 * Fix typos in gc_priv.h, in README for ews4800
3181 * Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)
3182 * Fix various spelling errors
3183 * Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX
3184 * Regenerate configure files using official libtool release (v2.4.2)
3185 * Remove documentation about obsolete GC_REDIRECT_TO_LOCAL
3186 * Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from
3187 * windows-untested: Fix paths to msvc_dbg.c/h
3188 3189 3190 == [7.2f] 2014-06-03 ==
3191 3192 * Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
3193 * Fix 'source file in a subdirectory' Automake warnings
3194 * Fix ABORT message in GC_restart_handler
3195 * Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
3196 * Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
3197 * Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap
3198 * Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
3199 * Fix GET_MEM argument rounding in GC_scratch_alloc and similar
3200 * Fix PARALLEL_MARK for Windows 7+
3201 * Fix build (broken by fenv.h inclusion) on Linux/x64 under uClibc
3202 * Fix crash when using GC_malloc_many() as first allocation call
3203 * Fix mark stack excessive growth during parallel mark
3204 * Fix or remove broken URLs in documentation
3205 * Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)
3206 * Fix typo in GC_collect_or_expand comment
3207 * Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes
3208 * Regenerate configure files by automake 1.14.1, libtool 2.4.2.418
3209 * Update emails/links due to project site and ML transition
3210 3211 3212 == [7.2e] 2013-11-10 ==
3213 3214 * Add weak attribute to avoid __data_start undefined messages (s390x)
3215 * Add weak stubs for pthread_cancel API
3216 * Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
3217 * Append _test suffix to 'initsecondarythread' binary file names
3218 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
3219 * Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
3220 * Fix GC_CreateThread 'dwStackSize' argument type for Win64
3221 * Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
3222 * Fix GC_clear_stack by declaring 'dummy' local array as volatile
3223 * Fix GC_get_stack_base assembly code (Cygwin/Clang)
3224 * Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
3225 * Fix GC_marker_Id elements initialization (WinCE)
3226 * Fix GC_print_trace missing unlock
3227 * Fix GC_unix_mmap_get_mem for open of /dev/zero failure
3228 * Fix GC_win32_free_heap compilation error for Cygwin
3229 * Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
3230 * Fix Win32 GC_write preventing potential infinite recursion at abort
3231 * Fix assertion violation in GC_mark_from prefetch loop
3232 * Fix collection of objects referenced only from GC_mark_stack_X variables
3233 * Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
3234 * Fix heap sections overflow for Win32/Cygwin with enabled parallel marker
3235 * Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
3236 * Fix missing tabs in SMakefile.amiga file
3237 * Fix null-pointer dereference in CORD_substr_closure
3238 * Fix old_segv/bus_act variables initialization for FreeBSD
3239 * Fix potential double fclose in test_extras (cordtest)
3240 * Fix pthread_attr_t resource leak in pthread_create
3241 * Fix race in GC_print_all_errors regarding GC_leaked
3242 * Fix sizeof in GC_push_thread_structures
3243 * Fix stackbottom/stack_end assignment in GC_call_with_gc_active
3244 * Fix tests makefile to link with new GNU ld linking rules
3245 * Fix typos in comments and documentation
3246 * Fix unportable '==' test operators in configure
3247 * Fix vsprintf_args cleanup in CORD_vsprintf
3248 * Merge FreeBSD New ports collection for boehm-gc v7.2d
3249 * Replace GC_DBG_RA with GC_DBG_EXTRAS macro
3250 * Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file
3251 * Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)
3252 3253 3254 == [7.2d] 2012-08-09 ==
3255 3256 * Fix GC_call_with_stack_base to prevent its tail-call optimization
3257 * Fix all address-of-dummy operations by using GC_approx_sp() instead
3258 * Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
3259 * Fix test_cpp (ensure the collector recognizes pointers to interiors)
3260 * Fix thread-related tests for pthreads-w32
3261 * test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
3262 3263 3264 == [7.2c] 2012-06-11 ==
3265 3266 * Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory
3267 * Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
3268 * Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
3269 * Fix visibility of GC_clear/set_mark_bit (unhide symbols)
3270 * Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols
3271 3272 3273 == [7.2b] 2012-05-23 ==
3274 3275 * Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
3276 3277 3278 == [7.2] 2012-05-11 ==
3279 3280 * Abort in GC_thr_init on pthread_atfork failure (POSIX threads)
3281 * Add GC_WIN32_PTHREADS target in configure
3282 * Add GC_is_disabled new function to GC API
3283 * Add info that getcontext() resets FPE mask no longer on Linux/x64
3284 * Add public GC_set_handle_fork to control forked child handling support
3285 * Add realloc_test.c test
3286 * Add support for Hexagon target
3287 * Add thread-safe GC_get_heap_usage_safe to GC API
3288 * Change GC_check_fl_marks prototype and implementation
3289 * Check pthread_create/join result in test
3290 * Define GC_DLL (in configure) if building only dynamic libraries
3291 * Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set
3292 * Disable incremental mode on Darwin if fork handling requested
3293 * Enable parallel marker in configure for Solaris
3294 * Fix "comparison of signed and unsigned values" compiler warnings
3295 * Fix 'volatile' keyword placement in GC_SysVGetDataStart
3296 * Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target
3297 * Fix GC_READ_ENV_FILE code for Cygwin
3298 * Fix GC_add_roots_inner for Mac OS X (align segment start)
3299 * Fix GC_check_fl_marks regarding concurrent access
3300 * Fix GC_finalizer_nested size to workaround alignment problem in Watcom
3301 * Fix GC_find_limit_with_bound to always reset fault handler on return
3302 * Fix GC_init static assertion for clang/x64 (Darwin)
3303 * Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection
3304 * Fix GC_push_all/selected boundaries check
3305 * Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
3306 * Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
3307 * Fix GC_restart_handler to preserve errno if needed
3308 * Fix GC_root_size update in GC_add_roots_inner (Win32)
3309 * Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32)
3310 * Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
3311 * Fix calloc, GC_generic_malloc to check for allocation size overflows
3312 * Fix compiler warning in GC_dyld_image_add/remove (Darwin)
3313 * Fix configure --enable-cplusplus make install
3314 * Fix configure to disable GCC aliasing optimization unless forced to
3315 * Fix duplicate definitions in gcconfig.h for NetBSD
3316 * Fix fork() support on Cygwin and Darwin targets
3317 * Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS
3318 * Fix gc_cpp.cc for Cygwin (remove duplicate function definition)
3319 * Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
3320 * Fix gcconfig.h to handle mips64-linux target
3321 * Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
3322 * Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6
3323 * Fix tests to check GC_malloc result for NULL (out-of-memory)
3324 * Fix thread model in configure for MinGW ("win32" instead of "posix")
3325 * Fix various warnings reported by LINT-like tools
3326 * Fix visibility of some GC internal symbols used by GNU GCJ currently
3327 * Port some thread tests to Win32
3328 * Refine API GC setters and getter comments regarding locking
3329 * Refine GC_stackbottom description in gc.h
3330 * Remove duplicate calls in GC_register_dynamic_libraries
3331 * Remove locking in API GC_get_bytes_since_gc and friends
3332 * Remove newly-added GC_get_heap_size/free_bytes_inner from API
3333 * Remove some local variables that are unused
3334 * Support multi-threading for RTEMS target
3335 * Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning
3336 * Use pkg-config to pick up libatomic_ops, etc
3337 * Workaround some Linux/arm kernels bug to get correct GC_nprocs value
3338 3339 3340 == [7.2alpha6] 2011-06-14 ==
3341 3342 * configure_atomic_ops.sh: Remove.
3343 * Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
3344 * Makefile.am (EXTRA_DIST): Add autogen.sh.
3345 3346 * NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
3347 filename passed.
3348 * NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
3349 extension.
3350 * NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
3351 * NT_MAKEFILE (.cpp.obj): Likewise.
3352 3353 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
3354 GC_traverse_back_graph): Move prototype to gc_priv.h.
3355 * checksums.c (GC_page_was_ever_dirty): Likewise.
3356 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
3357 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
3358 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
3359 GC_get_next_stack): Likewise.
3360 * finalize.c (GC_reset_finalizer_nested,
3361 GC_check_finalizer_nested): Likewise.
3362 * gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
3363 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
3364 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
3365 * misc.c (GC_register_main_static_data, GC_init_win32,
3366 GC_setpagesize, GC_init_linux_data_start,
3367 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
3368 GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
3369 GC_bl_init_no_interiors): Likewise.
3370 * os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
3371 Likewise.
3372 * reclaim.c (GC_check_leaked): Likewise.
3373 * win32_threads.c (GC_gww_dirty_init): Likewise.
3374 * darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
3375 GC_mprotect_resume): Move prototype to darwin_stop_world.h.
3376 * pthread_support.c (GC_FindTopOfStack): Likewise.
3377 * dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
3378 * mark.c (GC_page_was_ever_dirty): Remove (as already declared).
3379 * mark_rts.c (GC_roots_present): Change return type to void
3380 pointer (to match the prototype); return NULL instead of FALSE.
3381 * mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
3382 * os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
3383 * os_dep.c (GC_write_fault_handler): Make STATIC.
3384 * os_dep.c (GC_set_write_fault_handler): New function (only if
3385 GC_WIN32_THREADS).
3386 * pthread_start.c (GC_start_rtn_prepare_thread,
3387 GC_thread_exit_proc): Move prototype to pthread_support.h.
3388 * pthread_support.c (GC_nacl_initialize_gc_thread,
3389 GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
3390 Likewise.
3391 * pthread_support.c (GC_stop_init): Move prototype to
3392 pthread_stop_world.h.
3393 * win32_threads.c (GC_write_fault_handler): Remove prototype.
3394 * win32_threads.c (GC_register_my_thread_inner): Call
3395 GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
3396 (only if MPROTECT_VDB).
3397 * doc/README.win32: Add information about DMC.
3398 * include/private/gc_priv.h (GC_set_write_fault_handler): New
3399 prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
3400 3401 * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
3402 3403 * win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
3404 instead of FINISHED macro.
3405 * tests/test.c (check_heap_stats): Round up max_heap_sz value for
3406 Win32 (same as for USE_MMAP).
3407 3408 * tests/test.c (check_heap_stats): Adjust printf format specifier
3409 for max_heap_sz; cast max_heap_sz accordingly.
3410 3411 * doc/README.solaris2: Add note.
3412 3413 * configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
3414 Solaris/x86 2.10+.
3415 3416 * tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
3417 defined; explicitly define for some targets.
3418 3419 * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
3420 * stubborn.c (GC_dirty): Likewise.
3421 * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
3422 PROC_VDB): Undefine if MANUAL_VDB.
3423 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
3424 MANUAL_VDB.
3425 * os_dep.c (async_set_pht_entry_from_index): Define for
3426 MANUAL_VDB.
3427 * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
3428 success; if ioctl() failed then just print warning instead of
3429 aborting.
3430 3431 * include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
3432 for line number printing.
3433 3434 * os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
3435 (for PROC_VDB only); print errors via GC_err_printf; rename "ps"
3436 and "np" local variables to npages and pagesize, respectively;
3437 remove "current_addr" local variable.
3438 3439 * os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
3440 for BeOS and OS/2; define HAVE_GET_STACK_BASE.
3441 * os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
3442 GC_get_main_stack_base implementation is defined.
3443 * os_dep.c (GC_get_main_stack_base): Define that based on
3444 GC_get_stack_base() in a single place (only if
3445 GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
3446 result.
3447 3448 * mark.c (GC_push_selected): Remove "push_fn" argument (use
3449 GC_push_all directly); update the documentation.
3450 * mark.c (GC_push_conditional): Simplify the code (for better
3451 readability).
3452 3453 * mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
3454 boolean local variables.
3455 * doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
3456 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
3457 GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
3458 place.
3459 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
3460 PHT_HASH(h) only once (store result to a local variable).
3461 3462 * doc/README.solaris2: Update.
3463 3464 * include/private/gcconfig.h (end, InitStackBottom): Declare
3465 extern variable for RTEMS.
3466 * include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
3467 Update (for RTEMS).
3468 * include/private/gcconfig.h (DATAEND): Fix a typo in the macro
3469 name (for RTEMS).
3470 * tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
3471 Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
3472 3473 * include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
3474 single-threaded environment.
3475 3476 * include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
3477 * tests/test.c (NUMBER_ROUND_UP): New macro.
3478 * tests/test.c (check_heap_stats): Round up total expected heap
3479 size to the nearest 4 MiB bound.
3480 * tests/test.c (check_heap_stats): Print the current and expected
3481 heap sizes in case of failure.
3482 3483 * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
3484 only if GC_print_stats; print errors using GC_err_printf.
3485 * checksums.c (GC_check_blocks): Join adjacent printf() calls into
3486 a single one.
3487 3488 * pthread_support.c (pthread_join): Add assertion (check thread is
3489 finished).
3490 * pthread_support.c (GC_register_my_thread): Don't detach the
3491 thread if invoked from the thread destructor.
3492 * win32_threads.c (GC_register_my_thread): Likewise.
3493 * win32_threads.c (GC_unregister_my_thread): Don't delete the
3494 thread (just set FINISHED) if the thread is not detached (only if
3495 GC_PTHREADS); add assertion (check the thread is not finished).
3496 * tests/threadkey_test.c (main): Join some created threads.
3497 3498 * pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
3499 variable to "t".
3500 * win32_threads.c (GC_delete_gc_thread): Likewise.
3501 * pthread_support.c (pthread_join, pthread_detach,
3502 pthread_cancel): Rename "thread_gc_id" local variable to "t".
3503 * win32_threads.c (GC_pthread_detach): Likewise.
3504 * win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
3505 variable.
3506 * win32_threads.c (GC_pthread_join): Rename "joinee" local
3507 variable to "t".
3508 3509 * pthread_stop_world.c (pthread_sigmask): Undefine even if not
3510 DEBUG_THREADS.
3511 * pthread_stop_world.c (GC_unblock_gc_signals): New function (only
3512 if GC_EXPLICIT_SIGNALS_UNBLOCK).
3513 * pthread_support.c (GC_unblock_gc_signals): New prototype.
3514 * pthread_support.c (GC_register_my_thread_inner,
3515 GC_register_my_thread): Call GC_unblock_gc_signals (only if
3516 GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
3517 * include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
3518 macro.
3519 3520 * pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
3521 "sig" local variables; rename my_thread local variable to "self".
3522 3523 * tests/threadkey_test.c (LIMIT): Use smaller value (don't create
3524 more than 30 in parallel by default).
3525 3526 * tests/threadkey_test.c (key_once, main): Work around for Solaris
3527 PTHREAD_ONCE_INIT.
3528 * tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
3529 3530 * dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
3531 variable.
3532 * pthread_support.c (GC_unregister_my_thread_inner): Revert back
3533 GC_remove_specific invocation; add a comment.
3534 * include/private/thread_local_alloc.h (GC_remove_specific):
3535 Revert back.
3536 * specific.c (slow_getspecific): Cast qtid to AO_t.
3537 * include/private/specific.h (key_create, setspecific,
3538 remove_specific): Remove "extern" keyword.
3539 * include/private/specific.h (getspecific): Change type of "qtid"
3540 local variable to unsigned long.
3541 3542 * pthread_support.c (GC_check_tls): Fix "#endif" comment.
3543 * include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
3544 * include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
3545 Remove redundant test of the macro.
3546 3547 * backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
3548 * os_dep.c (GC_set_and_save_fault_handler): Recognize
3549 SIGACTION_FLAGS_NODEFER_HACK macro.
3550 * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
3551 macro.
3552 * pthread_support.c (GC_acquire_mark_lock): Remove commented out
3553 code.
3554 * include/private/gc_priv.h (SUNOS5SIGS): Don't include
3555 sys/siginfo.h on Linux.
3556 * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
3557 recognized, force PREFETCH_FOR_WRITE to be defined on x86.
3558 * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
3559 macro recognized (for HP/UX).
3560 3561 * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
3562 GWW_VDB).
3563 * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
3564 resetting (for PROC_VDB).
3565 3566 * tests/threadkey_test.c: New file.
3567 * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
3568 * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
3569 New variable.
3570 3571 * pthread_support.c (GC_unregister_my_thread_inner): Don't call
3572 GC_remove_specific.
3573 * include/private/thread_local_alloc.h (GC_remove_specific):
3574 Remove (since it is empty for all targets).
3575 * pthread_support.c (GC_record_stack_base): New inline function.
3576 * win32_threads.c (GC_record_stack_base): Likewise.
3577 * pthread_support.c (GC_register_my_thread_inner): Invoke
3578 GC_record_stack_base.
3579 * win32_threads.c (GC_register_my_thread_inner): Likewise.
3580 * pthread_support.c (GC_register_my_thread): If thread is FINISHED
3581 then call GC_record_stack_base, clear FINISHED, initialize
3582 thread-local list and return success.
3583 * win32_threads.c (GC_register_my_thread): Likewise.
3584 * include/gc.h (GC_register_my_thread): Update documentation.
3585 * include/private/thread_local_alloc.h (GC_thread_key): Likewise.
3586 3587 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
3588 adjacent "#ifdef".
3589 * thread_local_alloc.c (GC_malloc_atomic): Call
3590 GC_core_malloc_atomic (instead of GC_core_malloc).
3591 3592 * pthread_start.c (GC_start_rtn_prepare_thread): Change return
3593 type to GC_thread.
3594 * pthread_start.c (GC_inner_start_routine): Pass the current
3595 thread descriptor to pthread_cleanup_push (same as in
3596 win32_threads.c).
3597 * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
3598 variable to "self".
3599 * win32_threads.c (GC_push_all_stacks): Likewise.
3600 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
3601 "my_thread" local variable to "self".
3602 * pthread_support.c (GC_unregister_my_thread_inner): New static
3603 function.
3604 * pthread_support.c (GC_unregister_my_thread,
3605 GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
3606 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
3607 GC_do_blocking_inner): Rename "t" local variable to "thread_id".
3608 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
3609 "id" local variable to "thread_id".
3610 3611 * pthread_support.c (GC_unregister_my_thread): Call pthread_self
3612 only once.
3613 * win32_threads.c (GC_pthread_start_inner): Likewise.
3614 * pthread_support.c (GC_unregister_my_thread): Add debug output.
3615 * win32_threads.c (GC_unregister_my_thread): Likewise.
3616 * pthread_support.c (GC_register_my_thread,
3617 GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
3618 to "self".
3619 3620 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
3621 unconditionally (do not test GC_I_HIDE_POINTERS); update the
3622 comment.
3623 * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
3624 GC_HIDE/REVEAL_POINTER, respectively.
3625 * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
3626 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
3627 3628 * include/gc.h (GC_register_my_thread): Refine the comment.
3629 3630 * include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
3631 parentheses.
3632 * include/gc_typed.h (GC_get_bit, GC_set_bit,
3633 GC_CALLOC_EXPLICITLY_TYPED): Likewise.
3634 3635 * include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
3636 3637 * include/private/gcconfig.h (NO_GETCONTEXT): Do not use
3638 getcontext(2) on m68k because it is not implemented there.
3639 3640 * alloc.c (GC_clear_a_few_frames): Use BZERO().
3641 * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
3642 * reclaim.c (GC_start_reclaim): Likewise.
3643 * blacklst.c (total_stack_black_listed): Remove "len" local
3644 variable.
3645 * dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
3646 statement with "do-while" one.
3647 * dyn_load.c (GC_register_dynamic_libraries,
3648 GC_register_dynlib_callback): Remove redundant parentheses.
3649 3650 * cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
3651 "unused result" compiler warning for fread().
3652 3653 * os_dep.c (GC_write_fault_handler): Break when in_allocd_block
3654 is set to true.
3655 3656 * dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
3657 return -1 if the object has (or had) debugging info but was
3658 marked deallocated.
3659 * include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
3660 * dbg_mlc.c (GC_has_other_debug_info): Update documentation;
3661 remove "ohdr" local variable.
3662 * dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
3663 probably been deallocated.
3664 * dbg_mlc.c (GC_debug_free): Don't actually free the object even
3665 in the leak-finding mode if GC_findleak_delay_free.
3666 * dbg_mlc.c (GC_check_leaked): New function (only unless
3667 SHORT_DBG_HDRS).
3668 * doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
3669 * doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
3670 * include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
3671 on 64-bit architectures.
3672 * include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
3673 parentheses.
3674 * include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
3675 GC_has_other_debug_info change).
3676 * include/private/gc_priv.h (GC_findleak_delay_free): New global
3677 variable declaration (unless SHORT_DBG_HDRS).
3678 * misc.c (GC_findleak_delay_free): New global variable; recognize
3679 GC_FINDLEAK_DELAY_FREE.
3680 * misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
3681 variable (unless SHORT_DBG_HDRS).
3682 * reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
3683 * reclaim.c (GC_add_leaked): Don't add the object to leaked list
3684 if marked as deallocated.
3685 3686 * dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
3687 comment.
3688 * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
3689 * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
3690 * dbg_mlc.c (GC_smashed): Refine documentation.
3691 * mark.c (GC_push_selected): Change dirty_fn return type to
3692 GC_bool.
3693 * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
3694 * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
3695 local variable.
3696 * reclaim.c (GC_reclaim_block): Pass true constant to
3697 GC_reclaim_small_nonempty_block (instead of report_if_found).
3698 * doc/README.autoconf: Update; fix a typo.
3699 * include/private/gcconfig.h (GC_WORD_C): New macro.
3700 3701 * dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
3702 * dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
3703 comment.
3704 * dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
3705 argument.
3706 * dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
3707 message to GC_print_smashed_obj.
3708 * dbg_mlc.c (GC_debug_free): Call GC_size once.
3709 * dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
3710 allocation succeeded; remove unnecessary check for object is
3711 smashed (since this is done in GC_debug_free); remove "clobbered"
3712 local variable.
3713 3714 * dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
3715 Rename "integer" argument to "linenum"; change the type of the
3716 argument to int.
3717 * gcj_mlc.c (GC_store_debug_info): Likewise.
3718 * dbg_mlc.c (GET_OH_LINENUM): New macro.
3719 * dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
3720 GET_OH_LINENUM; adjust print format specifier.
3721 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
3722 GC_debug_malloc_atomic_ignore_off_page,
3723 GC_debug_generic_malloc_inner,
3724 GC_debug_generic_malloc_inner_ignore_off_page,
3725 GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
3726 GC_debug_malloc_uncollectable,
3727 GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
3728 "i".
3729 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
3730 3731 * os_dep.c (GC_linux_stack_base): Rename to
3732 GC_linux_main_stack_base.
3733 * os_dep.c (GC_freebsd_stack_base): Rename to
3734 GC_freebsd_main_stack_base; adjust error message.
3735 * pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
3736 as an argument for sem_init().
3737 * pthread_support.c (pthread_create): Likewise.
3738 * pthread_support.c (pthread_create): Abort in case sem_init()
3739 fails.
3740 * include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
3741 * tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
3742 from main() if it should be done from the primordial thread only.
3743 3744 * alloc.c: Don't include sys/types.h for ArmCC.
3745 * dyn_load.c: Likewise.
3746 * os_dep.c: Likewise.
3747 * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
3748 ArmCC.
3749 * mark.c (GC_noop): Define specially for ArmCC.
3750 * include/private/gc_priv.h (GC_noop): Likewise.
3751 * misc.c (GC_init): Don't test pointers comparison for ArmCC.
3752 * misc.c: Don't include unistd.h for ArmCC.
3753 * os_dep.c (pages_executable): Rename to GC_pages_executable;
3754 make STATIC.
3755 * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
3756 * ptr_chck.c (GC_is_visible): Explicitly cast
3757 (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
3758 a compiler warning).
3759 * include/private/gcconfig.h: Recognize __arm.
3760 * include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
3761 * include/private/gcconfig.h (HBLKPTR): Add parentheses for
3762 "bytes" argument.
3763 3764 * pthread_support.c (GC_get_nprocs): Don't define for Android.
3765 * pthread_support.c (GC_dummy_thread_local): Don't test
3766 GC_LINUX_THREADS.
3767 * include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
3768 Define for Android.
3769 3770 * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
3771 * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
3772 NO_GETCONTEXT.
3773 * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
3774 call for Android.
3775 3776 * include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
3777 Define before including windows.h.
3778 * include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
3779 Likewise.
3780 * include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
3781 NOSERVICE): Likewise.
3782 * include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
3783 arithmetics; add a comment.
3784 3785 * mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
3786 * extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
3787 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
3788 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
3789 "mark_byte" local variable.
3790 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
3791 about that AO_or() is not used by GC unless USE_MARK_BITS
3792 explicitly set.
3793 * include/private/gc_priv.h (OR_WORD): Likewise.
3794 * include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
3795 add parentheses.
3796 * include/private/gc_priv.h (ONES): Define before use by
3797 MAKE_COOLER.
3798 * include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
3799 * include/private/gc_priv.h (OR_WORD): Don't define if
3800 USE_MARK_BYTES.
3801 * include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
3802 definition; simplify expression.
3803 3804 * os_dep.c (GC_get_maps): Always close the file.
3805 * pthread_support.c (GC_get_nprocs): Likewise.
3806 * os_dep.c (READ): Define similarly across the file (without
3807 parameters).
3808 * pthread_support.c (GC_get_nprocs): Use signed int type for "i"
3809 and "len" local variables (since read() may return -1).
3810 * include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
3811 double underscore; add "volatile" for asm.
3812 * include/private/gc_pmark.h (LONG_MULT): Add missing
3813 parentheses.
3814 * include/private/gc_priv.h (OR_WORD): Likewise.
3815 * include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
3816 and ';' symbol.
3817 3818 * os_dep.c (GC_get_stack_base): Implement for Android (same as
3819 for Linux).
3820 * pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
3821 failed to open "stat" file (not to issue a warning twice); update
3822 the comment.
3823 * pthread_support.c (GC_thr_init): Call sysconf() on Android to
3824 get the number of CPUs.
3825 3826 * include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
3827 recent patches regarding this macro as the macro should be set
3828 (to 1) before including any other system header.
3829 3830 * doc/README.environment (GC_INITIAL_HEAP_SIZE,
3831 GC_MAXIMUM_HEAP_SIZE): Update.
3832 3833 * misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
3834 heap size specifier; return 0 if not a valid one.
3835 * include/gc_cpp.h: Explicitly define inline one-argument delete
3836 operator for Cygwin (as a workaround).
3837 * tests/test_cpp.cc (main): Suppress compiler warnings about
3838 "assigned value is unused".
3839 3840 * misc.c (GC_parse_mem_size_arg): New function.
3841 * misc.c (GC_init): Use GC_parse_mem_size_arg().
3842 * pthread_stop_world.c (tkill): Declare for Android.
3843 3844 * include/private/gc_priv.h (_GNU_SOURCE): Include features.h
3845 first (except for NaCl) and then define the macro to 1 if not yet.
3846 3847 * tests/tests.am (TESTS, check_PROGRAMS): Add
3848 'initsecondarythread'.
3849 * tests/tests.am (initsecondarythread_SOURCES,
3850 initsecondarythread_LDADD): New variable.
3851 3852 * dbg_mlc.c (GC_store_debug_info_inner): Always define; add
3853 "const" to its string argument.
3854 * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
3855 * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
3856 smashed or previously deallocated found.
3857 * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
3858 one.
3859 * reclaim.c (GC_reclaim_check): Likewise.
3860 * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
3861 * os_dep.c (GC_get_stack_base): Don't initialize
3862 stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
3863 calling GC_INIT() from a non-primordial thread is possible now).
3864 * reclaim.c (GC_add_leaked): Turn into an inline one.
3865 * reclaim.c (GC_reclaim_small_nonempty_block):
3866 Change report_if_found type from int/word to boolean.
3867 * include/private/gc_priv.h (GC_start_reclaim): Likewise.
3868 * include/private/gc_priv.h (set_mark_bit_from_hdr,
3869 clear_mark_bit_from_hdr): Place closing parenthesis properly.
3870 3871 * os_dep.c (GC_get_main_stack_base): Try to use
3872 pthread_attr_getstack first for Linux if THREADS.
3873 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
3874 alignment.
3875 3876 * dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
3877 typo.
3878 * dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
3879 * dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
3880 case of NULL argument).
3881 * dbg_mlc.c (GC_free): In case of NULL argument, just return
3882 (without any warning printed); eliminate "uncollectable" local
3883 variable.
3884 3885 * configure.ac (THREADDLLIBS): Use alternate thread library on
3886 Solaris 8.
3887 * configure.ac (need_atomic_ops_asm): Set to true only for SPARC
3888 Solaris.
3889 * configure.ac: Don't use libdl on mips-sgi-irix6.
3890 3891 * mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
3892 * mach_dep.c (GC_with_callee_saves_pushed): Don't call
3893 __builtin_unwind_init() for RTEMS; use setjmp() without the
3894 leading underscore (for RTEMS).
3895 * tests/test.c (BIG): Use smaller value for RTEMS.
3896 * tests/test.c (main): Customize for RTEMS.
3897 3898 * configure.host: Remove doubled words in comments.
3899 * os_dep.c: Likewise.
3900 * doc/README: Likewise.
3901 * extra/setjmp_t.c: Likewise.
3902 * tests/huge_test.c: Likewise.
3903 * extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
3904 K&R-style function definition with the ANSI C one.
3905 * extra/setjmp_t.c (nested_sp): Implement in the same way as
3906 GC_approx_sp.
3907 3908 * dyn_load.c (GC_dyld_sections): Add more sections.
3909 * dyn_load.c (GC_dyld_add_sect_fmts): New static variable.
3910 * dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
3911 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
3912 logging; add support for on-demand sections.
3913 3914 * gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
3915 GC_ASSERTIONS.
3916 * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
3917 declare (as external) unless GC_ASSERTIONS.
3918 * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
3919 Cygwin; add FIXME.
3920 * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
3921 * include/private/gcconfig.h: Add "#error" for every "-->" mark.
3922 * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
3923 an expression.
3924 * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
3925 (which existed previously as SUSPENDED and still exists in GCJ).
3926 * include/private/pthread_support.h (DISABLED_GC): Change the
3927 value (as it is already used by SUSPENDED_EXT).
3928 3929 * tests/test.c (reverse_test): Modify count (BIG) for
3930 ppc64-darwin.
3931 3932 * reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
3933 macro and environment variable; abort if any error has been
3934 printed provided the environment variable (or macro) is set.
3935 * doc/README.environment (GC_ABORT_ON_LEAK): Document.
3936 * doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
3937 3938 * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
3939 for RTEMS.
3940 * include/private/gcconfig.h (RTEMS): Add support for.
3941 * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
3942 3943 * mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
3944 it is used internally in some places).
3945 3946 * dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
3947 declaration.
3948 * dbg_mlc.c (GC_debug_malloc_replacement,
3949 GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
3950 * malloc.c (GC_debug_malloc_replacement): Likewise.
3951 * mallocx.c (GC_debug_realloc_replacement): Likewise.
3952 * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
3953 * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
3954 * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
3955 includes of string.h.
3956 * mallocx.c: Include string.h (for GC_strdup).
3957 * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
3958 to dbg_mlc.c.
3959 * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
3960 redundant trailing ';'.
3961 * include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
3962 * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
3963 properly.
3964 * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
3965 malloc.c, mallocx.c.
3966 3967 * alloc.c (GC_check_heap, GC_print_all_smashed): Move the
3968 definition from misc.c.
3969 * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
3970 public.
3971 * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
3972 * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
3973 macro.
3974 * dbg_mlc.c (MAX_SMASHED): Don't define if already set.
3975 * reclaim.c (MAX_LEAKED): Likewise.
3976 * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
3977 access to the global array.
3978 * reclaim.c (GC_add_leaked): Likewise.
3979 * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
3980 (new macro) is defined.
3981 * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
3982 * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
3983 GC_dump_regularly and GC_print_back_height variables with
3984 FALSE/TRUE.
3985 * reclaim.c (GC_print_all_errors): Refine the comment.
3986 3987 * tests/test.c (reverse_test_inner): Undo one of the previous
3988 patches which shifts "c" and "d" pointers only if
3989 ALL_INTERIOR_POINTERS (since interior pointers are always
3990 recognized in stacks).
3991 3992 * misc.c (GC_stdout, GC_stderr): Move the definition to the place
3993 where GC_log is defined (Unix only).
3994 * misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
3995 variable and the similar macro; redirect GC_stdout and GC_stderr
3996 to GC_log if "GC_LOG_FILE" environment variable is set unless
3997 prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
3998 * doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
3999 * doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
4000 4001 * misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
4002 only).
4003 * misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
4004 accordingly.
4005 * misc.c (GC_printf): Check GC_quiet before va_start().
4006 4007 * allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
4008 inside "if (GC_print_stats)" branch.
4009 * alloc.c (GC_collect_or_expand): Likewise.
4010 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
4011 * headers.c (GC_scratch_alloc): Likewise.
4012 * os_dep.c (GC_get_maps, GC_remap, PROTECT,
4013 GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
4014 * alloc.c (min_bytes_allocd): Use GC_log_printf instead of
4015 GC_printf for DEBUG_THREADS output.
4016 * darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
4017 GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
4018 * pthread_start.c (GC_inner_start_routine): Likewise.
4019 * pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
4020 GC_push_all_stacks, GC_suspend_all, GC_stop_world,
4021 GC_start_world): Likewise.
4022 * pthread_support.c (GC_mark_thread, GC_get_nprocs,
4023 GC_start_rtn_prepare_thread, pthread_create): Likewise.
4024 * checksums.c (GC_update_check_page): Use GC_printf() instead of
4025 GC_err_printf() for error printing.
4026 * checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
4027 instead of GC_printf for logging purposes.
4028 * dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
4029 external variable outside from GC_register_dynamic_libraries.
4030 * dyn_load.c (GC_register_dynamic_libraries): Don't use
4031 sys_errlist value if errno equals to sys_nerr.
4032 * dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
4033 instead of GC_printf for DL_VERBOSE output.
4034 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
4035 GC_init_dyld): Use GC_log_printf instead of GC_printf for
4036 DARWIN_DEBUG output.
4037 * os_dep.c (catch_exception_raise): Use GC_log_printf
4038 instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
4039 * reclaim.c (GC_print_free_list): Move "n" increment out of
4040 GC_printf() call.
4041 4042 * win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
4043 DEBUG_WIN32_THREADS): Remove.
4044 * win32_threads.c (GC_register_my_thread_inner,
4045 GC_win32_start_inner): Use GC_log_printf instead of GC_printf
4046 inside "if (GC_print_stats)" branch.
4047 * win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
4048 GC_PTHREADS).
4049 * win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
4050 GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
4051 macro.
4052 * win32_threads.c (GC_push_stack_for, GC_mark_thread,
4053 GC_CreateThread, GC_beginthreadex, GC_pthread_join,
4054 GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
4055 GC_mark_thread_local_free_lists): Use GC_log_printf instead of
4056 GC_printf for DEBUG_THREADS output.
4057 * win32_threads.c (GC_win32_start_inner, GC_CreateThread,
4058 GC_beginthreadex, GC_pthread_join, GC_pthread_create,
4059 GC_pthread_start_inner, GC_thread_exit_proc): Cast
4060 GetCurrentThreadId result to long; don't cast value of pthread_t
4061 type to int; adjust printf format specifiers.
4062 * doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
4063 information.
4064 4065 * tests/test.c (cons, small_cons, gcj_cons, check_ints,
4066 check_uncollectable_ints, print_int_list, check_marks_int_list,
4067 fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
4068 alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
4069 test, main): Remove unnecessary casts of GC_printf calls to void.
4070 4071 * allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
4072 BDWGC) printed message (adjust letters case, terminating dot and
4073 new line symbols).
4074 * alloc.c (GC_check_fl_marks): Likewise.
4075 * backgraph.c (new_back_edges): Likewise.
4076 * checksums.c (GC_check_dirty): Likewise.
4077 * darwin_stop_world.c (GC_push_all_stacks,
4078 GC_suspend_thread_list): Likewise.
4079 * dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
4080 store_old): Likewise.
4081 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
4082 * mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
4083 GC_push_selected, GC_push_next_marked_dirty): Likewise.
4084 * mark_rts.c (GC_exclude_static_roots_inner): Likewise.
4085 * os_dep.c (GC_remap, GC_default_push_other_roots,
4086 GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
4087 catch_exception_raise_state, catch_exception_raise_state_identity,
4088 GC_mprotect_thread_notify, GC_mprotect_thread,
4089 catch_exception_raise): Likewise.
4090 * pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
4091 GC_stop_world, GC_stop_init): Likewise.
4092 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
4093 GC_start_routine): Likewise.
4094 * win32_threads.c (GC_register_my_thread_inner,
4095 GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
4096 GC_pthread_start_inner): Likewise.
4097 * alloc.c (GC_expand_hp_inner): Realign the code.
4098 * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
4099 Likewise.
4100 * misc.c (GC_init): Likewise.
4101 * os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
4102 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
4103 * tests/test.c (run_one_test): Likewise.
4104 * misc.c (GC_err_puts): Document.
4105 * misc.c (GC_err_write): Remove.
4106 * os_dep.c (dump_maps): Likewise.
4107 * include/private/gc_priv.h (GC_err_write): Likewise.
4108 * os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
4109 dump_maps() and GC_err_write().
4110 * os_dep.c (GC_read_dirty): Remove redundant brackets.
4111 4112 * tests/test.c (reverse_test_inner): Test interior pointer
4113 recognition only if ALL_INTERIOR_POINTERS.
4114 * tests/test.c (run_one_test): Replace GC_all_interior_pointers
4115 with GC_get_all_interior_pointers(); simplify the expression.
4116 * tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
4117 GC_bytes_allocd_before_gc with GC_get_total_bytes().
4118 * tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
4119 4120 * dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
4121 warning if the argument is NULL and GC is in leaks detection mode.
4122 * dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
4123 function definition.
4124 * malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
4125 * mallocx.c (GC_posix_memalign): Likewise.
4126 * malloc.c (strdup): Fix string size value; rename "len" to "lb".
4127 * mallocx.c: Include errno.h unless WinCE (otherwise include
4128 windows.h for Win32 error constants).
4129 * win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
4130 windows.h inclusion.
4131 * misc.c (GC_init): Register at-exit callback if GC_find_leak
4132 (even if GC_FIND_LEAK macro is unset).
4133 * pthread_stop_world.c (NACL_STORE_REGS,
4134 __nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
4135 Use BCOPY() instead of memcpy().
4136 * pthread_support.c (GC_init_real_syms): Likewise.
4137 * doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
4138 Document new macro.
4139 * doc/README.macros (REDIRECT_MALLOC): Update documentation.
4140 * include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
4141 New API function prototype.
4142 * include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
4143 GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
4144 * include/gc.h (GC_STRDUP): Remove redundant parentheses.
4145 * include/leak_detector.h (realloc, strdup): Likewise.
4146 * include/gc.h (GC_STRNDUP): New API macro.
4147 * include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
4148 GC_NEW_UNCOLLECTABLE): Add missing parentheses.
4149 * include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
4150 prototype (only if GC_REQUIRE_WCSDUP).
4151 * include/gc.h (GC_WCSDUP): New API macro (only if
4152 GC_REQUIRE_WCSDUP).
4153 * include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
4154 GC_DONT_INCLUDE_STDLIB).
4155 * include/leak_detector.h (malloc, calloc, free, realloc):
4156 Undefine symbol before its redefinition.
4157 * include/leak_detector.h (strndup, memalign, posix_memalign):
4158 Redefine to the corresponding GC function.
4159 * include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
4160 if GC_REQUIRE_WCSDUP).
4161 * include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
4162 the macro if already defined.
4163 4164 * misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
4165 when doing code static analysis (to inform the tool that the
4166 function is a no-return one).
4167 * os_dep.c (GC_linux_stack_base): Remove a duplicate validation
4168 of the length of "stat" file; use signed int type for "i",
4169 "buf_offset" and "len" local variables (since read() may
4170 return -1).
4171 4172 * blacklst.c (GC_bl_init_no_interiors): New function (the code
4173 moved from GC_bl_init).
4174 * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
4175 GC_all_interior_pointers mode; remove unnecessarily parameter cast
4176 for GC_scratch_alloc call.
4177 * include/private/gc_priv.h (GC_bl_init): Move the function
4178 declaration to misc.c file.
4179 * misc.c (GC_bl_init_no_interiors): Add a prototype.
4180 * misc.c (GC_set_all_interior_pointers): Allow values other than 0
4181 and 1; allow altering GC_set_all_interior_pointers value even
4182 after GC initialization.
4183 * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
4184 GC_modws_valid_offsets if GC_all_interior_pointers is off.
4185 * misc.c (GC_init): Don't call GC_initialize_offsets() unless
4186 GC_all_interior_pointers mode.
4187 4188 * alloc.c (GC_finish_collection): Remove redundant brackets;
4189 adjust code indentation.
4190 * blacklst.c (GC_add_to_black_list_normal): Simplify expression
4191 (to improve code readability).
4192 * blacklst.c (GC_is_black_listed): Join nested "if" (into a single
4193 conditional expression); initialize "nblocks" just before the loop
4194 beginning.
4195 * misc.c (GC_init): Don't compute initial_heap_sz if GC is already
4196 initialized.
4197 * include/private/gc_priv.h (GC_initialize_offsets): Move the
4198 function declaration to misc.c file.
4199 * obj_map.c (GC_initialize_offsets): Remove offsets_initialized
4200 static variable since the function is called only once.
4201 * tests/middle.c (main): Use setter for GC_all_interior_pointers;
4202 adjust printf format specifier (and cast the value passed to).
4203 4204 * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
4205 documentation.
4206 * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
4207 if LARGE_CONFIG is defined.
4208 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
4209 4210 * alloc.c (GC_finish_collection): Replace "#else #ifdef" with
4211 "#elif".
4212 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
4213 MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
4214 * alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
4215 overflow even if not LARGE_CONFIG.
4216 * dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
4217 SMALL_CONFIG.
4218 * finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
4219 * doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
4220 GC_FULL_FREQUENCY): Refine the documentation.
4221 4222 * extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
4223 GC_word).
4224 * extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
4225 as word.
4226 4227 * dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
4228 GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
4229 LINT-like tool to instruct it that the function is invoked only
4230 with valid parameters (otherwise a SEGV is ok); recognize LINT2
4231 new macro.
4232 * misc.c (GC_abort): Instruct a LINT-like tool that the function
4233 never returns in fact.
4234 * os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
4235 close the file immediately after read; use STRTOULL() instead of
4236 decoding the address number manually.
4237 * include/private/gc_priv.h (EXPECT): Don't specify outcome for a
4238 LINT-like tool.
4239 * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
4240 LINT-like tool that the value is restricted to zero and one only
4241 (required since the variable is global and its value is used as a
4242 part of array index expression is some places).
4243 4244 * dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
4245 NULL.
4246 * dbg_mlc.c (GC_debug_register_finalizer,
4247 GC_debug_register_finalizer_no_order,
4248 GC_debug_register_finalizer_unreachable,
4249 GC_debug_register_finalizer_ignore_self): Handle out of memory
4250 case properly (similar to GC_register_finalizer_inner).
4251 * headers.c (GC_install_header): Handle the case when alloc_hdr()
4252 returns NULL.
4253 * os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
4254 * pthread_support.c (GC_mark_thread): Place a dummy return
4255 statement (which uses "id" argument) before the actual use of "id"
4256 as an array index (to suppress a warning produced by some static
4257 code analysis tools).
4258 * win32_threads.c (GC_mark_thread): Likewise.
4259 * pthread_support.c (GC_thr_init): Abort (with the appropriate
4260 message) if out of memory.
4261 4262 * finalize.c (GC_register_finalizer_inner): Fix a typo in a
4263 comment.
4264 *include/private/gcconfig.h (STACKBOTTOM): Likewise.
4265 * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
4266 EXPECT (the 2nd argument).
4267 * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
4268 Likewise.
4269 * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
4270 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
4271 * include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
4272 * include/private/gc_priv.h (SMALL_OBJ): Likewise.
4273 * include/private/specific.h (getspecific): Likewise.
4274 * pthread_support.c (LOCK_STATS): Add a comment.
4275 4276 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
4277 GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
4278 GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
4279 definition to gc_config_macros.
4280 4281 * pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
4282 GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
4283 GC_PTHREAD_EXIT_ATTRIBUTE).
4284 * include/gc_pthread_redirects.h (GC_pthread_cancel,
4285 pthread_cancel): Likewise.
4286 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
4287 GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
4288 code.
4289 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
4290 Define as empty for NaCl.
4291 * include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
4292 defined.
4293 4294 * dyn_load.c (GC_init_dyld): Do not invoke
4295 _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
4296 not required to register the main data segment in that case).
4297 * include/gc.h (GC_no_dls): Adjust the comment.
4298 4299 * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
4300 GC_NO_DLOPEN.
4301 * gc_dlopen.c: Likewise.
4302 * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
4303 * gc_dlopen.c: Don't include dlfcn.h (as it is included in
4304 gc_pthread_redirects.h).
4305 * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
4306 GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
4307 GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
4308 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
4309 pthread_sigmask): Likewise.
4310 * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
4311 GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
4312 * pthread_support.c (pthread_create, GC_pthread_create_t,
4313 GC_pthread_create): Rename GC_PTHREAD_CONST to
4314 GC_PTHREAD_CREATE_CONST.
4315 * win32_threads.c (GC_pthread_create): Likewise.
4316 * include/gc_pthread_redirects.h: Likewise.
4317 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
4318 GC_NO_PTHREAD_SIGMASK): New macro defined.
4319 * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
4320 empty for NaCl.
4321 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
4322 not define for Android (as CANCEL_SAFE is not defined).
4323 4324 * include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
4325 GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
4326 definition to gc_config_macros.h file.
4327 * include/gc_config_macros.h: Check the file is included from gc.h
4328 file.
4329 * include/gc_version.h: Likewise.
4330 4331 * gc_dlopen.c: Empty unit for NaCl.
4332 * os_dep.c: Include fcntl.h for NaCl.
4333 * os_dep.c (GC_get_main_stack_base): Ignore
4334 USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
4335 * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
4336 * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
4337 * pthread_start.c (GC_inner_start_routine): Don't invoke
4338 pthread_cleanup_push/pop for NaCl.
4339 * pthread_stop_world.c (GC_nacl_num_gc_threads,
4340 GC_nacl_thread_idx, GC_nacl_park_threads_now,
4341 GC_nacl_thread_parker, GC_nacl_gc_thread_self,
4342 GC_nacl_thread_parked, GC_nacl_thread_used,
4343 GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
4344 variable (fo NaCl only).
4345 * pthread_stop_world.c (GC_remove_allowed_signals,
4346 suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
4347 GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
4348 GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
4349 GC_restart_handler): Don't define for NaCl.
4350 * pthread_support.c (GC_get_nprocs): Likewise.
4351 * include/private/gc_priv.h (SIG_SUSPEND): Likewise.
4352 * include/private/gcconfig.h (LINUX): Likewise.
4353 * pthread_stop_world.c (GC_push_all_stacks): Push register storage
4354 for NaCl.
4355 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
4356 GC_start_world): Implement for NaCl.
4357 * pthread_stop_world.c (GC_stop_world): Don't define unused "i"
4358 local variable for OpenBSD (and NaCl).
4359 * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
4360 NaCl.
4361 * pthread_stop_world.c (nacl_pre_syscall_hook,
4362 __nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
4363 GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
4364 function (for NaCl only).
4365 * pthread_stop_world.c (GC_stop_init): Empty for NaCl.
4366 * pthread_support.c (pthread_cancel, pthread_sigmask): Don't
4367 redirect for NaCl.
4368 * include/gc_pthread_redirects.h (pthread_cancel,
4369 pthread_sigmask): Likewise.
4370 * pthread_support.c (GC_nacl_initialize_gc_thread,
4371 GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
4372 * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
4373 and shutdown thread for NaCl.
4374 * pthread_support.c (GC_thr_init): Call sysconf for NaCl.
4375 * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
4376 for NaCl.
4377 * include/gc.h: Don't include features.h for NaCl.
4378 * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
4379 * include/gc_pthread_redirects.h (GC_pthread_create): Use
4380 GC_PTHREAD_CONST instead of const.
4381 * win32_threads.c (GC_pthread_create): Likewise.
4382 * pthread_support.c (GC_pthread_create_t, GC_pthread_create,
4383 pthread_create): Likewise.
4384 * include/private/gcconfig.h (NACL): Recognize NaCl.
4385 * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
4386 * include/private/pthread_stop_world.h (thread_stop_info): Add
4387 reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
4388 NaCl only).
4389 * include/private/pthread_support.h (GC_nacl_gc_thread_self):
4390 Declare internal variable (for NaCl only).
4391 4392 * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
4393 macro.
4394 4395 * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
4396 keywords with double underscore.
4397 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
4398 catch_exception_raise_state_identity): Add GC_API_OSCALL to
4399 function definition.
4400 * os_dep.c (catch_exception_raise_state,
4401 catch_exception_raise_state_identity): Move definition to be
4402 before GC_ports.
4403 * os_dep.c (catch_exception_raise): Declare to have the symbol
4404 defined before GC_ports.
4405 * os_dep.c (GC_ports): Store references to catch_exception_raise,
4406 catch_exception_raise_state, catch_exception_raise_state_identity
4407 (to prevent stripping these symbols as dead).
4408 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
4409 catch_exception_raise_state_identity): Mark these symbols as
4410 "referenced dynamically" via an assembler directive (unless
4411 NO_DESC_CATCH_EXCEPTION_RAISE).
4412 * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
4413 similar to GC_API but as if GC_DLL is always defined).
4414 4415 * os_dep.c: Don't include signal.h for GC_write_fault_handler on
4416 Win32.
4417 * os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
4418 FreeBSD.
4419 * os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
4420 SEGV_ACCERR for older FreeBSD releases).
4421 4422 * dyn_load.c (GC_register_map_entries,
4423 GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
4424 DATASTART only once if DATASTART_IS_FUNC.
4425 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
4426 Calculate DATAEND only once if DATAEND_IS_FUNC.
4427 * dyn_load.c: Add comment to some endif; realign some code.
4428 * dyn_load.c (GC_init_dyld): Don't use
4429 _dyld_bind_fully_image_containing_address if
4430 NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
4431 * include/private/gcconfig.h (GC_data_start, GC_find_limit):
4432 Declare if used by DATASTART/DATAEND, respectively.
4433 * include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
4434 Define if DATASTART/DATAEND is a function, respectively.
4435 * include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
4436 NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
4437 unistd.h.
4438 4439 * os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
4440 Reorder to remove redundant ifdef for Win32.
4441 * os_dep.c: Add comment to some endif.
4442 * os_dep.c: Include pthread.h (for Linux even if single-threaded)
4443 if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
4444 * os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
4445 for some reason).
4446 * os_dep.c (GC_get_main_stack_base): Allow
4447 USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
4448 assertion for the returned result.
4449 * os_dep.c (GC_get_stack_base): Define for Darwin if
4450 multi-threaded.
4451 * os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
4452 * os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
4453 * os_dep.c (catch_exception_raise): Remove redundant parentheses;
4454 refine the documentation.
4455 4456 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
4457 well.
4458 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4459 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
4460 * include/gc.h (GC_INIT): Document.
4461 * include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
4462 GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
4463 define these macros also for ARM).
4464 * tests/test.c (check_heap_stats): Print main thread stack bottom
4465 as well (only if verbose mode is on).
4466 4467 * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
4468 introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
4469 and X86_64).
4470 4471 * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
4472 "volatile" keyword with double underscore.
4473 * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
4474 include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
4475 * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
4476 mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
4477 * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
4478 for Linux/x64 (since its GLibc getcontext currently has the bug).
4479 4480 * allchblk.c (GC_use_entire_heap): Change type to int (as declared
4481 in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
4482 macro.
4483 * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
4484 alter the default value of GC_use_entire_heap.
4485 * doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
4486 * doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
4487 4488 * include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
4489 MPROTECT_VDB undefining.
4490 4491 * include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
4492 the comment.
4493 4494 * include/private/gc_priv.h (_GC_arrays): Move the conditional
4495 macro definitions (shortcuts for GC_arrays members) into the
4496 structure body.
4497 4498 * darwin_stop_world.c (GC_mach_handler_thread,
4499 GC_use_mach_handler_thread,
4500 GC_darwin_register_mach_handler_thread): Define only if
4501 MPROTECT_VDB.
4502 * darwin_stop_world.c (GC_suspend_thread_list): Use
4503 GC_mach_handler_thread and GC_use_mach_handler_thread only if
4504 MPROTECT_VDB.
4505 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
4506 only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
4507 * misc.c (GC_init): Fix comment for GWW_VDB.
4508 * os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
4509 DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
4510 * os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
4511 DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
4512 * pthread_support.c (GC_thr_init): Define "dummy" local variable
4513 only unless GC_DARWIN_THREADS.
4514 * include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
4515 even in the single-threaded mode; define for iPhone/iPad.
4516 * include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
4517 around "undef".
4518 * include/private/gcconfig.h (HEURISTIC1): Remove unused for
4519 Cygwin.
4520 * include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
4521 Darwin/arm (instead of HEURISTIC1).
4522 4523 * misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
4524 (for ECOS and NOSYS).
4525 * os_dep.c (GC_get_main_stack_base): Likewise.
4526 * os_dep.c (GC_get_main_stack_base): Check
4527 USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
4528 remove "dummy" variable (use result one instead).
4529 * doc/README.macros (SN_TARGET_PS3): Document.
4530 * extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
4531 for Android.
4532 * include/private/pthread_support.h: Fix comment for "endif".
4533 4534 * misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
4535 * misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
4536 * os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
4537 * os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
4538 * os_dep.c (GC_default_push_other_roots,
4539 GC_push_thread_structures): Define for SN_TARGET_PS3.
4540 * include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
4541 for SN_TARGET_PS3.
4542 * include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
4543 (Sony PS/3 target).
4544 * include/private/gcconfig.h (THREADS): Define unconditionally if
4545 SN_TARGET_PS3.
4546 * include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
4547 4548 * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
4549 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
4550 GC_debug_malloc_atomic_ignore_off_page,
4551 GC_debug_generic_malloc_inner,
4552 GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
4553 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
4554 GC_debug_malloc_atomic_uncollectable): Likewise.
4555 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
4556 * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
4557 comment.
4558 * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
4559 * mark_rts.c (GC_roots_present): Likewise.
4560 * doc/README: Likewise.
4561 * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
4562 * include/private/gc_priv.h (_GC_arrays): Likewise.
4563 4564 * configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
4565 just blindly linking to -lpthread, as Android includes pthread
4566 support within libc and does not provide a separate libpthread.
4567 * dyn_load.c (GC_register_dynamic_libraries): Skip current link map
4568 entry if l_addr is NULL (Android/bionic only).
4569 * pthread_stop_world.c (android_thread_kill): New internal function
4570 (Android only).
4571 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
4572 android_thread_kill (based on tkill) instead of pthread_kill on
4573 Android (since pthread_kill cannot be used safely on the platform).
4574 * pthread_support.c (GC_new_thread): Store thread Id (obtained from
4575 gettid) for use by android_thread_kill (Android only).
4576 * include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
4577 structure member (Android only).
4578 * include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
4579 of __x86_64__ (Darwin); define __environ macro (Android on M68K).
4580 4581 * allchblk.c (GC_freehblk): Print extended error message (done via
4582 GC_printf() before aborting with a short message) only if
4583 GC_print_stats.
4584 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
4585 * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
4586 PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
4587 * pthread_stop_world.c (GC_start_world): Likewise.
4588 * win32_threads.c (GC_register_my_thread_inner): Likewise.
4589 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
4590 GC_dirty_init): Remove redundant print of an error message before
4591 aborting with the same message.
4592 * os_dep.c (GC_register_data_segments): Remove format specifier
4593 from the string passed to GC_err_puts(); use ABORT instead of EXIT
4594 (if invalid executable type).
4595 * os_dep.c (GC_remap): Adjust printf format specifier (for long
4596 type).
4597 * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
4598 (for SIGSEGV/BUS) only if GC_print_stats.
4599 * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
4600 calls.
4601 4602 * tests/test.c (main): Print the relevant message if GWW_VDB.
4603 * include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
4604 on x64 if compiled by GCC.
4605 4606 * tests/staticrootstest.c: Include string.h for memset() prototype.
4607 * tests/thread_leak_test.c (main): Fix printf() format specifiers.
4608 4609 * CMakeLists.txt: Check enable_parallel_mark on Darwin.
4610 * configure.ac: Likewise.
4611 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
4612 DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
4613 GC_DISCOVER_TASK_THREADS, respectively.
4614 * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
4615 * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
4616 * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
4617 (and remove FIXME).
4618 * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
4619 comment; remove FIXME.
4620 * win32_threads.c (GC_NO_DLLMAIN): Rename to
4621 GC_NO_THREADS_DISCOVERY.
4622 * tests/test.c (GC_NO_DLLMAIN): Likewise.
4623 * doc/README.macros (GC_NO_DLLMAIN): Likewise.
4624 * doc/README.win32 (GC_NO_DLLMAIN): Likewise.
4625 * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
4626 * win32_threads.c (GC_win32_dll_threads): Define as macro to true
4627 if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
4628 update the comment.
4629 * win32_threads.c (GC_use_DllMain): Rename to
4630 GC_use_threads_discovery; do not set GC_win32_dll_threads if
4631 GC_DISCOVER_TASK_THREADS.
4632 * win32_threads.c (GC_started_thread_while_stopped,
4633 GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
4634 GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
4635 which use GC_win32_dll_threads to minimize the possibility of
4636 an "unreachable code" compiler warning when GC_win32_dll_threads
4637 is defined as a macro.
4638 * win32_threads.c (GC_unregister_my_thread): Don't call
4639 GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
4640 (since can't happen); use "t" local variable only if not
4641 GC_win32_dll_threads.
4642 * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
4643 * include/gc.h (GC_use_DllMain): Rename to
4644 GC_use_threads_discovery but keep old name as a macro definition.
4645 * include/gc.h (GC_use_threads_discovery): Declare also for
4646 Darwin; update the comment.
4647 * tests/test.c (main): Call GC_use_threads_discovery for Darwin
4648 (to test the mode if possible).
4649 4650 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
4651 DARWIN_QUERY_TASK_THREADS): New macro recognized.
4652 * darwin_stop_world.c (GC_query_task_threads): add STATIC;
4653 initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
4654 or DARWIN_QUERY_TASK_THREADS; remove FIXME.
4655 * darwin_stop_world.c (GC_use_threads_discovery): New function
4656 (for setting GC_query_task_threads value).
4657 * darwin_stop_world.c (GC_mach_handler_thread,
4658 GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
4659 GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
4660 GC_darwin_register_mach_handler_thread): Define only if not
4661 DARWIN_SUSPEND_GC_THREADS.
4662 * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
4663 the code for GC_query_task_threads case from compilation unless
4664 DARWIN_SUSPEND_GC_THREADS.
4665 * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
4666 if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
4667 * os_dep.c (GC_mprotect_thread): Call
4668 GC_darwin_register_mach_handler_thread only if THREADS and not
4669 DARWIN_SUSPEND_GC_THREADS.
4670 * pthread_support.c (marker_mach_threads): Don't define if
4671 DARWIN_SUSPEND_GC_THREADS.
4672 * pthread_support.c (GC_mark_thread): Don't fill in
4673 marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
4674 * include/private/gc_locks.h (GC_need_to_lock): Always declare for
4675 THREADS case.
4676 4677 * darwin_stop_world.c (GC_query_task_threads): Don't define to
4678 false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
4679 the variable to false (for now).
4680 * darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
4681 only if not DARWIN_DONT_PARSE_STACK.
4682 * darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
4683 approach based on task_threads() only if GC_query_task_threads
4684 else use GC_threads table.
4685 4686 * darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
4687 * darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
4688 really clear GC_mach_threads[]).
4689 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
4690 (instead of calling GC_stop_init).
4691 * include/private/pthread_support.h (GC_stop_init): Remove proto.
4692 * pthread_support.c (GC_stop_init): Add proto (unless Darwin).
4693 * pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
4694 GC_DARWIN_THREADS.
4695 4696 * darwin_stop_world.c (GC_stack_range_for): New static function
4697 (move the code from GC_push_all_stacks).
4698 * darwin_stop_world.c (GC_push_all_stacks): Call
4699 GC_stack_range_for(); rename kern_return local variable to
4700 kern_result.
4701 * darwin_stop_world.c (GC_is_mach_marker): Change argument type
4702 from mach_port_t to thread_act_t.
4703 * pthread_support.c (GC_is_mach_marker): Likewise.
4704 4705 * darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
4706 variable initialization (always call current_task()).
4707 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
4708 Don't set thread's stop_info.stack_ptr value for Darwin.
4709 * include/private/darwin_stop_world.h (thread_stop_info): Update
4710 the comment for stack_ptr.
4711 4712 * darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
4713 variables to "kern_return" and "my_thread" ones, respectively;
4714 call mach_port_deallocate() unconditionally.
4715 * darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
4716 if DEBUG_THREADS.
4717 4718 * darwin_stop_world.c (GC_mach_thread): Move from
4719 darwin_stop_world.h.
4720 * include/private/darwin_stop_world.h (GC_mach_thread): Remove.
4721 * win32_threads.c (GC_start_world): Define "thread_id" local
4722 variable only if GC_ASSERTIONS; decide whether to resume a thread
4723 based on its "suspended" field value; assert that suspended thread
4724 stack_base is non-zero and the thread is not our one.
4725 4726 * darwin_stop_world.c (GC_thread_resume): New inline function
4727 (move code from GC_thread_resume).
4728 * darwin_stop_world.c (GC_start_world): Check result of
4729 task_threads(); call GC_thread_resume().
4730 * os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
4731 only if not CYGWIN32.
4732 * os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
4733 if not CYGWIN32.
4734 4735 * darwin_stop_world.c (FindTopOfStack): Change return type to
4736 ptr_t (from long); make GC_INNER; add GC_ prefix.
4737 * darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
4738 local variable (initialized from the corresponding GC_thread
4739 field unless GC_query_task_threads); add assertion that our
4740 thread is not blocked; prefix FindTopOfStack with GC_ and remove
4741 no longer needed cast to ptr_t of the result; handle thread
4742 blocked case (and remove FIXME); use GC_push_all_stack_sections
4743 unless GC_query_task_threads (and remove FIXME).
4744 * pthread_support.c (GC_FindTopOfStack): Declare (if needed).
4745 * pthread_support.c (GC_do_blocking_inner): Call
4746 GC_save_regs_in_stack (if needed) before acquiring the lock.
4747 * win32_threads.c (GC_do_blocking_inner): Likewise.
4748 * pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
4749 field of GC_thread (Darwin only).
4750 * include/private/pthread_support.h (GC_thread): Add topOfStack
4751 field for Darwin (unless DARWIN_DONT_PARSE_STACK).
4752 4753 * finalize.c (GC_check_finalizer_nested): Change return type to
4754 char pointer (instead of int pointer); use explicit cast for
4755 GC_finalizer_nested assignment.
4756 * pthread_support.c (GC_check_finalizer_nested): Likewise.
4757 * win32_threads.c (GC_check_finalizer_nested): Likewise.
4758 * finalize.c (GC_finalizer_nested): Change type to unsigned char.
4759 * finalize.c (GC_notify_or_invoke_finalizers): Change type of
4760 "pnested" local variable to char pointer.
4761 * pthread_support.c (GC_do_blocking_inner,
4762 GC_call_with_gc_active): Use explicit cast for "thread_blocked"
4763 field assignment.
4764 * win32_threads.c (GC_lookup_pthread): Use explicit cast for
4765 "suspended" field assignment.
4766 * win32_threads.c (GC_Thread_Rep): Use short type for
4767 finalizer_skipped; use char type for finalizer_nested and flags
4768 fields and reorder some fields (to minimize GC_Thread_Rep
4769 structure size).
4770 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
4771 * win32_threads.c (GC_Thread_Rep): Use char type for suspended
4772 field (instead of GC_bool).
4773 * include/private/pthread_support.h (GC_Thread_Rep): Use char type
4774 for thread_blocked field (instead of short).
4775 4776 * darwin_stop_world.c (GC_query_task_threads): New variable (or
4777 macro).
4778 * darwin_stop_world.c (GC_push_all_stacks): Use
4779 GC_query_task_threads (to choose between algorithms based on
4780 kernel task_threads and based on GC_threads table); update FIXME;
4781 remove commented out GC_push_one statements.
4782 * pthread_support.c (GC_thr_init, GC_do_blocking_inner,
4783 GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
4784 stack_ptr field for all platforms.
4785 * pthread_support.c (GC_call_with_gc_active): Initialize
4786 saved_stack_ptr field for all platforms.
4787 * include/private/darwin_stop_world.h (thread_stop_info): Add
4788 stack_ptr field; change type of already_suspended from int to
4789 GC_bool.
4790 4791 * darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
4792 * darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
4793 GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
4794 * darwin_stop_world.c (GC_mach_threads): Add FIXME.
4795 * darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
4796 GC_stop_world): Use FALSE and TRUE for already_suspended field and
4797 "changed", "found" variables.
4798 * darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
4799 PARALLEL_MARK).
4800 * darwin_stop_world.c (GC_suspend_thread_list): Change return type
4801 to GC_bool; change type of "changed", "found" to GC_bool; make
4802 "my_thread" as an argument (instead of acquiring/deallocating it
4803 locally); do not add my_thread, GC_mach_handler_thread and marker
4804 threads to GC_mach_threads table; check for overflow of
4805 GC_mach_threads table; increase GC_mach_threads_count if "found"
4806 is true and info.suspend_count is non-zero.
4807 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
4808 Adjust "thread" format specifiers for GC_printf(); search thread
4809 in "old_list" starting from the previous found one.
4810 * darwin_stop_world.c (GC_stop_world): Rename "changes" to
4811 "changed" local variable; remove "result" variable; adjust
4812 GC_printf debugging message.
4813 * darwin_stop_world.c (GC_start_world): Do not check for
4814 my_thread and GC_use_mach_handler_thread (since they are not added
4815 to GC_mach_threads table); call thread_info() only if
4816 DEBUG_THREADS or GC_ASSERTIONS.
4817 * pthread_support.c (marker_mach_threads): New static variable (if
4818 Darwin).
4819 * pthread_support.c (GC_is_mach_marker): New function (if Darwin).
4820 * pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
4821 table (if Darwin).
4822 4823 * alloc.c (GC_parallel): Define only if THREADS.
4824 * misc.c (GC_get_parallel): Likewise.
4825 * include/gc.h (GC_parallel, GC_get_parallel,
4826 GC_get_suspend_signal, GC_allow_register_threads,
4827 GC_register_my_thread, GC_unregister_my_thread): Define only if
4828 GC_THREADS.
4829 * include/gc.h (GC_get_heap_size): Fix a typo in a comment.
4830 4831 * configure.ac: Use AC_C_INLINE.
4832 * include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
4833 (determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
4834 4835 * dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
4836 FreeBSD).
4837 * dyn_load.c (GC_register_main_static_data): Move the definition
4838 above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
4839 case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
4840 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
4841 GC_register_main_static_data() result (instead of direct testing
4842 of dl_iterate_phdr (to prevent a compiler warning).
4843 * os_dep.c (CODE_OK): Test si_code also for the value of 2
4844 (FreeBSD case; required for FreeBSD v7+).
4845 * os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
4846 * include/private/gcconfig.h (DATASTART): Cast etext argument in
4847 GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
4848 case).
4849 4850 * include/private/specific.h (quick_thread_id): Define thru
4851 GC_approx_sp(); define as a macro.
4852 * include/private/specific.h (getspecific): Use GC_INLINE instead
4853 of __inline__ (to work around Sun CC which does not recognize
4854 inline keyword surrounded with underscores).
4855 4856 * darwin_stop_world.c (FindTopOfStack): Simplify condition
4857 expressions.
4858 * darwin_stop_world.c (GC_push_all_stacks): Merge two variants
4859 of this function (DARWIN_DONT_PARSE_STACK).
4860 * darwin_stop_world.c (GC_push_all_stacks): Add a check for our
4861 thread is found (same as in pthread_stop_world.c).
4862 * darwin_stop_world.c (GC_push_all_stacks): Print the number of
4863 scanned threads if verbose (same as in pthread_stop_world.c).
4864 4865 * darwin_stop_world.c (GC_push_all_stacks): Reset
4866 thread_state_count value before every thread_get_state call;
4867 refine the comment for thread_state_count.
4868 * darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
4869 rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
4870 register pushing.
4871 * darwin_stop_world.c (GC_push_all_stacks): Set outCount to
4872 GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
4873 * darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
4874 for x86.
4875 4876 * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
4877 * darwin_stop_world.c (GC_use_mach_handler_thread): Change type
4878 to GC_bool.
4879 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
4880 Simplify the expressions involving GC_use_mach_handler_thread.
4881 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
4882 Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
4883 4884 * include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
4885 pthread_sigmask, dlopen): Don't define for pthreads-win32 (and
4886 don't include signal.h and dlfcn.h).
4887 4888 * dyn_load.c (GC_register_dynlib_callback): Add FIXME.
4889 4890 * include/private/gcconfig.h: Add support for FreeBSD on ppc64.
4891 4892 * os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
4893 VM_PROT_EXECUTE.
4894 4895 * os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
4896 pages_executable is on.
4897 * os_dep.c (os2_alloc): Add FIXME (for recursion).
4898 * os_dep.c (UNPROTECT): Abort with a more informative message if
4899 pages_executable is on ("mprotect" case).
4900 * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
4901 pages_executable is on (Darwin case).
4902 * pthread_support.c (GC_init_real_syms): Abort with an informative
4903 message if libgc is linked after libpthread.
4904 4905 * dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
4906 for 64-bit targets.
4907 * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
4908 macro.
4909 * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
4910 since REAL(pthread_create) is used.
4911 * pthread_support.c (PTHREAD_CREATE): Remove unused.
4912 4913 * extra/threadlibs.c (main): Remove --wrap for "read" (since not
4914 wrapped anymore).
4915 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
4916 * os_dep.c (__wrap_read): Likewise.
4917 4918 * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
4919 beginning of the file.
4920 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
4921 macro (defined only for Linux and Solaris).
4922 * include/gc_pthread_redirects.h (GC_pthread_cancel,
4923 GC_pthread_exit): Declare new API function (only if
4924 GC_PTHREAD_EXIT_ATTRIBUTE).
4925 * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
4926 Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
4927 * include/private/pthread_support.h (DISABLED_GC): New macro.
4928 * pthread_support.c (pthread_cancel, pthread_exit): Restore
4929 original definition or declare "real" function (if needed and
4930 GC_PTHREAD_EXIT_ATTRIBUTE).
4931 * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
4932 Declare new types if needed.
4933 * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
4934 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
4935 * pthread_support.c (GC_init_real_syms): Initialize pointers to
4936 the "real" pthread_cancel and pthread_exit (only if
4937 GC_PTHREAD_EXIT_ATTRIBUTE).
4938 * pthread_support.c (GC_unregister_my_thread): Enable collections
4939 if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
4940 * pthread_support.c (pthread_cancel, pthread_exit): New wrapped
4941 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
4942 * pthread_support.c (GC_start_routine): Refine the comment.
4943 * extra/threadlibs.c (main): Adjust --wrap (add "read",
4944 "pthread_exit", "pthread_cancel" but remove "sleep").
4945 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
4946 4947 * include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
4948 macro definition.
4949 * include/gc.h (GC_reachable_here): Likewise.
4950 * include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
4951 with double '_'.
4952 4953 * pthread_start.c: New file.
4954 * CMakeLists.txt (SRC): Add pthread_start.c.
4955 * Makefile.am (libgc_la_SOURCES): Likewise.
4956 * Makefile.direct (CSRCS): Likewise.
4957 * Makefile.direct (OBJS): Add pthread_start.obj.
4958 * extra/gc.c: Add a comment; include pthread_start.c.
4959 * pthread_support.c (start_info): Move the struct definition down
4960 closer to its usage.
4961 * pthread_support.c (GC_thread_exit_proc): Replace STATIC with
4962 GC_INNER.
4963 * pthread_support.c (GC_inner_start_routine): Move to the
4964 definition to pthread_start.c; leave only the prototype; remove
4965 STATIC.
4966 * pthread_support.c (GC_start_rtn_prepare_thread): New function
4967 (contains parts of the original GC_inner_start_routine).
4968 4969 * configure.ac (NO_EXECUTE_PERMISSION): Add comment.
4970 * doc/README.macros (NO_EXECUTE_PERMISSION): Update the
4971 documentation.
4972 * include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
4973 New API function declaration.
4974 * os_dep.c (OPT_PROT_EXEC): Remove (superseded by
4975 pages_executable).
4976 * os_dep.c (pages_executable): New static variable.
4977 * os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
4978 GC_get_pages_executable only).
4979 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
4980 Replace OPT_PROT_EXEC with pages_executable.
4981 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
4982 GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
4983 * os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
4984 UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
4985 * os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
4986 API function definition.
4987 4988 * tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
4989 64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
4990 at least).
4991 4992 * tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
4993 32-bit CPUs (to prevent "Unexpected heap growth" failure).
4994 4995 * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
4996 * pthread_support.c (pthread_create, pthread_join, pthread_detach,
4997 pthread_sigmask): Likewise.
4998 * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
4999 is added).
5000 * gc_dlopen.c (GC_dlopen): Fix return type.
5001 * pthread_support.c (GC_init_real_syms): Don't define
5002 LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
5003 libpthread_name if RTLD_NEXT.
5004 5005 * gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
5006 * gc_dlopen.c (dlopen): Likewise.
5007 * include/gc.h (GC_enable_incremental): Refine the comment.
5008 * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
5009 missing (only for Win32).
5010 * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
5011 * win32_threads.c (GC_ExitThread): Likewise.
5012 * include/gc.h (GC_endthreadex): Add a comment.
5013 5014 * include/cord.h: Fix typos.
5015 5016 * Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
5017 "tests/CMakeLists.txt".
5018 * doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
5019 5020 * mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
5021 * include/private/gcconfig.h (AVR32): New macro (also define the
5022 supplementary macros for the target).
5023 * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
5024 define for AVR32.
5025 5026 * tests/leak_test.c (main): Explicitly define as returning int
5027 (to prevent a spurious test failure on some Linux/alpha targets).
5028 * tests/thread_leak_test.c (main): Likewise.
5029 * tests/thread_leak_test.c: Initialize GC_find_leak in the main
5030 thread (before GC_INIT) only.
5031 * tests/leak_test.c (main): Use GC_set_find_leak() instead of
5032 accessing GC_find_leak directly.
5033 * tests/thread_leak_test.c (main): Likewise.
5034 5035 * include/gc.h (GC_find_leak, GC_finalize_on_demand,
5036 GC_java_finalization, GC_dont_expand, GC_no_dls,
5037 GC_dont_precollect): Simplify the comment (remove the information
5038 about data races since the value is boolean).
5039 5040 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
5041 Solaris-specific implementation (based on thr_stksegment).
5042 * os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
5043 variable used by the Solaris-specific GC_get_stack_base().
5044 5045 * pthread_support.c (GC_mark_thread_local_free_lists,
5046 GC_check_tls): Mark (and check) only for live threads (in case of
5047 GC_destroy_thread_local() is called already but GC_delete_thread()
5048 is not yet).
5049 * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
5050 Likewise.
5051 5052 * NT_MAKEFILE: Remove the comment about DLL and win32s.
5053 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5054 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5055 * NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
5056 properly on VS 2005+).
5057 * NT_MAKEFILE: Update GC log file name in comments.
5058 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5059 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5060 * NT_X64_THREADS_MAKEFILE: Likewise.
5061 * doc/README.win32: Likewise.
5062 * NT_MAKEFILE: Remove ":full" for "-debug" option (since no
5063 longer supported by VS).
5064 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5065 * NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
5066 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5067 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5068 * NT_X64_THREADS_MAKEFILE: Likewise.
5069 * NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
5070 * NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
5071 * NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
5072 default stack size limit).
5073 * NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
5074 * win32_threads.c (GC_get_next_stack): Always define (since it is
5075 also used for Cygwin now).
5076 5077 * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
5078 be just before GC_clear_marks() call.
5079 * include/gc_mark.h (GC_start_callback_proc): Refine the comment.
5080 5081 * Makefile.am (check_LTLIBRARIES): Initialize to empty.
5082 * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
5083 * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
5084 libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
5085 libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
5086 Define.
5087 * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
5088 5089 * tests/staticrootstest.c: New file.
5090 * tests/staticrootslib.c: Likewise.
5091 5092 * dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
5093 Cygwin as well as other win32 targets.
5094 * dyn_load.c (GC_wnt): Define to constant true.
5095 * dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
5096 well as other win32 targets.
5097 * mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
5098 Don't define for Cygwin, as on other win32.
5099 * mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
5100 Cygwin as for other win32 targets.
5101 * mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
5102 other win32.
5103 * mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
5104 other win32.
5105 * mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
5106 declare on Cygwin as on other win32.
5107 * mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
5108 !NO_DEBUGGING, as on other win32 targets.
5109 * mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
5110 Cygwin as for other win32 targets.
5111 * os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
5112 * os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
5113 other win32.
5114 * os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
5115 * os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
5116 Win32, but call GC_unix_get_mem instead of GlobalAlloc.
5117 * os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
5118 * ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
5119 as on other win32 platforms.
5120 * win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
5121 for dynamic loading targets.
5122 * include/private/gc_priv.h (GC_INNER): Don't try to use
5123 visibility on Cygwin which does not support it.
5124 * include/private/gc_priv.h (struct roots): Don't declare r_next
5125 member on Cygwin as on other windows hosts.
5126 * include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
5127 likewise.
5128 * include/private/gc_priv.h (struct _GC_arrays): Do declare
5129 _heap_bases[] member and don't declare _root_index likewise.
5130 * include/private/gc_priv.h (GC_heap_bases): Do define likewise.
5131 * include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
5132 likewise.
5133 * include/private/gc_priv.h (GC_sysinfo): Do declare extern
5134 likewise.
5135 * include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
5136 prototype on Cygwin as other win32 platforms.
5137 5138 * os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
5139 pthread_attr_getstack() instead of GC_get_stack_base() (and check
5140 returned stackaddr for NULL); output a warning on failure.
5141 5142 * alloc.c (GC_start_call_back): Replace the definition type to
5143 GC_start_callback_proc.
5144 * alloc.c (GC_set_start_callback, GC_get_start_callback): New
5145 setter/getter function.
5146 * alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
5147 unconditionally (because GC_try_to_collect_inner always does full
5148 GC).
5149 * include/gc_mark.h (GC_start_callback_proc): New type.
5150 * include/gc_mark.h (GC_set_start_callback,
5151 GC_get_start_callback): New API function declaration.
5152 5153 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
5154 * os_dep.c (GC_get_main_stack_base): Recognize
5155 USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
5156 and use GC_get_stack_base() in this case.
5157 5158 * os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
5159 GC_find_limit_with_bound() should be called with the lock held).
5160 * backgraph.c (FOR_EACH_PRED): Fix a typo.
5161 5162 * alloc.c (GC_set_stop_func, GC_get_stop_func): Add
5163 DCL_LOCK_STATE.
5164 * finalize.c (GC_notify_or_invoke_finalizers): Likewise.
5165 * gc_dlopen.c (disable_gc_for_dlopen): Likewise.
5166 * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
5167 * mark.c (GC_print_trace): Likewise.
5168 * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
5169 GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
5170 GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
5171 GC_get_finalizer_notifier): Likewise.
5172 * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
5173 * pthread_support.c (GC_is_thread_tsd_valid,
5174 GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
5175 GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
5176 pthread_detach, GC_register_my_thread, GC_inner_start_routine,
5177 pthread_create): Likewise.
5178 * reclaim.c (GC_print_all_errors): Likewise.
5179 * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
5180 GC_unregister_my_thread, GC_do_blocking_inner,
5181 GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
5182 GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
5183 GC_init_parallel): Likewise.
5184 5185 * doc/README.darwin: Update.
5186 5187 * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
5188 usable on Mac OS X).
5189 * doc/README.cmake: Update.
5190 5191 * CMakeLists.txt: New file (adding CMake support).
5192 * tests/CMakeLists.txt: Likewise.
5193 * doc/README.cmake: Likewise.
5194 5195 * configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
5196 macros.
5197 * include/private/gc_priv.h (THREAD_FLD): Recognize
5198 __DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
5199 5200 * pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
5201 OpenBSD.
5202 * pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
5203 OpenBSD.
5204 * pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
5205 NetBSD and OpenBSD.
5206 5207 * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
5208 if THREADS is undefined.
5209 * include/gc.h (GC_malloc_many): Update the comment.
5210 5211 * include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
5212 (formerly known as Borland) C++ compiler v6.21+.
5213 * include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
5214 VC++ compilers.
5215 5216 * win32_threads.c (GC_register_my_thread_inner,
5217 GC_pthread_start_inner): Undo the previous commit changes for
5218 the thread flags and DETACHED state (since the state is only
5219 tested in GC_thread_exit_proc).
5220 5221 * include/gc.h (GC_unregister_my_thread): Fix a typo; update the
5222 comment.
5223 * pthread_support.c (GC_delete_thread): Allow to delete the main
5224 thread (don't call GC_INTERNAL_FREE for it); update the comment.
5225 * win32_threads.c (GC_delete_thread): Likewise.
5226 * pthread_support.c (GC_unregister_my_thread): Add an assertion
5227 for FINISHED flag is unset.
5228 * tests/test.c (check_heap_stats): Test the main thread
5229 unregistering (only if THREADS).
5230 * win32_threads.c (GC_register_my_thread_inner): Set flags to
5231 DETACHED (only if GC_PTHREADS).
5232 * win32_threads.c (GC_unregister_my_thread): Add FIXME (for
5233 GC_wait_for_gc_completion).
5234 * win32_threads.c (GC_pthread_start_inner): Clear flags detached
5235 state if needed; set pthread_id and flags while holding the lock.
5236 5237 * include/private/gc_priv.h (SIG_SUSPEND): Don't define for
5238 OpenBSD and Darwin.
5239 5240 * include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
5241 5242 * test.c (main, WinMain): Consistently don't invoke
5243 GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
5244 do invoke it even if parallel marking is enabled.
5245 5246 * tests/test.c (reverse_test): Comment out a check for MSWIN32
5247 (when determining BIG value) assuming outdated win32s.
5248 * tests/test.c (reverse_test): Rename to reverse_test_inner;
5249 change the declaration (to be of GC_fn_type); call itself thru
5250 GC_call_with_gc_active() if the argument is zero.
5251 * tests/test.c (reverse_test): New function added calling
5252 reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
5253 GC_call_with_gc_active).
5254 5255 * doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
5256 Document.
5257 * dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
5258 * dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
5259 PLATFORM_ANDROID.
5260 * include/private/gcconfig.h (LINUX): Define also if
5261 PLATFORM_ANDROID (for the windows-based toolkit).
5262 * include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
5263 define for Android/x86 platform.
5264 * include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
5265 new macro (undefine DYNAMIC_LOADING in this case).
5266 * include/private/gcconfig.h (CANCEL_SAFE): Don't define if
5267 PLATFORM_ANDROID.
5268 * include/private/gcconfig.h (IF_CANCEL): Fix definition for the
5269 explicitly defined CANCEL_SAFE.
5270 5271 * allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
5272 if GC_DISABLE_INCREMENTAL.
5273 * reclaim.c (GC_reclaim_generic): Likewise.
5274 * checksums.c (GC_page_was_ever_dirty): Add prototype.
5275 * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
5276 unless PARALLEL_MARK.
5277 * include/private/gc_priv.h (GC_dirty_maintained,
5278 GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
5279 declare if GC_DISABLE_INCREMENTAL.
5280 * include/private/gc_priv.h (GC_print_finalization_stats): Don't
5281 declare if SMALL_CONFIG.
5282 * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
5283 GC_DISABLE_INCREMENTAL (since nothing to check).
5284 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
5285 GC_DISABLE_INCREMENTAL.
5286 * os_dep.c (GC_dirty_maintained): Likewise.
5287 * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
5288 GC_DISABLE_INCREMENTAL.
5289 * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
5290 Uncomment; define only if CHECKSUMS.
5291 5292 * darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
5293 GC_push_all_stack() instead of GC_push_all_stack_frames()).
5294 * include/private/gc_priv.h (GC_push_all_stack_frames,
5295 GC_push_all_register_frames): Rename to
5296 GC_push_all_stack_sections and GC_push_all_register_sections,
5297 respectively.
5298 * mark_rts.c (GC_push_all_stack_frames,
5299 GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
5300 GC_push_current_stack): Likewise.
5301 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5302 * win32_threads.c (GC_push_stack_for): Likewise.
5303 * misc.c (GC_call_with_gc_active): Rename "frame" local variable
5304 to "stacksect".
5305 * pthread_support.c (GC_call_with_gc_active): Likewise.
5306 * win32_threads.c (GC_call_with_gc_active): Likewise.
5307 * pthread_support.c (GC_call_with_gc_active): Update FIXME for
5308 Darwin.
5309 * win32_threads.c (GC_Thread_Rep): Update the comment for
5310 traced_stack_sect.
5311 5312 * darwin_stop_world.c (GC_push_all_stacks): Rename
5313 activation_frame to traced_stack_sect.
5314 * include/private/gc_priv.h (GC_push_all_stack_frames,
5315 GC_push_all_register_frames): Likewise.
5316 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
5317 * mark_rts.c (GC_push_all_register_frames,
5318 GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
5319 GC_push_current_stack): Likewise.
5320 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5321 * pthread_support.c (GC_call_with_gc_active): Likewise.
5322 * win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
5323 GC_push_stack_for): Likewise.
5324 * include/private/gc_priv.h (GC_activation_frame_s): Rename to
5325 GC_traced_stack_sect_s.
5326 * include/private/gc_priv.h (GC_activation_frame): Rename to
5327 GC_traced_stack_sect.
5328 * misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
5329 * doc/README.macros (UNICODE): Document.
5330 5331 * doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
5332 * include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
5333 declare and use GC_envfile_getenv().
5334 * misc.c (GC_envfile_content, GC_envfile_length): New static
5335 variable (only if GC_READ_ENV_FILE).
5336 * misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
5337 * misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
5338 if GC_READ_ENV_FILE).
5339 * misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
5340 if GC_READ_ENV_FILE.
5341 * misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
5342 calls to be just before GC_envfile_init() one (since the latter
5343 uses GET_MEM).
5344 * misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
5345 WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
5346 * mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
5347 from the ABORT message.
5348 * misc.c (GC_init): Likewise.
5349 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
5350 Likewise.
5351 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5352 * pthread_support.c (GC_init_real_syms, start_mark_threads):
5353 Likewise.
5354 5355 * win32_threads.c (GC_get_next_stack): Don't define for Cygwin
5356 (since unused for now).
5357 5358 * dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
5359 GC_register_main_static_data() is defined.
5360 * dyn_load.c (GC_register_dynamic_libraries): Define only if used
5361 (if DYNAMIC_LOADING or PCR or Win32/CE).
5362 * dyn_load.c (GC_register_main_static_data): Define the default
5363 one only if DYNAMIC_LOADING.
5364 * include/private/gc_priv.h (GC_register_dynamic_libraries):
5365 Declare only if used (to prevent compiler warning).
5366 5367 * mark_rts.c (GC_approx_sp): Add a comment (for GCC).
5368 5369 5370 == [7.2alpha4] 2009-12-01 ==
5371 5372 * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
5373 5374 * include/gc.h (GC_get_suspend_signal): New function declaration.
5375 * misc.c (GC_get_suspend_signal): New API function (only if
5376 THREADS).
5377 5378 * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
5379 two if GC_incremental (instead of TRUE_INCREMENTAL).
5380 5381 * sparc_mach_dep.S (GC_push_regs): Remove the reference.
5382 5383 * os_dep.c (SIZE_T, PULONG_PTR): Remove.
5384 * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
5385 "word"); add the comment.
5386 * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
5387 GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
5388 5389 * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
5390 const value (for speed).
5391 * win32_threads.c (THREAD_TABLE_INDEX): New macro.
5392 * win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
5393 GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
5394 THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
5395 * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
5396 5397 * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
5398 5399 * backgraph.c: Remove apostrophe char from "#error".
5400 5401 * doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
5402 * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
5403 new macro; implicitly define it if SMALL_CONFIG.
5404 * alloc.c (GC_incremental, GC_timeout_stop_func): Check for
5405 GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
5406 * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
5407 GC_push_conditional): Likewise.
5408 * mark.c (GC_push_next_marked_dirty, GC_push_selected,
5409 GC_push_conditional, GC_block_was_dirty): Likewise.
5410 * misc.c (GC_enable_incremental): Likewise.
5411 * misc.c (GC_init): Likewise.
5412 5413 * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
5414 * misc.c (WIN32_LEAN_AND_MEAN): Likewise.
5415 * os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
5416 * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
5417 in a comment.
5418 * backgraph.c: Likewise.
5419 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
5420 * extra/threadlibs.c (main): Likewise.
5421 * pthread_support.c (pthread_join): Likewise.
5422 * tests/test.c (main): Likewise.
5423 5424 * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
5425 a duplicate symbol definition linker error).
5426 * misc.c (GC_clear_stack_inner): Likewise.
5427 * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
5428 5429 * include/private/gc_priv.h (GC_write_disabled): New variable
5430 declaration (only if GC_ASSERTIONS and Win32 threads).
5431 * misc.c (GC_write): Add assertion for GC_write_disabled value is
5432 not on (only if THREADS).
5433 * win32_threads.c (GC_write_disabled): New variable (only if
5434 GC_ASSERTIONS and not Cygwin).
5435 * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
5436 (while holding GC_write_cs).
5437 5438 * win32_threads.c (GC_please_stop): If DllMain-based thread
5439 registration is not compiled in then define GC_please_stop as
5440 a non-volatile variable for assertion only.
5441 * win32_threads.c (GC_stop_world): Set and clear only if defined.
5442 * win32_threads.c (GC_stop_world): Add the comment for GC_printf()
5443 usage (while holding GC_write_cs).
5444 * win32_threads.c (GC_delete_gc_thread): Likewise.
5445 * os_dep.c (GC_remove_protection): Likewise.
5446 5447 * pthread_support.c (GC_inner_start_routine): Join 3 sequential
5448 GC_printf() calls into a single one (for DEBUG_THREADS).
5449 5450 * include/private/gc_priv.h (GC_total_stacksize): New variable
5451 declaration (only if THREADS).
5452 * alloc.c (GC_total_stacksize): New variable (only if THREADS).
5453 * alloc.c (min_bytes_allocd): Calculate stack_size using
5454 GC_stackbottom only in the single-threaded case; otherwise use
5455 GC_total_stacksize; print GC_total_stacksize value if
5456 DEBUG_THREADS.
5457 * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
5458 specifier for lo/hi values (instead of "%lx").
5459 * darwin_stop_world.c (GC_push_all_stacks): Use
5460 GC_push_all_stack_frames() instead of GC_push_all_stack().
5461 * darwin_stop_world.c (GC_push_all_stacks): Recalculate
5462 GC_total_stacksize value.
5463 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
5464 * win32_threads.c (GC_push_all_stacks): Likewise.
5465 * win32_threads.c (GC_push_stack_for): Pass "me" argument; return
5466 stack size; don't check for non-zero value of thread->stack_base.
5467 * win32_threads.c (GC_push_all_stacks): Don't call
5468 GC_push_stack_for() and don't check for "t->id == me" if
5469 thread->stack_base is zero.
5470 5471 * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
5472 with "0x".
5473 * os_dep.c (PROTECT): Likewise.
5474 * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
5475 int (to match printf type specifier).
5476 5477 * tests/test.c (check_heap_stats): Take into account the unmapped
5478 memory size when checking for "Unexpected heap growth"; remove
5479 FIXME.
5480 5481 * alloc.c: Revert last change.
5482 5483 * include/private/gcconfig.h (STACKBOTTOM): Add a presence check
5484 for eCos/NOSYS.
5485 * misc.c (GC_write): Comment out _Jv_diag_write() call (since no
5486 longer defined in GCJ).
5487 5488 * os_dep.c (brk): Rename to ecos_gc_brk.
5489 5490 * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
5491 stack_size even if THREADS.
5492 * doc/README.macros (DEBUG_THREADS): Document.
5493 * pthread_support.c (DEBUG_THREADS): Remove the commented out
5494 definition.
5495 * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
5496 definition.
5497 * win32_threads.c: Include errno.h (except for WinCE).
5498 * win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
5499 to local variables, and free "arg" parameter before "start"
5500 invocation.
5501 * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
5502 (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
5503 * win32_threads.c (GC_beginthreadex): Return 0 on error (instead
5504 of -1).
5505 5506 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
5507 Use GC_INNER for the function definition.
5508 * include/private/darwin_stop_world.h
5509 (GC_darwin_register_mach_handler_thread): Remove the prototype.
5510 * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
5511 for the function prototype.
5512 * include/private/gc_priv.h (NDEBUG): Explicitly define if
5513 NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
5514 inclusion).
5515 5516 * include/private/gcconfig.h: Move DebugBreak() workaround (for
5517 x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
5518 5519 * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
5520 GC_freehblk): Use GC_INNER for the function definition.
5521 * alloc.c (GC_never_stop_func, GC_should_collect,
5522 GC_try_to_collect_inner, GC_collect_a_little_inner,
5523 GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
5524 GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
5525 * backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
5526 Likewise.
5527 * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
5528 GC_promote_black_lists, GC_unpromote_black_lists,
5529 GC_add_to_black_list_normal, GC_add_to_black_list_stack,
5530 GC_is_black_listed): Likewise.
5531 * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
5532 GC_stop_init, GC_stop_world, GC_start_world): Likewise.
5533 * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
5534 GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
5535 GC_store_debug_info, GC_start_debugging,
5536 GC_debug_generic_malloc_inner,
5537 GC_debug_generic_malloc_inner_ignore_off_page,
5538 GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
5539 * dyn_load.c (GC_register_dynamic_libraries,
5540 GC_register_main_static_data, GC_init_dyld): Likewise.
5541 * finalize.c (GC_push_finalizer_structures, GC_finalize,
5542 GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
5543 Likewise.
5544 * gcj_mlc.c (GC_core_gcj_malloc): Likewise.
5545 * headers.c (GC_find_header, GC_header_cache_miss,
5546 GC_scratch_alloc, GC_init_headers, GC_install_header,
5547 GC_install_counts, GC_remove_header, GC_remove_counts,
5548 GC_next_used_block, GC_prev_block): Likewise.
5549 * mach_dep.c (GC_with_callee_saves_pushed): Likewise.
5550 * malloc.c (GC_collect_or_expand, GC_alloc_large,
5551 GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
5552 GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
5553 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
5554 * mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
5555 GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
5556 GC_clear_marks, GC_initiate_gc, GC_mark_some,
5557 GC_mark_stack_empty, GC_invalidate_mark_state,
5558 GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
5559 GC_mark_init, GC_push_all, GC_push_conditional,
5560 GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
5561 Likewise.
5562 * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
5563 GC_exclude_static_roots_inner, GC_push_all_register_frames,
5564 GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
5565 GC_push_roots): Likewise.
5566 * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
5567 Likewise.
5568 * new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
5569 * obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
5570 GC_initialize_offsets): Likewise.
5571 * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
5572 GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
5573 GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
5574 GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
5575 GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
5576 GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
5577 GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
5578 GC_page_was_ever_dirty, GC_remove_protection,
5579 GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
5580 GC_save_callers, GC_print_callers): Likewise.
5581 * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
5582 GC_start_world, GC_stop_init): Likewise.
5583 * pthread_support.c (GC_mark_thread_local_free_lists,
5584 GC_lookup_thread, GC_reset_finalizer_nested,
5585 GC_check_finalizer_nested, GC_segment_is_thread_stack,
5586 GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
5587 GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
5588 GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
5589 GC_wait_marker, GC_notify_all_marker): Likewise.
5590 * reclaim.c (GC_print_all_errors, GC_block_empty,
5591 GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
5592 GC_reclaim_all): Likewise.
5593 * thread_local_alloc.c (GC_init_thread_local,
5594 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
5595 * win32_threads.c (GC_reset_finalizer_nested,
5596 GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
5597 GC_start_world, GC_push_all_stacks, GC_get_next_stack,
5598 GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
5599 GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
5600 GC_thr_init, GC_init_parallel, GC_lock,
5601 GC_mark_thread_local_free_lists): Likewise.
5602 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
5603 GC_traverse_back_graph): Use GC_INNER for the function prototype.
5604 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
5605 Likewise.
5606 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
5607 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
5608 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
5609 GC_get_next_stack): Likewise.
5610 * finalize.c (GC_reset_finalizer_nested,
5611 GC_check_finalizer_nested): Likewise.
5612 * gcj_mlc.c (GC_start_debugging): Likewise.
5613 * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
5614 GC_has_other_debug_info, GC_store_debug_info): Likewise.
5615 * include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
5616 * include/private/gc_locks.h (GC_lock): Likewise.
5617 * include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
5618 GC_mark_from): Likewise.
5619 * include/private/pthread_support.h (GC_lookup_thread,
5620 GC_stop_init): Likewise.
5621 * include/private/thread_local_alloc.h (GC_init_thread_local,
5622 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
5623 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
5624 * mark.c (GC_page_was_ever_dirty): Likewise.
5625 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
5626 * misc.c (GC_register_main_static_data, GC_init_win32,
5627 GC_setpagesize, GC_init_linux_data_start,
5628 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
5629 GC_do_blocking_inner): Likewise.
5630 * os_dep.c (GC_greatest_stack_base_below): Likewise.
5631 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
5632 Likewise.
5633 * include/private/gc_priv.h: Likewise.
5634 * include/private/gc_priv.h (GC_INNER): Update the comment.
5635 * doc/README.macros (GC_DLL): Update.
5636 5637 * alloc.c (GC_collection_in_progress): Move the prototype to
5638 gc_priv.h.
5639 * gc_dlopen.c (GC_collection_in_progress): Likewise.
5640 * pthread_support.c (GC_collection_in_progress): Likewise.
5641 * misc.c (GC_init_parallel): Likewise.
5642 * pthread_support.c (GC_init_parallel): Likewise.
5643 * win32_threads.c (GC_init_parallel): Likewise.
5644 * darwin_stop_world.c (GC_thr_init): Likewise.
5645 * misc.c (GC_thr_init): Likewise.
5646 * pthread_stop_world.c (GC_thr_init): Likewise.
5647 * pthread_support.c (GC_thr_init): Likewise.
5648 * blacklst.c (GC_clear_bl, GC_copy_bl,
5649 GC_number_stack_black_listed): Make STATIC.
5650 * dbg_mlc.c (GC_print_obj, GC_make_closure,
5651 GC_debug_invoke_finalizer): Likewise.
5652 * malloc.c (GC_alloc_large_and_clear): Likewise.
5653 * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
5654 GC_push_marked4, GC_push_marked, GC_push_next_marked,
5655 GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
5656 Likewise.
5657 * misc.c (GC_clear_stack_inner): Likewise.
5658 * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
5659 * darwin_stop_world.c (FindTopOfStack): Make static; define only
5660 if not DARWIN_DONT_PARSE_STACK.
5661 * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
5662 * dyn_load.c (GC_repeat_read): Remove unused prototype.
5663 * include/private/gc_pmark.h (GC_find_start): Likewise.
5664 * misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
5665 * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
5666 THREADS).
5667 * dyn_load.c (GC_register_main_static_data): Define only if
5668 DYNAMIC_LOADING.
5669 * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
5670 "return" statement.
5671 * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
5672 GC_PTHREADS).
5673 * include/gc.h: Fix a typo.
5674 * include/gc_inline.h (GC_ASSERT): Define (if not defined) since
5675 the header is public.
5676 * include/gc_inline.h (GC_generic_malloc_many): New public
5677 function declaration.
5678 * mallocx.c (GC_generic_malloc_many): Make public.
5679 * include/private/gc_priv.h (GC_INNER): Use visibility attribute
5680 (if available).
5681 * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
5682 * include/private/gc_priv.h: Include atomic_ops.h if THREADS and
5683 MPROTECT_VDB.
5684 * os_dep.c: Don't include atomic_ops.h
5685 * win32_threads.c: Likewise.
5686 * include/private/gc_priv.h (GC_push_selected, GC_push_regs,
5687 GC_push_marked, GC_number_stack_black_listed,
5688 GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
5689 GC_generic_malloc_many, GC_make_closure,
5690 GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
5691 Remove the prototype.
5692 * mark.c (GC_page_was_ever_dirty): Add prototype (only if
5693 PROC_VDB).
5694 * include/private/gc_priv.h (GC_push_next_marked_dirty,
5695 GC_push_next_marked, GC_push_next_marked_uncollectable): Move
5696 the prototype to mark.c.
5697 * include/private/gc_priv.h (GC_is_static_root): Declare only if
5698 not THREADS.
5699 * include/private/gc_priv.h (GC_free_inner): Declare only if
5700 THREADS.
5701 * include/private/gc_priv.h (GC_debug_free_inner): Declare only if
5702 THREADS and DBG_HDRS_ALL.
5703 * include/private/gc_priv.h (GC_markers): Declare GC_markers only
5704 if PARALLEL_MARK.
5705 * include/private/gc_priv.h (GC_register_main_static_data): Move
5706 the prototype to misc.c.
5707 * mach_dep.c (GC_push_regs): Make STATIC; define only along with
5708 HAVE_PUSH_REGS definition.
5709 * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
5710 definition with the ANSI C one.
5711 * mark.c (GC_started_thread_while_stopped): Declared only if not
5712 GNU C.
5713 * win32_threads.c (GC_started_thread_while_stopped): Don't define
5714 if GNU C.
5715 * mark.c (GC_mark_from): Avoid unbalanced brackets in
5716 #if-#else-#endif blocks.
5717 * mark_rts.c (GC_is_static_root): Define only if not THREADS.
5718 * os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
5719 * os_dep.c (GC_page_was_ever_dirty): Comment out the function
5720 except for PROC_VDB.
5721 * tests/test.c (main): Don't reference GC_print_obj,
5722 GC_make_closure, GC_debug_invoke_finalizer,
5723 GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
5724 * thread_local_alloc.c: Don't include "gc_inline.h".
5725 * win32_threads.c (GC_write_fault_handler): Declare only if
5726 MPROTECT_VDB.
5727 5728 * allchblk.c (DEBUG): Remove macro (since unused).
5729 * allchblk.c: Include private/gc_priv.h before other includes and
5730 definitions.
5731 * alloc.c: Likewise.
5732 * gc_dlopen.c: Likewise.
5733 * headers.c: Likewise.
5734 * mallocx.c: Likewise.
5735 * mark_rts.c: Likewise.
5736 * new_hblk.c: Likewise.
5737 * reclaim.c: Likewise.
5738 * mark.c: Include private/gc_pmark.h before other includes.
5739 * misc.c: Likewise.
5740 * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
5741 * pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
5742 * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
5743 already defined in gc_config_macros.h).
5744 * dyn_load.c (GC_init_dyld): Remove parameter cast for
5745 _dyld_register_func_for_add_image() and
5746 _dyld_register_func_for_remove_image(); add the comment about
5747 possible warnings; add FIXME for the deprecated
5748 _dyld_bind_fully_image_containing_address().
5749 * include/private/gc_priv.h: Include gc.h before the standard
5750 headers inclusion.
5751 * tests/test.c: Likewise.
5752 * include/private/gcconfig.h (DebugBreak): Update the comment.
5753 * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
5754 5755 * configure.ac (openbsd): Define GC_OPENBSD_THREADS.
5756 * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
5757 * configure.ac: Add sparc-openbsd case.
5758 * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
5759 Document.
5760 * tests/test.c (main): Handle OpenBSD case.
5761 * include/private/pthread_stop_world.h: Likewise.
5762 * extra/threadlibs.c (main): Replace K&R-style function definition
5763 with the ANSI C one.
5764 * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
5765 * dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
5766 * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
5767 define it for OpenBSD.
5768 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
5769 pthread_sigmask): Don't declare and redefine for OpenBSD.
5770 * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, x86,
5771 x64, powerpc).
5772 * mach_dep.c (NO_GETCONTEXT): Likewise.
5773 * include/private/pthread_stop_world.h (thread_stop_info): Don't
5774 define last_stop_count field if OpenBSD.
5775 * misc.c (GC_init_dyld): Add declaration (if NetBSD).
5776 * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
5777 * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
5778 * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
5779 (only if OpenBSD).
5780 * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
5781 GC_skip_hole_openbsd): New static function (only if OpenBSD).
5782 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
5783 GC_register_data_segments): Define specially for OpenBSD case.
5784 * os_dep.c (GC_fault_handler_lock): Initialize to
5785 AO_TS_INITIALIZER (instead of 0).
5786 * pthread_support.c (GC_allocate_lock): Likewise.
5787 * pthread_stop_world.c (NSIG, GC_print_sig_mask,
5788 GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
5789 GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
5790 GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
5791 GC_restart_handler): Don't define and use if OpenBSD.
5792 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
5793 GC_start_world): Handle OpenBSD case.
5794 * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
5795 * pthread_support.c (pthread_sigmask): Don't undefine the macro and
5796 don't define the wrapper function if OpenBSD.
5797 * pthread_support.c (GC_thr_init): Handle OpenBSD case.
5798 5799 * dyn_load.c: Move the inclusion of private/gc_priv.h below
5800 definition of a feature macro (_GNU_SOURCE).
5801 5802 * include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
5803 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
5804 (only if GC_I_HIDE_POINTERS).
5805 * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
5806 * dbg_mlc.c (GC_get_back_ptr_info): Likewise.
5807 * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
5808 GC_enqueue_all_finalizers): Likewise.
5809 * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
5810 * finalize.c (GC_general_register_disappearing_link,
5811 GC_unregister_disappearing_link, GC_register_finalizer_inner,
5812 GC_finalize): Likewise.
5813 * include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
5814 * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
5815 of I_HIDE_POINTERS.
5816 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
5817 * include/gc.h (_GC_H): Strip leading underscore.
5818 * include/gc_backptr.h (_GC_H): Likewise.
5819 * include/gc_gcj.h (_GC_H): Likewise.
5820 * include/gc_mark.h (_GC_H): Likewise.
5821 * include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
5822 * include/javaxfc.h (_GC_H): Likewise.
5823 * include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
5824 * include/private/dbg_mlc.h (_GC_H): Likewise.
5825 * include/private/gc_priv.h (_GC_H): Likewise.
5826 5827 * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
5828 5829 * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
5830 variable definitions).
5831 * include/private/gc_priv.h (GC_EXTERN): Update the comment.
5832 * allchblk.c (GC_unmap_threshold): Define as GC_INNER.
5833 * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
5834 GC_n_memory, GC_fail_count): Likewise.
5835 * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
5836 * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
5837 * mach_dep.c (GC_save_regs_ret_val): Likewise.
5838 * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
5839 GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
5840 GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
5841 GC_mark_no, GC_markers): Likewise.
5842 * mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
5843 * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
5844 GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
5845 GC_backtraces, GC_force_unmap_on_gcollect,
5846 GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
5847 GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
5848 * os_dep.c (GC_page_size, GC_dont_query_stack_min,
5849 GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
5850 GC_dirty_maintained, GC_fault_handler_lock): Likewise.
5851 * pthread_support.c (GC_allocate_ml, GC_lock_holder,
5852 GC_need_to_lock, GC_thr_initialized, GC_threads,
5853 GC_in_thread_creation, GC_collecting, GC_allocate_lock,
5854 GC_mark_lock_holder): Likewise.
5855 * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
5856 Likewise.
5857 * win32_threads.c (GC_allocate_ml, GC_lock_holder,
5858 GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
5859 * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
5860 * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
5861 5862 * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
5863 GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
5864 case (since they are not defined inside GC at present).
5865 * include/private/gc_priv.h (GC_objects_are_marked): Remove the
5866 declaration (since made static).
5867 * mark.c (GC_objects_are_marked): Define as STATIC.
5868 * win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
5869 Likewise.
5870 * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
5871 to initialize GC_n_kinds).
5872 * win32_threads.c (start_mark_threads): Adjust the comment.
5873 5874 * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
5875 function.
5876 * backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
5877 * mark_rts.c (add_roots_to_index): Likewise.
5878 5879 * extra/gc.c: New file.
5880 * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
5881 5882 * misc.c (GC_log): Remove the declaration; move the definition (to
5883 the place where it is used); make STATIC.
5884 * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
5885 to print open log failure.
5886 * misc.c (GC_write): Don't abort on open log failure if the GC is
5887 compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
5888 5889 * include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
5890 5891 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
5892 the variable declaration to gc_priv.h.
5893 * alloc.c (GC_bytes_found, GC_unmap_threshold,
5894 GC_force_unmap_on_gcollect): Likewise.
5895 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
5896 * finalize.c (GC_fail_count): Likewise.
5897 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
5898 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
5899 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
5900 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
5901 GC_mark_stack_too_small, GC_mark_state): Likewise.
5902 * include/private/pthread_support.h (GC_threads,
5903 GC_thr_initialized, GC_in_thread_creation): Likewise.
5904 * mallocx.c (GC_bytes_found): Likewise.
5905 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
5906 * misc.c (GC_unmap_threshold): Likewise.
5907 * os_dep.c (GC_unmap_threshold): Likewise.
5908 * pthread_support.c (GC_markers): Likewise.
5909 * thread_local_alloc.c (GC_gcjobjfreelist,
5910 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
5911 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
5912 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
5913 * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
5914 a tag for now); defined after "gcconfig.h" inclusion.
5915 * include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
5916 keyword for most global variables.
5917 * alloc.c (GC_copyright): Add the comment about the symbol
5918 visibility.
5919 * finalize.c (GC_fo_entries): Likewise.
5920 * include/private/gc_priv.h (GC_print_stats): Likewise.
5921 * misc.c (GC_quiet): Likewise.
5922 * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
5923 STATIC.
5924 * pthread_support.c (GC_threads): Add explicit zero initializer
5925 (to make the variable definition differ from the declaration).
5926 5927 * backgraph.c (GC_quiet): Remove the declaration (not needed
5928 anymore since gc_priv.h is always included).
5929 * checksums.c (GC_quiet): Likewise.
5930 * gcj_mlc.c (GC_quiet): Likewise.
5931 * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
5932 comment.
5933 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
5934 GC_hdr_cache_misses): Likewise.
5935 * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
5936 * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
5937 Likewise.
5938 * win32_threads.c (GC_please_stop, GC_max_thread_index,
5939 GC_mark_mutex_waitcnt): Likewise.
5940 5941 * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
5942 'D') in the name.
5943 5944 * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
5945 redirection is turned off; turn it on later when dlopen real
5946 symbol is no longer needed (according to the comment and the same
5947 as in dyn_load.c).
5948 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
5949 REAL_DLFUNC, respectively (to have unique names since the
5950 definitions may differ from that of the similar ones in
5951 pthread_support.c).
5952 * mark.c (source): Undefine the macro when no longer needed.
5953 * os_dep.c (handler): Rename the type to GC_fault_handler_t (to
5954 have the unique name across the project).
5955 * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
5956 comment.
5957 * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
5958 * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
5959 longer needed.
5960 5961 * pthread_stop_world.c (pthread_sigmask): Undefine before using
5962 in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
5963 * win32_threads.c (dlopen, _beginthread): Don't undefine (since
5964 neither redirected nor used here).
5965 * win32_threads.c (GC_Thread_Rep): Rename "table_management" to
5966 "tm" for short; remove "tm_" prefix.
5967 * win32_threads.c (in_use, next): Don't define the macros; use
5968 tm.in_use and tm.next fields, respectively (to ease debugging).
5969 * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
5970 unique name across the project).
5971 5972 * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
5973 inclusion.
5974 * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
5975 not included yet.
5976 * finalize.c (I_HIDE_POINTERS): Don't define.
5977 * include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
5978 * misc.c (I_HIDE_POINTERS): Likewise.
5979 * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
5980 GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
5981 * include/private/gc_pmark.h: Remove the comment about gc_priv.h
5982 inclusion order.
5983 5984 * dyn_load.c: Include gc_priv.h before using configuration
5985 information (MACOS).
5986 * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
5987 GC_MUST_RESTORE_REDEFINED_DLOPEN.
5988 5989 * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
5990 properly.
5991 * darwin_stop_world.c: Replace "if DEBUG_THREADS" with
5992 "ifdef DEBUG_THREADS".
5993 * pthread_stop_world.c: Likewise.
5994 * pthread_support.c: Likewise.
5995 * include/gc_inline.h: Guard with GC_INLINE_H.
5996 5997 * alloc.c (GC_copyright): Define as const.
5998 * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
5999 (since the name starts with "GC_" prefix).
6000 * dbg_mlc.c (GC_describe_type_fns): Likewise.
6001 * dyn_load.c (GC_FirstDLOpenedLinkMap,
6002 GC_register_dynlib_callback, GC_dyld_sections,
6003 GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
6004 Likewise.
6005 * malloc.c (GC_libpthread_start, GC_libpthread_end,
6006 GC_libld_start, GC_libld_end): Likewise.
6007 * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
6008 Likewise.
6009 * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
6010 GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
6011 GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
6012 GC_forward_exception): Likewise.
6013 * pthread_support.c (GC_syms_initialized): Likewise.
6014 * typd_mlc.c (GC_push_typed_structures_proc): Likewise.
6015 * win32_threads.c (GC_win32_dll_threads,
6016 GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
6017 GC_waitForSingleObjectInfinite): Likewise.
6018 * darwin_stop_world.c (GC_use_mach_handler_thread,
6019 GC_use_mach_handler_thread, GC_mach_threads_count): Replace
6020 "static" with "STATIC" and add zero initializer.
6021 * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
6022 GC_sigbus_count): Likewise.
6023 * headers.c (free_hdr): Replace "static" with GC_INLINE.
6024 * misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
6025 * os_dep.c (memory): Rename static variable to ecos_gc_memory.
6026 * os_dep.c (async_set_pht_entry_from_index): Make static (for
6027 MPROTECT_VDB case).
6028 * pthread_support.c (GC_real_pthread_create,
6029 GC_real_pthread_sigmask, GC_real_pthread_join,
6030 GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
6031 for static GC_real_XXX symbols.
6032 * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
6033 6034 * alloc.c (GC_finish_collection): Replace getenv() with GETENV().
6035 * dyn_load.c (GC_init_dyld): Likewise.
6036 * os_dep.c (GC_print_callers): Likewise.
6037 * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
6038 result (since it's always of "struct mach_header" type).
6039 * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
6040 GC_dyld_image_remove (to always have the first argument of
6041 "struct mach_header" pointer type).
6042 6043 * configure.ac: Add threads support for OpenBSD case (threads may
6044 not work correctly for it).
6045 6046 * acinclude.m4: Rename to m4/gc_set_version.m4.
6047 * m4/libtool.m4: Delete the file.
6048 * m4/lt~obsolete.m4: Likewise.
6049 * m4/ltoptions.m4: Likewise.
6050 * m4/ltsugar.m4: Likewise.
6051 * m4/ltversion.m4: Likewise.
6052 6053 * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
6054 x86mingw32ce toolchain to workaround the incorrect DebugBreak()
6055 declaration in winbase.h (the workaround would turn into a no-op
6056 when DebugBreak() will be defined as a macro in the toolchain).
6057 6058 * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
6059 x86mingw32ce toolchain).
6060 * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
6061 toolchain (or if already defined).
6062 * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
6063 defined for WinCE or if NO_GETENV is defined).
6064 * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
6065 NO_GETENV one.
6066 6067 * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
6068 * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
6069 * libtool.m4: Remove.
6070 * m4/libtool.m4: New file (generated).
6071 * m4/lt~obsolete.m4: Likewise.
6072 * m4/ltoptions.m4: Likewise.
6073 * m4/ltsugar.m4: Likewise.
6074 * m4/ltversion.m4: Likewise.
6075 6076 * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
6077 prefix GC_CreateThread and GC_ExitThread with '_' if defined.
6078 * doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
6079 6080 * alloc.c (GC_collect_or_expand): Add "retry" argument; add the
6081 comments; don't use "default" stop_func on a retry if
6082 GC_dont_expand.
6083 * alloc.c (GC_allocobj): Pass "retry" argument to
6084 GC_collect_or_expand().
6085 * malloc.c (GC_alloc_large): Likewise.
6086 * include/private/gc_priv.h (GC_collect_or_expand): Move the
6087 declaration to malloc.c; add "retry" argument.
6088 6089 * alloc.c (GC_start_call_back): Move the variable definition from
6090 misc.c.
6091 * include/private/gc_priv.h (GC_start_call_back): Remove the
6092 declaration.
6093 * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
6094 * alloc.c (GC_try_to_collect_inner): Also call stop_func at the
6095 beginning of the function.
6096 * include/gc.h (GC_try_to_collect): Refine the comment about
6097 stop_func.
6098 6099 * alloc.c (GC_default_stop_func, GC_try_to_collect_general,
6100 GC_gcollect): Add the comment.
6101 * alloc.c (GC_try_to_collect_general): Move the assertion on
6102 stop_func != 0 to GC_try_to_collect().
6103 * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
6104 GC_default_stop_func instead (holding the lock).
6105 * alloc.c (GC_gcollect): Pass 0 as stop_func instead of
6106 GC_default_stop_func (to prevent data races).
6107 6108 * Makefile.direct: Move "define arguments" documentation to
6109 doc/README.macros; add reference to doc/README.macros.
6110 * Makefile.dj: Change the documentation reference to
6111 doc/README.macros.
6112 * README.QUICK: Likewise.
6113 * configure.ac: Likewise.
6114 * allchblk.c: Remove unnecessary "-D" from the comment.
6115 * doc/README.macros: Likewise.
6116 * README.environment: Likewise.
6117 * include/gc.h: Likewise.
6118 * include/gc_inline.h: Likewise.
6119 * include/private/gcconfig.h: Likewise.
6120 * README.QUICK: Fix a typo.
6121 6122 * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
6123 CreateFile(); don't immediately flush every write if very verbose.
6124 6125 * doc/README.win32: Replace ".exe.log" to ".gc.log".
6126 * doc/README.win64: Likewise.
6127 * doc/README.win64: Fix a typo.
6128 * misc.c (GC_CreateLogFile): Strip executable file extension for
6129 the log file; use ".gc.log" extension (instead of ".log").
6130 6131 * include/gc_config_macros.h: Avoid the redefinition of
6132 GC_xxx_THREADS macros.
6133 6134 * alloc.c (GC_try_to_collect_general): Change the type of "result"
6135 local variable to GC_bool.
6136 6137 * include/gc_config_macros.h: Use old behavior for FreeBSD and
6138 NetBSD platform detection code (check that other GC_xxx_THREADS
6139 are undefined); add FIXME.
6140 6141 * include/gc_config_macros.h: Rearrange the platform detection
6142 code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
6143 GC_THREADS first if GC_XXX_THREADS already set; define proper
6144 GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
6145 place; define _REENTRANT if posix threads except for Win32).
6146 6147 * alloc.c (GC_try_to_collect_general): New function (move the code
6148 from GC_try_to_collect, pass force_unmap argument).
6149 * alloc.c (GC_try_to_collect, GC_gcollect): Call
6150 GC_try_to_collect_general().
6151 * alloc.c (GC_gcollect_and_unmap): New public function.
6152 * include/gc.h (GC_gcollect_and_unmap): New function declaration.
6153 * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
6154 WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
6155 and GC_gcollect()).
6156 6157 * include/gc.h (GC_allow_register_threads, GC_register_my_thread,
6158 GC_unregister_my_thread, GC_malloc_many): Refine the comment.
6159 * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
6160 (that is, don't depend on GC_THREADS macro).
6161 * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
6162 with a check for GC_PTHREADS (since the former implies the
6163 latter).
6164 6165 * include/gc.h (GC_SOLARIS_THREADS): Don't check for.
6166 * include/gc.h (GC_MIN, GC_MAX): Don't define.
6167 * mallocx.c (GC_malloc_many): Add comment to #endif.
6168 6169 * configure.ac: Drop the subdir-objects Automake option, since
6170 it's incompatible with picking source files from libatomic_ops.
6171 6172 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
6173 "extern" keyword to a global variable declaration (some compilers
6174 require it).
6175 * alloc.c (GC_bytes_found, GC_unmap_threshold,
6176 GC_force_unmap_on_gcollect): Likewise.
6177 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
6178 * finalize.c (GC_fail_count): Likewise.
6179 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
6180 GC_hdr_cache_misses): Likewise.
6181 * mallocx.c (GC_bytes_found): Likewise.
6182 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
6183 * misc.c (GC_unmap_threshold): Likewise.
6184 * os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
6185 * pthread_support.c (GC_markers): Likewise.
6186 * thread_local_alloc.c (GC_gcjobjfreelist,
6187 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
6188 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
6189 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
6190 6191 * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
6192 suppress misleading GC "Out of Memory!" warning printed on every
6193 GC_MALLOC(LONG_MAX) call.
6194 * tests/huge_test.c: Include "gc.h" instead of <gc.h>.
6195 * tests/huge_test.c (main): Replace K&R-style function definition
6196 with the ANSI C one.
6197 6198 * dyn_load.c (GC_register_dynamic_libraries): Always use
6199 lpMaximumApplicationAddress value for WinCE (even for old
6200 versions).
6201 * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
6202 * os_dep.c (GC_dont_query_stack_min): New global variable (only if
6203 WinCE and THREADS).
6204 * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
6205 for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
6206 GC_dont_query_stack_min for older WinCE (prior to version 5).
6207 * win32_threads.c (GC_dont_query_stack_min): Declare.
6208 * win32_threads.c (GC_get_stack_min): Rename the macro to
6209 GC_wince_evaluate_stack_min for WinCE; update the comment.
6210 * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
6211 GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
6212 WinCE and don't update thread's last_stack_min value (only if
6213 GC_dont_query_stack_min).
6214 * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
6215 GC_dont_query_stack_min (since the evaluated stack_min value may
6216 be incorrect if the stack is bigger than 64 KiB).
6217 6218 * gc_dlopen.c (GC_dlopen): Add function redirector (only if
6219 GC_USE_LD_WRAP).
6220 * include/gc.h: Include "gc_pthread_redirects.h" even if
6221 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
6222 * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
6223 define and check for (since included only from gc.h).
6224 * include/gc_pthread_redirects.h: Declare "GC_" symbols even if
6225 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
6226 * include/gc_pthread_redirects.h: Include signal.h only to get
6227 sigset_t definition.
6228 6229 * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
6230 * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
6231 NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
6232 * os_dep.c (GC_sysinfo): Remove explicit global variable
6233 initialization to "{0}" (revert back the previous change) since it
6234 might produce a warning.
6235 6236 * allchblk.c (GC_large_alloc_warn_interval): Move declaration from
6237 gc_priv.h.
6238 * allchblk.c (GC_large_alloc_warn_suppressed): Move definition
6239 from misc.c; define as STATIC.
6240 * include/private/gc_priv.h (GC_large_alloc_warn_interval,
6241 GC_large_alloc_warn_suppressed): Remove declaration.
6242 * alloc.c (GC_bytes_found): Add "defined in" comment.
6243 * mallocx.c (GC_bytes_found): Likewise.
6244 * misc.c (GC_unmap_threshold): Likewise.
6245 * os_dep.c (GC_old_allocator): Likewise.
6246 * pthread_support.c (GC_markers): Likewise.
6247 * thread_local_alloc.c (GC_gcjobjfreelist,
6248 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
6249 * win32_threads.c (GC_markers): Likewise.
6250 * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
6251 be distinctive from a variable declaration).
6252 * backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
6253 * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
6254 GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
6255 * checksums.c (GC_faulted, GC_n_dirty_errors,
6256 GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
6257 GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
6258 * dbg_mlc.c (GC_smashed): Likewise.
6259 * finalize.c (GC_old_dl_entries): Likewise.
6260 * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
6261 GC_gcjdebugobjfreelist): Likewise.
6262 * mach_dep.c (GC_save_regs_ret_val): Likewise.
6263 * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
6264 GC_mark_stack_top): Likewise.
6265 * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
6266 Likewise.
6267 * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
6268 GC_old_segv_handler, GC_old_bus_handler,
6269 GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
6270 GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
6271 * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
6272 * reclaim.c (GC_leaked): Likewise.
6273 * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
6274 GC_typed_mark_proc_index, GC_array_mark_proc_index,
6275 GC_eobjfreelist, GC_arobjfreelist): Likewise.
6276 * win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
6277 GC_marker_Id): Likewise.
6278 * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
6279 * gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
6280 * os_dep.c (GC_vd_base): Likewise.
6281 * pthread_support.c (GC_mark_threads): Likewise.
6282 * reclaim.c (GC_leaked): Likewise.
6283 * typd_mlc.c (GC_bm_table): Likewise.
6284 * mark_rts.c (GC_save_regs_ret_val): Change declaration type to
6285 that of definition; add "defined in" comment.
6286 * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
6287 GC_save_regs_ret_val.
6288 * misc.c (GC_check_heap, GC_print_all_smashed,
6289 GC_start_call_back): Remove unnecessary cast (of 0).
6290 * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
6291 * misc.c (GC_large_alloc_warn_interval): Initialize to
6292 GC_LARGE_ALLOC_WARN_INTERVAL value.
6293 * misc.c (GC_tmp): Change to "static".
6294 * os_dep.c (GC_mprotect_state): Define as static.
6295 * pthread_support.c (dummy_thread_local): Prefix with "GC_".
6296 * win32_threads.c (WinMain): Remove FIXME for WinCE.
6297 6298 * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
6299 6300 * configure.ac: Rewrite the tests for external or internal
6301 libatomic_ops.
6302 * configure.ac: In particular, drop the symbolic links. Add option
6303 --with-libatomic-ops for forced selection.
6304 * Makefile.am: Adjust the path of source files from libatomic_ops
6305 to not use the links.
6306 * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
6307 be empty if we use the bundled AO sources.
6308 6309 * Makefile.am: Strip version suffix for libatomic_ops directory.
6310 * build_atomic_ops.sh: Likewise.
6311 * build_atomic_ops.sh.cygwin: Likewise.
6312 * configure_atomic_ops.sh: Likewise.
6313 * Makefile.direct: Remove AO_VERSION definition; strip version
6314 suffix for libatomic_ops directory.
6315 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6316 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6317 * NT_X64_THREADS_MAKEFILE: Likewise.
6318 * gc.mak: Likewise.
6319 6320 * libatomic_ops: Rename from "libatomic_ops-1.2".
6321 6322 * alloc.c (GC_version): Add "const" keyword.
6323 * alloc.c (GC_get_version): New public function.
6324 * include/gc.h (GC_get_version): New function declaration; update
6325 the comment for the GC version.
6326 6327 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
6328 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
6329 (for the global variable declaration) again.
6330 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
6331 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
6332 GC_mark_stack_too_small, GC_mark_state): Likewise.
6333 * include/private/gcconfig.h (GC_register_stackbottom): Likewise.
6334 * include/private/pthread_support.h (GC_threads,
6335 GC_thr_initialized, GC_in_thread_creation): Likewise.
6336 * include/private/gc_priv.h: Likewise.
6337 6338 * real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
6339 6340 * allchblk.c (GC_hblkfreelist): Define as STATIC.
6341 * blacklst.c (GC_total_stack_black_listed): Likewise.
6342 * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
6343 GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
6344 declaration.
6345 * mark_rts.c (GC_stopped_mark): Add declaration (only if
6346 THREAD_LOCAL_ALLOC).
6347 * allchblk.c (GC_fail_count): Move the declaration out of
6348 GC_allochblk_nth(); remove "extern".
6349 * alloc.c (IF_THREADS): Remove unused macro.
6350 * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
6351 * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
6352 THREAD_LOCAL_ALLOC.
6353 * alloc.c (GC_bytes_found, GC_collection_in_progress,
6354 GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
6355 Remove K&R-style "extern" for the declaration.
6356 * dbg_mlc.c (GC_free_inner): Likewise.
6357 * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
6358 GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
6359 * finalize.c (GC_fail_count): Likewise.
6360 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
6361 GC_hdr_cache_misses): Likewise.
6362 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
6363 GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
6364 Likewise.
6365 * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
6366 GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
6367 GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
6368 * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
6369 GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
6370 GC_page_size, GC_sysinfo, GC_black_list_spacing,
6371 GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
6372 GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
6373 GC_large_alloc_warn_suppressed, GC_blocked_sp,
6374 GC_activation_frame, GC_push_other_roots,
6375 GC_push_finalizer_structures, GC_push_thread_structures,
6376 GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
6377 GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
6378 GC_print_heap_obj, GC_have_errors, GC_print_stats,
6379 GC_dump_regularly, GC_backtraces, GC_print_back_height,
6380 GC_debug_generic_malloc_inner,
6381 GC_debug_generic_malloc_inner_ignore_off_page,
6382 GC_fl_builder_count, GC_mark_no, GC_help_marker,
6383 GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
6384 * include/private/gcconfig.h (GC_SysVGetDataStart,
6385 GC_FreeBSDGetDataStart, GC_register_stackbottom,
6386 GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
6387 * include/private/pthread_support.h (GC_threads,
6388 GC_thr_initialized, GC_in_thread_creation): Likewise.
6389 * malloc.c (GC_text_mapping): Likewise.
6390 * mallocx.c (GC_bytes_found): Likewise.
6391 * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
6392 * mark_rts.c (GC_save_regs_ret_val): Likewise.
6393 * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
6394 GC_setpagesize, GC_init_linux_data_start,
6395 GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
6396 * os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
6397 GC_darwin_register_mach_handler_thread): Likewise.
6398 * pthread_support.c (GC_markers, GC_collection_in_progress):
6399 Likewise.
6400 * tests/test.c (GC_amiga_free_all_mem): Likewise.
6401 * thread_local_alloc.c (GC_gcjobjfreelist,
6402 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
6403 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
6404 GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
6405 * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
6406 Move the declaration out of GC_init(); remove "extern".
6407 * os_dep.c (GC_abort): Add the comment; add workaround to suppress
6408 compiler "unreachable code" warnings for ABORT callers (where
6409 ABORT is followed by a dummy return statement).
6410 * os_dep.c (GC_old_allocator): Move the declaration out of
6411 GC_default_push_other_roots(); remove "extern".
6412 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
6413 Move the declaration out of GC_stop_world() and GC_start_world()
6414 (only if MPROTECT_VDB); remove "extern".
6415 6416 * win32_threads.c (GC_get_stack_min, GC_push_stack_for,
6417 GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
6418 WinCE emulation and for custom WinCE 6 devices); add the comment.
6419 * win32_threads.c (GC_get_stack_min): Cast pointer to word instead
6420 of DWORD.
6421 * win32_threads.c (GC_get_next_stack): Don't use and maintain the
6422 latest known stack_min value for WinCE (if GC_get_stack_min is
6423 defined as a macro); update the comments.
6424 * win32_threads.c (GC_wnt): Don't declare for WinCE.
6425 6426 * Makefile.direct: Document EMPTY_GETENV_RESULTS.
6427 * gcj_mlc.c (GC_clear_stack): Remove declaration.
6428 * malloc.c (GC_clear_stack): Likewise.
6429 * mallocx.c (GC_clear_stack): Likewise.
6430 * typd_mlc.c (GC_clear_stack): Likewise.
6431 * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
6432 GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
6433 remove "lb" unnecessary cast to word.
6434 * include/private/gc_priv.h (GC_clear_stack): Add declaration.
6435 * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
6436 Move common declaration from typd_mlc.c and malloc.c; remove
6437 unnecessary result and "lb" parameter casts.
6438 * include/private/thread_local_alloc.h: Guard against duplicate
6439 header file inclusion.
6440 * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
6441 the case when USE_MMAP is not defined.
6442 * pthread_support.c (GC_is_thread_tsd_valid): New internal
6443 function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
6444 code from thread-local GC_malloc(); add FIXME for the condition.
6445 * win32_threads.c (GC_is_thread_tsd_valid): Likewise.
6446 * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
6447 match that of its definition).
6448 * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
6449 GC_gcjobjfreelist.
6450 * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
6451 Remove unused declaration; don't include pthread.h.
6452 * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
6453 (only if GC_ASSERTIONS).
6454 * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
6455 instead of GC_lookup_thread().
6456 * win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
6457 * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
6458 id different from that in os_dep.c).
6459 6460 * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
6461 with GC_INLINE.
6462 * include/private/gc_priv.h (fixed_getenv): Likewise.
6463 * alloc.c (GC_max, GC_min): Replace "static INLINE" with
6464 GC_INLINE.
6465 * mark_rts.c (rt_hash): Likewise.
6466 * win32_threads.c (GC_get_max_thread_index): Likewise.
6467 * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
6468 "static"; define for Sun CC; define for VC++ (and other
6469 compilers).
6470 * pthread_support.c: Don't define __inline__ for non-GNU compilers
6471 (not needed anymore).
6472 6473 * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
6474 * Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
6475 * Makefile.am: Likewise.
6476 * Makefile.dj: Likewise.
6477 * Makefile.direct: Likewise.
6478 * doc/README.win32: Add reference to gc.mak.
6479 * NT_X64_THREADS_MAKEFILE: Likewise.
6480 6481 * Makefile.direct: Remove references to acinclude.m4, libtool.m4.
6482 6483 * autogen.sh: Update.
6484 6485 * Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
6486 * acinclude.m4: Fix underquoting of GC_SET_VERSION.
6487 * README.QUICK: Update information for Makefile.
6488 * Makefile.am: Do not distribute the substituted bdw-gc.pc.
6489 * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
6490 * tests/tests.am: Use it here to conditionally enable tracetest
6491 when possible.
6492 6493 * dyn_load.c (GC_wnt): Update the comment.
6494 * dyn_load.c (GC_register_dynamic_libraries): Add the comment for
6495 _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
6496 macro); call GC_is_heap_base() only if check for Type succeeded.
6497 6498 * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
6499 update the comment.
6500 * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
6501 6502 * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
6503 * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
6504 ASSERT_CANCEL_DISABLED): New macros.
6505 * alloc.c (GC_maybe_gc): Assert cancellation disabled.
6506 (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
6507 Disable cancellation.
6508 (GC_add_to_our_memory): Check for overflow.
6509 * misc.c (GC_cancel_disable_count): declare.
6510 (GC_init, GC_write): Disable cancellation.
6511 (GC_init): Remove redundant GC_is_initialized test.
6512 * os_dep.c (GC_repeat_read): Assert cancellation disabled.
6513 (GC_get_stack_base): Disable cancellation.
6514 * pthread_stop_world.c (GC_suspend_handler_inner): Disable
6515 cancellation.
6516 * pthread_support.c (GC_mark_thread): Permanently disable
6517 cancellation.
6518 (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
6519 Assert cancellation disabled.
6520 (fork handling): Disable cancellation, fix comment.
6521 (GC_pthread_create): Disable cancellation.
6522 (GC_unregister_my_thread): Disable cancellation.
6523 * Makefile.direct: Document NO_CANCEL_SAFE.
6524 6525 * Makefile: Remove outdated file (Makefile.direct should be used
6526 instead).
6527 6528 * include/gc.h (GC_use_DllMain): Refine the comment.
6529 6530 * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
6531 EMPTY_GETENV_RESULTS.
6532 * configure.ac: Fix a typo.
6533 * Makefile.am: Likewise.
6534 6535 * checksums.c (GC_checksum, GC_update_check_page): Remove
6536 "register" keyword in local variable declarations (for the code
6537 used only for debugging or which is not time-critical).
6538 * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
6539 GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
6540 GC_print_smashed_obj, GC_debug_end_stubborn_change,
6541 GC_debug_invoke_finalizer): Likewise.
6542 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
6543 * mallocx.c (GC_realloc): Likewise.
6544 * mark_rts.c (GC_print_static_roots, GC_is_static_root,
6545 GC_clear_roots): Likewise.
6546 * misc.c (GC_write): Likewise.
6547 * os_dep.c (GC_print_callers): Likewise.
6548 * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
6549 variable to "j" for the nested loop (just not to hide the similar
6550 variable in the outer one).
6551 * mark_rts.c (GC_print_static_roots): Output an error message
6552 using GC_err_printf() (instead of GC_printf()).
6553 6554 * configure.ac: Move include flag from ${INCLUDE} ...
6555 * Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
6556 * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
6557 * configure.ac: Add documentation to all AC_DEFINE either directly
6558 or using AH_TEMPLATE.
6559 6560 * win32_threads.c (GC_waitForSingleObjectInfinite): New static
6561 function (only if GC_WINMAIN_REDIRECT).
6562 * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
6563 thru GC_do_blocking() instead of calling WaitForSingleObject()
6564 directly.
6565 6566 * pthread_support.c (start_mark_threads): Refine printed message.
6567 * win32_threads.c (GC_thr_init): Likewise.
6568 6569 * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
6570 * Makefile.direct (NO_GETENV): Update the comment.
6571 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
6572 * include/gc.h (GC_WinMain): Remove declaration.
6573 * include/gc.h (WinMain): Define (as GC_WinMain) if and only if
6574 GC_WINMAIN_REDIRECT.
6575 * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
6576 WinCE target unless GC_WINMAIN_REDIRECT is defined.
6577 * tests/test.c (WINMAIN_LPTSTR): New macro.
6578 * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
6579 and GC_WINMAIN_WINCE_LPTSTR.
6580 * win32_threads.c (start_mark_threads): Add the comment for
6581 MARK_THREAD_STACK_SIZE.
6582 * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
6583 * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
6584 macro (only if GC_WINMAIN_REDIRECT).
6585 * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
6586 * win32_threads.c (GC_WinMain): Add prototype (only if
6587 GC_WINMAIN_REDIRECT).
6588 * win32_threads.c (main_thread_args, WinMain): Rename
6589 GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
6590 * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
6591 use WINMAIN_THREAD_STACK_SIZE.
6592 * win32_threads.c (WinMain): Call GC_deinit() and
6593 DeleteCriticalSection() only if WinCE; add FIXME.
6594 6595 * os_dep.c (GC_get_main_stack_base): add assertion for mem_base
6596 value returned by GC_get_stack_base().
6597 6598 * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
6599 Add the comment for.
6600 * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
6601 Declare external variable (only if USE_MUNMAP).
6602 * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
6603 value to 1 if GC_force_unmap_on_gcollect and restore it before
6604 unlocking (only if USE_MUNMAP).
6605 * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
6606 information for.
6607 * include/gc.h (GC_set_force_unmap_on_gcollect,
6608 GC_get_force_unmap_on_gcollect): New public function prototype.
6609 * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
6610 recognized.
6611 * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
6612 * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
6613 internal macro (used by GC_INIT only).
6614 * misc.c (GC_force_unmap_on_gcollect): New global variable.
6615 * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
6616 environment variable (and set GC_force_unmap_on_gcollect).
6617 * misc.c (GC_set_force_unmap_on_gcollect,
6618 GC_get_force_unmap_on_gcollect): New public function.
6619 * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
6620 to force the mode on if WM_HIBERNATE; restore the mode after
6621 GC_gcollect().
6622 6623 * Makefile.direct (LARGE_CONFIG): Update information.
6624 * include/gc.h (GC_stop_func): Refine the comment.
6625 6626 * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
6627 Win32 (workaround for Wine bug).
6628 6629 * allchblk.c (GC_freehblk): Adjust local variables indentation.
6630 * mallocx.c (GC_generic_malloc_many): Likewise.
6631 * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
6632 GC_calloc_explicitly_typed): Likewise.
6633 * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
6634 brackets.
6635 6636 * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
6637 * configure.ac: Process enable_parallel_mark option for Cygwin and
6638 Win32; define THREAD_LOCAL_ALLOC for Win32.
6639 6640 * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
6641 PARALLEL_MARK (required for VC++ x86).
6642 6643 * dbg_mlc.c (GC_generate_random_backtrace): Call
6644 GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
6645 if GC is disabled then print error message and return.
6646 * include/gc.h (GC_try_to_collect): Refine the comment.
6647 * include/private/gc_priv.h (GC_never_stop_func): Fix return type;
6648 refine the comment.
6649 6650 * add_gc_prefix.c: Move the file to the new "extra" directory.
6651 * AmigaOS.c: Likewise.
6652 * gcname.c: Likewise.
6653 * if_mach.c: Likewise.
6654 * if_not_there.c: Likewise.
6655 * MacOS.c: Likewise.
6656 * msvc_dbg.c: Likewise.
6657 * setjmp_t.c: Likewise.
6658 * threadlibs.c: Likewise.
6659 * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
6660 * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
6661 if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
6662 with "extra" directory.
6663 * Makefile.am: Likewise.
6664 * Makefile.direct: Likewise.
6665 * Makefile.dj: Likewise.
6666 * Makefile.in: Likewise.
6667 * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
6668 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6669 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6670 * NT_X64_THREADS_MAKEFILE: Likewise.
6671 * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
6672 * gc.mak: Likewise.
6673 * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
6674 directory.
6675 * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
6676 directory.
6677 * doc/simple_example.html: Update for threadlibs.c.
6678 * os_dep.c: Prepend included AmigaOS.c with "extra" directory.
6679 6680 * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
6681 function prototype.
6682 * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
6683 single-threaded case) with an assertion check for the state to be
6684 not a "do-blocking" one.
6685 * include/private/gc_priv.h (blocking_data): Move the structure
6686 definition from pthread_support.c; change "fn" return type to void
6687 pointer.
6688 * include/private/gc_priv.h (GC_activation_frame_s): New structure
6689 type.
6690 * include/private/gc_priv.h (GC_push_all_stack_frames): New
6691 function declaration (only if THREADS).
6692 * include/private/gc_priv.h (GC_world_stopped): Don't declare
6693 unless THREADS.
6694 * include/private/gc_priv.h (GC_blocked_sp,
6695 GC_activation_frame_s): New declaration (only if not THREADS).
6696 * include/private/gc_priv.h (GC_push_all_register_frames): New
6697 function declaration (only for IA-64).
6698 * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
6699 obsolete (unused) symbols.
6700 * include/private/gc_priv.h (GC_push_all_stack_partially_eager):
6701 Remove declaration (since it is static now).
6702 * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
6703 (for code locality) and make STATIC.
6704 * mark_rts.c (GC_push_all_register_frames): New function (only for
6705 IA-64).
6706 * mark_rts.c (GC_push_all_stack_frames): New function (only if
6707 THREADS).
6708 * mark_rts.c (GC_add_trace_entry): New function prototype (used by
6709 GC_push_all_stack_partially_eager(), only if TRACE_BUF).
6710 * mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
6711 * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
6712 function body (only for IA-64).
6713 * mark_rts.c (GC_push_current_stack): Call
6714 GC_push_all_stack_part_eager_frames() instead of
6715 GC_push_all_stack_partially_eager().
6716 * mark_rts.c (GC_push_current_stack): Call
6717 GC_push_all_register_frames() instead of GC_push_all_eager() for
6718 IA-64 backing store.
6719 * misc.c (GC_do_blocking_inner): Declare function (if THREADS
6720 only).
6721 * misc.c (GC_blocked_sp, GC_blocked_register_sp,
6722 GC_activation_frame): New global variables (only if not THREADS).
6723 * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
6724 function (only if not THREADS).
6725 * misc.c (GC_do_blocking): Move the function from
6726 pthread_support.c.
6727 * include/private/pthread_support.h (GC_Thread_Rep): Add
6728 "activation_frame" field.
6729 * pthread_stop_world.c (GC_push_all_stacks): Call
6730 GC_push_all_stack_frames() and GC_push_all_register_frames instead
6731 of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
6732 STACK_GROWS_UP here.
6733 * pthread_support.c (GC_do_blocking_inner): Remove "static"; store
6734 "fn" result back to "client_data" field.
6735 * pthread_support.c (GC_call_with_gc_active): New API function.
6736 * win32_threads.c (GC_call_with_gc_active): Likewise.
6737 * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
6738 "activation_frame" fields.
6739 * win32_threads.c (GC_new_thread): Add assertion checking for
6740 thread_blocked_sp is NULL.
6741 * win32_threads.c (GC_do_blocking_inner): New function.
6742 * win32_threads.c (GC_stop_world): Don't suspend a thread if its
6743 thread_blocked_sp is non-NULL.
6744 * win32_threads.c (GC_push_stack_for): Use thread
6745 "activation_frame" (if non-NULL); use "thread_blocked_sp" if
6746 non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
6747 thread before modifying its last_stack_min; call
6748 GC_push_all_stack_frames() instead of GC_push_all_stack(); update
6749 the comments.
6750 6751 * alloc.c (GC_default_stop_func): New static variable (initialized
6752 to GC_never_stop_func).
6753 * alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
6754 * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
6755 (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
6756 else call GC_default_stop_func() before getting "current_time".
6757 * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
6758 FIXME comment).
6759 * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
6760 replacing GC_never_stop_func with GC_default_stop_func (if
6761 possible).
6762 * alloc.c (GC_gcollect): Use GC_default_stop_func.
6763 * alloc.c (GC_collect_or_expand): Use GC_default_stop_func
6764 (instead of GC_never_stop_func) unless it is triggered due to out of
6765 memory; don't increment GC_fail_count and don't output warning
6766 (before trying to collect again) in case the collection has been
6767 interrupted (by GC_default_stop_func) and the heap expansion has
6768 failed too.
6769 * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
6770 prototypes.
6771 6772 * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
6773 GC_get_writable_length() result.
6774 6775 * configure.ac: Don't use -lpthread -ldl for Cygwin.
6776 6777 * NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
6778 6779 * include/private/gcconfig.h (GWW_VDB): Undefine if
6780 USE_GLOBAL_ALLOC (since incompatible).
6781 * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
6782 is defined.
6783 * os_dep.c (GC_unmap_threshold): Declare (for use in
6784 GC_init_win32) if USE_MUNMAP.
6785 * os_dep.c (GC_init_win32): Turn off memory unmapping if
6786 GlobalAlloc() is used.
6787 * os_dep.c (GC_win32_get_mem): Define and use new
6788 VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless
6789 MPROTECT_VDB is in use.
6790 6791 * Makefile: Replace "version.h" with "include/gc_version.h".
6792 * include/gc_version.h: Likewise.
6793 6794 * alloc.c (GC_collect_or_expand): Output heap size in WARN()
6795 (before returning FALSE) for convenience.
6796 6797 * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
6798 string.
6799 * pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
6800 * win32_threads.c (GC_delete_thread): Likewise.
6801 * include/private/gc_priv.h (GC_PRIdPTR): New macro.
6802 * pthread_stop_world.c (GC_suspend_handler_inner): Remove
6803 unnecessary cast for WARN argument.
6804 * pthread_support.c (start_mark_threads): if pthread_create()
6805 failed then don't try to create other marker threads and (after
6806 printing a warning) adjust GC_markers and GC_parallel values; log
6807 GC_markers value (possibly adjusted) after that.
6808 6809 * win32_threads.c (start_mark_threads): if pthread_create() is
6810 failed then don't try to create other marker threads and (after
6811 printing a warning) adjust GC_markers and GC_parallel values.
6812 * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
6813 the definition upper (to be visible in start_mark_threads()).
6814 * win32_threads.c (start_mark_threads): if CreateThread() or
6815 _beginthreadex() is failed then don't try to create other marker
6816 threads and (after printing a warning) adjust GC_markers,
6817 GC_parallel values, and destroy the event objects (either only
6818 some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
6819 not a single thread is created).
6820 * win32_threads.c (GC_thr_init): Log GC_markers value (possibly
6821 adjusted) after start_mark_threads() call.
6822 6823 * Makefile.am: Back remove "GC_" prefix for PTHREADS,
6824 DARWIN_THREADS, WIN32_THREADS (for configure.ac).
6825 6826 * include/private/gc_priv.h: Change include of config.h to
6827 private/config.h.
6828 * include/private/gc_pmark.h: Likewise.
6829 * gc_cpp.cc: Likewise.
6830 * tests/test.c: Likewise.
6831 * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
6832 undefine GC_BUILD.
6833 6834 * finalize.c (GC_general_register_disappearing_link): Return
6835 GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
6836 respectively).
6837 * include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
6838 * include/gc.h (GC_register_disappearing_link,
6839 GC_general_register_disappearing_link): Update the comment.
6840 * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
6841 * finalize.c (GC_general_register_disappearing_link,
6842 GC_register_finalizer_inner): Recalculate the hash table index
6843 after GC_oom_fn succeeded (since the table may grow while not
6844 holding the lock) and check again that the entry is still not in
6845 the table (free the unused entry otherwise unless DBG_HDRS_ALL).
6846 * finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
6847 local variable (to prevent a compiler warning).
6848 * finalize.c (GC_register_finalizer_inner): Don't modify the data
6849 pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
6850 (due to out of memory).
6851 6852 * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
6853 suppress compiler "variable might be uninitialized" warnings.
6854 6855 * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
6856 * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
6857 WinCE.
6858 * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
6859 HANDLE thru word type (to avoid a compiler warning) for WinCE.
6860 * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
6861 (only if DONT_USE_SIGNALANDWAIT).
6862 * win32_threads.c (start_mark_threads): Initialize GC_marker_Id
6863 and GC_marker_cv for each helper thread (only if
6864 DONT_USE_SIGNALANDWAIT).
6865 * win32_threads.c (GC_mark_mutex_state): New static variable (only
6866 if DONT_USE_SIGNALANDWAIT).
6867 * win32_threads.c (GC_mark_mutex_waitcnt,
6868 signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
6869 * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
6870 Use InterlockedExchange() over GC_mark_mutex_state (instead of
6871 AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
6872 * win32_threads.c (GC_wait_marker, GC_notify_all_marker):
6873 Implement wait/broadcast primitives using Win32 multiple events
6874 (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
6875 using Win32 SignalObjectAndWait).
6876 * win32_threads.c (GC_thr_init): Don't declare hK32 local
6877 variable, don't check for GC_wnt, and don't initialize
6878 signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
6879 6880 * alloc.c (GC_finish_collection): Call GC_print_finalization_stats
6881 if GC_print_stats (after getting "done_time").
6882 * finalize.c (GC_old_dl_entries): New static variable (only if not
6883 SMALL_CONFIG).
6884 * finalize.c (GC_finalize): Save current GC_dl_entries value (only
6885 if not SMALL_CONFIG).
6886 * finalize.c (GC_print_finalization_stats): Define if and only if
6887 not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
6888 instead of GC_printf(); use "%lu" (instead of "%u") print format
6889 specifier; use unsigned long type for "ready" counter (for LP64
6890 targets).
6891 * misc.c (GC_dump): No longer call GC_print_finalization_stats()
6892 here (since it is called from GC_finish_collection()).
6893 * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
6894 ECOS).
6895 6896 * alloc.c (GC_expand_hp): Replace GC_init_inner() call with
6897 GC_init() one.
6898 * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
6899 * mallocx.c (GC_generic_malloc_many): Likewise.
6900 * misc.c (GC_enable_incremental): Likewise.
6901 * alloc.c (GC_expand_hp): Update the comment.
6902 * mark.c (GC_obj_kinds): Likewise.
6903 * win32_threads.c (GC_allow_register_threads): Likewise.
6904 * private/gc_priv.h (GC_init_inner): Remove function declaration.
6905 * misc.c (GC_init_inner): Replace with public GC_init().
6906 6907 * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
6908 * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
6909 GC_gcj_fake_mark_proc (aborting with the appropriate message)
6910 instead.
6911 6912 * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
6913 to out of memory) then don't increment GC_n_heap_bases and don't
6914 call VirtualAlloc() again (with MEM_COMMIT).
6915 * os_dep.c (GC_remap): Abort with a more informatory message if
6916 VirtualAlloc() fails due to out of memory; update FIXME.
6917 6918 * Makefile: Fix typo for msvc_dbg.c.
6919 * Makefile.direct: Likewise.
6920 * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
6921 "GC_".
6922 * Makefile.dj: Don't reference remove files (nursery.c,
6923 gc_nursery.h, gc_copy_descr.h).
6924 * NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
6925 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6926 * NT_THREADS_MAKEFILE: Likewise.
6927 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6928 * NT_X64_THREADS_MAKEFILE: Likewise.
6929 * gc.mak: Likewise.
6930 * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
6931 defined in the source files).
6932 * NT_THREADS_MAKEFILE: Likewise.
6933 * NT_X64_THREADS_MAKEFILE: Likewise.
6934 * gc.mak: Likewise.
6935 * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
6936 * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
6937 GC_THREADS.
6938 * NT_THREADS_MAKEFILE: Likewise.
6939 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
6940 * NT_X64_THREADS_MAKEFILE: Likewise.
6941 * gc.mak: Likewise.
6942 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
6943 compiler warnings.
6944 * NT_STATIC_THREADS_MAKEFILE: Likewise.
6945 * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
6946 before "$*.C" (and "$*.CPP").
6947 * NT_X64_THREADS_MAKEFILE: Likewise.
6948 6949 * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
6950 * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
6951 * doc/README.win64: Add info about mingw-w64; add note for VC++
6952 warnings suppression.
6953 6954 * os_dep.c (GC_forward_exception): Fix logic in several places.
6955 (OSX-specific)
6956 6957 * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
6958 6959 * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
6960 from Makefile.
6961 * Makefile: Remove the information about "define arguments" (which
6962 is incomplete and outdated compared to that in Makefile.direct);
6963 add help reference to Makefile.direct.
6964 * Makefile.dj: Likewise.
6965 6966 * alloc.c (world_stopped_total_time, world_stopped_total_divisor):
6967 Replace "STATIC" with "static" in the definition (since the
6968 symbols aren't prefixed with "GC_").
6969 * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
6970 start_mark_threads, mark_mutex, builder_cv, mark_cv,
6971 mark_mutex_event, signalObjectAndWait_func, main_thread_start):
6972 Likewise.
6973 * pthread_support.c (GC_wait_builder): Define as STATIC.
6974 * win32_threads.c (GC_wait_builder): Likewise.
6975 6976 * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
6977 API function.
6978 * include/gc_pmark.h (GC_get_heap_size_inner,
6979 GC_get_free_bytes_inner): New function declaration.
6980 6981 * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
6982 * include/gc_config_macros.h: Likewise.
6983 * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
6984 * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
6985 internal use).
6986 * include/gc_config_macros.h: Always include stddef.h if GCC.
6987 * include/gc_config_macros.h (GC_API): Define for CeGCC in the
6988 same way as for MinGW.
6989 * include/gc_config_macros.h (GC_API): Group the definition for
6990 all cases together (check for GC_DLL only once).
6991 * include/gc_pthread_redirects.h: Group non-Darwin code together.
6992 * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
6993 6994 * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
6995 GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
6996 GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
6997 comment for.
6998 * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
6999 macro).
7000 * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
7001 FIXME and the comment for WinCE.
7002 * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
7003 (new macro).
7004 * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
7005 WinCE (since backtrace() is unimplemented).
7006 * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
7007 (since static).
7008 * os_dep.c (GC_n_heap_bases): Define as STATIC; move the
7009 definition to be above GC_is_heap_base().
7010 * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
7011 (both for MinGW and CeGCC toolchains).
7012 * include/private/gcconfig.h: Recognize __CEGCC__ and
7013 __MINGW32CE__ (as synonyms for __WIN32_WCE).
7014 * include/private/gcconfig.h: If SH4 then don't set config
7015 parameters for SH.
7016 * include/private/thread_local_alloc.h (GC_key_create): Don't
7017 abort on failures, just return -1 in these cases (this also
7018 prevents compilation error for targets where ABORT is defined
7019 indirectly as an inline assembler sequence).
7020 * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
7021 the GCC-based cross-compiler.
7022 * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
7023 WRAP_MARK_SOME is defined; define also for WinCE case; don't
7024 check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
7025 * mark.c (GC_mark_some): Use __try/__except also for WinCE; update
7026 the comment.
7027 * misc.c: Include signal.h after gc_pmark.h included; check for
7028 MSWINCE instead of _WIN32_WCE.
7029 * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
7030 * misc.c: Don't include <crtdbg.h> for WinCE targets.
7031 * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
7032 CeGCC toolchain).
7033 * misc.c (GC_write): Use OutputDebugStringW() instead of
7034 _CrtDbgReport() for WinCE targets.
7035 * os_dep.c (GC_least_described_address): Define as STATIC.
7036 * os_dep.c (GC_register_data_segments): Fix code indentation.
7037 * os_dep.c (GC_wince_get_mem): Initialize "result" local variable
7038 (to prevent a compiler warning).
7039 * os_dep.c (GC_dirty_init): Add comment for WinCE target.
7040 * tests/test.c: Don't include winbase.h directly if GCC for WinCE,
7041 include assert.h instead.
7042 * tests/test.c (tiny_reverse_test): Define and use
7043 TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
7044 useful for WinCE.
7045 * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
7046 for WinCE (since thread Id is used as a "real" thread handle).
7047 * win32_threads.c (THREAD_HANDLE): New macro.
7048 * win32_threads.c (GC_register_my_thread_inner): Don't recognize
7049 DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
7050 WinCE.
7051 * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
7052 * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
7053 for MSWINCE.
7054 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
7055 close thread handle on WinCE (since it's a thread Id).
7056 * win32_threads.c (GC_suspend): Don't check for MSWINCE in the
7057 MPROTECT-related code (for the case if MPROTECT_VDB would be
7058 implemented for WinCE).
7059 * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
7060 Use THREAD_HANDLE(t) to obtain thread handle.
7061 * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
7062 implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
7063 pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
7064 GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
7065 parallel mark support).
7066 * win32_threads.c (start_mark_threads): Use int type for "i" local
7067 variable (instead of "unsigned") to prevent a compiler warning.
7068 * win32_threads.c (start_mark_threads): Don't check CreateThread()
7069 result for -1; call CloseHandle() for the handle created by
7070 CreateThread() (on WinCE); don't use errno (since errno.h is
7071 missing on some targets like WinCE) when printing warning on a
7072 marker thread creation failure.
7073 * win32_threads.c (signalObjectAndWait_func): Define for WinCE.
7074 * win32_threads.c (GC_wait_marker): Remove unnecessary assertion
7075 for non-zero signalObjectAndWait_func (to make the code compilable
7076 for WinCE).
7077 * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
7078 use GC_sysinfo to get processors count if WinCE; don't check for
7079 SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
7080 GC_PTHREADS_PARAMARK.
7081 * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
7082 macro (useful for testing parallel marking on WinCE).
7083 * win32_threads.c (GC_win32_start, main_thread_start): Define as
7084 STATIC.
7085 * win32_threads.c: Don't define main_thread_args,
7086 main_thread_start(), WinMain() for WinCE if GC_DLL.
7087 * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
7088 (since the stack size parameter is ignored on WinCE).
7089 * win32_threads.c (main_thread_start): Remove forward declaration;
7090 place its definition before WinMain() one.
7091 * win32_threads.c (WinMain): Abort if GC_CreateThread() or
7092 WaitForSingleObject() failed (for the main thread).
7093 7094 * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
7095 a function.
7096 * allchblk.c (GC_unmap_threshold): New global variable definition
7097 (initialized to MUNMAP_THRESHOLD).
7098 * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
7099 MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
7100 * doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
7101 * misc.c (GC_unmap_threshold): New variable declaration.
7102 * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
7103 environment variable to set GC_unmap_threshold value (only if
7104 USE_MUNMAP).
7105 7106 * dbg_mlc.c (OFN_UNSET): New macro (to detect
7107 GC_register_finalizer() failures).
7108 * dbg_mlc.c (store_old): Add a check for register_finalizer()
7109 failure caused by an out-of-memory event (leave *ofn and *ocd
7110 unmodified in that case).
7111 * dbg_mlc.c (GC_debug_register_finalizer,
7112 GC_debug_register_finalizer_no_order,
7113 GC_debug_register_finalizer_unreachable,
7114 GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
7115 to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
7116 as in GC_register_finalizer_inner()).
7117 7118 * Makefile.direct (GC_DLL): Add the comment for.
7119 * doc/README.macros: Fix a typo.
7120 * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
7121 * doc/README.macros (__STDC__): Remove info.
7122 * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
7123 GC_generate_random_valid_address, GC_print_backtrace,
7124 GC_generate_random_backtrace, GC_register_describe_type_fn): Add
7125 GC_API and GC_CALL to function definition.
7126 * malloc.c (GC_generic_malloc): Likewise.
7127 * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
7128 * mark.c (GC_mark_and_push): Likewise.
7129 * misc.c (GC_new_free_list_inner, GC_new_free_list,
7130 GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
7131 Likewise.
7132 * include/gc_backptr.h (GC_get_back_ptr_info,
7133 GC_generate_random_heap_address, GC_generate_random_valid_address,
7134 GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
7135 GC_CALL to function prototype.
7136 * include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
7137 GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
7138 GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
7139 GC_register_describe_type_fn): Likewise.
7140 * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
7141 GC_generic_malloc_words_small): Likewise.
7142 * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
7143 * include/private/gc_pmark.h: Likewise.
7144 * include/private/gc_priv.h: Likewise.
7145 * tests/test.c: Likewise.
7146 * gc_cpp.cc: Define GC_BUILD.
7147 * include/private/gc_pmark.h: Likewise.
7148 * include/private/gc_priv.h: Likewise.
7149 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
7150 * gc_dlopen.c (dlopen): Add GC_API to the wrapper function
7151 definition.
7152 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
7153 GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
7154 pthread_detach, pthread_create): Likewise.
7155 * win32_threads.c (GC_pthread_join, GC_pthread_create,
7156 GC_pthread_sigmask, GC_pthread_detach): Likewise.
7157 * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
7158 * include/gc_backptr.h: Include "gc.h".
7159 * include/gc_backptr.h: Use extern "C" for the exported functions.
7160 * include/gc_mark.h: Likewise.
7161 * include/gc_config_macros.h (GC_THREADS): Define the macro if any
7162 GC_XXX_THREADS is defined.
7163 * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
7164 Move the definitions below the place where GC_NETBSD_THREADS and
7165 GC_DGUX386_THREADS are defined.
7166 * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
7167 is defined) for GCC.
7168 * include/gc_config_macros.h (GC_API): Define for Cygwin (in the
7169 same way as for VC++); define for GCC v4+ (other than already
7170 recognized MinGW/Cygwin) as a "default" visibility attribute if
7171 GC_DLL is defined.
7172 * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
7173 New macro.
7174 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
7175 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
7176 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
7177 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
7178 GC_debug_malloc_atomic, GC_debug_strdup,
7179 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
7180 GC_debug_malloc_ignore_off_page,
7181 GC_debug_malloc_atomic_ignore_off_page,
7182 GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
7183 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
7184 GC_gcj_malloc_ignore_off_page): Likewise.
7185 * include/gc.h (GC_malloc, GC_malloc_atomic,
7186 GC_malloc_uncollectable, GC_malloc_stubborn,
7187 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
7188 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
7189 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
7190 GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
7191 GC_debug_malloc_atomic_ignore_off_page,
7192 GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
7193 (for the first argument).
7194 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
7195 GC_gcj_malloc_ignore_off_page): Likewise.
7196 * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
7197 GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
7198 (for the second argument).
7199 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
7200 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
7201 GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
7202 GC_realloc, GC_expand_hp, GC_set_max_heap_size,
7203 GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
7204 GC_register_displacement, GC_debug_register_displacement,
7205 GC_try_to_collect, GC_malloc_ignore_off_page,
7206 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
7207 GC_debug_malloc_atomic, GC_debug_strdup,
7208 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
7209 GC_debug_malloc_ignore_off_page,
7210 GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
7211 GC_debug_realloc, GC_debug_malloc_replacement,
7212 GC_debug_realloc_replacement, GC_finalization_proc,
7213 GC_register_finalizer, GC_debug_register_finalizer,
7214 GC_register_finalizer_ignore_self,
7215 GC_debug_register_finalizer_ignore_self,
7216 GC_register_finalizer_no_order,
7217 GC_debug_register_finalizer_no_order,
7218 GC_register_finalizer_unreachable,
7219 GC_debug_register_finalizer_unreachable,
7220 GC_register_disappearing_link,
7221 GC_general_register_disappearing_link,
7222 GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
7223 GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
7224 GC_call_with_alloc_lock, GC_stack_base_func,
7225 GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
7226 GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
7227 GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
7228 GC_malloc_many, GC_CreateThread, GC_beginthreadex,
7229 GC_endthreadex): Comment out (or remove if single and meaningless)
7230 function argument names (to avoid identifiers out of the name
7231 space).
7232 * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
7233 GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
7234 * include/gc.h (GC_try_to_collect): Update the comment.
7235 * include/gc.h (GC_size, GC_register_my_thread): Add const
7236 qualifier for the argument referent.
7237 * misc.c (GC_size): Likewise.
7238 * pthread_support.c (GC_register_my_thread_inner,
7239 GC_register_my_thread): Likewise.
7240 * win32_threads.c (GC_register_my_thread_inner,
7241 GC_register_my_thread): Likewise.
7242 * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
7243 (define instead of GC_INIT() for Cygwin and AIX).
7244 * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
7245 GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
7246 GC_INITIAL_HEAP_SIZE): Recognize new macro.
7247 * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
7248 GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
7249 GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
7250 GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
7251 * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
7252 * include/gc_mark.h: Prefix GC_H with '_'.
7253 * include/gc_mark.h (GC_least_plausible_heap_addr,
7254 GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
7255 for the public variable declaration.
7256 * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
7257 GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
7258 * include/gc_pthread_redirects.h (GC_pthread_create,
7259 GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
7260 Use GC_API for the wrapper prototype.
7261 * include/gc_pthread_redirects.h (pthread_create, pthread_join,
7262 pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
7263 before redirecting.
7264 * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
7265 GC_incr_bytes_freed(); remove FIXME.
7266 * include/private/gc_priv.h (GC_make_closure,
7267 GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
7268 function.
7269 * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
7270 the target.
7271 7272 * finalize.c (GC_general_register_disappearing_link,
7273 GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
7274 guard for LOCK/UNLOCK().
7275 * finalize.c (GC_general_register_disappearing_link,
7276 GC_register_finalizer_inner): Get GC_oom_fn value before releasing
7277 the lock (to prevent data races).
7278 * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
7279 GC_gcj_malloc_ignore_off_page): Likewise.
7280 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
7281 * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
7282 instead of GC_oom_fn (to prevent data races).
7283 * malloc.c (GC_generic_malloc): Likewise.
7284 * mallocx.c (GC_memalign): Likewise.
7285 * pthread_support.c (pthread_create): Likewise.
7286 * gcj_mlc.c (maybe_finalize): Acquire the lock before setting
7287 last_finalized_no value to prevent data races.
7288 * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
7289 GC_set_find_leak, GC_set_finalize_on_demand,
7290 GC_set_java_finalization, GC_set_finalizer_notifier,
7291 GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
7292 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
7293 GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
7294 the comment.
7295 * misc.c (GC_set_oom_fn): Likewise.
7296 * include/gc.h (GC_general_register_disappearing_link): Refine the
7297 comment (replace "soft" word with "weak").
7298 * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
7299 GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
7300 * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
7301 GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
7302 7303 * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
7304 "private/dbg_mlc.h" before it.
7305 * malloc.c: Likewise.
7306 * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
7307 for WinCE (since deprecated); evaluate strlen() only once; don't
7308 set errno for WinCE.
7309 * malloc.c (GC_strdup): Likewise.
7310 * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
7311 * include/gc.h (GC_unregister_my_thread): Refine the comment.
7312 * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
7313 Don't declare for WinCE.
7314 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
7315 * include/gc.h (GC_WinMain): Remove GC_API.
7316 * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
7317 lpCmdLine.
7318 * tests/test.c (GC_WinMain): Likewise.
7319 * win32_threads.c (main_thread_args, GC_WinMain): Likewise.
7320 * include/gc_config_macros.h (ptrdiff_t): Guard with
7321 ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
7322 * include/private/gc_locks.h: Guard include "atomic_ops.h" with
7323 ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
7324 * mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
7325 * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
7326 * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
7327 * include/private/gc_locks.h: Use include "atomic_ops.h" instead
7328 of include <atomic_ops.h>.
7329 * include/private/gc_priv.h: Likewise.
7330 * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
7331 Don't export (replace GC_API to "extern").
7332 * win32_threads.c (GC_allocate_ml): Don't export.
7333 * include/private/gc_priv.h (DebugBreak): Define as macro for
7334 WinCE (if not UNDER_CE and DebugBreak is not defined yet).
7335 * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
7336 (since "UNALIGNED" is defined in winnt.h of WinCE).
7337 * mark.c (UNALIGNED): Likewise.
7338 * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
7339 * include/private/gcconfig.h (ALIGNMENT): Check always defined.
7340 * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
7341 * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
7342 for WinCE (since __declspec(thread) is unsupported).
7343 * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
7344 Define for WinCE (if undefined).
7345 * malloc.c (GC_malloc): Remove outdated comment about disabling
7346 signals.
7347 * misc.c: Don't include <tchar.h> (since not used anymore and may
7348 break TEXT() macro defined in winnt.h).
7349 * misc.c (GC_init_inner): Don't use GetModuleHandle() and
7350 InitializeCriticalSectionAndSpinCount() for WinCE.
7351 * misc.c (GC_init_inner): Replace GetModuleHandleA() with
7352 GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
7353 * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
7354 * misc.c (GC_CreateLogFile): New static function (Win32/WinCE
7355 only); move the code from GC_write(); replace GETENV() with
7356 GetEnvironmentVariable(); replace CreateFileA() with
7357 CreateFile(); use TEXT() macro (for Unicode support); replace
7358 strcat() with memcpy() (since deprecated in WinCE).
7359 * misc.c (GC_write): Define as STATIC.
7360 * win32_threads.c (GC_attached_thread): Likewise.
7361 * misc.c (GC_write): Use GC_CreateLogFile().
7362 * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
7363 * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
7364 (Win32 only) if DONT_USE_USER32_DLL is defined.
7365 * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
7366 WinCE).
7367 * misc.c (GC_abort): Use a more user-friendly abort if
7368 NO_DEBUGGING (Win32 only).
7369 * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
7370 THREADS).
7371 * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
7372 (for Unicode support); check GetModuleHandle() result.
7373 * tests/test.c: Don't define assert for WinCE (since may be
7374 redefined by "assert.h" included from libatomic_ops).
7375 * tests/test.c (FAIL): Define as ABORT for all targets (except
7376 for PCR).
7377 * tests/test.c (n_tests): Don't use AO_t.
7378 * tests/test.c (check_heap_stats): Don't cast n_tests.
7379 * tests/test.c (inc_int_counter): New function (for n_tests atomic
7380 incrementation).
7381 * tests/test.c (run_one_test): Test GC_memalign() for all targets.
7382 * tests/test.c (run_one_test): Avoid unbalanced brackets in
7383 #if-#else-#endif blocks.
7384 * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
7385 private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
7386 * tests/test.c (check_heap_stats): Replace
7387 "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
7388 "unreachable code" compiler warning.
7389 * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
7390 "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
7391 * tests/test.c (thr_window): Replace "L" string prefix with
7392 TEXT().
7393 * thread_local_alloc.c: Check THREADS is defined (to prevent other
7394 compiler errors and warnings otherwise).
7395 * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
7396 GC_use_DllMain()).
7397 * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
7398 the comments for.
7399 * win32_threads.c (GC_register_my_thread_inner): Recognize
7400 DONT_IMPORT_GETCURTHREAD macro.
7401 * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
7402 DllMain support if needed).
7403 * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
7404 thread registration is unsupported for a given configuration.
7405 * win32_threads.c (GC_use_DllMain): Update the comment; refine
7406 ABORT message.
7407 * win32_threads.c (GC_use_DllMain,
7408 GC_started_thread_while_stopped, GC_register_my_thread_inner,
7409 GC_lookup_thread_inner, GC_delete_gc_thread,
7410 GC_allow_register_threads, GC_lookup_pthread,
7411 GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
7412 Check for GC_NO_DLLMAIN.
7413 * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
7414 DllMain): Don't define if GC_NO_DLLMAIN.
7415 * win32_threads.c (GC_stop_world): Declare "i" and "max" local
7416 variables only if not GC_NO_DLLMAIN (to suppress compiler
7417 warning).
7418 * win32_threads.c (GC_mark_thread, start_mark_threads): Use
7419 CreateThread() instead of _beginthreadex() for WinCE.
7420 * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
7421 New macros defined (used by start_mark_threads(), WinMain()).
7422 * win32_threads.c (GC_thr_init): Exclude parallel-specific code on
7423 WinCE for now (since getenv(), GetProcessAffinityMask() and
7424 SignalObjectAndWait() are missing on WinCE).
7425 * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
7426 GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
7427 TEXT() macro (for Unicode support).
7428 7429 * include/gc.h (GC_has_static_roots_func): New typedef (user filter
7430 callback).
7431 * include/gc.h (GC_register_has_static_roots_callback): Use
7432 GC_has_static_roots_func type.
7433 * dyn_load.c (GC_has_static_roots,
7434 GC_register_has_static_roots_callback): Likewise.
7435 * dyn_load.c (GC_has_static_roots,
7436 GC_register_has_static_roots_callback): Define on all platforms.
7437 * dyn_load.c (GC_register_dynlib_callback,
7438 GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
7439 functions definition with the ANSI C one.
7440 * dyn_load.c (GC_register_dynlib_callback): Use new local variable
7441 "callback" (initialized from GC_has_static_roots) to minimize data
7442 races.
7443 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
7444 GC_cond_add_roots): Define as STATIC.
7445 * mark_rts.c (GC_remove_roots_inner): Likewise.
7446 * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
7447 sections smaller than pointer size (just to avoid acquiring the
7448 lock unnecessarily).
7449 * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
7450 only for DARWIN_DEBUG).
7451 * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
7452 LOCK + GC_add_roots_inner() + UNLOCK.
7453 * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
7454 callback (if set) holding the lock; if it returns 0 then don't call
7455 GC_add_roots_inner() for that region.
7456 * dyn_load.c (GC_register_has_static_roots_callback): Put
7457 "callback" value to GC_has_static_roots on all platforms.
7458 * dyn_load.c (GC_has_static_roots): Update the comments.
7459 * include/gc.h (GC_exclude_static_roots, GC_add_roots,
7460 GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
7461 * include/private/gc_priv.h (struct roots): Likewise.
7462 * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
7463 to mark_rts.c and declare it as STATIC.
7464 * include/private/gc_priv.h (GC_exclude_static_roots_inner): New
7465 prototype.
7466 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
7467 GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
7468 * misc.c (GC_init_inner): Likewise.
7469 * mark_rts.c (GC_exclude_static_roots_inner): New function (move
7470 all the code from GC_exclude_static_roots(); add the comment.
7471 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
7472 add alignment assertion for the lower bound; add assertion for the
7473 lower bound to be less than the upper one.
7474 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
7475 the upper bound (round down to be of a pointer-aligned value);
7476 return in case of an empty range.
7477 * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
7478 GC_exclude_static_roots_inner().
7479 * mark_rts.c (GC_remove_roots): Quickly check the bounds and return
7480 in case of a do-nothing case (before acquiring the lock).
7481 7482 * finalize.c (GC_fail_count): New external variable declaration.
7483 * finalize.c (GC_reset_finalizer_nested,
7484 GC_check_finalizer_nested): New function declarations (if THREADS
7485 only).
7486 * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
7487 static global variables (used internally by GC_finalize() and
7488 GC_check_finalizer_nested()).
7489 * finalize.c (GC_check_finalizer_nested): New static function
7490 definition (only if not THREADS, used internally by
7491 GC_notify_or_invoke_finalizers() to minimize the probability of
7492 a deep recursion when a client finalizer tries to allocate GC
7493 memory).
7494 * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
7495 call GC_reset_finalizer_nested()) if last heap expansion failed.
7496 * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
7497 GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
7498 last_finalizer_notification variables holding the lock (to avoid
7499 data races).
7500 * finalize.c (GC_finalizer_notifier): Add comment.
7501 * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
7502 for an empty finalization queue (only if THREADS and not
7503 KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
7504 * finalize.c (GC_notify_or_invoke_finalizers): Call
7505 GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
7506 if appropriate.
7507 * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
7508 finalizer_nested and finalizer_skipped fields (for internal use
7509 by the multi-threaded GC_check_finalizer_nested()).
7510 * win32_threads.c (GC_Thread_Rep): Likewise.
7511 * pthread_support.c (GC_reset_finalizer_nested,
7512 GC_check_finalizer_nested): New function definitions (the
7513 multi-threaded variants of that in finalize.c).
7514 * win32_threads.c (GC_reset_finalizer_nested,
7515 GC_check_finalizer_nested): Likewise.
7516 7517 * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
7518 anymore and GCC produces a warning for it).
7519 * alloc.c (GC_stopped_mark): Adjust printf argument type
7520 specifier.
7521 * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
7522 the case when the configuration information comes from a config.h
7523 file).
7524 * checksums.c: Likewise.
7525 * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
7526 keyword instead of "unused".
7527 * include/gc_allocator.h: Fix typos in comments.
7528 * thread_local_alloc.c: Likewise.
7529 * include/javaxfc.h (GC_finalize_all): Update comment.
7530 * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
7531 GC_API and serves only as a marker for the private but exported
7532 symbols used by test.c only).
7533 * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
7534 GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
7535 GC_API_PRIV one.
7536 * include/private/gc_priv.h (GC_fo_entries): Don't export it
7537 outside a DLL.
7538 * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
7539 designated to check the arguments correctness of printf-like
7540 functions (currently works only for GCC v3+).
7541 * include/private/gc_priv.h (GC_printf, GC_err_printf,
7542 GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
7543 7544 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
7545 Define for FreeBSD 7.0+.
7546 7547 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
7548 7549 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
7550 comment.
7551 7552 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent
7553 free blocks have different mapping status. Correctly handle gap
7554 between blocks.
7555 (GC_split_block): Remove dead code setting hb_flags. Add comment.
7556 (GC_allochblk): Split blocks also in generational-only mode.
7557 * os_dep.c (GC_unmap_gap): Don't really use munmap.
7558 7559 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
7560 not USE_MUNMAP case.
7561 7562 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
7563 USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
7564 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
7565 PARALLEL_MARK, STATIC): Update the comments.
7566 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
7567 recognized (only if MPROTECT_VDB).
7568 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
7569 Add the comments for.
7570 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
7571 environment variable (only if MPROTECT_VDB, if the variable is
7572 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
7573 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
7574 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
7575 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
7576 the future).
7577 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
7578 space returned to OS (GC_unmapped_bytes).
7579 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
7580 comments.
7581 * misc.c (GC_get_unmapped_bytes): New API function.
7582 * include/gc.h (GC_get_unmapped_bytes): New API prototype.
7583 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
7584 "ifdef MSWIN32" one (for Cygwin).
7585 7586 * pthread_support.c (GC_allow_register_threads): New API function.
7587 * win32_threads.c (GC_allow_register_threads): Likewise.
7588 * include/gc.h (GC_allow_register_threads): New API prototype.
7589 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
7590 Update the comments.
7591 * pthread_support.c (GC_register_my_thread): Check the collector
7592 is in the multi-threaded mode.
7593 * win32_threads.c (GC_register_my_thread): Likewise.
7594 7595 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
7596 instead, following Ivan's original patch.
7597 7598 * allchblk.c (GC_allochblk_nth): Add assertion.
7599 * checksums.c: Add GC_record_fault, GC_was_faulted,
7600 CC_n_faulted_dirty_errors.
7601 (GC_check_dirty): Remove register declarations, print
7602 dirty bit errors on faulted pages.
7603 * os_dep.c (GC_write_fault_handler): Call GC_record_fault().
7604 * os_dep.c (GC_remove_protection): Compute index correctly.
7605 7606 7607 == [7.2alpha2] 2009-06-12 ==
7608 7609 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
7610 calls into a single one (for output atomicity).
7611 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
7612 GC_finalization_failures variable; check the result of
7613 GC_general_register_disappearing_link() (for lack of memory)
7614 instead.
7615 * finalize.c (GC_finalization_failures): Remove unused global
7616 variable.
7617 * finalize.c (GC_general_register_disappearing_link,
7618 GC_general_register_disappearing_link): Don't update the value of
7619 GC_finalization_failures (since unused).
7620 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
7621 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
7622 word type now (as FIXUP_POINTER requires numeric argument).
7623 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
7624 requires the first parameter of word type.
7625 * mark.c (PUSH_GRANULE): Likewise.
7626 * mark.c (GC_push_one, GC_push_all_eager): Likewise.
7627 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
7628 GC_finalizer_notifier directly, instead
7629 of GC_INVOKE_FINALIZERS() to prevent infinite looping.
7630 * include/javaxfc.h: Clarify GC_finalize_all comment.
7631 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
7632 after) for configuration information.
7633 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
7634 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
7635 variable for NULL before dereferencing it, return GC_oom_fn() in
7636 this case.
7637 * typd_mlc.c (GC_malloc_explicitly_typed,
7638 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
7639 suppress compiler warning (for uninitialized "lg" variable).
7640 7641 * win32_threads.c (GC_unregister_my_thread): add false assertion
7642 in unreachable code.
7643 7644 * pthread_support.c (GC_inner_start_routine): Don't release the
7645 GC lock between GC_register_my_thread_inner() and
7646 GC_init_thread_local() calls (post the "registered" even after
7647 calling GC_init_thread_local()).
7648 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
7649 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
7650 acquire the GC lock only once.
7651 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
7652 directly instead of GC_register_my_thread() since I_HOLD_LOCK
7653 and our (main) thread is not registered yet (add assertion for it).
7654 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
7655 directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
7656 * win32_threads.c (GC_lookup_thread): Remove unused function.
7657 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
7658 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
7659 also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
7660 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
7661 (for Cygwin).
7662 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
7663 (inside GC_ASSERT) to prevent compiler warning.
7664 * win32_threads.c (GC_push_all_stacks): Remove FIXME for
7665 PARALLEL_MARK.
7666 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
7667 to a place before GC_get_next_stack().
7668 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
7669 as in pthread_support.c).
7670 * win32_threads.c (marker_last_stack_min): New static arrays (the
7671 same semantics as for last_stack_min of GC_Thread_Rep).
7672 * win32_threads.c (GC_get_next_stack): Handle marker threads.
7673 * win32_threads.c (GC_mark_thread): Save the current stack pointer
7674 to marker_[b]sp.
7675 * win32_threads.c (start_mark_threads): Initialize
7676 marker_last_stack_min elements (to "unset" value).
7677 7678 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
7679 GC_set_finalize_on_demand, GC_set_java_finalization,
7680 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
7681 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
7682 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
7683 Change return type to void (these API functions no longer return
7684 the old value).
7685 * include/gc.h: Likewise.
7686 * tests/test.c (main, WinMain, test): Remove explicit cast to void
7687 for GC_set_warn_proc().
7688 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
7689 GC_get_finalize_on_demand, GC_get_java_finalization,
7690 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
7691 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
7692 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
7693 API functions (to get the current value of the corresponding R/W
7694 public variables).
7695 * include/gc.h: Likewise.
7696 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
7697 Update the comment.
7698 * misc.c (GC_ignore_warn_proc): New API call-back function.
7699 * include/gc.h (GC_ignore_warn_proc): Likewise.
7700 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
7701 GC_get_non_gc_bytes): New API setter and getter functions (for the
7702 public GC_find_leak and GC_non_gc_bytes variables, respectively).
7703 * include/gc.h: Likewise.
7704 * include/gc.h (GC_memalign): Add proto to GC API.
7705 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
7706 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
7707 remove GC_memalign() proto.
7708 * misc.c (GC_write): Use multi-byte (A) variants of Win32
7709 GetModuleFileName() and CreateFile().
7710 * tests/test.c (main): Replace K&R-style function definition with the
7711 ANSI C one.
7712 7713 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
7714 recognized (for Linux on ARM32 without glibc).
7715 * include/private/gcconfig.h (STRTOULL): Define for all targets
7716 (define as "strtoul" for most targets except for LLP64/Win64).
7717 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
7718 (cast the result to word type) to decode values of "GC_TRACE",
7719 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
7720 variables.
7721 7722 * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
7723 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
7724 7725 * win32_threads.c (GC_release_mark_lock): Correct misspelling of
7726 AO_load in assertion.
7727 7728 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
7729 is defined as FALSE (otherwise the size of dll_thread_table is near
7730 200 KiB for 32-bit).
7731 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
7732 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
7733 backing_store_ptr fields for IA64 support.
7734 * win32_threads.c (GC_register_my_thread_inner): Set
7735 backing_store_end field to reg_base value for IA64 (same as in
7736 pthread_support.c).
7737 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
7738 "right" places, remove ';'.
7739 * win32_threads.c (GC_fault_handler_lock): Declare only
7740 if MPROTECT_VDB (and not WinCE).
7741 * win32_threads.c (GC_suspend): Acquire and release
7742 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
7743 * win32_threads.c (GC_suspend): Define as STATIC.
7744 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
7745 (should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
7746 * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
7747 calls into a single one (for output atomicity).
7748 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
7749 before altering its last_stack_min ("thread" variable is added).
7750 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
7751 "s" is non-NULL.
7752 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
7753 if WinCE.
7754 * win32_threads.c (GC_get_next_stack): Pass current_min value to
7755 GC_get_stack_min as-is (without -1).
7756 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
7757 version of AO_fetch_and_sub1().
7758 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
7759 to pointer (and vice versa) thru word type to suppress warnings.
7760 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
7761 access atomically.
7762 * misc.c: Change GC_THREADS tests back to THREADS.
7763 7764 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
7765 a group of printf() calls into a single one (for output atomicity).
7766 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
7767 GC_set_time_limit): New prototypes.
7768 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
7769 GC_set_time_limit): New public setter/getter functions.
7770 * include/gc.h: Fix (and remove outdated) comments for thread-local
7771 allocation.
7772 * include/gc.h: Fix typos in comments.
7773 * misc.c (GC_init_inner, GC_printf): Likewise.
7774 * include/gc.h (GC_unregister_disappearing_link): Refine comment.
7775 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
7776 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
7777 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
7778 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
7779 GC_bytes_allocd_at_reset): Define as STATIC.
7780 * misc.c (GC_get_heap_size, GC_get_free_bytes,
7781 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
7782 avoid data races.
7783 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
7784 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
7785 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
7786 set the default initial value of initial_heap_sz.
7787 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
7788 * misc.c (GC_init_inner): Fix WARN() format specifier (should be
7789 word-compliant, "%p" is used w/o "0x").
7790 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
7791 environment variable if SMALL_CONFIG.
7792 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
7793 variable to set initial GC_full_freq value (if not SMALL_CONFIG).
7794 * doc/README.environment (GC_FULL_FREQUENCY): Add information.
7795 * doc/README.environment (GC_MARKERS): Refine information.
7796 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
7797 possible.
7798 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
7799 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
7800 * misc.c (GC_abort): Don't define if SMALL_CONFIG.
7801 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
7802 (to prevent possible infinite recursion).
7803 7804 * finalize.c (finalization_mark_proc): Replace K&R-style declaration
7805 with ANSI C one.
7806 * finalize.c (GC_grow_table, GC_register_finalizer_inner,
7807 GC_enqueue_all_finalizers): Remove outdated comments about disabling
7808 signals.
7809 * finalize.c (GC_general_register_disappearing_link): Fix assertion
7810 to catch NULL "obj" value.
7811 * finalize.c (GC_unregister_disappearing_link): Check "link"
7812 alignment before gaining the lock.
7813 * finalize.c (GC_finalize): Refine comment.
7814 * finalize.c (GC_finalize): Fix WARN() format specifier (should be
7815 word-compliant, "%p" is used w/o "0x").
7816 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
7817 variable (to 0) to suppress compiler warning.
7818 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
7819 * include/gc_gcj.h: add "extern C" header and tail.
7820 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
7821 GC_help_wanted, GC_helper_count, GC_active_count declarations (move
7822 the comments to the place where these symbols are defined in mark.c).
7823 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
7824 GC_mark_some_inner, if PARALLEL_MARK only).
7825 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
7826 GC_active_count, GC_do_parallel_mark): Define as STATIC.
7827 * pthread_support.c (GC_mark_thread): Likewise.
7828 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
7829 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
7830 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
7831 GC_arobjfreelist): Likewise.
7832 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
7833 for HBLKSIZE to GC_STATIC_ASSERT.
7834 * mark.c (GC_noop): Define for Borland C the same as for Watcom.
7835 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
7836 * pthread_support.c (GC_do_blocking_inner): Likewise.
7837 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
7838 switch branch to suppress compiler warning.
7839 * mark.c (GC_return_mark_stack): Append new-line to printf message.
7840 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
7841 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
7842 suppress compiler warning.
7843 * pthread_support.c (start_mark_threads): Move the code limiting
7844 "GC_markers" value (and printing a warning) to GC_thr_init().
7845 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
7846 if based on the number of CPUs.
7847 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
7848 values as one.
7849 * pthread_support.c (GC_register_my_thread_inner): Add a check for
7850 "stack_end" is non-NULL (the same as in win32_threads.c).
7851 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
7852 with ENOMEM.
7853 * thread_local_alloc.c (return_single_freelist): Convert "for" loop
7854 to "while" one to suppress "possible extraneous ';'" warning.
7855 7856 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
7857 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
7858 (Darwin only).
7859 * include/private/gcconfig.h: Add machine-specific part for DARWIN.
7860 * include/private/gcconfig.h (ARM32): Define config parameters for
7861 DARWIN (iPhone).
7862 7863 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
7864 GC_TIME_LIMIT): New macros (used to control the default initial
7865 values of GC_full_freq variable, GC_dont_expand,
7866 GC_free_space_divisor, GC_time_limit respectively).
7867 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
7868 with GC_TIME_LIMIT in alloc.c).
7869 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
7870 Define as STATIC.
7871 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
7872 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
7873 Move the prototypes to alloc.c, make STATIC.
7874 * include/private/gc_priv.h (GC_push_current_stack,
7875 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
7876 (move the comments to the places where these functions are defined).
7877 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
7878 as STATIC.
7879 * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
7880 GC_print_heap_sects): Convert a group of printf() calls into
7881 a single one (for output atomicity).
7882 * mark_rts.c (GC_print_static_roots): Likewise.
7883 * alloc.c (GC_stopped_mark): Output blank line (when logging) for
7884 convenience to delimit collections.
7885 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
7886 make "frames" local variable volatile (to prevent optimization).
7887 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
7888 GC_finish_collection, GC_allocobj): Remove outdated comments about
7889 disabling signals.
7890 * include/private/gc_priv.h (GC_register_displacement_inner,
7891 GC_gcollect_inner): Likewise.
7892 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
7893 GC_finish_collection): Initialize "start_time" local variable (to 0)
7894 to suppress compiler warning.
7895 * mark_rts.c (GC_add_roots_inner): Likewise.
7896 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
7897 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
7898 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
7899 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
7900 K&R-style function prototypes with ANSI C one.
7901 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
7902 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
7903 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
7904 macros.
7905 * include/private/gc_priv.h (GC_noop): Declare for Borland C the
7906 same as for Watcom.
7907 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
7908 7909 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
7910 outdated comment about disabling signals.
7911 * mallocx.c (GC_malloc_uncollectable,
7912 GC_malloc_atomic_uncollectable): Likewise.
7913 * os_dep.c: Likewise.
7914 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
7915 Add ARGSUSED tag.
7916 * pthread_stop_world.c (GC_suspend_handler,
7917 GC_suspend_handler_inner): Likewise.
7918 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
7919 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
7920 switch branch to suppress compiler warning.
7921 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
7922 * include/private/darwin_semaphore.h (sem_init): Likewise.
7923 * include/javaxfc.h: Replace "GC_H" with "_GC_H".
7924 * include/private/dbg_mlc.h (GC_has_other_debug_info,
7925 GC_store_debug_info): Replace K&R-style function prototypes with ANSI
7926 C one.
7927 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
7928 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
7929 * include/private/pthread_support.h (GC_stop_init): Likewise.
7930 * include/private/gcconfig.h: Refine comment about setting
7931 GC_stackbottom.
7932 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
7933 "right" places.
7934 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
7935 for "stack_end" field.
7936 * mallocx.c (GC_malloc_uncollectable,
7937 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
7938 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
7939 GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
7940 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
7941 format specifier (should be word-compliant, "%p" is used w/o "0x").
7942 * pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
7943 * os_dep.c (GC_dirty_init): Append new-line to printf messages.
7944 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
7945 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
7946 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
7947 as STATIC.
7948 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
7949 "thread_blocked" is not set for the current thread.
7950 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
7951 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
7952 suppress compiler warning.
7953 7954 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
7955 7956 * win32_threads.c: restructure parallel marking mutex initialization.
7957 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
7958 pthread_stop_world.c, pthread_support.c: Add runtime conditions
7959 on GC_parallel were appropriate.
7960 * pthread_support.c: Condition marker_bsp on ia64.
7961 (GC_segment_is_thread_stack): Fix loop upper bound.
7962 * reclaim.c: Limit some assertions to PARALLEL_MARK.
7963 * pthread_support.c: Don't acquire mark lock for thread-local
7964 allocation.
7965 * include/private/gc_priv.h: Don't define parallel mark sync
7966 support just for THREAD_LOCAL_ALLOC.
7967 7968 * include/private/gcconfig.h: refine MINGW32 test.
7969 * mark.c: Add win64/gcc tests.
7970 7971 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
7972 typed_test, run_one_test, check_heap_stats, main, test): Replace
7973 all K&R-style function definitions with ANSI C ones.
7974 * trace_test.c (main): Likewise.
7975 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
7976 THREAD_LOCAL_ALLOC.
7977 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
7978 or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
7979 * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
7980 local variables (to suppress "assigned value is never used"
7981 compiler warning).
7982 * test.c (tree_test): Use public GC_noop1() instead of private
7983 GC_noop().
7984 * test.c (typed_test): Likewise.
7985 * test.c (check_heap_stats): Define and assign value to
7986 "late_finalize_count" local variable only if its value is used
7987 (if FINALIZE_ON_DEMAND defined).
7988 * test.c (main): Remove DJGPP-specific initialization of
7989 GC_stackbottom (not needed anymore, handled in gcconfig.h).
7990 * trace_test.c: Guard #define GC_DEBUG with #ifndef.
7991 * trace_test.c: Include "gc_backptr.h".
7992 * trace_test.c (main): Call GC_INIT().
7993 * trace_test.c (main): Add "return 0" statement.
7994 7995 * dyn_load.c (GC_register_dynlib_callback): Use new index j
7996 instead of i in the inner loop.
7997 7998 * tests/test.c: Increment n_tests with fetch_and_add when possible,
7999 avoiding need to export lock.
8000 8001 * include/gc_pthread_redirects.h:
8002 - dlfcn.h is included for dlopen() proto before undefining
8003 "dlopen" (so, it's possible now to include dlfcn.h after
8004 gc.h from user code);
8005 - GC_dlopen() proto is added (except for Darwin as
8006 it's missing there);
8007 - "dlopen" is explicitly undefined (before its redefinition).
8008 * include/gc.h:
8009 - "process.h" is included besides "windows.h"
8010 (for _beginthreadex/_endthreadex); win32 only.
8011 - GC_NO_THREAD_DECLS is moved to the right place
8012 (before closing "extern C").
8013 * pthread_support.c: Fix out of memory handling for Thread_Reps.
8014 * win32_threads.c: Don't include process.h on winCE,
8015 improve out of memory handling for thread structures, don't
8016 define GC_beginthreadex and GC_endthreadex for winCE.
8017 8018 * tests/test.c: Change gcj vtable decriptor type from size_t to
8019 GC_word.
8020 8021 * gcj_mlc.c: Add comment.
8022 * tests/test.c: Change NTEST to NTHREADS. Fork 5 threads by default.
8023 Run reverse_test a second time in each thread.Add comments.
8024 Don't rely on AO_fetch_and_add.
8025 8026 * dyn_load.c (GC_register_dynlib_callback,
8027 GC_register_dynamic_libraries_dl_iterate_phdr): Add support
8028 for GNU_PT_RELRO relocations.
8029 8030 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
8031 by GC_SOLARIS_THREADS.
8032 * include/gc.h: Improve finalizer documentation.
8033 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
8034 * pthread_stop_world.c, Makefile.dj: Fix typos.
8035 8036 * win32_threads.c (GC_new_thread): Make first_thread
8037 visible to the whole file.
8038 (UNPROTECT): New macro.
8039 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect
8040 thread structures before writing.
8041 (GC_suspend): Acquire GC_fault_handler_lock before suspending
8042 thread.
8043 * os_dep.c: export GC_fault_handler_lock.
8044 (GC_remove_protection): Check if already unprotected.
8045 8046 * doc/README.win32: Add OpenWatcom warning.
8047 * include/private/gcconfig.h: Really check it in.
8048 8049 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
8050 code from gcc version.
8051 * os_dep.c: make gc compilable (optionally) for Cygwin with
8052 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
8053 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
8054 * mark.c (GC_noop): fix declaration definition mismatch for DMC.
8055 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
8056 Watcom (Win32 only). It works.
8057 8058 * mach_dep.c: Don't use __builtin_unwind_init for register
8059 state on PowerPC/Darwin.
8060 8061 * doc/gcdescr.html: Improve description of object freelist
8062 structure.
8063 * include/private/gc_priv.h: Fix comment for _size_map.
8064 8065 * os_dep.c (GC_linux_stack_base): Relax sanity test.
8066 8067 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
8068 MARK_BIT_PER_OBJ): Add missing backslash before eoln.
8069 8070 * misc.c (GC_set_warn_proc): Implicitly initialize GC on
8071 non-Cygwin win32.
8072 8073 * configure.ac: Enable thread-local allocation for sparc-linux.
8074 8075 * alloc.c (GC_try_to_collect): Remove duplicate initialization
8076 check.
8077 * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
8078 threaded warnings.
8079 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
8080 8081 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
8082 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
8083 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
8084 thread_local_alloc.c.
8085 * misc.c: Refine comment.
8086 8087 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently. Add FIXME
8088 comment.
8089 8090 * win32_threads.c (GC_push_stack_for): Yet another attempt
8091 at the stack_min finding logic. Try to clean up the existing code
8092 while minimizing VirtualQuery calls.
8093 (GC_win32_start_inner): Register thread before GC_printf.
8094 Produce more output with DEBUG_THREADS.
8095 *include/gc.h: Update obsolete comments.
8096 8097 * tests/test.c:
8098 (gcj_class_struct2): Use cast instead of l suffix.
8099 Cast GetLastError to int in various places.
8100 Avoid unused result warning from incr/decr macros.
8101 Add cast for fake_gcj_mark_proc.
8102 Cast GC_gc_no to unsigned in printf.
8103 8104 * include/gc.h: Fix two typos in comments.
8105 8106 * finalize.c: Fix typo in comment.
8107 8108 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
8109 with lock.
8110 8111 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
8112 if we are checking for leaks.
8113 8114 * win32_threads.c: Remove mark lock spinning.
8115 * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
8116 GC_spin_count, and GC_block_count using atomic operations.
8117 * tests/test.c: Declare n_tests as AO_t only if we have threads.
8118 8119 * win32_threads.c: Support PARALLEL_MARK. Make printf arg
8120 types agree with format specifiers.
8121 Add STATIC for GC_threads.
8122 * include/private/gcconfig.h: Add FIXME comment.
8123 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
8124 AO_fetch_and_add1_full. Declare n_tests as AO_t.
8125 (WinMain): Don't call GC_use_DllMain.
8126 with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
8127 8128 * alloc.c (GC_try_to_collect_inner): Don't print redundant
8129 GC_bytes_allocd and GC_gc_no.
8130 (GC_stopped_mark): Print average world stop time.
8131 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
8132 8133 * misc.c, doc/README.environment: Add support for
8134 GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
8135 * include/gc.h: Make GC_set_free_space_divisor correspond to
8136 (somewhat unfortunate) reality.
8137 8138 (Mostly improves LLP64 support.)
8139 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
8140 misc.c, reclaim.c: Changed some int and long type to word or size_t
8141 (and vice versa where appropriate)
8142 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
8143 include/private/thread_local_alloc.h, mark.c,
8144 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
8145 casts to word type when casting from int to pointer (or pointer
8146 to int, or data pointer to code pointer) - just to remove the
8147 corresponding compiler warning.
8148 * ptr_chck.c (GC_is_visible): cast int const to word type to
8149 prevent left shift overflow.
8150 * os_dep.c: change the type of GC_mem_top_down global variable
8151 (containing a flag) to DWORD.
8152 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
8153 is defined on SunOS/x64.
8154 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
8155 for VC++ 2008 x64 (v15.00.21022.08 for x64) compiler bug
8156 (the compiler gets hung if invoked with -Ox -D
8157 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
8158 * backgraph.c: cast GC_gc_no value to unsigned short when
8159 assigned/compared to height_gc_no field of back_edges.
8160 * os_dep.c (GC_remove_protection): Add ARGSUSED.
8161 * win32_threads.c (GC_thread_exit_proc): Remove unused local
8162 variable.
8163 * mark.c (GC_check_dirty): Move declaration out of func body.
8164 8165 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
8166 * include/gc.h (GC_register_my_thread): Improve comment.
8167 8168 * Makefile.direct: Add comment for -DCHECKSUMS.
8169 8170 * thread_local_alloc.c, include/private/thread_local_alloc.h:
8171 Fix typos in comments.
8172 * finalize.c: Declare mark_procs and GC_register_finalizer_inner
8173 STATIC.
8174 * malloc.c (GC_free): Move size calculation below assertion.
8175 8176 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
8177 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
8178 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
8179 8180 * finalize.c (GC_general_register_disappearing_link): Add
8181 assertion.
8182 * malloc.c (GC_generic_malloc): Round lb to granules, not words.
8183 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
8184 granules, not words.
8185 8186 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
8187 * configure.ac: Define mach_dep for sparc-linux.
8188 8189 * mark_rts.c (GC_approx_sp): Use volatile to avoid common
8190 warning.
8191 8192 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
8193 order.
8194 8195 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
8196 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
8197 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
8198 include/javaxfc.h, include/private/gc_locks.h,
8199 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
8200 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
8201 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
8202 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
8203 * test.c: Remove some old K&R code.
8204 8205 * win32_threads.c (GC_may_be_in_stack): New. (GC_Thread_Rep):
8206 Add last_stack_min. (GC_push_stack_for): Use last_stack_min.
8207 (GC_get_next_stack): Add limit argument, use_last_stack_min.
8208 (GC_suspend): make stack_base assignment conditional.
8209 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to
8210 GC_get_next_stack.
8211 * configure_atomic_ops.sh: Remove.
8212 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
8213 Makefile.direct: Partially support build directories whose path
8214 name contains blanks.
8215 * Makefile.am: Support new files (build_atomic_ops.sh,
8216 build_atomic_ops.sh.cygwin)
8217 8218 * include/private/gc_locks.h, include/private/gc_pmark.h,
8219 include/private/gc_priv.h, include/private/gcconfig.h,
8220 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
8221 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
8222 Fix comments.
8223 8224 * pthread_support.c: Comment out LOCK_STATS.
8225 * include/gc.h: Fix comments.
8226 8227 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
8228 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
8229 * os_dep.c (GC_get_main_stack_base): Use alternate definition
8230 with USE_MMAP.
8231 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
8232 8233 * doc/README: Make it clearer when Makefile.direct is assumed.
8234 * cord/cord.am: install include/cord.h.
8235 8236 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
8237 Remove unused variables.
8238 * darwin_stop_world.c: Always declare GC_thr_init().
8239 * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
8240 SHORT_DBG_HDRS is defined.
8241 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
8242 mark, USE_MARK_BITS version): Refer to correct parameter name.
8243 8244 * finalize.c (GC_general_register_disappearing_link): Remove
8245 redundant code.
8246 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
8247 * os_dep.c: (GC_write_fault_handler): Remove remaining
8248 references to deleted variable "code". Remove redundant
8249 FREEBSD definitions.
8250 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
8251 defined for x86. (STATIC): Define as "static" with NO_DEBUGGING.
8252 8253 * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
8254 8255 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
8256 smashed string, (GC_debug_free_inner): Mark as free.
8257 * mallocx.c (GC_malloc_many): Always clear new block if
8258 GC_debugging_started.
8259 * reclaim.c: Move GC_debugging_started from
8260 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
8261 which is also called directly.
8262 * doc/README: Fix spelling error. Update license summary.
8263 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
8264 * tests/test.c: Don't define GC_DEBUG if already defined.
8265 8266 * doc/simple_example.html: update --enable-full-debug reference,
8267 Make HTML formatting standards compliant.
8268 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
8269 * doc/gcinterface.html: specify encoding.
8270 8271 * doc/simple_example.html: Update thread-local allocation
8272 description.
8273 8274 * configure.ac: Check for gc-debug earlier; replace remaining
8275 full-debug tests.
8276 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
8277 Use signed offset type. Use ptr_t internally.
8278 * doc/gcinterface.html: Update LOCAL_MALLOC description.
8279 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
8280 Fix full-debug reference.
8281 * include/gc.h: Rewrite GC_..._INCR and friends.
8282 * tests/test.c: Minimally test GC_..._INCR and friends.
8283 8284 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
8285 GC_push_next_marked_uncollectable): Never invoke GC_push_marked
8286 on free hblk.
8287 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
8288 (GC_header_cache_miss): Always blacklist pointers for free
8289 hblks. Add assertion and comment.
8290 * pthread_support.c (GC_register_my_thread): Fix #if indentation.
8291 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
8292 Delete it.
8293 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
8294 8295 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
8296 8297 * configure.ac: Set win32_threads on MinGW.
8298 8299 Ivan's description of the patch follows. Note that a few pieces like
8300 the GC_malloc(0) patch, were not applied since an alternate had been
8301 previously applied. A few differed stylistically from the rest of
8302 the code (mostly casts to void * instead of target type),
8303 or were classified as too minor to bother. Note that
8304 all of Ivan's static declarations which did not correct outright
8305 naming bugs (as a few did), where replaced by STATIC, which is
8306 ignored by default.
8307 8308 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
8309 GC_malloc(0));
8310 - addition of missing getter/setter functions for public variables
8311 (may be useful if compiled as Win32 DLL);
8312 - addition of missing GC_API for some exported functions;
8313 - addition of missing "static" declarator for internal functions
8314 and variables (where possible);
8315 - replacement of all remaining K&R-style definitions with ANSI
8316 C ones (__STDC__ macro is not used anymore);
8317 - addition of some Win32 macro definitions (that may be missing in
8318 the standard headers supplied with a compiler) for GWW_VDB mode;
8319 - elimination of most compiler warnings (except for
8320 "uninitialized data" warning);
8321 - several typos correction;
8322 - missing parenthesis addition in macros in some header files of
8323 "libatomic_ops" module.
8324 8325 My highlights based on reading the patch:
8326 8327 * allchblk.c: Remove GC_freehblk_ptr decl.
8328 Make free_list_index_of() static.
8329 * include/gc.h: Use __int64 on Win64, define GC_oom_func,
8330 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
8331 add getter and setters: GC_get_gc_no, GC_get_parallel,
8332 GC_set_oom_fn, GC_set_finalize_on_demand,
8333 GC_set_java_finalization, GC_set_dont_expand,
8334 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
8335 GC_set_finalizer_notifier. Always define GC_win32_free_heap.
8336 gc_config_macros.h: Define _REENTRANT after processing
8337 GC_THREADS.
8338 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
8339 handling of operator new[] for old Windows compilers.
8340 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
8341 around arguments.
8342 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
8343 * mark.c (GC_mark_and_push_stack): Fix source argument for
8344 blacklist printing.
8345 * misc.c: Fix log file naming based on environment variable
8346 for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor
8347 just return current value with 0 argument. Add DONT_USE_USER32_DLL.
8348 Add various getters and setters as in gc.h.
8349 * os_dep.c: Remove no longer used GC_disable/enable_signals
8350 implementations. (GC_get_stack_base): Add pthread_attr_destroy
8351 call. No longer set GC_old_bus_handler in DARWIN workaround.
8352 * pthread_support.c: GC_register_my_thread must also
8353 call GC_init_thread_local.
8354 8355 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
8356 * mach_dep.c: Include signal.h.
8357 * gc_priv.h: Factor out INLINE declaration.
8358 8359 * include/private/gcconfig.h: Update MIPS/LINUX config.
8360 * doc/gcdescr.html: Fix typo.
8361 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
8362 for MIPS/LINUX.
8363 8364 * configure.ac: SPARC fixes.
8365 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
8366 size 0, except for gcj.
8367 * doc/gc.man: Expand C++ cautions.
8368 * include/gc_inline.h: Fix comments.
8369 8370 8371 == [7.1] 2008-05-03 ==
8372 8373 * doc/gcinterface.html: Improve C++ interface documentation.
8374 8375 * allchblk.c (GC_allochblk): Check for overflow during size
8376 rounding.
8377 * tests/huge_test.c: New.
8378 * Makefile.direct, tests/tests.am: Add huge_test.c
8379 8380 * pthread_support.c: Fix typo in comment.
8381 * os_dep.c (GC_win32_get_mem): Add heap section only if
8382 allocation succeeded.
8383 8384 * malloc.c: (free replacement) Fix caller address space check.
8385 8386 * finalize.c (GC_grow_table): Dereference table in null-check.
8387 8388 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
8389 Consistently call CloseHandle. (GC_suspend): Call
8390 GC_delete_gc_thread.
8391 * tests/test.c: Don't reference GC_print_stats if not exported.
8392 8393 * tests/test.c (run_one_test): Don't mention pthread_self().
8394 * misc.c: Declare GC_thr_init().
8395 8396 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
8397 and refine assertions to handle huge unmergeable blocks.
8398 (GC_allochblk_nth): Add comment.
8399 8400 * include/private/gcconfig.h: Add missing FREEBSD macro
8401 consistency test.
8402 8403 * allchblk.c (GC_enough_large_bytes_left): No longer take
8404 parameters; return free list index bound.
8405 (GC_merge_unmapped): Don't access nexthdr until after null test.
8406 (Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate
8407 when splitting is allowable only once here, not when considering each
8408 block. (GC_allochblk_nth): Accept new may_split parameter.
8409 Avoid some redundant tests for exact size matches.
8410 * alloc.c (GC_should_collect): Cache min_bytes_allocd.
8411 (GC_maybe_gc): Make locking assertion testable.
8412 * mark_rts.c: Fix indentation.
8413 * pthread_stop_world.c: Replace old GC_err_printf1 reference.
8414 * tests/test.c: Remove (void) casts. Optionally print some
8415 timing information.
8416 8417 * windows-untested/gc.def: Remove CreateThread line.
8418 * windows-untested/README: New file.
8419 * win32_threads.c (GC_use_DllMain): Force collector initialization.
8420 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
8421 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
8422 * include/gc_cpp.h: Add matching placement delete overloads
8423 everywhere.
8424 * include/private/gc_locks.h (NO_THREAD): Add cast.
8425 * include/private/gcconfig.h: Add test for __HP_aCC.
8426 * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX.
8427 8428 * doc/README.win32: Fix typo.
8429 * configure.ac: Fix printing of enable-shared result.
8430 8431 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when
8432 defined. (GC_call_with_stack_base): Add GC_API.
8433 * os_dep.c (GC_get_stack_base): Add GC_API.
8434 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
8435 Add GC_API.
8436 * include/gc.h: Add GC_API annotations.
8437 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
8438 PCR.
8439 * include/private/gc_pmark.h: Fix comments.
8440 8441 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
8442 Add GC_push_typed_structures() to push GC_ext_descriptors.
8443 8444 * tests/test.c: Call GC_INIT for DARWIN; test system type using
8445 gcconfig.h-defined macros.
8446 8447 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
8448 blocks large enough that their size, when interpreted as a signed
8449 value, would be negative.
8450 * include/private/gc_priv.h: Comment hb_sz range limit.
8451 8452 * mark.c (GC_push_next_marked): correct comment.
8453 * Makefile.direct: document NO_PROC_STAT.
8454 * include/private/gcconfig.h: Accommodate NO_PROC_STAT.
8455 8456 8457 == [7.1alpha2] 2008-01-10 ==
8458 8459 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
8460 again. Refer to build directory as ".".
8461 8462 * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
8463 * darwin_stop_world.c: Add FIXME comment for parallel marker.
8464 8465 * include/private/gc_priv.h: Update MAX_ROOT_SETS
8466 and LOG_PHT_ENTRIES to handle larger heaps.
8467 8468 * include/gc.h (GC_INIT,GC_init): Update comments.
8469 8470 * allchblk.c, alloc.c, include/private/gc_priv.h:
8471 Track GC_bytes_dropped and use in GC triggering decisions.
8472 * alloc.c (min_bytes_allocd): Weight atomic blocks less.
8473 8474 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
8475 adjusting p.
8476 8477 * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
8478 8479 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
8480 * alloc.c: Add declaration for GC_add_current_malloc_heap.
8481 * win32_threads.c (GC_beginthreadex): Clean up error
8482 return code.
8483 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
8484 Add NT_X64_THREADS_MAKEFILE.
8485 8486 * alloc.c: Define GC_version instead of in version.h.
8487 * version.h: Remove.
8488 * include/gc_version.h: Move most of version.h here.
8489 * include/gc.h: Include gc_version.h.
8490 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
8491 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
8492 Adjust for version.h rename.
8493 8494 * configure.ac: Put libatomic_ops links in build directory.
8495 * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
8496 as nodist sources.
8497 8498 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
8499 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
8500 8501 * alloc.c: Deal correctly with address wrapping for
8502 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
8503 * finalize.c, include/gc.h (GC_register_disappearing_link,
8504 GC_register_finalizer_inner): Improve out-of-memory handling.
8505 * include/private/gc_pmark.h: Fix comment spelling.
8506 8507 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
8508 in other contexts.
8509 8510 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
8511 8512 * gc_cpp.cc: Don't include gc_cpp.h from local directory.
8513 8514 * allchblk.c, configure.ac (add --enable-munmap)
8515 8516 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
8517 GC_GETSECTBYNAME instead.
8518 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
8519 architecture (Darwin).
8520 8521 * reclaim.c (GC_bytes_found): Expand comment.
8522 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
8523 granules, not bytes, to GC_FAST_MALLOC_GRANS.
8524 * include/gc.h: Never include gc_local_alloc.h.
8525 * tests/test.c: Add size zero allocation tests.
8526 8527 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
8528 * allchblk.c: Sanity check GC_max_large_allocd_bytes.
8529 8530 * Makefile.direct: Invoke $(MAKE) instead of make.
8531 8532 * doc/scale.html: Reflect gc7 thread local allocation behavior.
8533 8534 * include/extra/gc.h, include/extra/gc_cpp.h: New.
8535 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
8536 again.
8537 8538 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
8539 for HURD.
8540 8541 * include/private/gcconfig.h: Add Linux/mips-64 support.
8542 8543 * dbg_mlc.c: Use random() on all glibc systems.
8544 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
8545 HURD. Add comment.
8546 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
8547 systems without SA_SIGINFO.
8548 8549 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
8550 * tests/test.c (run_one_test): Add GC_PTR_STORE test.
8551 No longer test for RS6000.
8552 8553 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
8554 Maintain GC_our_memory and GC_n_memory.
8555 * dbg_mlc.c (GC_print_smashed_obj): Improve message.
8556 (GC_print_all_smashed_proc): Pass client object address instead of
8557 base.
8558 * dyn_load.c (sort_heap_sects): New. (GC_register_map_entries):
8559 Register sections that are contiguous and merged with our heap.
8560 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name
8561 of libraries.
8562 * malloc.c (calloc): Check for special callers even with
8563 USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary
8564 malloc/free tracing.
8565 * misc.c: No longer call GC_init_lib_bounds explicitly.
8566 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
8567 initialize on demand.
8568 * tests/test.c: Call GC_INIT only when required.
8569 8570 * Makefile.direct: Remove comment fragment.
8571 * tests/tests.am: Add smashtest.
8572 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
8573 * pthread_support.c: Fix comment spelling.
8574 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
8575 GC_LINUX_THREADS and REDIRECT_MALLOC.
8576 * tests/smash_test.c: Initial check-in.
8577 * obj_map.c: Print log entry to correct file.
8578 * include/private/thread_local_alloc.h: Add TlsAlloc error check.
8579 8580 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
8581 while world is still running.
8582 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
8583 with world stopped.
8584 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
8585 * misc.c (GC_init/GC_init_inner): Perform all work in
8586 GC_init_inner.
8587 * Makefile.direct: Expand -DUSE_MUNMAP comment.
8588 8589 * include/gc.h: Define uintptr_t explicitly for VC++6.
8590 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
8591 exist.
8592 8593 8594 == [7.0] 2007-07-02 ==
8595 8596 * include/gc_config_macros.h: Also check for IA64 when setting
8597 GC_HPUX_THREADS.
8598 * mallocx.c: Change my_bytes_allocd to signed_word.
8599 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads
8600 (as opposed to pthreads) support.
8601 8602 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
8603 on ARM/Linux. Check getcontext() return value.
8604 8605 * backgraph.c (per_object_func): Make argument types consistent.
8606 (GC_traverse_back_graph): Mark GC_deepest_obj.
8607 8608 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
8609 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
8610 8611 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst
8612 anachronisms.
8613 * dyn_load.c: Partially support cygwin, but don't enable it yet.
8614 8615 * Makefile.am: Use -no-undefined for libgc.
8616 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
8617 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
8618 consistently.
8619 * misc.c: Fix some WARN calls. Move GC_is_initialized setting and
8620 GC_thr_init() call.
8621 * os_dep.c: Consistently use WARN where appropriate.
8622 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
8623 remove inappropriate pthread.h include.
8624 * doc/README.linux: Remove some anachronisms.
8625 8626 * alloc.c: Also use GC_check_tls on non-Linux systems.
8627 * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
8628 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
8629 with prototype.
8630 8631 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
8632 (GC_print_heap_sects): Use size_t instead of unsigned long.
8633 * thread_local_alloc.c (GC_lookup_thread): Define in the correct
8634 context.
8635 * win32_threads.c, include/gc_config_macros.h: The last of Romano
8636 Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h.
8637 * include/gc_inline.h: Avoid gc_priv.h dependencies.
8638 * tests/test.c (check_heap_stats): Replace unsigned long with size_t.
8639 8640 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
8641 * mark_rts.c (GC_push_roots): Fix kind type.
8642 8643 * doc/README.win64: New file.
8644 * doc/doc.am, Makefile.direct: Add README.win64.
8645 8646 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
8647 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
8648 * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
8649 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
8650 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
8651 win32_threads.c, cord/de_win.c, include/gc_mark.h,
8652 include/private/gc_hdrs.h, include/private/gc_pmark.h,
8653 include/private/gc_priv.h, tests/test_cpp.cc:
8654 Replace old style function declarations. Clean up integral types.
8655 Remove register declarations. The change in malloc.c and the
8656 "int descr" declaration in mark.c are the most likely to have
8657 been real bugs outside of Win64.
8658 * msvc_dbg.c: Disable on Win64.
8659 * win32_threads.c: Add x64 support.
8660 * include/gc.h: no backtrace on x64 for now.
8661 8662 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
8663 8664 * include/gc.h: (GC_word, GC_signed_word): Fix Win64 definitions.
8665 Don't include windows.h in an extern "C" context.
8666 * include/private/gcconfig.h: Fix Win64 configuration.
8667 * tests/test.c: Eliminate more old style function definitions.
8668 Cleanup pointer and integer casts for Win64.
8669 * tests/test_cpp.cc: Don't include gc_priv.h.
8670 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
8671 * NT_X64_STATIC_THREADS_MAKEFILE: New.
8672 8673 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore
8674 FINISHED threads for suspension. (GC_pthread_join): Add
8675 pthread_self() cast. (GC_pthread_start_inner): Execute cleanup
8676 handler when popping it.
8677 * include/private/gc_locks.h: Inline THREAD_EQUAL for
8678 GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have
8679 pthreads.
8680 8681 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
8682 tests/test.c: Accommodate GC_WIN32_PTHREADS.
8683 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
8684 * include/gc_config_macros.h: Define both PTHREADS and
8685 GC_WIN32_THREADS.
8686 * include/private/gc_locks.h: Nonstandard definitions of
8687 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
8688 * doc/README.win32, Makefile.direct: Include documentation
8689 for GC_WIN32_PTHREADS.
8690 * Makefile.direct: Remove some anachronisms in the documentation.
8691 8692 * Makefile.am: Move includes to bottom. Add better library
8693 dependencies. Increment library version. Remove "SUBDIRS += .".
8694 * cord/cord.am, tests/tests.am: Add better library dependencies.
8695 Remove now unnecessary dependencies.
8696 * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
8697 Move to define on all Windows platforms. (_beginthread): define
8698 to generate error if used.
8699 8700 * include/private/gc_locks.h: Format to 80 columns.
8701 8702 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
8703 * NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars
8704 rc.
8705 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
8706 case.
8707 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
8708 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
8709 * include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API.
8710 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
8711 * tests/test.c: Add GC_reachable_here() call.
8712 8713 * alloc.c (GC_try_to_collect): Call GC_init if necessary.
8714 * tests/thread_leak_test.c: Don't unconditionally define
8715 GC_LINUX_THREADS.
8716 8717 * Makefile.am: Remove extra_ldflags_libgc definition.
8718 8719 * include/private/gc_priv.h: Define AO_REQUIRE_CAS.
8720 8721 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
8722 value.
8723 8724 8725 == [7.0alpha9] 2007-05-15 ==
8726 8727 * Some gc6.9 changes.
8728 * Change FindTopOfStack decl in darwin_stop_world.c.
8729 * Move some static tests from misc.c to gcconfig.h. Use #error.
8730 * Add GC_print_free_list() function (thanks to Bruce Hoult).
8731 * Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
8732 Barry DeFreese, and possibly other Debian maintainers).
8733 * __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
8734 Peter Wang).
8735 * Integrated various MacOSX patches and tried to reconcile them (thanks to
8736 Allan Hsu, several contributors at Apple, and probably others).
8737 * Added some casts to powerpc.h in libatomic_ops to silence warnings.
8738 8739 * Makefile.am: Include NT_STATIC_THREADS_MAKEFILE in dist.
8740 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
8741 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now
8742 unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
8743 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
8744 NUMERIC_THREAD_ID, THREAD_EQUAL.
8745 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
8746 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
8747 ARM.
8748 8749 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
8750 GC_debug_register_finalizer_unreachable() patch from gcc tree.
8751 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
8752 to check GC has been initialized.
8753 8754 * include/gc_cpp.h: Documentation updates.
8755 * include/gc_config_macros.h: Don't check for __ppc__ to set
8756 DARWIN_THREADS.
8757 * Makefile.am: Include configure_atomic_ops.sh in dist.
8758 8759 * Makefile.am: Don't distribute copied atomic_ops files. Include
8760 libatomic_ops with "make dist".
8761 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
8762 * win32_threads.c: Report error for Cygwin + GC_DLL.
8763 8764 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
8765 * cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove
8766 MakeProcInstance anachronism.
8767 * doc/README.macros: Officially remove elif prohibition.
8768 Remove documentation for defunct SRC_M3 support.
8769 * include/gc.h: Remove more SRC_M3 references.
8770 * include/private/gcconfig.h: Remove still more SRC_M3 references.
8771 GC_SOLARIS_THREADS no longer needs to be checked separately.
8772 8773 * thread_local_alloc.c, include/private/thread_local_alloc.h:
8774 Spell __declspec correctly.
8775 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
8776 8777 * doc/README.win32: Adjust GC_win32_dll_threads rules again.
8778 8779 * mark.c (GC_mark_some wrapper): Restructure for readability, handle
8780 GC_started_thread_while_stopped.
8781 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
8782 * win32_threads.c: (client_has_run): remove,
8783 GC_started_thread_while_stopped, GC_attached_thread: add.
8784 (GC_push_all_stacks): Add verbose output.
8785 (DllMain): Avoid initializing collector or the like.
8786 Never update both thread tables.
8787 * doc/README.win32: Adjust GC_win32_dll_threads rules.
8788 8789 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
8790 GC_PRINT_VERBOSE_STATS.
8791 8792 * configure.ac: Comment out redundant
8793 AC_DEFINE(NO_EXECUTE_PERMISSION).
8794 * sparc_mach_dep.S: Remove single quote in comment.
8795 * include/private/gcconfig.h: Fix DATAEND for NONSTOP.
8796 * win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain.
8797 (GC_use_DllMain): Fix assertion.
8798 8799 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
8800 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
8801 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
8802 targets. Remove comments.
8803 Prepare ppc64 support for Darwin.
8804 8805 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
8806 Make i unsigned.
8807 (GC_stop_world): Likewise. Remove unused GC_thread p.
8808 (GC_start_world): Likewise.
8809 8810 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
8811 Remove double SIG_HNDLR_PTR definition.
8812 (GC_forward_exception): Fix compiler warnings, make i unsigned.
8813 Initialize thread_state to NULL.
8814 (catch_exception_raise): Fix compiler warnings, make i unsigned.
8815 8816 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
8817 also define for X86_64.
8818 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
8819 * README.changes: Point to ChangeLog.
8820 8821 * darwin_stop_world.c: Move THREAD_FLD defines to ...
8822 * include/private/gc_priv.h: ... here.
8823 Fix THREAD_STATE definitions for ppc64.
8824 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
8825 access.
8826 8827 * configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
8828 HAS_X86_THREAD_STATE32_*.
8829 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
8830 HAS_X86_THREAD_STATE64_*.
8831 Added value 1 in the above AC_DEFINE's. Important for the upcoming
8832 Leopard.
8833 * include/private/gcconfig.h: Modified X86_64 define for Darwin.
8834 Removed __x86_64__ check in POWERPC section. Added base definitions
8835 for the X86_64 Darwin port.
8836 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
8837 to distinguish between 32 and 64-bit applications. Added definitions
8838 for X86_64 Darwin.
8839 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
8840 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
8841 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
8842 !DARWIN_DONT_PARSE_STACK. Maybe obsolete.
8843 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
8844 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
8845 Distinguish between getsectbynamefromheader_64 and
8846 getsectbynamefromheader.
8847 * os_dep.c (catch_exception_raise): Introduce exception definition for
8848 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
8849 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
8850 8851 8852 == [7.0alpha7] 2006-09-19 ==
8853 8854 * More 6.7 changes.
8855 * Declare GC_dump() in gc.h.
8856 * Add --enable-large-config, which just defines the LARGE_CONFIG macro.
8857 * Make GlobalAlloc address alignment a bit more intuitive (thanks to
8858 Charles Mills).
8859 * Use #elif in the definitions of GET_MEM.
8860 * Overhaul porting.html. Remove corresponding text from README.
8861 * Fix typo in DARWIN section of gcconfig.h.
8862 * Fix Darwin thread memory leak (thanks to Bruce Mitchener).
8863 * Update x86 AO_test_and_set implementation to use "=q".
8864 * Add $(EXEEXT) to many tests in tests/tests.am. (Corresponds to a
8865 6.7 fix, which no longer applied.)
8866 * Fix Darwin/PPC port.
8867 * Fix Cygwin/threads port.
8868 * Fix gcj malloc support.
8869 * For GNU-style make, don't build libatomic_ops unless threads are requested.
8870 This should allow single-threaded builds on platforms which do not
8871 currently support libatomic_ops.
8872 * Clean up and hopefully fix the CFLAGS calculation for GNU build.
8873 (Substantially improves things on HP/UX.)
8874 * Integrated Andrei Polushin's Visual C++ patches. These provide for
8875 stack traces, better C++ debug support, and better log file handling.
8876 Note that these change the location of the log file to a the path of the
8877 executable with a .log extension. To get the old behavior back, define
8878 OLD_WIN32_LOG_FILE. For the time being, I'm checking his project
8879 files and the like into a windows-untested subdirectory. They
8880 are almost certainly already out of date, but better than what we had
8881 before.
8882 * Fixed some win32 threads bugs, and added support for _beginthreadex.
8883 * Fix zero size thread local allocation so that explicit deallocation
8884 works correctly.
8885 * Removed serious bug in GC_malloc_uncollectable(large size).
8886 * Do not try to do thread-local gcj allocation in incremental mode. There
8887 are races in setting up the descriptor.
8888 * Add GC_INIT() to middle.c, fix some more GC_printfn calls.
8889 * Some assertions erroneously used I_HOLD_LOCK() negatively, even though
8890 it can now spuriously return TRUE.
8891 * Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
8892 * On Linux and some Un*x variants, allocate memory by first trying sbrk,
8893 and then switching to mmap if that fails.
8894 * Fixed /proc/x/maps reading to deal with asynchronous deletions.
8895 * Fix REDIRECT_MALLOC with threads on Linux. It now usually seems to work
8896 with ugly hacks that include having calloc behave differently when it is
8897 called from ld.so or the pthreads library. A reasonable amount of
8898 infrastructure was added to support some of this. (Thanks to Roland McGrath
8899 for ideas and information.)
8900 * Import various updated build scripts.
8901 * Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
8902 * Fix serious bugs in GC_malloc_atomic_uncollectable().
8903 * Return GC_SUCCESS form GC_get_stack_base().
8904 * Fix several atomic_ops problems on IA64 with HP Compiler.
8905 * Update to atomic_ops-1.2.
8906 * Fix hb_n_marks description and reclaim.c assertion.
8907 * Various additional win32 threads fixes.
8908 * Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
8909 8910 8911 == [7.0alpha5] 2005-09-29 ==
8912 8913 * More 6.6, 6.7 changes.
8914 * Some Solaris fixes, including some more general changes in how
8915 the assembly pieces of mach_dep.c are handled.
8916 * Removed a lot of SOLARIS_THREADS-specific code that was only
8917 needed with the old implementation. This included many (mostly no-op)
8918 versions of GC_is_fresh.
8919 * Don't use atomic_ops in gc_locks.h unless we need threads.
8920 * Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
8921 * Removed Solaris GC_INIT hack. It's a workaround for a long dead bug,
8922 and it seemed to be wrong anyway.
8923 * Changed win32_threads.c to require preprocessor-based interception
8924 of thread routines by default. A client call to GC_use_DllMain is
8925 now required to get the old behavior in which DllMain is used to implicitly
8926 register threads. This was done for uniformity with other platforms, and
8927 because the DllMain solution seemed to require very tricky code which,
8928 at least in the past, imposed hard bounds on the number of threads.
8929 * Many small changes to make thread support work again on Cygwin.
8930 * Moved definition of allocator lock etc. to pthread_support.c and
8931 win32_threads.c for those two cases.
8932 * Got rid of the FASTLOCK() machinery. It doesn't seem useful on modern
8933 platforms.
8934 * Cleaned up the uncollectible allocation routines, speeding up the
8935 slower paths. The code did enough unnecessary work off the critical path
8936 that the underlying logic was getting hard to extract.
8937 * No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL. Indications
8938 are it just works, and I think the reasons for it not working disappeared
8939 a while ago.
8940 * Fixed bugs in hb_n_marks calculation and assertion.
8941 * Don't use __builtin_expect for pre-3.0 gcc.
8942 * Define GWW_VDB only for recent Microsoft tool chains.
8943 * Add overview.html to doc directory.
8944 * Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
8945 * Made thread local allocation sort of work with Cygwin. The code should
8946 be there to deal with other Windows variants, But non-Cygwin Windows
8947 threads need more bug fixes.
8948 8949 8950 == [7.0alpha4] 2005-08-02 ==
8951 8952 * Various 6.5, 6.6 changes.
8953 * Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
8954 (thanks to Ben Maurer).
8955 * Integrated build patches from Davide Angelocola and Petter Urkedal.
8956 * Fix dynamic-linker-based pthread call redirection.
8957 * Renamed RS6000 to POWERPC/AIX.
8958 * Allow recovery from SIGSEGV in marker on Linux. This works around
8959 a race in thread stack marking if /proc is used to find roots. We do
8960 that by default with malloc redirection and threads. This involved
8961 moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
8962 * Added doc/porting.html file.
8963 * Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
8964 memory overwrite errors.
8965 * Added trivial NO_INCREMENTAL flag to facilitate debugging.
8966 * Added GC_getattr_np-based GC_get_stack_base (untested).
8967 * Separated thread local allocation into a separate file and added the
8968 beginning of win32 support for that.
8969 8970 8971 == [7.0alpha3] 2005-04-28 ==
8972 8973 * Added support for dlopen-based interception of pthread functions.
8974 This is only half done. The gc.h redefinitions currently interfere.
8975 * Integrated major automake overhaul from Petter Urkedal.
8976 8977 8978 == [7.0alpha2] 2005-04-07 ==
8979 8980 * GC_bytes_allocd was incremented by a possibly uninitialized variable
8981 in GC_generic_malloc_inner. (Bug introduced in gc7.0alpha1. Thanks
8982 to Ben Hutchings for tracking it down.)
8983 * Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
8984 * Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
8985 implementation for win32.
8986 * Removed pc_gc.tar and floppy targets in Makefile.direct. Removed
8987 pc_excludes file.
8988 * No longer include GC_bytes_wasted when evaluating allocation progress.
8989 Since we are now counting live memory, it no longer makes sense.
8990 * Applied Davide Angelocola's configure patch. There are now separate
8991 Makefile.am's in the cord and tests subdirectory, more tests, etc.
8992 * Renamed configure.in to configure.ac.
8993 * Merged a very small number of Nathanael Nerode's configure.ac
8994 cleanups from the gcc tree. Unfortunately, that file is a bit
8995 different from ours.
8996 * Changed EINTR handling in sem_wait slightly.
8997 * Restructure the root marking code. Remove all traces of
8998 USE_GENERIC_PUSH_REGS, and effectively make it the default.
8999 Make it easier to pass a context pointer to the mark routine, in
9000 case we ever want to do precise stack marking.
9001 * Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
9002 This remains undocumented, and only implemented for pthreads. But it
9003 removes an otherwise unavoidable race with stores of callee-save
9004 registers.
9005 * Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case. This
9006 resulted in bogus complaints in heap dumps.
9007 * Upgrade to libatomic_ops-1.0, and update build structure to match.
9008 * Remove SRC_M3 support. Clean up lock initialization code in misc.c.
9009 * Removed gc_local_alloc.h. If THREAD_LOCAL_ALLOC is defined, the
9010 thread local allocation routines are now called automatically.
9011 * Renamed gc_inl.h back to gc_inline.h. Changed the interface appreciably
9012 since locking has turned into a dominant issue, and in-line allocation
9013 only makes sense if it's no worse than thread-local allocation.
9014 Gc_inline.h is now also used to implement thread-local allocation.
9015 * Finished replacing stubborn allocation with manual write barrier.
9016 Untested.
9017 * Use thread-local allocation code by default.
9018 * Added GC_register_my_thread and friends for Posix and win32.
9019 * Patch for GWW_VDB from Ben Hutchings.
9020 * Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
9021 redefines GC_malloc.
9022 * Removed now unused AIX memory allocation code.
9023 * Various minor fixes for bugs introduced in 7.0alpha1.
9024 9025 9026 == [7.0alpha1] 2004-11-09 ==
9027 9028 * Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler
9029 and use ANSI constructs unconditionally.
9030 * Introduce #elif and #error in some of the appropriate places.
9031 * Remove GC_printf cruft. Use stdargs.
9032 * Remove separate Solaris threads support. Use the more generic Posix
9033 implementation.
9034 * Use atomic_ops for atomic operations and memory barriers.
9035 * Clean up MPROTECT_VDB implementation. Use SA_SIGINFO wherever
9036 possible.
9037 * Remove broken SIGNALS stuff.
9038 * Use size_t instead of word, where appropriate.
9039 * Add .S.o rule to Makefile.am.
9040 * Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
9041 A/UX, HP), IBM PC/RTs and RISCOS/Irix4. (I doubt the old code worked.
9042 If anyone cares, these should be easy to resurrect.)
9043 * Add EXPECT() in some critical places.
9044 * Redefined hb_sz and hb_body to deal with bytes rather than words.
9045 This affected a great deal of code. I would like to consistently use
9046 byte offsets and sizes where there's not a convincing reason to do
9047 otherwise.
9048 * Redefined several other variables (GC_mem_found, GC_words_allocd)
9049 etc. to use units of bytes. Most of these were also renamed to
9050 reflect that fact.
9051 * Killed as many "register" declarations as possible.
9052 * Partially replaced stubborn allocation with manual write barrier.
9053 It's currently broken.
9054 * Restructured mark code, to allow mark bits to be kept either on
9055 a per allocation granule or per object basis. The emphasis is
9056 now on the -DUSE_MARK_BYTES option, since individual bits perform
9057 quite badly on hyper-threaded P4s, and are probably suboptimal on
9058 other architectures. -DUSE_MARK_BITS is currently broken, and may
9059 be resurrected only for the single-threaded case. This significantly
9060 reduced the cache footprint required by auxiliary GC data structures.
9061 It also reduces space overhead for small heaps. It probably slows
9062 things down slightly if interior pointers are very common.
9063 * As part of the above, we now maintain an approximate count of set
9064 mark bits in each heap block.
9065 * As part of the above, the semantics of hb_map changed drastically.
9066 For MARK_BIT_PER_OBJ, it doesn't exist. For MARK_BIT_PER_GRANULE,
9067 it is purely a way to replace a mod instruction with a table lookup.
9068 (Somewhat to my surprise, this still wins on modern hardware.)
9069 * Removed PRINTSTATS, GATHERSTATS, and SILENT macros. Everything is
9070 now controlled by GC_print_stats variable and GC_PRINT_STATS
9071 and new GC_PRINT_VERBOSE_STATS environment variables.
9072 * Add GC_log_printf and use it consistently for logging output.
9073 * Unconditionally count the objects we reclaim in the sweep phase.
9074 For thread local allocation, we need that anyway, and we expect
9075 that's increasingly the only case that matters. And it simplifies
9076 the code. In general expect minor performance hacks that benefit
9077 only the single-threaded case to disappear.
9078 * Remove GC_quiet from gc.h and elsewhere.
9079 * Changed the heap expansion heuristic, and the definition of
9080 GC_free_space_divisor, to refer to live data size, instead of total
9081 heap size. I believe this is much more robust. It wasn't previously
9082 possible, because we didn't have access to live data size.
9083 * Thread local allocation added the extra byte in twice: Once in
9084 thread_local_alloc, and once in malloc_many.
9085 * Removed GC_malloc_words_small and GC_gcj_fast_malloc. A new
9086 mechanism based on the thread local allocation data structures
9087 is expected to be added instead. This should allow inlined code
9088 that is both fast and doesn't rely on collector internals.
9089 * Changed both free lists and reclaim lists to be indexed by granules
9090 instead of words, norming halving their size.
9091 * MERGE_SIZE is now the only option, and the macro was removed.
9092 (Without it, we need a memory reference to GC_all_interior_pointers
9093 anyway. Thus it costs us nothing.)
9094 * Change GC_size_map to map to granules instead of words. Make sure
9095 that every possible size up to TINY_FREELISTS is present.
9096 * Split of macros need for fast inline allocation into gc_tiny_fl.h
9097 in anticipation of a new inline allocator that doesn't rely on GC
9098 internals.
9099 * Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
9100 in anticipation of a merge with the inline allocation code.
9101 * Removed ALIGN_DOUBLE. This is mostly handled by GRANULE_BYTES.
9102 * Make locking on most platforms conditional on GC_need_to_lock.
9103 9104 9105 == [6.9] ==
9106 9107 * Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
9108 * Fix M68K LINUX port (thanks to Debian packagers).
9109 * __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
9110 * Integrated Allan Hsu's patch for OS X VM deallocation problems.
9111 * Applied FreeBSD/X86_64 patch.
9112 9113 9114 == [6.8] 2006-07-08 ==
9115 9116 * Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
9117 Thomas Klausner).
9118 * Improvements to the HP/UX section of configure.in/configure.ac (thanks
9119 to Andreas Tobler).
9120 * GC_unix_get_mem could neglect to release the malloc lock on Irix, under
9121 extremely unlikely circumstances. (Thanks to Jean-Baptiste Nivois for
9122 some careful code inspection.)
9123 * Added support for kFreeBSD + glibc (thanks to Petr Salinger).
9124 * Fix more MacOS threads memory leaks (thanks to Allan Hsu).
9125 * Added initial Solaris/x64 support (thanks to Rainer Orth).
9126 9127 9128 == [6.7] 2006-03-03 ==
9129 9130 * Add "int" to Solaris "end" and "etext" declaration in gc.h. Declared
9131 the symbols with underscores and as arrays, since that's what's actually
9132 used. Perhaps this could all just be removed. (Thanks to John Bowman.)
9133 * Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
9134 * Added casts for assignments to hb_last_reclaimed, which truncate the
9135 value. Added a cast to GC_adj_words_allocd. Use GetModuleHandleA
9136 when retrieving a handle to kernel32.dll under win32.
9137 * Added Tandem S-Series support. (Thanks to Craig McDaniel. A modified
9138 version of his patch was applied, and hence breakage is probably not
9139 his fault.)
9140 * Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
9141 to Hanno Boeck).
9142 * Changed a test for LINUX in config_macros.h to one for __linux__.
9143 * Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
9144 David Ayers).
9145 * Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
9146 (thanks to Andreas Tobler).
9147 * Add support for Darwin/x86 (thanks to Geoff Norton and the Mono
9148 developers).
9149 * Merge in some recent gcc fixes. Add ppc64 asm code. (Thanks to
9150 Bryce McKinlay and other GCJ developers.)
9151 * Scan MEM_PRIVATE sections under Windows ME and predecessors.
9152 * Interior pointers with some largish offsets into large objects could
9153 be ignored, if GC_all_interior_pointers was set. (Oddly this worked
9154 correctly for stack references if it was not set. Otherwise it failed
9155 for both stack and heap references. Thanks to Andrew McKinlay for the
9156 critical test case.)
9157 * Integrated Tatsuya Bizenn's NETBSD threads support, with some
9158 untested changes.
9159 * Added GC_strdup and friends to make leak detection work correctly
9160 for strdup clients (thanks to Jon Moore). Fixed the existing strdup
9161 with malloc redirection to handle a null malloc return correctly.
9162 9163 9164 == [6.6] 2005-09-09 ==
9165 9166 * Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
9167 * Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
9168 * Integrated Andreas Tobler's FreeBSD/PowerPC patch.
9169 * Don't access the GC thread structure from the restart handler. It's
9170 unsafe, since the handler may run too late. (Thanks to Ben Maurer for
9171 tracking this down.)
9172 * Applied Christian Thalinger's patch to change comment syntax in
9173 alpha_mach_dep.S.
9174 * Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
9175 Juan Jose Garcia-Ripoll).
9176 * Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
9177 Sugioka Toshinobu and Christian Thalinger).
9178 * Rewrote GC_parse_map_entry. This assumed a fixed column layout of
9179 /proc/self/maps on Linux. This ceased to be true about 2 years ago.
9180 The old code is probably quite problematic with -DREDIRECT_MALLOC. It
9181 is also used by default for IA64, though I haven't seen actual failures
9182 there.
9183 * More consistently define HBLKSIZE to 4096 on 64 bit architectures with
9184 4K pages (thanks to Andrew Haley).
9185 * With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
9186 to Ben Hutchings for the observation and patch).
9187 * Move up struct callinfo declaration to make gcc 4.0.2 happy.
9188 9189 9190 == [6.5] 2005-05-22 ==
9191 9192 * Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
9193 * Make GC_approx_sp() write to dummy location to ensure that stack
9194 is grown here, when sp looks reasonable, rather than later, when
9195 it might look like a bad memory reference. (Problem was never
9196 observed that I know of. But on rereading the code it seemed
9197 dubious.)
9198 * Separate out GC_with_callee_saves_pushed and sometimes call
9199 it from GC_suspend_handler in pthread_stop_world.c. Callee-save
9200 register values sometimes failed to get traced under HP/UX on
9201 PA-RISC. Linux/IA64 had the same problem, though non-stacked
9202 callee-save registers seem to be so rarely used there that nobody
9203 ever noticed.
9204 * Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
9205 from Andreas Tobler, which I had lost.
9206 * Fix compare_and_exchange implementation for gcc/IA64 to deal with
9207 pickier compiler versions.
9208 * Fixed Itanium 32-bit ABI support (HP/UX). In particular, the
9209 compare_and_exchange implementation didn't consider that possibility.
9210 * Undefine GC_pthread_detach in win32_threads.c (thanks to
9211 Tommaso Tagliapietra).
9212 * Fixed inclusion of frame.h for NETBSD in os_dep.c.
9213 * Applied Dan Bonachea's patch to use mmap on AIX.
9214 * Several fixes to resurrect the Irix port on recent OS versions.
9215 * Change ALPHA to use LINUX_STACKBOTTOM.
9216 * Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential
9217 bad values of __libc_stack_end on that platform (thanks to David Miller).
9218 * Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
9219 (Unnecessary in 7.0)
9220 * Force a define of __STDC__=0 for the IBM compiler on AIX, so that
9221 we get prototypes. (Unnecessary in 7.0)
9222 * GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
9223 which are only defined in private include files.
9224 * Integrated some small gcconfig.h patches from Dan Bonachea. Also
9225 relaxed assertion about FreeBSD stack size in pthread_support.c.
9226 * Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
9227 support. This may need additional work.
9228 * Avoided potentially infinite recursion in GC_save_callers if
9229 the system backtrace calls malloc. The workaround currently requires
9230 __thread support if this code is used with threads.
9231 * Avoided another similar infinite recursion by conditionally
9232 invoking GC_save_callers in alloc.c (thanks to Matthias Andree
9233 for helping to track down both of these).
9234 * Removed all traces of aix_irix_threads.c. AIX and Irix now use
9235 pthread_support.c and pthread_stop_world.c. The old code appeared
9236 to be unreliable for AIX, and was not regularly maintained.
9237 * On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
9238 they're not always safe to read.
9239 * Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
9240 in GC_remove_from_fl.
9241 * Fix stack_size assertion in GC_pthread_create.
9242 * Fix assertion in GC_steal_mark_stack.
9243 9244 9245 == [6.4] 2004-12-21 ==
9246 9247 * Merge gcconfig.h changes from gcc tree.
9248 * Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
9249 aix_irix_threads.c, and solaris_threads.c to get thread definitions.
9250 * Start marker threads in GC_thr_init, so that they get started even
9251 if no other threads are ever started. (Oddly enough, the parallel
9252 collector worked correctly, though not well, with no helper threads.)
9253 * Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
9254 is set (thanks to Alexander Petrossian).
9255 * GC_PRINT_BACK_HEIGHT would deadlock with thread support.
9256 * Let in_progress_space in backgraph.s grow dynamically.
9257 * Fix README.solaris2. The GC_thr_init() hack doesn't work anymore.
9258 * Convert GC_finalizer_mem_freed to bytes in allchblk.c.
9259 * Add missing declaration for GC_generic_malloc_words_small_inner.
9260 Without it, s390x breaks. (Thanks to Ulrich Weigand.)
9261 * Applied several MacOSX patches to support older tool chains (thanks
9262 to Stefan Ring).
9263 * Bug fix for NetBSD/x64 (thanks to Marc Recht).
9264 * Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
9265 * Fixed an uninitialized variable in cordprnt.c.
9266 * Eliminated some, but not all, gcc -Wall warnings.
9267 * Changed some old style casts to reinterpret_cast in new_gc_alloc.h
9268 (thanks to Dan Grayson).
9269 * GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
9270 GC_DONT_ADD_BYTE_AT_END is set.
9271 * Changed some (long) casts to (word) in preparation for Win64 (thanks
9272 to Peter Colson).
9273 * Changed "int stack_size" declaration in pthread_support.c to use
9274 size_t. (Only mattered with GC_ASSERTIONS enabled.)
9275 * Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
9276 * Removed GC_IGNORE_FB frame buffer recognition, and replaced
9277 it with a check that the mapping type is MEM_IMAGE.
9278 In theory, this should work much better, but it is a high
9279 risk change for win32. (Thanks to Ashley Bone for the crucial
9280 experimental data behind this, and to Rutger Ovidius for
9281 some further experiments.)
9282 * GC_allochblk_nth incremented GC_words_wasted by bytes rather than
9283 words.
9284 * Consider GC_words_wasted in GC_adj_words_allocd only if it is within
9285 reason. (A hack to avoid some extremely unlikely scenarios in which
9286 we manage to allocate only "wasted" space. 7.0 has a better fix.)
9287 * Changed PowerPC GC_clear implementation to use lwsync instead of
9288 eieio, since the documentation recommends against eieio, and
9289 it seems to be incorrect if the preceding memory op is a load.
9290 * Fixed print_block_list to print the correct kind number for
9291 STUBBORN (thanks to Rutger Ovidius).
9292 * Have configure.in generate an error if it is asked to support
9293 pthreads, but doesn't know how to.
9294 * Added Kazuhiro Inaoka's patch for Renesas M32R support.
9295 * Have the GNU build mechanism link with -ldl. Rename THREADLIBS
9296 to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.)
9297 * Added Hannes Mehnert's patch for FreeBSD/SPARC support.
9298 * Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
9299 (Thanks to John Merryweather Cooper.)
9300 * Define MPROTECT_VDB on MACOSX only if threads are being used, since the
9301 dirty page tracking mechanism uses threads. (This avoids an undefined
9302 reference to _GC_darwin_register_mach_handler_thread.)
9303 * By popular demand, use __libc symbols only if we are built with
9304 USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
9305 * Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
9306 The GC itself will dirty lots of pages in this cases, probably making
9307 it counterproductive on all platforms. And the DARWIN port crashes.
9308 9309 9310 == [6.3] 2004-07-08 ==
9311 9312 * Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
9313 * Very large allocations could cause a collector hang. Correct
9314 calculation of GC_collect_at_heapsize.
9315 * GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
9316 was defined.
9317 * Include gc_config_macros.h in threadlibs.c.
9318 * Correct MacOSX thread stop code (thanks to Dick Porter).
9319 * SMALL_OBJ definition was off by one. This could cause crashes
9320 at startup. (Thanks to Zoltan Varga for narrowing this down to
9321 a trivial test case.)
9322 * Integrate Paolo Molaro's patch to deal with a race in the Darwin
9323 thread stopping code.
9324 * Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
9325 implementation. The old approach appears to have been broken by
9326 recent kernels.
9327 * Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
9328 to Andrew Begel).
9329 * Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
9330 * Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
9331 9332 9333 == [6.3alpha6] 2004-05-06 ==
9334 9335 * Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
9336 * Fixed the x64 PREFETCH macros to correctly handle ia32e (which uses
9337 different prefetch instructions on x64). (Thanks to H.J. Lu.)
9338 * GC_config_macros.h did not correctly define GC_WIN32_THREADS from
9339 GC_THREADS.
9340 * Added simple_example.html.
9341 * Merged Andrew Gray's patch to correctly restore signal handlers on
9342 FreeBSD.
9343 * Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
9344 on x86-64. Added some other casts so that the PREFETCH macros
9345 always get a ptr_t argument. Removed some casts in the PREFETCH
9346 implementations.
9347 * Added a header guard for gc_allocator.h and changed GC_debug_free to
9348 clobber contents of deallocated object (suggested by Jesse Jones).
9349 * The signal masking code in pthread_stop_world.c contained some errors.
9350 In particular SIGSEGV was masked in the handler, in spite of the fact that
9351 it wrote to the heap. This could lead to an uncaught SIGSEGV, which
9352 apparently became much more likely in Linux 2.6. Also fixed some
9353 typos, and reduced code duplication in the same area.
9354 * Remove ltconfig, clean up configure messages for DG/UX (thanks to
9355 Adrian Bunk for the patches).
9356 * Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
9357 9358 9359 == [6.3alpha5] 2004-03-30 ==
9360 9361 * Fix & vs && typo in GC_generic_malloc and
9362 GC_generic_malloc_ignore_off_page. (Propagated from the gcc tree.)
9363 * Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
9364 (According to Christian Limpach, the NetBSD problem is fixed.
9365 Presumably so is the Solaris 2.3 problem.)
9366 * Removed placement delete from gc_cpp.h for the SGI compiler (thanks
9367 to Simon Gornall for the patch).
9368 * Changed semantics of the GC_IGNORE_FB environment variable, based
9369 on experimentation by Nicolas Cannasse pointing out that the old
9370 interpretation was useless. We still need help in identifying win32
9371 graphics memory mappings. The current "solution" is a hack.
9372 * Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
9373 It probably made more sense in the gcc context.
9374 * Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
9375 * Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
9376 supports the same extension on various platforms.
9377 * Added some basic (completely untested) defines for Win64, in support
9378 of future work.
9379 * Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
9380 a memory overwrite bug on Solaris and perhaps other platforms.
9381 * Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
9382 Jakub Jelinek for the patch and explaining the problem).
9383 Otherwise pre-linking could cause the collector to fail.
9384 * Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
9385 for HP/UX with gcc. The compiler-based implementation appears to work
9386 only with the vendor compiler.
9387 * Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
9388 making client mark code cleaner and less dependent on GC version.
9389 * Export several new procedures and GC_generic_malloc from gc_mark.h
9390 to support user-defined kinds. Use the new procedures to replace existing
9391 code in gcj_mlc.c and typd_mlc.c.
9392 * Added support for GC_BACKTRACES.
9393 * Fixed a remaining problem in CORD_str with signed characters (thanks
9394 to Alexandr Petrosian for the patch).
9395 * Removed supposedly redundant, but very buggy, definitions of finalizer
9396 macros from javaxfc.h. Fortunately this file probably has no users.
9397 The correct declarations were already in gc.h.
9398 * Also need to set GC_in_thread_creation while waiting for GC during
9399 thread termination, since it is also possible to collect from an
9400 unregistered thread in that case.
9401 * Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
9402 Plus some other minor WinCE fixes (thanks to Alain Novak).
9403 * Added GC_register_describe_type_fn.
9404 * Arrange for debugging finalizer registration to ignore non-heap
9405 registrations, since the regular version of the routine also behaves
9406 that way.
9407 * GC_gcj_malloc and friends need to check for finalizers waiting to be run.
9408 One of the more obscure allocation routines with missing a LOCK() call.
9409 * Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
9410 to work with VS.NET.
9411 * Cleaned up GC_INIT calls in test. Updated gc.man to encourage GC_INIT
9412 use in portable code.
9413 * Taught the GC to use libunwind if --enable-full-debug is specified on
9414 IA64 and libunwind is present.
9415 * The USE_MUNMAP code could get confused about the age of a block and
9416 prematurely unmap it. GC_unmap_old had a bug related to wrapping of
9417 GC_gc_no. GC_freehblk and GC_merge_unmapped didn't maintain
9418 hb_last_reclaimed reasonably when blocks were merged. The code was
9419 fixed to reflect original intent, but that may not always be an
9420 improvement.
9421 9422 9423 == [6.3alpha4] 2004-01-01 ==
9424 9425 * USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
9426 * Darwin support was broken in alpha3 as a result of my mis-integration of
9427 Andrew Begel's patches. Fixed with another patch from Andrew Begel.
9428 * A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
9429 overly aggressive. We may collect from an unregistered thread during
9430 thread creation. Fixed by explicitly checking for that case. (Added
9431 GC_in_thread_creation.)
9432 9433 9434 == [6.3alpha3] 2003-12-20 ==
9435 9436 * Removed -DSMALL_CONFIG from BCC_MAKEFILE.
9437 * Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
9438 * Mostly applied a DJGPP patch from Doug Kaufman. Especially Makefile.dj
9439 had suffered from serious bit rot.
9440 * Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
9441 and a call to alloca (for lcc compatibility).
9442 * Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
9443 the memory with PROT_NONE instead of unmapping it. The latter risks
9444 an intervening mmap grabbing the address space out from underneath us.
9445 Updated this code to reflect a cleaner patch from Ulrich Drepper.
9446 * Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
9447 (Patch from Andrew Begel.)
9448 * Dynamically choose whether or not lock should spin on win32 (thanks
9449 to Maurizio Vairani for the patch). This may be a significant performance
9450 improvement for win32.
9451 * Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
9452 in the distribution (thanks to Maurizio Vairani).
9453 * Maybe_install_looping_handler() was accidentally exported, violating
9454 our name space convention.
9455 * Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD. (Thanks to
9456 Christian Limpach. I generalized the patch to use sigsetjmp on all
9457 UNIX_LIKE platforms, admittedly a slightly risky move. But it may avoid
9458 similar problems on some other platforms. I also cleaned up the definition
9459 of UNIX_LIKE a bit.)
9460 * Integrated Andrew Begel's Darwin threads patch, adjusted according to
9461 some of Fergus Hendersons's comments. (Patch didn't apply cleanly,
9462 errors are possible.)
9463 * Added another test or two for the Intel 8.0 compiler to avoid
9464 confusing it with gcc. The single-threaded collector should now build
9465 with icc, at least on ia64.
9466 9467 9468 == [6.3alpha2] 2003-11-04 ==
9469 9470 * Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
9471 * Put back the WINABI qualifier for GC_CreateThread. (Thanks to
9472 Danny Smith for the patch. 6.3alpha1 had the qualifier in one place
9473 but not elsewhere, which was clearly wrong.)
9474 * Sometimes explicitly define __private_extern__ before DARWIN dyld.h
9475 include. (Thanks to Andreas Tobler for posting the patch.)
9476 * Included signal.h from pthread_support.c. Removed GC_looping_handler,
9477 which was dead code.
9478 * GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
9479 defined (thanks to Glauco Masotti for testing and reporting this).
9480 Changed GC_find_start to never just return 0. According to its
9481 comment it doesn't, and it's unclear that's correct.
9482 * GC_alloc_large had several largely compensating bugs in the
9483 computation of GC_words_wasted. (It was confused about bytes vs.
9484 words in two places.)
9485 * Integrated Slava Sysoltsev's patch to support more recent versions of
9486 the Intel compiler on IA64/Linux.
9487 * Changed win32 spinlock initialization to conditionally set a spin count.
9488 (Emmanual Stumpf pointed out that enabling this makes a large performance
9489 difference on win32 multiprocessors.) Also cleaned up the win32 spinlock
9490 initialization code a bit.
9491 * Fixed thread support for HP/UX/IA64. The register backing store base for
9492 the main thread was sometimes not set correctly. (Thanks to
9493 Laurent Morichetti.)
9494 * Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
9495 * Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
9496 avoid 64-bit size mismatches (thanks to Bernie Solomon).
9497 * Fixed GC_generic_push_regs to avoid a potential and very unfortunate
9498 tail call optimization. This could lead to prematurely reclaimed
9499 objects on configurations that used the generic routine and the new
9500 build infrastructure (which potentially optimizes mach_dep.c).
9501 This was a serious bug, but it's unclear whether it has resulted in
9502 any real failures.
9503 * Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
9504 for noticing the problem and supplying the patch).
9505 * Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
9506 to Anthony Green).
9507 * Partially merged a win32 patch from Ben Hutchings, and substantially
9508 revised other parts of win32_threads.c. It had several problems.
9509 Under MinGW with a statically linked library, the main thread was
9510 not registered. Cygwin detached threads leaked thread descriptors.
9511 There were several race conditions. For now, unfortunately the
9512 static threads limit remains, though we increased it, and made table
9513 traversal cost depend on the actual thread count.
9514 There is also still some code duplication with pthread_support.c.
9515 (Thread descriptors did become much smaller, since Ben Hutchings
9516 removed the thread context from them.)
9517 * Integrated a Solaris configure.in patch from Rainer Orth.
9518 * Added GC_IGNORE_FB and associated warning to very partially address
9519 the issue of the collector treating a mapped frame buffer as part
9520 of the root set. (Thanks to David Peroutka for providing some
9521 insight. More would be helpful. Is there anything that can be used
9522 to at least partially identify such memory segments?)
9523 9524 9525 == [6.3alpha1] 2003-07-26 ==
9526 9527 * Integrated some NetBSD patches by Marc Recht. These
9528 were already in the NetBSD package.
9529 * GC_pthread_create waited for the semaphore even if pthread_create failed.
9530 (Thanks to Dick Porter for the pthread_support.c patch.) Applied the
9531 analogous fix for aix_irix_threads.c.
9532 * Added Rainer Orth's Tru64 fixes.
9533 * The check for exceeding the thread table size in win32 threadDetach
9534 was incorrect (thanks to Alexandr Petrosian for the patch).
9535 * Applied Andrew Begel's patch to correct some reentrancy issues
9536 with dynamic loading on Darwin.
9537 * GC_CreateThread() was neglecting to duplicate the thread handle in
9538 the table (thanks to Tum Nguyen for the patch).
9539 * Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
9540 Roger Sayle for the patch).
9541 * Applied more AIX threads patches from Scott Ananian.
9542 9543 9544 == [6.2] 2003-06-21 ==
9545 9546 * Integrated a second round of Irix/AIX patches from Dan Bonachea.
9547 Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
9548 the Irix assembler to do the C preprocessing; gcc -E doesn't work.
9549 * Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
9550 * There was a race between GC_pthread_detach and thread exit that could
9551 result in a thread structure being deallocated by GC_pthread_detach
9552 even though it was still needed by the thread exit code (thanks to
9553 Dick Porter for the small test case that allowed this to be debugged).
9554 * Fixed version parsing for non-alpha versions in acinclude.m4 and
9555 version checking in version.h.
9556 * Issues identified (not yet fixed):
9557 - A dynamic libgc.so references dlopen unconditionally, but doesn't link
9558 against libdl.
9559 - GC_proc_fd for Solaris is not correctly updated in response to a
9560 fork() call. Thus incremental collection in the child won't work
9561 correctly. (Thanks to Ben Cottrell for pointing this out.)
9562 - --enable-redirect-malloc is mostly untested and known not to work
9563 on some platforms.
9564 - There seem to be outstanding issues on Solaris/x86, possibly with
9565 finding the data segment starting address.
9566 - Very large root set sizes (> 16 MB or so) could cause the collector
9567 to abort with an unexpected mark stack overflow. (Thanks to
9568 Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial
9569 size.
9570 - The SGI version of the collector marks from mmapped pages, even
9571 if they are not part of dynamic library static data areas. This
9572 causes performance problems with some SGI libraries that use mmap
9573 as a bitmap allocator. NOT YET FIXED. It may be possible to turn
9574 off DYNAMIC_LOADING in the collector as a workaround. It may also
9575 be possible to conditionally intercept mmap and use GC_exclude_static_roots.
9576 The real fix is to walk rld data structures, which looks possible.
9577 - Incremental collector should handle large objects better. Currently,
9578 it looks like the whole object is treated as dirty if any part of it is.
9579 9580 9581 == [6.2alpha6] 2003-06-05 ==
9582 9583 * There was an extra underscore in the name of GC_save_registers_in_stack
9584 for NetBSD/SPARC (thanks to Jaap Boender for the patch).
9585 * Integrated Brian Alliet's patch for Darwin. This restructured the
9586 linuxthreads/pthreads support to separate generic pthreads support
9587 from more the system-dependent thread-stopping code. I believe this
9588 should make it easier to eliminate the code duplication between
9589 pthreads platforms in the future. The patch included some other
9590 code cleanups.
9591 * Integrated Dan Bonachea's patch to support AIX threads. This required
9592 substantial manual integration, mostly due to conflicts with other
9593 recent threads changes. It may take another iteration to
9594 get it to work.
9595 * Removed HPUX/PA-RISC support from aix_irix_threads.c. It wasn't used
9596 anyway and it cluttered up the code. And anything we can do to migrate
9597 towards generic pthreads support is a good thing.
9598 * Added a more explicit test for tracing of function arguments to test.c.
9599 * Added Akira Tagoh's PowerPC64 patch.
9600 * Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
9601 pointing it out). gc.h now includes just windows.h, not winbase.h.
9602 * Declared GC_save_regs_in_stack() in gc_priv.h. Remove other declarations.
9603 * Changed --enable-cplusplus to use automake consistently. The old way
9604 confused libtool. "Make install" didn't work correctly for the old version.
9605 Previously --enable-cplusplus was broken on cygwin.
9606 * Changed the C version of GC_push_regs to fail at compile time if it is
9607 generated with an empty body. This seems to have been the cause of one
9608 or two subtle failures on unusual platforms. Those failures should
9609 now occur at build time and be easily fixable.
9610 9611 9612 == [6.2alpha5] 2003-05-14 ==
9613 9614 * GC_invoke_finalizers could, under rare conditions, set
9615 GC_finalizer_mem_freed to an essentially random value. This could
9616 possibly cause unbounded heap growth for long-running applications
9617 under some conditions. (The bug was introduced in 6.1alpha5, and
9618 is not in gcc3.3.)
9619 * Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared.
9620 GC_DLL is used instead. All internal tests are now on GC_DLL.
9621 README.macros is now more precise about the intended meaning.
9622 * Include DllMain in the multi-threaded win32 version only if the
9623 collector is actually built as a dll (thanks to Mohan Embar for
9624 a version of the patch).
9625 * Hide the cygwin threadAttach/Detach functions. They were violating our
9626 namespace rules.
9627 * Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT
9628 (thanks again to Ben Hutchings).
9629 * Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
9630 * CORD_cat was not rebalancing unbalanced trees in some cases, violating
9631 a CORD invariant. Also tweaked the re-balancing rule for
9632 CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report
9633 and patch.)
9634 * Added hand-coded structured exception handling support to mark.c.
9635 This should enable support of dynamic libraries under win32 with
9636 gcc-compiled code. (Thanks to Ranjit Mathew for the patch.)
9637 Turned on dynamic library scanning for gcc on Win32.
9638 * Removed some remnants of read wrapping (thanks to Kenneth Schalk).
9639 GC_USE_LD_WRAP was probably broken in recent versions.
9640 * The build could fail on some platforms since gcconfig.h could include
9641 declarations mentioning ptr_t, which was not defined, e.g. when if_mach
9642 was built (thanks to Yann Dirson for pointing this out). Also
9643 cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
9644 * The GC_LOOP_ON_ABORT environment variable interfered with incremental
9645 collection, since the write fault handler was erroneously overridden.
9646 Handlers are now set up in the correct order.
9647 * It used to be possible to call GC_mark_thread_local_free_lists() while
9648 the world was not stopped during an incremental GC. This was not safe.
9649 Fortunately, it was also unnecessary. Added GC_world_stopped flag
9650 to avoid it. (This caused occasional crashes in GC_set_fl_marks
9651 with thread local allocation and incremental GC. This probably happened
9652 primarily on old, slow multiprocessors.)
9653 * Allowed overriding of MAX_THREADS in win32_threads.c from the build
9654 command line (thanks to Yannis Bres for the patch).
9655 * Taught the IA64/linux code to determine the register backing store base from
9656 /proc/self/maps after checking the __libc symbol, but before guessing.
9657 (__libc symbols are on the endangered list, and the guess is likely to not
9658 always be right for 2.6 kernels.) Restructured the code to read and parse
9659 /proc/self/maps so it only exists in one place (all platforms).
9660 * The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it
9661 also registered the main data segment, but didn't actually do so. (I don't
9662 think anyone actually uses this configuration, but ...)
9663 * Made another attempt to get --enablecplusplus to do the right thing.
9664 Since there are unavoidable problems with C programs linking against a
9665 dynamic library that includes C++ code, I separated out the c++ code into
9666 libgccpp.
9667 9668 9669 == [6.2alpha4] 2003-03-10 ==
9670 9671 * Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS. (See Debian bug
9672 # 177204)
9673 * Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
9674 * Integrated Grzegorz Jakacki's substantial GNU build patch. "Make dist"
9675 should now work for the GNU build process. Documentation files
9676 are installed under share/gc.
9677 * Tweaked gc_cpp.h to again support the Borland compiler (thanks to
9678 Rene Girard for pointing out the problems).
9679 * Updated BCC_MAKEFILE (thanks to Rene Girard).
9680 * Added GC_ASSERT check for minimum thread stack size.
9681 * Added --enable-gc-assertions.
9682 * Added some web documentation to the distribution. Updated it in the
9683 process.
9684 * Separate gc_conf_macros.h from gc.h.
9685 * Added generic GC_THREADS client-defined macro to set the appropriate
9686 GC_XXX_THREADS internal macro. (gc_config_macros.h.)
9687 * Add debugging versions of _ignore_off_page allocation primitives.
9688 * Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
9689 from gc.h to gc_priv.h.
9690 * Reset GC_fail_count even if only a small allocation succeeds.
9691 * Integrated Brian Alliet's patch for dynamic library support on Darwin.
9692 * gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
9693 when it should have called the lower case version, since it was
9694 explicitly computing a base pointer.
9695 9696 9697 == [6.2alpha3] 2003-01-30 ==
9698 9699 * Don't include execinfo.h in os_dep.c when it's not needed, and may not
9700 exist.
9701 9702 9703 == [6.2alpha2] ==
9704 9705 * Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
9706 Hironori Sakamoto for the patch).
9707 * Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
9708 * Attempted to work around the problems with .S filenames and the SGI
9709 compiler. (Untested.)
9710 * Worked around an HP/UX make issue with the GNU-style build process.
9711 * Fixed the --enable-cplusplus build machinery to allow builds without
9712 a C++ compiler. (That was always the intent ...)
9713 * Changed the debugging allocation macros to explicitly pass the return
9714 address for Linux and XXXBSD on hardware for which we can't get stack
9715 traces. Use __builtin_return_address(0) to generate it when possible.
9716 Some of the configuration work was cleaned up (good) and moved to gc.h
9717 (bad, but necessary). This should make leak detection more useful
9718 on a number of platforms. (Thanks to Fabian Thylman for the suggestion.)
9719 * Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
9720 * Bumped revision number for dynamic library.
9721 9722 9723 == [6.2alpha1] 2003-01-23 ==
9724 9725 * Guard the test for GC_DUMP_REGULARLY in misc.c with
9726 "#ifndef NO_DEBUGGING". Otherwise it fails to build with NO_DEBUGGING
9727 defined. (Thanks to Manuel Serrano.)
9728 * Message about retrying suspend signals was incorrectly generated even when
9729 flag was not set.
9730 * Cleaned up MACOSX/NEXT root registration code. There was apparently a
9731 separate ifdef case in GC_register_data_segments() for no reason.
9732 * Removed MPROTECT_VDB for MACOSX port, based on one negative report.
9733 * Arrange for gc.h and friends to be correctly installed with GNU-style
9734 "make install".
9735 * Enable the GNU-style build facility include C++ support in the library
9736 with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
9737 * Mark from GC_thread_key in linux_threads.c, in case that's allocated
9738 from the garbage collected heap, as it is with our own thread-specific
9739 storage implementation (thanks to Jeff Sturm).
9740 * Mark all free list header blocks if they are heap allocated. This avoids
9741 some unnecessary tracing. And it remains correct if we clear the
9742 root set. (Thanks to Jeff Sturm for identifying the bug.)
9743 * Improved S390/Linux support. Add S390/Linux 64-bit support (thanks to
9744 Ulrich Weigand).
9745 * Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
9746 GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h. This is technically
9747 an interface change. Based on the fact that nobody reported this,
9748 I suspect/hope there were no clients.
9749 * Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
9750 when appropriate, (2) doesn't generate references to undefined internal
9751 macros, and (3) allows easier manual construction of descriptors.
9752 * Close the file descriptor used by GC_print_address_map().
9753 * Set the "close-on-exec" bit for various file descriptors maintained
9754 for the collector's internal use.
9755 * Added a hack to find memory segments owned by the system allocator
9756 under win32. Based on my tests, this tends to eventually find all
9757 segments, though it may take a while. There appear to be cleaner,
9758 but slower solutions under NT/XP. But they rely on an API that's
9759 unsupported under 9X.
9760 * Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM. (Thanks
9761 to Akira Tagoh for pointing out that HEURISTIC1 does not work on
9762 64-bit kernels.)
9763 * Added GC_set_free_space_divisor to avoid some Windows dll issues.
9764 * Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
9765 of candidate pointers for tagging, etc.
9766 * Always lock around GC_notify_full_gc(). Simplified code for
9767 invoking GC_notify_full_gc().
9768 * Changed the way DATASTART is defined on FreeBSD to be robust against
9769 an unmapped page after etext. (Thanks to Hironori Sakamoto for
9770 tracking down the intermittent failure.)
9771 * Made GC_enable() and GC_disable() official. Deprecated direct update
9772 of GC_dont_gc. Changed GC_gcollect to be a noop when garbage collection
9773 is disabled.
9774 * Call GC_register_dynamic_libraries before stopping the world on Linux,
9775 in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
9776 * Introduced a more general mechanism for platform-dependent code to
9777 decide whether the main data segment should be handled separately
9778 from dynamic libraries, or registered by GC_register_dynamic_libraries.
9779 The latter is more reliable and easier on Linux with dl_iterate_phdr.
9780 9781 9782 == [6.1] ==
9783 9784 * Added GC_MAXIMUM_HEAP_SIZE environment variable.
9785 * Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
9786 * Double page hash table size for -DLARGE_CONFIG.
9787 * Integrated Bo Thorsen's x64 support.
9788 * STACKBOTTOM definition for LINUX/MIPS was partially changed back
9789 (thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
9790 * Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
9791 SEARCH_FOR_DATA_START. It doesn't hurt to fall back to a search.
9792 And __data_start doesn't seem to get defined correctly of the GC
9793 library is loaded with LD_PRELOAD, e.g. for leak detection.
9794 * If the GC_find_leak environment variable is set, do a
9795 atexit(GC_gcollect) to give us at least one chance to detect leaks.
9796 This may report some very benign leaks, but ...
9797 * Addeded REDIRECT_FREE. It's necessary if we want leak detection with
9798 LD_PRELOAD.
9799 * Defer printing of leaked objects, as for smashed objects.
9800 * Fixed process and descriptor leak in GC_print_callers. Try for
9801 line number even if we got function name.)
9802 * Ported parallel GC support and thread local allocation to Alpha.
9803 Not yet well-tested.
9804 * Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
9805 * Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
9806 alpha_mach_dep.s.
9807 * Incorporated a change to new_gc_alloc.h,
9808 which should make it work with gcc3.1.
9809 * Use alpha_mach_dep.S only on Linux. (It's not clear that this is
9810 optimal, but it otherwise didn't build on Tru64. Thanks to Fergus Henderson.)
9811 * Added ifdef to guard free() in os_dep.c. Otherwise we get a
9812 compilation error on Irix (thanks to Dai Sato).
9813 * Added an experimental version of GC_memalign to mallocx.c. This can't
9814 always work, since we don't handle alignment requests in the hblk-level
9815 allocator, and we can't handle arbitrary pointer displacements unless
9816 GC_all_interior_pointers is enabled. But it should work for alignment
9817 requests up to HBLKSIZE. This is not yet documented in the standard
9818 places.
9819 * Finally debugged the OSF1/Tru64 thread support. This needs more testing,
9820 since I needed to add a somewhat unconvincing workaround for signal
9821 delivery issues that I don't yet completely understand. But it does
9822 pass my tests, even in parallel GC mode. Incremental GC support is
9823 disabled if thread support is enabled, due to the signal issues.
9824 * Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
9825 * Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
9826 declarations to gc.h. On IA64, this is required for REDIRECT_MALLOC
9827 to work correctly with these.
9828 * Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
9829 9830 9831 == [6.1alpha5] 2002-06-19 ==
9832 9833 * Added GC_finalizer_mem_freed, and changed some of the code that
9834 decided on heap expansion to look at it. Memory explicitly
9835 deallocated by finalizers essentially needs to be counted as reclaimed
9836 by the GC. Otherwise there are cases in which the heap can grow
9837 infinitely. (Thanks to Mark Reichert for the test case.)
9838 * Integrated Adam Megacz patches to not scan dynamic libraries if
9839 we are compiling with gcc on win32. Otherwise we need structured
9840 exception handling to deal with asynchronously unmapped root
9841 segments, and gcc doesn't directly support that.
9842 * Integrated Anthony Green's patch to support Wine.
9843 * GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
9844 places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
9845 * Integrated Loren J. Rittle's Alpha FreeBSD patches. These also
9846 changed the declarations of symbols like _end on many platforms to
9847 that they wouldn't mistakenly be declared as short data symbols (suggested by
9848 Richard Henderson).
9849 * Integrated changes from the Debian distribution (thanks to Ryan Murray
9850 for pointing these out).
9851 Fix C++ comments in POWERPC port. Add ARM32
9852 incremental GC support. Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
9853 this time for real. Use va_copy to get rid of cord printf problems
9854 (finally).
9855 * Close file descriptor used to count CPUs (thanks to Jeff Sturm for
9856 pointing out the omission).
9857 * Don't just drop gcj free lists in GC_start_reclaim, since that can
9858 eventually cause the marker to see a bogus mark descriptor in the
9859 dropped objects. The usual symptom was a very intermittent segmentation
9860 fault in the marker. This mattered only if one of the GC_gcj_malloc
9861 variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
9862 Tom Tromey for helping to track this down).
9863 * Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
9864 Jeff Sturm, Tom Tromey, and Christian Joensson).
9865 * Fixed a typo in strdup definition (thanks to Gerard A Allan).
9866 * Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
9867 This is needed on Linux. I'm not sure whether it's better or worse
9868 on Tru64.
9869 * Changed gc_cpp.h once more to declare operator new and friends only in
9870 a Microsoft environment. This may need further fine tuning (thanks to
9871 Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
9872 * Don't ever override strdup if it's already macro defined (thanks to
9873 Adnan Ali for pointing out the problem).
9874 * Changed gc_cpp.h yet again to also overload placement new. Due to the
9875 C++ overloading rules, the other overloaded new operations otherwise hide
9876 placement new, which causes many STL uses to break (thanks to Reza Shahidi
9877 for reporting this, and to Matt Austern for proposing a fix).
9878 * Integrated cygwin pthreads support from Dan Bonachea.
9879 * Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
9880 * Changed printing code to print more complete GC times.
9881 * Applied Mark Mitchell's Irix patch to correct some bit rot.
9882 * Clarified which object-printing routines in dbg_mlc.c should hold
9883 the allocation lock. Restructured the code to allow reasonable object
9884 printing with -DREDIRECT_MALLOC.
9885 * Fix the Linux mmap code to always start with 0x1000 as the initial hint.
9886 Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
9887 Jeffrey Mark Siskind).
9888 * Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
9889 with a system header (thanks to Philip Brown).
9890 * Cause win32_threads.c to handle an out of range stack pointer correctly,
9891 though currently with a warning. (Thanks to Jonathan Clark for
9892 observing that Windows applications may temporarily use the stack
9893 pointer for other purposes, and suggesting a fix. Unfortunately, it's
9894 not clear that there is a complete solution to this problem.)
9895 9896 9897 == [6.1alpha4] 2002-06-16 ==
9898 9899 * Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
9900 building. Increased 64-bit heap size limit in test.c slightly, since
9901 a functional SPARC collector seems to slightly exceed the old limits.
9902 * Use NPRGREG in solaris_threads.c, thus printing all registers if things
9903 go wrong.
9904 * Added GC_MARKERS environment variable to allow use of a single marker
9905 thread on an MP without confusing the lock implementation.
9906 * Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
9907 This is really a purely generational mode, and we can afford to
9908 postpone the collection until the heap is (nearly) full.
9909 * Remove read() wrapper for MPROTECT_VDB. It was causing more harm than
9910 good. It is often no longer needed if system calls avoid writing to
9911 pointerful heap objects.
9912 * Fix MACOSX test in gcconfig.h (thanks to John Clements).
9913 * Change GC_test_and_set so that it consistently has one argument.
9914 Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
9915 Ryan Murray).
9916 * Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort()
9917 declaration (thanks to Michael Smith).
9918 * Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START().
9919 * Added win32 recognition code in configure.in. Changed some of the
9920 dllimport/export defines in gc.h (thanks to Adam Megacz).
9921 * GC_malloc_many didn't set hb_last_reclaimed when it called
9922 GC_reclaim_generic. (I'm not sure this matters much, but ...)
9923 * Allocating uncollectible objects with debug information sometimes
9924 allocated objects that were one byte too small, since uncollectible
9925 objects don't have the extra byte added at the end (thanks to
9926 Wink Saville for pointing this out).
9927 * Added a bit more assertion checking to make sure that gcj objects
9928 on free lists never have a nonzero second word.
9929 * Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
9930 * Upgraded libtool, configure.in and some related files to hopefully
9931 support NetBSD/SPARC (thanks to Adrian Bunk). Unfortunately,
9932 libtool 1.4.2 seemed to be buggy due to missing quotes in several
9933 "test" invocations. Fixed those in the ltmain.sh script.
9934 * Some win32-specific patches, including the introduction of
9935 GC_CreateThread (thanks to Adam Megacz).
9936 * Merged in gcj changes from Anthony Green to support embedded systems.
9937 * Tried to consistently rename preprocessed assembly files with a capital
9938 .S extension.
9939 * Use alpha_mach_dep.S on ALPHA again. It doesn't really matter, but this
9940 makes our distribution consistent with the gcc one, avoiding future merge
9941 problems.
9942 * Move GET_MEM definition into gcconfig.h. Include gcconfig.h slightly
9943 later in gc_priv.h to avoid forward references to ptr_t.
9944 * Add some testing of local allocation to test.c.
9945 * Change definition of INVALID_QTID in specific.h. The -1 value was used
9946 inconsistently, and too likely to collide with a valid stack address.
9947 Some general clean-up of specific.[ch]. Added assertions. (Thanks
9948 to Michael Smith for tracking down an intermittent bug to this
9949 general area. I'm not sure it has been squashed yet, however.)
9950 * On Pthread systems it was not safe to call GC_malloc() between fork()
9951 and exec(). According to the applicable standards, it doesn't appear
9952 to be safe to call malloc() or many other libc functions either, thus
9953 it's not clear this is fixable. Added experimental support for
9954 -DHANDLE_FORK in linux_threads.c which tries to support it. It may
9955 succeed if libc does the right thing. I'm not sure whether it does.
9956 (Thanks to Kenneth Schalk for pointing out this issue.)
9957 * Documented thread local allocation primitives to require an
9958 explicit GC_init call. GC_init_parallel is no longer declared to
9959 be a constructor function, since that isn't portable and often
9960 seems to lead to initialization order problems.
9961 * Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
9962 compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
9963 * Some more patches for Linux on HP PA-RISC.
9964 * Added include/gc_allocator.h. It implements (hopefully) standard
9965 conforming (as opposed to SGI-style) allocators that allocate
9966 collectible (gc_allocator) or GC-traceable, but not collectible
9967 (traceable_allocator) objects. This borrows heavily from libstc++,
9968 which borrows heavily from the SGI implementation, this part of
9969 which was written by Matt Austern. Changed test_cpp.cc to very
9970 minimally test this.
9971 * On Linux/x86, retry mmap with a different start argument. That should
9972 allow the collector to use more (closer to 3GB) of the address space.
9973 * Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
9974 patch to the gcc tree).
9975 * Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
9976 to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
9977 * Compensated for the fact that current versions of glibc set
9978 __libc_stack_end incorrectly on Linux/IA64 while initialization code
9979 is running. This could cause the collector to miss 16 bytes of
9980 the memory stack if GC_malloc or friends where called before main().
9981 * Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
9982 This will probably take another iteration to work, since his
9983 patch conflicted with the libtool upgrade.
9984 * Added README.arm.cross containing some information about cross-
9985 compiling to an ARM processor from Margaret Fleck (original code provided by
9986 Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
9987 Tilman Vogel; also ported for iPAQ by Oliver Kurth).
9988 9989 9990 == [6.1alpha3] 2002-02-07 ==
9991 9992 * Minor cleanup on the gcconfig.h section for SPARC.
9993 * Minor fix to support Intel compiler for Linux/x86 (thanks to
9994 Sven Hartrumpf).
9995 * Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
9996 * Restructured the way in which we determine whether or not to keep
9997 call stacks for debug allocation. By default SAVE_CALL_COUNT is
9998 now zero on all platforms. Added SAVE_CALL_NARGS parameters.
9999 If possible, use execinfo.h to capture call stack. (This should
10000 add support for a number of new platforms, though often at
10001 considerable runtime expense.)
10002 * Try to print symbolic information for call stacks. On Linux, we
10003 do this with a combination of execinfo.h and running addr2line in
10004 a separate process. This is both much more expensive and much more
10005 useful. Amazingly, it seems to be fast enough for most purposes.
10006 * Redefined strdup if -DREDIRECT_MALLOC is given.
10007 * Changed incremental collector and MPROTECT_VDB implementation so that,
10008 under favorable conditions, pointer-free objects are not protected.
10009 Added GC_incremental_protection_needs() to determine ahead of time whether
10010 pointer-free objects may be protected. Replaced GC_write_hint() with
10011 GC_remove_protection().
10012 * Added test for GC_ENABLE_INCREMENTAL environment variable.
10013 * Made GC_time_limit runtime configurable. Added GC_PAUSE_TIME_TARGET
10014 environment variable.
10015 * Eliminated GC_page_sz, a duplicate of GC_page_size.
10016 * Caused the Solaris and Irix thread creation primitives to call
10017 GC_init_inner().
10018 10019 10020 == [6.1alpha2] 2001-12-20 ==
10021 10022 * No longer wrap read by default in multi-threaded applications. It was
10023 pointed out on the libgcj list that this holds the allocation lock for
10024 way too long if the read blocks. For now, reads into the heap are
10025 broken with incremental collection. It's possible to turn this back on
10026 if you make sure that read calls don't block (e.g. by calling select
10027 first).
10028 * Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
10029 * Added check for environment variable GC_IGNORE_GCJ_INFO.
10030 * Added printing of stop-the-world GC times if GC_PRINT_STATS environment
10031 variable is set.
10032 * The calloc definition in leak_detector.h was missing parentheses, and
10033 realloc was missing a second argument to GC_REALLOC (thanks to
10034 Elvenlord Elrond).
10035 * Added GC_PRINT_BACK_HEIGHT environment variable and associated
10036 code, mostly in the new file backgraph.c. See doc/README.environment.
10037 * Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
10038 Jonathan Clark).
10039 * Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
10040 different address-space layout). This may help for other machines with
10041 holes in the data segment. (Thanks to Hironori Sakamoto.)
10042 * Changed the order in which GC_push_roots and friends push things onto
10043 the mark stack. GC_push_all calls need to come first, since we can't
10044 necessarily recover if those overflow the mark stack. (Thanks to
10045 Matthew Flatt for tracking down the problem.)
10046 * Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
10047 10048 10049 == [6.1alpha1] 2001-09-22 ==
10050 10051 * Non-debug, atomic allocations could result in bogus smashed object
10052 reports with debugging on (thanks to Patrick Doyle for the small test case).
10053 * Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
10054 2.2.4 bug.
10055 * Initial port to HP/UX on Itanium. Thread support and both 32 and 64
10056 bit ABIs appear to work. Parallel mark support doesn't yet, due to
10057 some inline assembly code issues. Thread local allocation does appear
10058 to work.
10059 * ifdef'ed out glibc2.1/Itanium workaround. I suspect nobody is using
10060 that combination anymore.
10061 * Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
10062 Dimitris Vyzovitis for the patch).
10063 * Debugged 64-bit support on HP/UX PA-RISC.
10064 * Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
10065 * Unregistering of finalizers with debugging allocation was broken (thanks
10066 to Jani Kajala for the test case).
10067 * Old finalizers were not returned correctly from GC_debug_register_finalizer.
10068 * Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
10069 * Cleaned up some statistics gathering code in reclaim.c (thanks to
10070 Walter Bright).
10071 * Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
10072 * Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
10073 traversal to dyn_load.c. Changed it to weakly reference dl_iterate_phdr,
10074 so that the old code is still used with old versions of glibc.
10075 * Cleaned up feature test macros for various threads packages and
10076 integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
10077 It's likely that the cleanup broke something, since it touched lots of
10078 code. It's also likely that it fixed some unreported bugs in the
10079 less common thread implementations, since some of the original code
10080 didn't stand up to close scrutiny. Support for the next pthreads
10081 implementation should be easier to add.
10082 10083 10084 == [6.0] 2001-07-26 ==
10085 10086 * Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
10087 * Fixed a stack clearing problem that resulted in SIGILL with a
10088 misaligned stack pointer for multi-threaded SPARC builds.
10089 * Integrated another HURD patch (thanks to Igor Khavkine).
10090 10091 10092 == [6.0alpha9] ==
10093 10094 * added README.macros.
10095 * Made gc.mak a symbolic link to work around winzip's tendency to ignore
10096 hard links.
10097 * Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
10098 it on untested platforms.
10099 * Integrated initial GNU HURD port (thanks to Chris Lingard and
10100 Igor Khavkine).
10101 * A few more fixes for Digital Mars compiler (by Walter Bright).
10102 * Fixed gcc version recognition. Renamed OPERATOR_NEW_ARRAY to
10103 GC_OPERATOR_NEW_ARRAY. Changed GC_OPERATOR_NEW_ARRAY to be the default.
10104 It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
10105 Cesar Eduardo Barros).
10106 * Changed the byte size to free-list mapping in thread local allocation
10107 so that size 0 allocations are handled correctly.
10108 * Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
10109 * Changed finalization registration to invoke GC_oom_fn when it runs out
10110 of memory.
10111 * Removed lvalue cast in finalize.c. This caused some debug configurations
10112 not to build with some non-gcc compilers.
10113 10114 10115 == [6.0alpha8] 2001-06-15 ==
10116 10117 * Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
10118 so that they compile under Irix (thanks to Dave Love).
10119 * Updated powerpc_macosx_mach_dep.s so that it works if the collector
10120 is in a dynamic library (thanks to Andrew Begel).
10121 * Transformed README.debugging into debugging.html, updating and
10122 expanding it in the process. Added gcdescr.html and tree.html
10123 from the web site to the GC distribution.
10124 * Fixed several problems related to PRINT_BLACK_LIST. This involved
10125 restructuring some of the marker macros.
10126 * Fixed some problems with the sizing of objects with debug information.
10127 Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST. Reduced the
10128 object size with SHORT_DEBUG_HDRS by another word.
10129 * The "Needed to allocate blacklisted ..." warning had inadvertently
10130 been turned off by default, due to a buggy test in allchblk.c. Turned
10131 it back on.
10132 * Removed the marker macros to deal with 2 pointers in interleaved fashion.
10133 They were messy and the performance improvement seemed minimal. We'll
10134 leave such scheduling issues to the compiler.
10135 * Changed Linux/PowerPC test to also check for __powerpc__ in response
10136 to a discussion on the gcc mailing list.
10137 * Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
10138 (suggested by Matthew Flatt). This was causing problems in
10139 systems that register all of their own roots. It looks far more correct
10140 to me without the "static" anyway.
10141 * Fixed several problems with thread local allocation of pointer-free or
10142 typed objects. The collector was reclaiming thread-local free lists, since
10143 it wasn't following the link fields.
10144 * There was apparently a long-standing race condition related to
10145 multi-threaded incremental collection. A collection could be started and
10146 a thread stopped between the memory unprotect system call and the setting of
10147 the corresponding dirt bit. I believe this did not affect Solaris or PCR,
10148 which use a different dirty-bit implementation. Fixed this by installing
10149 signal handlers with sigaction instead of signal, and disabling the thread
10150 suspend signal while in the write-protect handler. (It is unclear
10151 whether this scenario ever actually occurred.)
10152 * Incremental collection did not cooperate correctly with the PARALLEL_MARK
10153 implementation of GC_malloc_many or the local_malloc primitives. It still
10154 doesn't work well, but it shouldn't lose memory anymore.
10155 * Integrated some changes from the gcc source tree that I had previously
10156 missed (thanks to Bryce McKinlay for the reminder and patch).
10157 * Added Makefile.direct as a copy of the default Makefile, which would
10158 normally be overwritten if configure is run.
10159 * Changed the gc.tar target in Makefile.direct to embed the version number
10160 in the gc directory name. This will affect future tar file distributions.
10161 * Changed the Irix dynamic library finding code to no longer try to
10162 eliminate writable text segments under Irix6.x, since that is probably no
10163 longer necessary, and can apparently be unsafe on occasion (thanks to
10164 Shiro Kawai for pointing this out).
10165 * GC_cleanup with GC_DEBUG enabled passed a real object base address to
10166 GC_debug_register_finalizer_ignore_self, which expected a pointer past the
10167 debug header. Call GC_register_finalizer_ignore_self instead, even with
10168 debugging enabled (thanks to Jean-Daniel Fekete for catching this).
10169 * The collector didn't build with call chain saving enabled but NARGS=0.
10170 * Fixed up the GNU-style build files enough so that they work in some
10171 obvious cases (thanks to Maarten Thibaut).
10172 * Added initial port to Digital Mars compiler for win32 (thanks to Walter
10173 Bright).
10174 10175 10176 == [6.0alpha7] 2001-04-19 ==
10177 10178 * Added GC_finalizer_notifier. Fixed GC_finalize_on_demand. (The variable
10179 actually wasn't being tested at the right points. The build-time flag
10180 was.)
10181 * Added Tom Tromey's S390 Linux patch.
10182 * Added code to push GC_finalize_now in GC_push_finalizer_structures
10183 (thanks to Matthew Flatt).
10184 * Added GC_push_gc_structures() to push all GC internal roots.
10185 * Integrated some FreeBSD changes from Matthew Flatt.
10186 * It looks like USRSTACK is not always correctly defined under Solaris.
10187 Hacked gcconfig.h to attempt to work around the problem. The result
10188 is not well tested. (Thanks again to Matthew Flatt for pointing this out.)
10189 * Added Ji-Yong Chung's win32 threads and C++ fixes.
10190 * Arranged for hpux_test_and_clear.s to no longer be needed or built.
10191 It was causing build problems with gas, and it's not clear this is
10192 better than the pthreads alternative on this platform.
10193 * Some MINGW32 fixes from Hubert Garavel.
10194 * Added initial Hitachi SH4 port from Kaz Kojima.
10195 * Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
10196 * Made include/gc_mark.h more public and separated out the really private
10197 pieces. This is probably still not quite sufficient for clients that
10198 want to supply their own kind of type information. But it's a start.
10199 This involved lots of identifier renaming to make it namespace clean.
10200 * Added GC_dont_precollect for clients that need complete control over
10201 the root set.
10202 * GC_is_visible didn't do the right thing with gcj objects. (Not that
10203 many people are likely to care, but ...)
10204 * Don't redefine read with GC_USE_LD_WRAP.
10205 * Initial port to LINUX/HP_PA. Incremental collection and threads are not
10206 yet supported. (Incremental collection should work if you have the
10207 right kernel. Threads may work with a sufficiently patched pthread
10208 library.)
10209 * Changed gcconfig.h to recognize __i386__ as an alternative to x86 in
10210 many places (thanks to Benjamin Lerman).
10211 * Made win32_threads.c more tolerant of detaching a thread that it didn't
10212 know about (thanks to Paul Nash).
10213 * Added Makefile.am and configure.in from gcc to the distribution, with
10214 minimal changes. For the moment, those are just placeholders. In the
10215 future, we're planning to switch to a GNU-style build environment for
10216 Un*x-like systems, though the old Makefile will remain as a backup.
10217 * Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
10218 option.
10219 * Redistributed some functions between malloc.c and mallocx.c, so that
10220 simple statically linked apps no longer pull in mallocx.o.
10221 * Changed large object allocation to clear the first and last few words
10222 of each block before releasing the lock. Otherwise the marker could see
10223 objects with nonsensical type descriptors.
10224 * Fixed a couple of subtle problems that could result in not recognizing
10225 interior pointers from the stack. (I believe these were introduced
10226 in 6.0alpha6.)
10227 * GC_debug_free_inner called GC_free, which tried to reacquire the
10228 allocator lock, and hence deadlocked. (DBG_HDRS_ALL probably never worked
10229 with threads.)
10230 * Fixed several problems with back traces. Accidental references to a free
10231 list could cause the free list pointer to be overwritten by a back pointer.
10232 There seemed to be some problems with the encoding of root and finalizer
10233 references.
10234 10235 10236 == [6.0alpha6] ==
10237 10238 * Changed the definition of DATASTART on ALPHA and IA64, where data_start
10239 and __data_start are not defined by earlier versions of glibc. This might
10240 need to be fixed on other platforms as well.
10241 * Changed the way the stack base and backing store base are found on IA64.
10242 This should now remain reliable on future kernels. But since it relies
10243 on /proc, it will no longer work in the simulated NUE environment.
10244 * Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
10245 on the OS. On non-Unix systems, rand() should be used instead. Handled
10246 small RAND_MAX (thanks to Peter Ross for pointing this out).
10247 * Fixed the cord make rules to create the cord subdirectory, if necessary
10248 (thanks to Doug Moen).
10249 * Changed fo_object_size calculation in finalize.c. Turned finalization
10250 of non-heap object into a no-op. Removed anachronism from GC_size()
10251 implementation.
10252 * Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
10253 It was missed in a previous renaming (thanks to Vladimir Tsichevski
10254 for pointing this out).
10255 * Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
10256 * Added GC_no_dls hook for applications that want to register their own
10257 roots.
10258 * Integrated Kjetil Matheussen's Amiga changes.
10259 * Added FREEBSD_STACKBOTTOM. Changed the FreeBSD/x86 port to use it
10260 (thanks to Matthew Flatt).
10261 * Added pthread_detach interception for platforms supported by linux_threads.c
10262 and irix_threads.c.
10263 * Changed the USE_MMAP code to check for the case in which we got the
10264 high end of the address space, i.e. mem_ptr + mem_sz == 0. It appears
10265 that this can happen under Solaris 7. It seems to be allowed by what
10266 I would claim is an oversight in the mmap specification. (Thanks to
10267 Toshio Endo for pointing out the problem.)
10268 * Cleanup of linux_threads.c. Some code was originally cloned from
10269 irix_threads.c and now unnecessary. Some comments were obviously wrong.
10270 * (Mostly) fixed a longstanding problem with setting of dirty bits from
10271 a signal handler. In the presence of threads, dirty bits could get lost,
10272 since the getting of a bit in the bit vector was not atomic with respect
10273 to other updates. The fix is 100% correct only for platforms for which
10274 GC_test_and_set is defined. The goal is to make that all platforms with
10275 thread support. Matters only if incremental GC and threads are both
10276 enabled.
10277 * made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
10278 initialization time, instead of build-time option. This is a
10279 nontrivial, high risk change. It should slow down the code measurably
10280 only if MERGE_SIZES is not defined, which is a very nonstandard
10281 configuration.
10282 * Added doc/README.environment, and implemented what it describes. This
10283 allows a number of additional configuration options to be set through
10284 the environment. It documents a few previously undocumented options.
10285 * Integrated Eric Benson's leak testing improvements.
10286 * Removed the option to throw away the beginning of each page (DISCARD_WORDS).
10287 This became less and less useful as processors enforce stricter alignment.
10288 And it hadn't been tested in ages, and was thus probably broken anyway.
10289 10290 10291 == [6.0alpha5] ==
10292 10293 * Changed the definition of GC_pause in linux_threads.c to use a volatile
10294 asm. Some versions of gcc apparently optimize away writes to local volatile
10295 variables. This caused poor locking behavior starting at about
10296 4 processors.
10297 * Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
10298 to linux_threads.c.
10299 The first two calls could be used to generally avoid sending GC signals to
10300 blocked threads, avoiding both premature wakeups and unnecessary overhead.
10301 * Fixed a serious bug in thread-local allocation. At thread termination,
10302 GC_free could get called on small integers. Changed the code for thread
10303 termination to more efficiently return left-over free-lists.
10304 * Integrated Kjetil Matheussen's BeOS support.
10305 * Rearranged the directory structure to create the doc and tests
10306 subdirectories.
10307 * Sort of integrated Eric Benson's patch for OSF1. This provided basic
10308 OSF1 thread support by suitably extending hpux_irix_threads.c. Based
10309 on earlier email conversations with David Butenhof, I suspect that it
10310 will be more reliable in the long run to base this on linux_threads.c
10311 instead. Thus I attempted to patch up linux_threads.c based on Eric's code.
10312 The result is almost certainly broken, but hopefully close enough that
10313 someone with access to a machine can pick it up.
10314 * Integrated lots of minor changes from the NetBSD distribution. (These
10315 were supplied by David Brownlee. I'm not sure about the original
10316 authors.)
10317 * Hacked a bit more on the HP/UX thread-support in linux_threads.c. It
10318 now appears to work in the absence of incremental collection. Renamed
10319 hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
10320 support HPUX there.
10321 * Changed gc.h to define _REENTRANT in cases in which it should already
10322 have been defined. It is still safer to also define it on the command
10323 line.
10324 10325 10326 == [6.0alpha4] ==
10327 10328 * Moved up the detection of mostly full blocks to the initiation of the
10329 sweep phase. This eliminates some lock contention in the PARALLEL_MARK case,
10330 as multiple threads try to look at mostly full blocks concurrently.
10331 * Restored the code in GC_malloc_many that grabs a prefix of the global
10332 free list. This avoids the case in which every GC_malloc_many call
10333 tries and fails to allocate a new heap block, and the returns a single
10334 object from the global free list.
10335 * Some minor fixes in new_hblk.c. (Attempted to build free lists in order
10336 of increasing addresses instead of decreasing addresses for cache performance
10337 reasons. But this seems to be only a very minor gain with -DEAGER_SWEEP,
10338 and a loss in other cases. So the change was backed out.)
10339 * Fixed some of the documentation (thanks in large part to Fergus Henderson).
10340 * Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
10341 large numbers of mmaps (thanks to Eric Benson). Also fixed that code to
10342 deal with short reads.
10343 * Added GC_get_total_bytes().
10344 * Fixed leak detection mode to avoid spurious messages under linuxthreads.
10345 (This should also now be easy for the other supported threads packages.
10346 But the code is tricky enough that I'm hesitant to do it without being able
10347 to test. Everything allocated in the GC thread support itself should be
10348 explicitly deallocated.)
10349 * Made it possible (with luck) to redirect malloc to GC_local_malloc.
10350 10351 10352 == [6.0alpha3] 2000-09-26 ==
10353 10354 * Fixed the /proc/self/maps code to not seek, since that apparently is not
10355 reliable across all interesting kernels.
10356 * Fixed some compilation problems in the absence of PARALLEL_MARK
10357 (introduced in alpha2).
10358 * Fixed an algorithmic problem with PARALLEL_MARK. If work needs to
10359 be given back to the main mark "stack", the BOTTOM entries of the local
10360 stack should be given away, not the top ones. This has substantial
10361 performance impact, especially for > 2 processors, from what I can tell.
10362 * Extracted gc_lock.h from gc_priv.h. This should eventually make it a
10363 bit easier to avoid including gc_priv.h in clients.
10364 * Moved all include files to include/ and removed duplicate links to the
10365 same file. The old scheme was a bad idea because it was too easy to get the
10366 copies out of sync, and many systems don't support hard links.
10367 Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
10368 the process, although I tried to update them appropriately.
10369 * Removed the partial support for a copied nursery. It's not clear that
10370 this would be a tremendous win, since we don't consistently lose to
10371 generational copying collectors. And it would significantly complicate
10372 many things. May be reintroduced if/when it really turns out to win.
10373 * Removed references to IRIX_JDK_THREADS, since I believe there never
10374 were and never will be any clients.
10375 * Added some code to linux_threads.c to possibly support HPUX threads
10376 using the Linux code. Unfortunately, it doesn't work yet, and is
10377 currently disabled.
10378 * Added support under Linux/x86 for saving the call chain, both in (debug)
10379 objects for client debugging, and in GC_arrays._last_stack for GC
10380 debugging. This was previously supported only under Solaris. It is
10381 not enabled by default under x86, since it requires that code be compiled
10382 to explicitly gave frame pointers on the call stack. (With gcc this
10383 currently happens by default, but is often turned off explicitly.)
10384 To turn it on, define SAVE_CALL_CHAIN.
10385 10386 10387 == [6.0alpha2] ==
10388 10389 * Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
10390 for which that's expensive.
10391 * Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
10392 * Added a missing volatile to OR_WORD and renamed the parameter to
10393 GC_compare_and_swap so it's not a C++ reserved word (thanks to
10394 Toshio Endo for pointing out both of those).
10395 * Changed Linux dynamic library registration code to look at /proc/self/maps
10396 instead of the rld data structures when REDIRECT_MALLOC is defined.
10397 Otherwise some of the rld data data structures may be prematurely garbage
10398 collected.
10399 * Fixed USE_LD_WRAP a bit more, so it should now work without threads.
10400 * Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
10401 Temporarily added some backward compatibility definitions. Renamed
10402 USE_LD_WRAP to GC_USE_LD_WRAP.
10403 * Many MACOSX POWERPC changes, some additions to the gctest output, and
10404 a few minor generic bug fixes (thanks to Dietmar Planitzer).
10405 10406 10407 == [6.0alpha1] ==
10408 10409 * Added HP/PA prefetch support.
10410 * Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
10411 the reliability of generating pointer backtrace information, e.g. in
10412 the Bigloo environment.
10413 * Added parallel marking support (-DPARALLEL_MARK). This currently
10414 works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
10415 to other platforms. This is intended to be a lighter-weight (less
10416 new code, probably not as scalable) solution than the work by Toshio Endo
10417 et al, at the University of Tokyo. A number of their ideas were
10418 reused, though the code wasn't, and the underlying data structure
10419 is significantly different. In particular, we keep the global mark
10420 stack as a single shared data structure, but most of the work is done
10421 on smaller thread-local mark stacks.
10422 * Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
10423 with -DPARALLEL_MARK.
10424 * Added full support for thread local allocation under Linux
10425 (-DTHREAD_LOCAL_ALLOC). This is a thin veneer on GC_malloc_many, and
10426 should be easily portable to other platforms, especially those that
10427 support pthreads.
10428 * CLEAR_DOUBLE was not always getting invoked when it should have been.
10429 * GC_gcj_malloc and friends used different out of memory handling than
10430 everything else, probably because I forgot about one when I implemented
10431 the other. They now both call GC_oom_fn(), not GC_oom_action().
10432 * Integrated Jakub Jelinek's fixes for Linux/SPARC.
10433 * Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
10434 GC_arrays, and separately registered the first two as excluded roots.
10435 This makes code compiled with gc_inl.h less dependent on the
10436 collector version. (It would be nice to remove the inclusion of
10437 gc_priv.h by gc_inl.h completely, but we're not there yet. The
10438 locking definitions in gc_priv.h are still referenced.)
10439 This change was later conditioned on SEPARATE_GLOBALS, which
10440 is not defined by default, since it involves a performance hit.
10441 * Register GC_obj_kinds separately as an excluded root region. The
10442 attempt to register it with GC_arrays was usually failing. (This wasn't
10443 serious, but seemed to generate some confusion.)
10444 * Moved backptr.h to gc_backptr.h.
10445 10446 10447 == [5.4] ==
10448 10449 * Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
10450 Shawn Wagner for actually testing this).
10451 * Fixed GC_is_thread_stack in solaris_threads.c. It forgot to return a value
10452 in the common case.
10453 * Fixed another silly syntax problem in GC_double_descr (thanks to
10454 Fergus Henderson for finding it).
10455 * Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
10456 10457 10458 == [5.3] 2000-09-24 ==
10459 10460 * Fixed _end declaration for OSF1.
10461 * There were lots of spurious leak reports in leak detection mode, caused
10462 by the fact that some pages were not being swept, and hence unmarked
10463 objects weren't making it onto free lists. (This bug dated back to 5.0.)
10464 * Fixed a typo in the liblinuxgc.so Makefile rule.
10465 * Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
10466 around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
10467 10468 10469 == [5.2] ==
10470 10471 * dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
10472 was defined as a macro. This prevented the collector from building on
10473 Irix.
10474 * We quietly assumed that indirect mark descriptors were never 0.
10475 Our own typed allocation interface violated that. This could result
10476 in segmentation faults in the marker with typed allocation.
10477 * Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
10478 Ben Hutchings for the patch).
10479 * Taught the collector about VC++ handling array operator new (thanks to
10480 Ben Hutchings for the patch).
10481 * The two copies of gc_hdrs.h had diverged. Made one a link to the other
10482 again.
10483 10484 10485 == [5.1] ==
10486 10487 * Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
10488 * Fixed a typo in GC_double_descr in typd_mlc.c.
10489 This probably could result in objects described by array descriptors not
10490 getting traced correctly (thanks to Ben Hutchings for pointing this out).
10491 * The block nearly full tests in reclaim.c were not correct for 64 bit
10492 environments. This could result in unnecessary heap growth under unlikely
10493 conditions.
10494 10495 10496 == [5.0] ==
10497 10498 * Fixed threadlibs.c for linux threads. -DUSE_LD_WRAP was broken and
10499 -ldl was omitted. Fixed Linux stack finding code to handle
10500 -DUSE_LD_WRAP correctly.
10501 * Added MSWIN32 exception handler around marker, so that the collector
10502 can recover from root segments that are unmapped during the collection.
10503 This caused occasional failures under Windows 98, and may also be
10504 an issue under Windows NT/2000.
10505 10506 10507 == [5.0alpha7] ==
10508 10509 * -DREDIRECT_MALLOC was broken in alpha6. Fixed.
10510 * Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
10511 accept it.
10512 * Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
10513 linked into every executable.
10514 * Added PREFETCH to bitmap marker. Changed it to use the header cache.
10515 * GC_push_marked sometimes pushed one object too many, resulting in a
10516 segmentation fault in GC_mark_from_mark_stack. This was probably an old
10517 bug. It finally showed up in gctest on win32.
10518 * Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
10519 when SMALL_CONFIG was defined. This was no doubt a major performance bug for
10520 the default win32 configuration.
10521 * Removed -DSMALL_CONFIG from NT_MAKEFILE. It seemed like an anachronism now
10522 that the average PC has 64MB or so.
10523 * Integrated Bryce McKinlay's patches for linux threads and dynamic loading
10524 from the libgcj tree. Turned on dynamic loading support for Linux/PPC.
10525 * Changed the stack finding code to use environ on HP/UX (thanks
10526 to Gustavo Rodriguez-Rivera for the suggestion). This should
10527 probably be done on other platforms, too. Since I can't test those, that'll
10528 wait until after 5.0.
10529 10530 10531 == [5.0alpha6] ==
10532 10533 * GC_malloc_explicitly_typed and friends sometimes failed to
10534 initialize first word.
10535 * Added allocation routines and support in the marker for mark descriptors
10536 in a type structure referenced by the first word of an object. This was
10537 introduced to support gcj, but hopefully in a way that makes it
10538 generically useful.
10539 * Added GC_requested_heapsize, and inhibited collections in non-incremental
10540 mode if the actual used heap size is less than what was explicitly
10541 requested.
10542 * The Solaris pthreads version of GC_pthread_create didn't handle a NULL
10543 attribute pointer. Solaris thread support used the wrong default thread
10544 stack size (thanks to Melissa O'Neill for the patch).
10545 * Changed PUSH_CONTENTS macro to no longer modify first parameter.
10546 This usually doesn't matter, but it was certainly an accident waiting
10547 to happen ...
10548 * Added GC_register_finalizer_no_order and friends to gc.h. They're
10549 needed by Java implementations.
10550 * Integrated a fix for a win32 deadlock resulting from clock() calling
10551 malloc (thanks to Chris Dodd).
10552 * Integrated Hiroshi Kawashima's port to Linux/MIPS. This was designed
10553 for a handheld platform, and may or may not be sufficient for other
10554 machines.
10555 * Fixed a va_arg problem with the %c specifier in cordprnt.c. It appears
10556 that this was always broken, but recent versions of gcc are the first to
10557 report the (statically detectable) bug.
10558 * Added an attempt at a more general solution to dlopen races/deadlocks.
10559 GC_dlopen now temporarily disables collection. Still not ideal, but ...
10560 * Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
10561 prefetch instructions. May improve performance measurably, but I'm not
10562 sure the code will run correctly on processors that don't support the
10563 instruction. Won't build except with very recent gcc.
10564 * Added caching for header lookups in the marker. This seems to result
10565 in a barely measurable performance gain. Added support for interleaved
10566 lookups of two pointers, but unconfigured that since the performance
10567 gain is currently near zero, and it adds to code size.
10568 * Changed Linux DATASTART definition to check both data_start and
10569 __data_start, since nothing else seems to be portable.
10570 * Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
10571 wrapping mechanism. Probably currently useful only on Linux.
10572 * Moved some variables for the scratch allocator into GC_arrays (suggested
10573 by Martin Hirzel).
10574 * Fixed a win32 threads bug that caused the collector to not look for
10575 interior pointers from one of the thread stacks without
10576 ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
10577 * Added Mingw32 support (thanks to Jeff Sturm for the patch).
10578 * Changed the alpha port to use the generic register scanning code instead
10579 of alpha_mach_dep.s. Alpha_mach_dep.s doesn't look for pointers in fp
10580 registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
10581 for helping debug this). Changed the IA64 code to
10582 do something similar for similar reasons.
10583 10584 10585 == [5.0alpha4] 1999-10-30 ==
10586 10587 * Added protection fault handling patch for Linux/M68K from Fergus
10588 Henderson and Roman Hodek.
10589 * Removed the tests for SGI_SOURCE in new_gc_alloc.h. This was causing that
10590 interface to fail on non-SGI platforms.
10591 * Changed the Linux stack finding code to use /proc, after changing it
10592 to use HEURISTIC1 (thanks to David Mosberger for pointing out /proc hook).
10593 * Added HP/UX incremental GC support and HP/UX 11 thread support.
10594 Thread support is currently still flaky.
10595 * Added basic Linux/IA64 support.
10596 * Integrated Anthony Green's PicoJava support.
10597 * Integrated Scott Ananian's StrongARM/NetBSD support.
10598 * Fixed some fairly serious performance bugs in the incremental
10599 collector. These have probably been there essentially forever.
10600 (Mark bits were sometimes set before scanning dirty pages.
10601 The reclaim phase unnecessarily dirtied full small object pages.)
10602 * Changed the reclaim phase to ignore nearly full pages to avoid
10603 touching them.
10604 * Limited GC_black_list_spacing to roughly the heap growth increment.
10605 * Changed full collection triggering heuristic to decrease full GC
10606 frequency by default, but to explicitly trigger full GCs during
10607 heap growth. This doesn't always improve things, but on average it's
10608 probably a win.
10609 * GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
10610 bug report and fix).
10611 10612 10613 == [5.0alpha3] 1999-09-15 ==
10614 10615 (Also known as 4.15alpha3.)
10616 * Added some highly incomplete code to support a copied young generation.
10617 Comments on nursery.h are appreciated.
10618 * Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
10619 so the same effect could be obtained with a runtime switch. This is
10620 a step towards standardizing on a single dynamic GC library.
10621 * Significantly changed the way leak detection is handled, as a consequence
10622 of the above.
10623 10624 10625 == [5.0alpha2] 1999-07-23 ==
10626 10627 * Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
10628 * Added -DKEEP_BACK_PTRS and backptr.h interface. (The implementation
10629 idea came from Alan Demers.)
10630 10631 10632 == [5.0alpha1] 1999-06-30 ==
10633 10634 (Also known as 4.15alpha1.)
10635 * Reworked large block allocator. Now uses multiple doubly linked free
10636 lists to approximate best fit.
10637 * Changed heap expansion heuristic. Entirely free blocks are no longer
10638 counted towards the heap size. This seems to have a major impact on
10639 heap size stability; the old version could expand the heap way too
10640 much in the presence of large block fragmentation.
10641 * added -DGC_ASSERTIONS and some simple assertions inside the collector.
10642 This is mainlyt for collector debugging.
10643 * added -DUSE_MUNMAP to allow the heap to shrink. Supported on only
10644 a few UNIX-like platforms for now.
10645 * added GC_dump_regions() for debugging of fragmentation issues.
10646 * Changed PowerPC pointer alignment under Linux to 4.
10647 * Changed the Linux/Alpha port to walk the data segment backwards until
10648 it encounters a SIGSEGV. The old way to find the start of the data
10649 segment broke with a recent release.
10650 * cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
10651 GC_register_finalizer, so that it would continue to work with GC_DEBUG.
10652 * allochblk sometimes cleared the wrong block for debugging purposes
10653 when it dropped blacklisted blocks. This could result in spurious
10654 error reports with GC_DEBUG.
10655 * added MACOS X Server support (thanks to Andrew Stone).
10656 * Changed the Solaris threads code to ignore stack limits > 8 MB with
10657 a warning. Empirically, it is not safe to access arbitrary pages
10658 in such large stacks. And the dirty bit implementation does not
10659 guarantee that none of them will be accessed.
10660 * Integrated Martin Tauchmann's Amiga changes.
10661 * Integrated James Dominy's OpenBSD/SPARC port.
10662 10663 10664 == [4.14] 1999-04-16 ==
10665 10666 * changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
10667 10668 10669 == [4.14alpha2] 1999-03-26 ==
10670 10671 * -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
10672 Recycling the mark stack during expansion could result in a size
10673 zero heap segment, which confused things. (This was probably also an
10674 issue with the normal config and huge pages.)
10675 * Did more work to make sure that callee-save registers were scanned
10676 completely, even with the setjmp-based code. Added USE_GENERIC_PUSH_REGS
10677 macro to facilitate testing on machines I have access to.
10678 * Added code to explicitly push register contents for win32 threads.
10679 This seems to be necessary. (Thanks to Pierre de Rop.)
10680 10681 10682 == [4.14alpha1] 1999-03-10 ==
10683 10684 * Fixed GC_print_source_ptr to not use a prototype.
10685 * generalized CYGWIN test.
10686 * gc::new did the wrong thing with PointerFreeGC placement (thanks to
10687 Rauli Ruohonen).
10688 * In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
10689 values could fail to be scanned if the register was saved and
10690 reused in a GC frame. This showed up in verbose mode with gctest
10691 compiled with an unreleased SGI compiler. I vaguely recall an old
10692 bug report that may have been related. The bug was probably quite old.
10693 (The problem was that the stack scanning could be deferred until
10694 after the relevant frame was overwritten, and the new save location
10695 might be outside the scanned area. Fixed by more eager stack scanning.)
10696 * PRINT_BLACK_LIST had some problems. A few source addresses were garbage.
10697 * Replaced Makefile.dj and added -I flags to cord make targets (thanks to
10698 Gary Leavens).
10699 * GC_try_to_collect was broken with the non-incremental collector.
10700 * gc_cleanup destructors could pass the wrong address to
10701 GC_register_finalizer_ignore_self in the presence of multiple
10702 inheritance (thanks to Darrell Schiebel).
10703 * Changed PowerPC Linux stack finding code.
10704 10705 10706 == [4.13] 1999-02-19 ==
10707 10708 * Fixed a crucial bug in the Watcom port. There was a redundant declaration
10709 of GC_push_one in gc_priv.h.
10710 * Added FINALIZE_ON_DEMAND.
10711 * Fixed some pre-ANSI cc problems in test.c.
10712 * Removed getpagesize() use for Solaris. It seems to be missing in one
10713 or two versions.
10714 * Fixed bool handling for SPARCCompiler version 4.2.
10715 * Fixed some files in include that had gotten unlinked from the main
10716 copy.
10717 * Some RS/6000 fixes (missing casts). (Thanks to Toralf Foerster.)
10718 * Fixed several problems in GC_debug_realloc, affecting mostly the
10719 FIND_LEAK case.
10720 * GC_exclude_static_roots contained a buggy unsigned comparison to
10721 terminate a loop (thanks to Wilson Ho).
10722 * CORD_str failed if the substring occurred at the last possible position.
10723 (Only affects cord users.)
10724 * Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
10725 os_dep.c code for dealing with various Linux versions.
10726 * Added workaround for Irix pthreads sigaction bug and possible signal
10727 misdirection problems.
10728 10729 10730 == [4.13alpha3] 1998-12-08 ==
10731 10732 * Fixed MSWIN32 recognition test, which interfered with cygwin.
10733 * Removed unnecessary gc_watcom.asm from distribution. Removed
10734 some obsolete README.win32 text.
10735 * Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
10736 for code for retrieving the fault address in a signal handler).
10737 Changed Linux signal handler context argument to be a pointer.
10738 * Took care of some new warnings generated by the 7.3 SGI compiler.
10739 * Integrated Phillip Musumeci's FreeBSD/ELF fixes.
10740 * -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
10741 10742 10743 == [4.13alpha2] 1998-08-08 ==
10744 10745 * Fixed more Linux threads problems.
10746 * Changed default GC_free_space_divisor to 3 with new large block allocation
10747 (thanks to Matthew Flatt for some measurements that suggest the old
10748 value sometimes favors space too much over time).
10749 * More CYGWIN32 fixes.
10750 * Integrated Tyson Dowd's Linux-M68K port.
10751 * Minor HP PA and DEC UNIX fixes from Fergus Henderson.
10752 * Integrated Christoffe Raffali's Linux-SPARC changes.
10753 * Allowed for one more GC fixup iteration after a full GC in incremental
10754 mode. Some quick measurements suggested that this significantly
10755 reduces pause times even with smaller GC_RATE values.
10756 * Moved some more GC data structures into GC_arrays. This decreases
10757 pause times and GC overhead, but makes debugging slightly less convenient.
10758 * Fixed namespace pollution problem ("excl_table").
10759 * Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
10760 that slightly.
10761 * Added some win32 threads fixes.
10762 * Integrated Ivan Demakov and David Stes' Watcom fixes.
10763 * Various other minor fixes contributed by many people.
10764 * Renamed config.h to gcconfig.h, since config.h tends to be used for
10765 many other things.
10766 * Integrated Matthew Flatt's support for 68K MacOS "far globals".
10767 * Fixed up some of the dynamic library Makefile targets for consistency
10768 across platforms.
10769 * Fixed a USE_MMAP typo that caused out-of-memory handling to fail
10770 on Solaris.
10771 * Added code to test.c to test thread creation a bit more.
10772 * Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
10773 * Fixed Solaris 2.7 stack base finding problem. (This may actually
10774 have been done in an earlier alpha release.)
10775 10776 10777 == [4.13alpha1] 1998-02-17 ==
10778 10779 * Changed RS6000 STACKBOTTOM.
10780 * Integrated Patrick Beard's Mac changes.
10781 * Alpha1 didn't compile on Irix m.n, m < 6.
10782 * Replaced Makefile.dj with a new one from Gary Leavens.
10783 * Added Andrew Stitcher's changes to support SCO OpenServer.
10784 * Added PRINT_BLACK_LIST, to allow debugging of high densities of false
10785 pointers.
10786 * Added code to debug allocator to keep track of return address
10787 in GC_malloc caller, thus giving a bit more context.
10788 * Changed default behavior of large block allocator to more
10789 aggressively avoid fragmentation. This is likely to slow down the
10790 collector when it succeeds at reducing space cost.
10791 * Integrated Fergus Henderson's CYGWIN32 changes. They are untested,
10792 but needed for newer versions.
10793 * USE_MMAP had some serious bugs. This caused the collector to fail
10794 consistently on Solaris with -DSMALL_CONFIG.
10795 * Added Linux threads support (thanks to Fergus Henderson).
10796 10797 10798 == [4.12] 1997-08-26 ==
10799 10800 * Fixed ElfW definition in dyn_load.c.
10801 This prevented the dynamic library support from compiling on some
10802 older ELF Linux systems.
10803 * Fixed UTS4 port (which I apparently mangled during the integration).
10804 (Thanks to Alistair Crooks.)
10805 * "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
10806 Fixed in gc_priv.h.
10807 * Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
10808 The current state of things should suffice for at least some
10809 applications.
10810 * Changed the out of memory retry count handling. (This matters only
10811 if GC_max_retries > 0, which is no longer the default.)
10812 * If a /proc read failed repeatedly, GC_written_pages was not updated
10813 correctly (thanks to Peter Chubb for diagnosing this).
10814 * Under unlikely circumstances, the allocator could infinite loop in
10815 an out of memory situation (thanks to Kenjiro Taura for
10816 identifying the problem and supplying a fix).
10817 * Fixed a syntactic error in the DJGPP code. Also fixed a test program
10818 problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
10819 * Atomic uncollectible objects were not treated correctly by the
10820 incremental collector. This resulted in weird log statistics and
10821 occasional performance problems (thanks to Peter Chubb for pointing this out).
10822 * Fixed some problems resulting from compilers that don't define
10823 __STDC__. In this case void * and char * were used inconsistently
10824 in some cases. (Void * should not have been used at all. If
10825 you have an ANSI superset compiler that does not define __STDC__,
10826 please compile with -D__STDC__=0. Thanks to Manuel Serrano and others
10827 for pointing out the problem.)
10828 * Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
10829 Also fixed some other IRIX_THREADS problems which may or may not have
10830 had observable symptoms.
10831 * Fixed an HP PA compilation problem in dyn_load.c (thanks to
10832 Philippe Queinnec).
10833 * SEGV fault handlers sometimes did not get reset correctly (thanks
10834 to David Pickens).
10835 * Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
10836 This probably needs more work to become functional.
10837 * Fixed struct sigcontext_struct in os_dep.c for compilation under
10838 Linux 2.1.X (thanks to Fergus Henderson).
10839 * Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
10840 (by Kristian Kristensen). These may still not be right, but it is
10841 it is likely to work more often than what was there before. They may
10842 even be exactly right.
10843 * Added a #include <string.h> to test_cpp.cc. This appears to help
10844 with HP/UX and gcc (thanks to Assar Westerlund).
10845 * Version 4.11 failed to run in incremental mode on recent 64-bit Irix
10846 kernels. This was a problem related to page unaligned heap segments.
10847 Changed the code to page align heap sections on all platforms.
10848 (I had mistakenly identified this as a kernel problem earlier.
10849 It was not.)
10850 * Version 4.11 did not make allocated storage executable, except on
10851 one or two platforms, due to a bug in a #if test (thanks to David Grove
10852 for pointing this out).
10853 * Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
10854 * Added GC_exclude_static_roots.
10855 * Fixed the object size mapping algorithm. This shouldn't matter,
10856 but the old code was ugly.
10857 * Heap checking code could die if one of the allocated objects was
10858 larger than its base address. (Unsigned underflow problem. Thanks
10859 to Clay Spence for isolating the problem.)
10860 * Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
10861 to Fred Stearns).
10862 * Added Fergus Henderson's patches for improved robustness with large
10863 heaps and lots of blacklisting.
10864 * Added Peter Chubb's changes to support Solaris Pthreads, to support
10865 MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
10866 through /proc, to add malloc_typed_ignore_off_page, and a few other
10867 minor features and bug fixes.
10868 * The Solaris 2 port should not use sbrk. I received confirmation from
10869 Sun that the use of sbrk and malloc in the same program is not
10870 supported. The collector now defines USE_MMAP by default on Solaris.
10871 * Replaced the djgpp makefile with Gary Leavens' version.
10872 * Fixed MSWIN32 detection test.
10873 * Added Fergus Henderson's patches to allow putting the collector into
10874 a DLL under GNU win32.
10875 * Added Ivan V. Demakov's port to Watcom C on x86.
10876 * Added Ian Piumarta's Linux/PowerPC port.
10877 * Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
10878 Brian Burton). This is of course unsafe, and may be controversial.
10879 On the other hand, it seems to be needed often enough that it's worth
10880 adding as a standard facility.
10881 * Add Lars Farm's suggestions on building the collector for MacOS.
10882 10883 10884 == [4.12alpha2] ==
10885 10886 (Changes not specified.)
10887 10888 10889 == [4.11] 1996-12-03 ==
10890 10891 * Rationalized (hopefully) GC_try_to_collect in an incremental collection
10892 environment. It appeared to not handle a call while a collection was in
10893 progress, and was otherwise too conservative.
10894 * Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
10895 code.
10896 * Added Patrick Beard's Mac fixes, with substantial completely untested
10897 modifications.
10898 * Fixed the MPROTECT_VDB code to deal with large pages and imprecise
10899 fault addresses (as on an UltraSPARC running Solaris 2.5). Note that this
10900 was not a problem in the default configuration, which uses PROC_VDB.
10901 * The DEC Alpha assembly code needed to restore $gp between calls (thanks to
10902 Fergus Henderson for tracking this down and supplying a patch).
10903 * The write command for "de" was completely broken for large files.
10904 I used the easiest portable fix, which involved changing the semantics
10905 so that f.new is written instead of overwriting f. That's safer anyway.
10906 * Added README.solaris2 with a discussion of the possible problems of
10907 mixing the collector's sbrk allocation with malloc/realloc.
10908 * Changed the data segment starting address for SGI machines. The
10909 old code failed under IRIX6.
10910 * Required double word alignment for MIPS.
10911 * Various minor fixes to remove warnings.
10912 * Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
10913 In particular, the collector could try to fork a thread with the
10914 world stopped as part of GC_thr_init. It also failed to deal with
10915 the case in which the original thread terminated before the whole
10916 process did.
10917 * Added -DNO_EXECUTE_PERMISSION. This has a major performance impact
10918 on the incremental collector under Irix, and perhaps under other
10919 operating systems.
10920 * Added some code to support allocating the heap with mmap. This may
10921 be preferable under some circumstances.
10922 * Integrated dynamic library support for HP (thanks to Knut Tvedten).
10923 * Integrated James Clark's win32 threads support, and made a number
10924 of changes to it (many of which suggested by Pontus Rydin). This is still
10925 not 100% solid.
10926 * Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
10927 370-class machine.
10928 * Fixed a serious bug in explicitly typed allocation. Objects requiring
10929 large descriptors where handled in a way that usually resulted in
10930 a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
10931 for helping to track this down).
10932 * Added partial support for GNU win32 development (thanks to
10933 Fergus Henderson).
10934 * Added optional support for Java-style finalization semantics (thanks to
10935 Patrick Bridges). This is recommended only for Java implementations.
10936 * GC_malloc_uncollectable faulted instead of returning 0 when out of
10937 memory (thanks to Daniel R. Grayson for noticing).
10938 * Calls to GC_base before the collector was initialized failed on a
10939 DEC Alpha (thanks to Matthew Flatt).
10940 * Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
10941 (thanks to Jeremy Fitzhardinge).
10942 * GC_debug_realloc failed for uncollectible objects (thanks to
10943 Jeremy Fitzhardinge).
10944 * Explicitly typed allocation could crash if it ran out of memory (thanks to
10945 Jeremy Fitzhardinge).
10946 * Added minimal support for a DEC Alpha running Linux.
10947 * Fixed a problem with allocation of objects whose size overflowed
10948 ptrdiff_t. (This now fails unconditionally, as it should.)
10949 * Added the beginning of Irix pthread support.
10950 * Integrated Xiaokun Zhu's fixes for djgpp 2.01.
10951 * Added SGI-style STL allocator support (gc_alloc.h).
10952 * Fixed a serious bug in README.solaris2.
10953 Multi-threaded programs must include
10954 gc.h with SOLARIS_THREADS defined.
10955 * Changed GC_free so it actually deallocates uncollectible objects (thanks
10956 to Peter Chubb for pointing out the problem).
10957 * Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
10958 * Changed the Borland cc configuration so that the assembler is not
10959 required.
10960 * Fixed a bug in the C++ test that caused it to fail in 64-bit
10961 environments.
10962 10963 10964 == [4.10t3] 1996-11-18 ==
10965 10966 Some changes related to threads support.
10967 10968 10969 == [4.10] 1996-02-19 ==
10970 10971 * Fixed a typo around a call to GC_collect_or_expand in alloc.c. It broke
10972 handling of out of memory. (Thanks to Patrick C. Beard for noticing.)
10973 10974 10975 == [4.9] 1996-02-12 ==
10976 10977 * More README.debugging fixes.
10978 * Objects ready for finalization, but not finalized in the same GC
10979 cycle, could be prematurely collected. This occasionally happened
10980 in test_cpp.
10981 * Too little memory was obtained from the system for very large
10982 objects. That could cause a heap explosion if these objects were
10983 not contiguous (e.g. under PCR), and too much of them was blacklisted.
10984 * Due to an improper initialization, the collector was too hesitant to
10985 allocate blacklisted objects immediately after system startup.
10986 * Moved GC_arrays from the data into the bss segment by not explicitly
10987 initializing it to zero. This significantly
10988 reduces the size of executables, and probably avoids some disk accesses
10989 on program startup. It's conceivable that it might break a port that I
10990 didn't test.
10991 * Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
10992 occurred a while ago.
10993 10994 10995 == [4.8] 1995-11-20 ==
10996 10997 * Changed a "comment" in a MacOS specific part of mach_dep.c that caused
10998 gcc to fail on other platforms.
10999 11000 11001 == [4.7] 1995-11-18 ==
11002 11003 * Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
11004 * Updated some Mac specific files (to synchronize with Patrick C. Beard).
11005 * Fixed a serious bug for machines with non-word-aligned pointers.
11006 (Thanks to Patrick C. Beard for pointing out the problem. The collector
11007 should fail almost any conceivable test immediately on such machines.)
11008 11009 11010 == [4.6] 1995-11-09 ==
11011 11012 * Added Linux ELF support (thanks to Arrigo Triulzi).
11013 * GC_base crashed if it was called before any other GC_ routines.
11014 This could happen if a gc_cleanup object was allocated outside the heap
11015 before any heap allocation.
11016 * The heap expansion heuristic was not stable if all objects had finalization
11017 enabled. Fixed finalize.c to count memory in finalization queue and
11018 avoid explicit deallocation. Changed alloc.c to also consider this count.
11019 (This is still not recommended. It's expensive if nothing else. Thanks
11020 to John Ellis for pointing this out.)
11021 * GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
11022 this out).
11023 * The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
11024 pointing this out). The current workaround is ugly, but expected to be
11025 temporary.
11026 * Fixed a formatting problem for SPARC stack traces.
11027 * Fixed some '=='s in os_dep.c that should have been assignments.
11028 Fortunately these were in code that should never be executed anyway (thanks
11029 to Fergus Henderson).
11030 * Fixed the heap block allocator to only drop blacklisted blocks in small
11031 chunks. Made BL_LIMIT self adjusting. (Both of these were in response
11032 to heap growth observed by Paul Graham.)
11033 * Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
11034 Patrick C. Beard).
11035 * Significantly updated README.debugging.
11036 * Fixed some problems with longjmps out of signal handlers, especially under
11037 Solaris. Added a workaround for the fact that siglongjmp doesn't appear to
11038 do the right thing with -lthread under Solaris.
11039 * Added MSDOS/djgpp port (thanks to Mitch Harris).
11040 * Added "make reserved_namespace" and "make user_namespace". The
11041 first renames ALL "GC_xxx" identifiers as "_GC_xxx". The second is the
11042 inverse transformation. Note that doing this is guaranteed to break all
11043 clients written for the other names.
11044 * descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
11045 defined should be -ALIGNMENT not WORDS_TO_BYTES(-1). This is
11046 a serious bug on machines with pointer alignment of less than a word.
11047 * GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
11048 end of the object correctly. Caused failures of the C++ test on a DEC Alpha
11049 with g++.
11050 * gc_inl.h still had problems. Partially fixed. Added warnings at the
11051 beginning to hopefully specify the remaining dangers.
11052 * Added DATAEND definition to config.h.
11053 * Fixed some of the .h file organization. Fixed "make floppy".
11054 11055 11056 == [4.5] 1995-06-14 ==
11057 11058 * Fixed many minor and one major README bugs (thanks to Franklin Chen
11059 for pointing out many of them).
11060 * Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
11061 * Added incremental GC support (MPROTECT_VDB) for Linux (with some
11062 help from Bruno Haible).
11063 * Altered SPARC recognition tests in gc.h and config.h (mostly as
11064 suggested by Fergus Henderson).
11065 * Added basic incremental GC support for win32, as implemented by
11066 Windows NT and Windows 95. GC_enable_incremental is a no-op
11067 under win32s, which doesn't implement enough of the VM interface.
11068 * Added -DLARGE_CONFIG.
11069 * Fixed GC_..._ignore_off_page to also function without
11070 -DALL_INTERIOR_POINTERS.
11071 * (Hopefully) fixed RS/6000 port. (Only the test was broken.)
11072 * Fixed a performance bug in the non-incremental collector running
11073 on machines supporting incremental collection with MPROTECT_VDB
11074 (e.g. SunOS 4, DEC AXP). This turned into a correctness bug under
11075 win32s with win32 incremental collection. (Not all memory protection
11076 was disabled.)
11077 * Fixed some ppcr related bit rot.
11078 * Caused dynamic libraries to be unregistered before re-registering.
11079 The old way turned out to be a performance bug on some machines.
11080 * GC_root_size was not properly maintained under MSWIN32.
11081 * Added -DNO_DEBUGGING and GC_dump.
11082 * Fixed a couple of bugs arising with SOLARIS_THREADS +
11083 REDIRECT_MALLOC.
11084 * Added NetBSD/M68K port (thanks to Peter Seebach).
11085 * Fixed a serious realloc bug. For certain object sizes, the collector
11086 wouldn't scan the expanded part of the object. (Thanks to Clay Spence
11087 for noticing the problem, and helping me to track it down.)
11088 11089 11090 == [4.4] 1995-02-18 ==
11091 11092 * ASM_CLEAR_CODE was erroneously defined for HP
11093 PA machines, resulting in a compile error.
11094 * Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
11095 * Gc_cleanup objects didn't work if they were created on
11096 the stack. Fixed.
11097 * One copy of Gc_cpp.h in the distribution was out of
11098 synch, and failed to document some known compiler
11099 problems with explicit destructor invocation. Partially
11100 fixed. There are probably other compilers on which
11101 gc_cleanup is miscompiled.
11102 * Fixed Makefile to pass C compiler flags to C++ compiler.
11103 * Added Mac fixes.
11104 * Fixed os_dep.c to work around what appears to be
11105 a new and different VirtualQuery bug under newer
11106 versions of win32s.
11107 * GC_non_gc_bytes was not correctly maintained by
11108 GC_free. Fixed (thanks to James Clark).
11109 * Added GC_set_max_heap_size.
11110 * Changed allocation code to ignore blacklisting if it is preventing
11111 use of a very large block of memory. This has the advantage
11112 that naive code allocating very large objects is much more
11113 likely to work. The downside is you might no
11114 longer find out that such code should really use
11115 GC_malloc_ignore_off_page.
11116 * Changed GC_printf under win32 to close and reopen the file
11117 between calls. FAT file systems otherwise make the log file
11118 useless for debugging.
11119 * Added GC_try_to_collect and GC_get_bytes_since_gc. These
11120 allow starting an abortable collection during idle times.
11121 This facility does not require special OS support. (Thanks to
11122 Michael Spertus of Geodesic Systems for suggesting this. It was
11123 actually an easy addition. Kumar Srikantan previously added a similar
11124 facility to a now ancient version of the collector. At the time
11125 this was much harder, and the result was less convincing.)
11126 * Added some support for the Borland development environment (thanks
11127 to John Ellis and Michael Spertus).
11128 * Removed a misfeature from checksums.c that caused unexpected
11129 heap growth (thanks to Scott Schwartz).
11130 * Changed finalize.c to call WARN if it encounters a finalization cycle.
11131 WARN is defined in gc_priv.h to write a message, usually to stdout.
11132 In many environments, this may be inappropriate.
11133 * Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
11134 naming convention.
11135 * Added GC_set_warn_proc to intercept warnings.
11136 * Fixed Amiga port (thanks to Michel Schinz).
11137 * Fixed a bug in mark.c that could result in an access to unmapped
11138 memory from GC_mark_from_mark_stack on machines with unaligned
11139 pointers.
11140 * Fixed a win32 specific performance bug that could result in scanning of
11141 objects allocated with the system malloc.
11142 * Added REDIRECT_MALLOC.
11143 11144 11145 == [4.3] 1994-12-23 ==
11146 11147 * Fixed SPARC alignment problem with GC_DEBUG.
11148 * Fixed Solaris threads /proc workaround. The real
11149 problem was an interaction with mprotect.
11150 * Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
11151 * Slightly improved allocator space utilization by
11152 fixing the GC_size_map mechanism.
11153 * Integrated some Sony News and MIPS RISCos 4.51
11154 patches (thanks to Nobuyuki Hikichi at Software Research Associates,
11155 Inc., Japan).
11156 * Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
11157 * Added GC_same_obj and friends. Changed GC_base
11158 to return 0 for pointers past the end of large objects.
11159 Improved GC_base performance with ALL_INTERIOR_POINTERS
11160 on machines with a slow integer mod operation.
11161 Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
11162 for preprocessor.
11163 * changed the default on most UNIX machines to be that
11164 signals are not disabled during critical GC operations.
11165 This is still ANSI-conforming, though somewhat dangerous
11166 in the presence of signal handlers. But the performance
11167 cost of the alternative is sometimes problematic.
11168 Can be changed back with a minor Makefile edit.
11169 * renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
11170 following my own naming convention. Added the function
11171 CORD_to_const_char_star.
11172 * Fixed a gross bug in GC_finalize. Symptom: occasional
11173 address faults in that function (thanks to Anselm Baird-Smith).
11174 * Added port to ICL DRS6000 running DRS/NX. Restructured
11175 things a bit to factor out common code, and remove obsolete
11176 code. Collector should now run under SUNOS5 with either
11177 mprotect or /proc dirty bits. (Thanks to Douglas Steel.)
11178 * More bug fixes and workarounds for Solaris 2.X. (These were
11179 mostly related to putting the collector in a dynamic library,
11180 which didn't really work before. Also SOLARIS_THREADS
11181 didn't interact well with dl_open.) (Thanks to Brian Lewis.)
11182 * Fixed a serious performance bug on the DEC Alpha. The text
11183 segment was getting registered as part of the root set.
11184 (Amazingly, the result was still fast enough that the bug
11185 was not conspicuous.) The fix works on OSF/1, version 1.3.
11186 Hopefully it also works on other versions of OSF/1 ...
11187 * Fixed a bug in GC_clear_roots.
11188 * Fixed a bug in GC_generic_malloc_words_small that broke
11189 gc_inl.h (reported by Antoine de Maricourt).
11190 * Fixed some problems with cord/de under Linux.
11191 * Fixed some cord problems, notably with CORD_riter4.
11192 * Added DG/UX port (thanks to Ben A. Mesander).
11193 * Added finalization registration routines with weaker ordering
11194 constraints. (This is necessary for C++ finalization with
11195 multiple inheritance, since the compiler often adds self-cycles.)
11196 * Filled the holes in the SCO port (thanks to Michael Arnoldus).
11197 * Completely rewritten the documentation in the interface gc_c++.h
11198 (later renamed gc_cpp.h) making it both clearer and more precise (done by
11199 John Ellis).
11200 * The definition of accessibility now ignores pointers from a finalizable
11201 object (an object with a clean-up function) to itself (done by John Ellis).
11202 This allows objects with virtual base classes to be finalizable by the
11203 collector. Compilers typically implement virtual base classes using
11204 pointers from an object to itself, which under the old definition of
11205 accessibility prevented objects with virtual base classes from ever
11206 being collected or finalized.
11207 * gc_cleanup now includes gc as a virtual base. This was enabled by
11208 the change in the definition of accessibility (by John Ellis).
11209 * Added support for operator new[] (by John Ellis). Since most compilers
11210 don't yet support operator new[], it is conditionalized on
11211 -DOPERATOR_NEW_ARRAY. The code is untested, but it's trivial and looks
11212 correct.
11213 * The test program test_gc_c++ (later renamed test_cpp.cc)
11214 tries to test for the C++-specific functionality not tested by the
11215 other programs.
11216 * Added unistd.h include to misc.c. (Needed for ppcr.)
11217 * Added PowerMac port (thanks to Patrick C. Beard).
11218 * Fixed "srcdir"-related Makefile problems. Changed things so
11219 that all externally visible include files always appear in the
11220 include subdirectory of the source. Made gc.h directly
11221 includable from C++ code (thanks to Per Bothner).
11222 * Changed Intel code to also mark from ebp (thanks to Kevin Warne).
11223 * Renamed C++ related files so they could live in a FAT
11224 file system (thanks to Charles Fiterman).
11225 * Changed Windows NT Makefile to include C++ support in
11226 gc.lib. Added C++ test as Makefile target.
11227 11228 11229 == [4.2] 1994-08-03 ==
11230 11231 * Multiple bug fixes/workarounds in the Solaris threads version.
11232 (It occasionally failed to locate some register contents for
11233 marking. It also turns out that thr_suspend and friends are
11234 unreliable in Solaris 2.3. Dirty bit reads appear
11235 to be unreliable under some weird
11236 circumstances. My stack marking code
11237 contained a serious performance bug. The new code is
11238 extremely defensive, and has not failed in several CPU
11239 hours of testing. But no guarantees ...)
11240 * Added MacOS support. (Thanks to Patrick C. Beard.
11241 David Chase suggested several improvements.)
11242 * Fixed several syntactic bugs in gc_c++.h and friends. (These
11243 didn't bother g++, but did bother most other compilers.)
11244 Fixed gc_c++.h finalization interface.
11245 * 64 bit alignment for allocated objects was not guaranteed in a
11246 few cases in which it should have been.
11247 * Added GC_malloc_atomic_ignore_off_page.
11248 * Added GC_collect_a_little.
11249 * Added some prototypes to gc.h.
11250 * Some other minor bug fixes (notably in Makefile).
11251 * Fixed OS/2 / EMX port (thanks to Ari Huttunen).
11252 * Fixed AmigaDOS port (thanks to Michel Schinz).
11253 * Fixed the DATASTART definition under Solaris. There
11254 was a 1 in 16K chance of the collector missing the first
11255 64K of static data (and thus crashing).
11256 * Fixed some blatant anachronisms in the README file.
11257 * Fixed PCR-Makefile for upcoming PPCR release.
11258 11259 11260 == [4.1] 1994-05-20 ==
11261 11262 * Changed finalization implementation to guarantee that
11263 finalization procedures are called outside of the allocation
11264 lock, making direct use of the interface a little less dangerous.
11265 MAY BREAK EXISTING CLIENTS that assume finalizers
11266 are protected by a lock. Since there seem to be few multi-threaded
11267 clients that use finalization, this is hopefully not much of
11268 a problem.
11269 * Fixed a gross bug in CORD_prev.
11270 * Fixed a bug in blacklst.c that could result in unbounded
11271 heap growth during startup on machines that do not clear
11272 memory obtained from the OS (e.g. win32s).
11273 * Ported de editor to Win32 and win32s. (This is now the only
11274 version with a mouse-sensitive UI. Thanks to Rob Haack for the
11275 implementation based on the generic Windows application template.)
11276 * Added GC_malloc_ignore_off_page to allocate large arrays
11277 in the presence of ALL_INTERIOR_POINTERS.
11278 * Changed GC_call_with_alloc_lock to not disable signals in
11279 the single-threaded case.
11280 * Reduced retry count in GC_collect_or_expand for garbage
11281 collecting when out of memory.
11282 * Made uncollectible allocations bypass black-listing, as they
11283 should.
11284 * Fixed a bug in typed_test in test.c that could cause (legitimate)
11285 GC crashes.
11286 * Fixed some potential synchronization problems in finalize.c
11287 * Fixed a real locking problem in typd_mlc.c.
11288 * Worked around an AIX 3.2 compiler feature that results in
11289 out of bounds memory references.
11290 * Partially worked around an IRIX5.2 beta problem (which may
11291 or may not persist to the final release).
11292 * Fixed a bug in the heap integrity checking code that could
11293 result in explicitly deallocated objects being identified as
11294 smashed. Fixed a bug in the dbg_mlc stack saving code
11295 that caused old argument pointers to be considered live.
11296 * Fixed a bug in CORD_ncmp (and hence CORD_str).
11297 * Repaired the OS2 port, which had suffered from bit rot
11298 in 4.0. Worked around what appears to be CSet/2 V1.0
11299 optimizer bug.
11300 * Fixed a Makefile bug for target "c++".
11301 11302 11303 == [4.0] 1994-04-07 ==
11304 11305 * Added support for Solaris threads (which was possible
11306 only by reimplementing some fraction of Solaris threads,
11307 since Sun doesn't currently make the thread debugging
11308 interface available).
11309 * Added non-threads Win32 and win32s support.
11310 * (Grudgingly, with suitable muttering of obscenities) renamed
11311 files so that the collector distribution could live on a FAT
11312 file system. Files that are guaranteed to be useless on
11313 a PC still have long names. Gc_inline.h and gc_private.h
11314 still exist, but now just include gc_inl.h and gc_priv.h.
11315 * Fixed a really obscure bug in finalization that could cause
11316 undetected mark stack overflows. (I would be surprised if
11317 any real code ever tickled this one.)
11318 * Changed finalization code to dynamically resize the hash
11319 tables it maintains. (This probably does not matter for well-
11320 -written code. It no doubt does for C++ code that overuses
11321 destructors.)
11322 * Added typed allocation primitives. Rewrote the marker to
11323 accommodate them with more reasonable efficiency. This
11324 change should also speed up marking for GC_malloc allocated
11325 objects a little. See gc_typed.h for new primitives. (Thanks to
11326 Zhong Shao performed much of the experimentation that led to the
11327 current typed allocation facility.)
11328 * Improved debugging facilities slightly. Allocation time
11329 stack traces are now kept by default on SPARC/SUNOS4. (Thanks to
11330 Scott Schwartz.)
11331 * Added better support for small heap applications.
11332 * Significantly extended cord package. Fixed a bug in the
11333 implementation of lazily read files. Printf and friends now
11334 have cord variants. Cord traversals are a bit faster.
11335 * Made ALL_INTERIOR_POINTERS recognition the default.
11336 * Fixed de so that it can run in constant space, independent
11337 of file size. Added simple string searching to cords and de.
11338 * Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
11339 * Added dynamic library support for OSF/1 (thanks to Alan Dosser and
11340 Tim Bingham at DEC).
11341 * Changed argument to GC_expand_hp to be expressed
11342 in units of bytes instead of heap blocks. (Necessary
11343 since the heap block size now varies depending on
11344 configuration. The old version was never very clean.)
11345 * Added GC_get_heap_size(). The previous "equivalent"
11346 was broken.
11347 * Restructured the Makefile a bit.
11348 * Added FreeBSD port (provided by Jeffrey Hsu).
11349 11350 11351 == [3.7] 1994-03-15 ==
11352 11353 * Added a workaround for an HP/UX compiler bug.
11354 * Fixed another stack clearing performance bug. Reworked
11355 that code once more.
11356 11357 11358 == [3.6] 1994-01-14 ==
11359 11360 * fixed a bug in the mark stack growth code that was introduced
11361 in 3.4.
11362 * fixed Makefile to work around DEC AXP compiler tail recursion
11363 bug.
11364 11365 11366 == [3.5] ==
11367 11368 * Minor collections now mark from roots only once, if that
11369 doesn't cause an excessive pause.
11370 * The stack clearing heuristic was refined to prevent anomalies
11371 with very heavily recursive programs and sparse stacks.
11372 * Fixed a bug that prevented mark stack growth in some cases.
11373 GC_objects_are_marked should be set to TRUE after a call
11374 to GC_push_roots and as part of GC_push_marked, since
11375 both can now set mark bits. I think this is only a performance
11376 bug, but I wouldn't bet on it. It's certainly very hard to argue
11377 that the old version was correct.
11378 * Fixed an incremental collection bug that prevented it from
11379 working at all when HBLKSIZE != getpagesize()
11380 * Changed dynamic_loading.c to include gc_priv.h before testing
11381 DYNAMIC_LOADING. SunOS dynamic library scanning
11382 must have been broken in 3.4.
11383 * Object size rounding now adapts to program behavior.
11384 * Added a workaround (provided by Manuel Serrano and
11385 colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
11386 that I had incorrectly assumed to have been squished.
11387 The collector was broken if the text segment size was within
11388 32 bytes of a multiple of 8K bytes, and if the beginning of
11389 the data segment contained interesting roots. The workaround
11390 assumes a demand-loadable executable. The original may have
11391 have "worked" in some other cases.
11392 * Added dynamic library support under IRIX5.
11393 * Added support for EMX under OS/2 (thanks to Ari Huttunen).
11394 * Added support of Motorola 88K processor running CX/UX (by Brent Benson).
11395 11396 11397 == [3.4] ==
11398 11399 * Fixed a performance bug in GC_realloc.
11400 * Updated the amiga port.
11401 * Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
11402 * Added cord library.
11403 * Added trivial performance enhancement for
11404 ALL_INTERIOR_POINTERS (do not scan last word).
11405 11406 11407 == [3.3] 1993-10-02 ==
11408 11409 * PCR-specific bugs (thanks to Neil Sharman).
11410 * Missing locking in GC_free, redundant FASTUNLOCK
11411 in GC_malloc_stubborn, and 2 bugs in
11412 GC_unregister_disappearing_link (pointed out by Neil Sharman).
11413 * Common symbols allocated by the SunOS4.X dynamic loader
11414 were not included in the root set.
11415 * Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
11416 * Merged Amiga port from Jesper Peterson (untested).
11417 * Merged NeXT port from Thomas Funke (significantly
11418 modified and untested). (Also thanks to Brian D. Carlstrom for
11419 the supplied the NeXT ports.)
11420 11421 11422 == [3.2] ==
11423 11424 Fixed a serious and not entirely repeatable bug in
11425 the incremental collector. It appeared only when dirty bit info
11426 on the roots was available, which is normally only under Solaris.
11427 It also added GC_general_register_disappearing_link, and some
11428 testing code. Interface.c disappeared.
11429 11430 11431 == [3.1] ==
11432 11433 * A workaround for a SunOS 4.X SPARC C compiler
11434 misfeature that caused problems when the collector was turned into
11435 a dynamic library.
11436 * A fix for a bug in GC_base that could result in a memory fault.
11437 * A fix for a performance bug (and several other misfeatures) pointed
11438 out by Dave Detlefs and Alan Dosser.
11439 * Use of dirty bit information for static data under Solaris 2.X.
11440 * DEC Alpha/OSF1 support (thanks to Alan Dosser).
11441 * Incremental collection on more platforms.
11442 * A more refined heap expansion policy. Less space usage by default.
11443 * Various minor enhancements to reduce space usage, and to reduce
11444 the amount of memory scanned by the collector.
11445 * Uncollectible allocation without per object overhead.
11446 * More conscientious handling of out-of-memory conditions.
11447 * Fixed a bug in debugging stubborn allocation.
11448 * Fixed a bug that resulted in occasional erroneous reporting of smashed
11449 objects with debugging allocation.
11450 * Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
11451 11452 11453 == [3.0] ==
11454 11455 Added generational/incremental collection and stubborn objects.
11456 11457 11458 == [2.6] 1993-04-27 ==
11459 11460 (Changes not specified.)
11461 11462 11463 == [2.5] ==
11464 11465 * Removed an explicit call to exit(1)
11466 * Fixed calls to GC_printf and GC_err_printf, so the correct number of
11467 arguments are always supplied. The OS/2 C compiler gets confused if
11468 the number of actuals and the number of formals differ. (ANSI C
11469 doesn't require this to work. The ANSI sanctioned way of doing things
11470 causes too many compatibility problems.)
11471 11472 11473 == [2.4] 1993-01-26 ==
11474 11475 Added GC_free_space_divisor as a tuning knob, added
11476 support for OS/2 and linux, and fixed the following bugs:
11477 * On machines with unaligned pointers (e.g. Sun 3), every 128th word could
11478 fail to be considered for marking.
11479 * Dynamic_load.c erroneously added 4 bytes to the length of the data and
11480 bss sections of the dynamic library. This could result in a bad memory
11481 reference if the actual length was a multiple of a page. (Observed on
11482 Sun 3. Can probably also happen on a Sun 4.)
11483 (Thanks to Robert Brazile for pointing out that the Sun 3 version
11484 was broken. Dynamic library handling is still broken on Sun 3s
11485 under 4.1.1U1, but apparently not 4.1.1. If you have such a machine,
11486 use -Bstatic.)
11487 11488 11489 == [2.3] ==
11490 11491 * Added ALL_INTERIOR_POINTERS.
11492 * Missing declaration of etext in the A/UX version.
11493 * Some PCR root-finding problems.
11494 * Blacklisting was not 100% effective, because the plausible future
11495 heap bounds were being miscalculated.
11496 * GC_realloc didn't handle out-of-memory correctly.
11497 * GC_base could return a nonzero value for addresses inside free blocks.
11498 * test.c wasn't really thread safe, and could erroneously report failure
11499 in a multi-threaded environment. (The locking primitives need to be
11500 replaced for other threads packages.)
11501 * GC_CONS was thoroughly broken.
11502 * On a SPARC with dynamic linking, signals stayed disabled while the
11503 client code was running (thanks to Manuel Serrano).
11504 11505 11506 == [2.2] ==
11507 11508 * GC_realloc could fail to extend the size of the object for certain large
11509 object sizes.
11510 * A blatant subscript range error in GC_printf, which unfortunately
11511 wasn't exercised on machines with sufficient stack alignment constraints.
11512 * GC_register_displacement did the wrong thing if it was called after
11513 any allocation had taken place.
11514 * The leak finding code would eventually break after 2048 byte
11515 byte objects leaked.
11516 * interface.c didn't compile.
11517 * The heap size remained much too small for large stacks.
11518 * The stack clearing code behaved badly for large stacks, and perhaps
11519 on HP/PA machines.
11520 11521 11522 == [2.1] ==
11523 11524 * The first stable version since 1.9.
11525 * Added support for PPCR.
11526 11527 11528 == [2.0] ==
11529 11530 * Introduced a consistent naming convention for collector
11531 routines and added support for registering dynamic library data segments
11532 in the standard mark_roots.c (original code supporting the SunOS dynamic
11533 loader provided by Bill Janssen). Most of the data structures were revamped.
11534 The treatment of interior pointers was completely changed. Finalization
11535 was added. Support for locking was added. Object kinds were added.
11536 We added a black listing facility to avoid allocating at addresses known
11537 to occur as integers somewhere in the address space. Much of this
11538 was accomplished by adapting ideas and code from the PCR collector.
11539 The test program was changed and expanded.
11540 11541 11542 == [1.9] 1992-01-29 ==
11543 11544 * fixed a major bug in gc_realloc.
11545 11546 11547 == [1.8] ==
11548 11549 * added ULTRIX support in gc_private.h. (Robert Brazile originally supplied
11550 the ULTRIX code. Alan Dosser and Regis Cridlig subsequently provided updates
11551 and information on variation between ULTRIX systems.)
11552 11553 11554 == [1.5] ==
11555 11556 * ensure 8 byte alignment for objects allocated on a sparc based machine.
11557 11558 11559 == [1.4] ==
11560 11561 * Does not use compile time determined values
11562 for the stack base. This no longer works on Sun 3s, since Sun 3/80s use
11563 a different stack base. We now use a straightforward heuristic on all
11564 machines on which it is known to work (incl. Sun 3s) and compile-time
11565 determined values for the rest. There should really be library calls
11566 to determine such values.
11567 11568 11569 == [1.3] ==
11570 11571 * Fixed spurious
11572 assembly language assignments to TMP_SP. Only the assignment in the PC/RT
11573 code is necessary. On other machines, with certain compiler options,
11574 the assignments can lead to an unsaved register being overwritten.
11575 Known to cause problems under SunOS 3.5 WITHOUT the -O option. (With
11576 -O the compiler recognizes it as dead code. It probably shouldn't,
11577 but that's another story.)
11578 The SPARC-specific code was originally contributed by Mark Weiser.
11579 The Encore Multimax modifications were supplied by Kevin Kenny.
11580 The adaptation to the IBM PC/RT is largely
11581 due to Vernon Lee, on machines made available to Rice by IBM.
11582 Much of the HP specific code and a number of good suggestions for improving
11583 the generic code are due to Walter Underwood.
11584 Parag Patel supplied the A/UX code.
11585 Manuel Serrano supplied linux and Sony News specific code.
11586