summaryrefslogtreecommitdiff
path: root/dyn_load.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix storage class of local variable in register_dynamic_libraries (Irix)Ivan Maidanski2016-12-201-1/+1
| | | | | | * dyn_load.c [IRIX5 || USE_PROC_FOR_LIBRARIES && !LINUX] (GC_register_dynamic_libraries): Remove "static" for needed_sz local variable (and initialize it to zero).
* Fix '~' operator application to unsigned values shorter than wordIvan Maidanski2016-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the fix, unsigned result of "~" operator is zero-extended to a wide type (word) thus the result has leading zeros (which is not expected to be). * dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_register_dynlib_callback): Cast (sizeof(word)-1) to word before "~" operation. * mark.c (GC_mark_from): Likewise. * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Likewise. * mark_rts.c [!MSWIN32 && !MSWINCE && !CYGWIN32] (GC_remove_roots_inner): Likewise. * os_dep.c [SVR4 || AUX || DGUX || LINUX && SPARC] (GC_SysVGetDataStart): Likewise. * os_dep.c [!MSWIN32 && DATASTART_USES_BSDGETDATASTART] (GC_FreeBSDGetDataStart): Likewise. * dyn_load.c [(MSWIN32 || MSWINCE || CYGWIN32) && !GC_WIN32_THREADS] (GC_cond_add_roots): Cast (dwAllocationGranularity-1) to word before "~" operation. * include/private/gc_priv.h (HBLKPTR): Cast (HBLKSIZE-1) to word before "~" operation. * os_dep.c [USE_WINALLOC || CYGWIN32] (GC_win32_get_mem): Likewise. * mark.c (GC_mark_from): Change type of new_size local variable from int to word. * os_dep.c [OPENBSD] (GC_find_limit_openbsd, GC_skip_hole_openbsd): Change type of pgsz local variable from size_t to word (to avoid implicit unsigned value extension after "~" operation). * os_dep.c [PROC_VDB] (GC_read_dirty): Cast (sizeof(long)-1) to word before "~" operation.
* Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)Ivan Maidanski2016-10-261-1/+2
| | | | | | * dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_register_dynamic_libraries_dl_iterate_phdr): Cast datastart to char*volatile* before dereferencing and checking against NULL.
* Workaround 'value of macro unknown' cppcheck info messagesIvan Maidanski2016-10-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The messages are eliminated for the macros: __int64, _SIGRTMIN, ARM_THREAD_STATE32, ARM_UNIFIED_THREAD_STATE, FIXUP_POINTER, GC_COLLECT_AT_MALLOC, GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_INITIAL_HEAP_SIZE, GC_MAX_RETRIES, GC_MAXIMUM_HEAP_SIZE, GC_MIN_MARKERS, GC_SIG_SUSPEND, GC_SIG_THR_RESTART, GC_TIME_LIMIT, HEURISTIC2_LIMIT, MAP_ANONYMOUS, RTLD_DI_LINKMAP, SAVE_CALL_COUNT, SIZE_MAX. * alloc.c (GC_full_freq, GC_free_space_divisor, GC_time_limit): Define to default immediate value if CPPCHECK. * darwin_stop_world.c [ARM32 && ARM_THREAD_STATE32] (GC_ARM_UNIFIED_THREAD_STATE): New macro (defined to ARM_UNIFIED_THREAD_STATE unless CPPCHECK). * darwin_stop_world.c [ARM32 && ARM_THREAD_STATE32] (GC_stack_range_for): Use GC_ARM_UNIFIED_THREAD_STATE; do not use value of ARM_THREAD_STATE32 if CPPCHECK. * dyn_load.c [!USE_PROC_FOR_LIBRARIES] (GC_RTLD_DI_LINKMAP): New macro (defined to RTLD_DI_LINKMAP unless CPPCHECK). * dyn_load.c [!USE_PROC_FOR_LIBRARIES] (GC_FirstDLOpenedLinkMap): Use GC_RTLD_DI_LINKMAP. * include/gc.h (GC_word, GC_signed_word): Do not define to __int64 if CPPCHECK. * include/gc.h (GC_INIT_CONF_MAX_RETRIES, GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ, GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_SUSPEND_SIGNAL, GC_INIT_CONF_THR_RESTART_SIGNAL, GC_MAXIMUM_HEAP_SIZE, GC_INITIAL_HEAP_SIZE): Define to empty if CPPCHECK. * include/private/gc_priv.h [SIZE_MAX] (GC_SIZE_MAX): Do not define to SIZE_MAX if CPPCHECK. * include/private/gc_priv.h [DARWIN && ARM32 && ARM_UNIFIED_THREAD_STATE] (GC_MACH_THREAD_STATE): Do not define to ARM_UNIFIED_THREAD_STATE if CPPCHECK. * include/private/gc_priv.h [GC_PTHREADS && _SIGRTMIN] (SIG_SUSPEND): Do not define to _SIGRTMIN if CPPCHECK. * pthread_stop_world.c [!SIG_THR_RESTART && _SIGRTMIN] (SIG_THR_RESTART): Likewise. * include/private/gcconfig.h [SAVE_CALL_CHAIN && SAVE_CALL_COUNT] (NFRAMES): Define to immediate value (do not use value of SAVE_CALL_COUNT) if CPPCHECK. * include/private/gcconfig.h [!FIXUP_POINTER && POINTER_MASK] (FIXUP_POINTER): Define to a sample expression (not using values of POINTER_MASK and POINTER_SHIFT) if CPPCHECK. * malloc.c [GC_COLLECT_AT_MALLOC] (GC_dbg_collect_at_malloc_min_lb): Define to sample value (not using value of GC_COLLECT_AT_MALLOC) if CPPCHECK. * misc.c [GC_INITIAL_HEAP_SIZE] (GC_init): Define to default immediate value if CPPCHECK. * os_dep.c [!BEOS && !OS2 && !SWIN32 && !GC_OPENBSD_THREADS && !STACKBOTTOM && HEURISTIC2_LIMIT] (GC_get_main_stack_base): Do not use value of HEURISTIC2_LIMIT if CPPCHECK. * os_dep.c [USE_MMAP_ANON && MAP_ANONYMOUS] (OPT_MAP_ANON): Do not use value of MAP_ANONYMOUS if CPPCHECK. * pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD && !GC_TIME_LIMIT] (GC_TIME_LIMIT): Do not define. * pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD] (GC_brief_async_signal_safe_sleep): Do not use value of GC_TIME_LIMIT if CPPCHECK. * pthread_support.c [PARALLEL_MARK && GC_MIN_MARKERS] (GC_thr_init): Do not use value of GC_MIN_MARKERS if CPPCHECK. * win32_threads.c [PARALLEL_MARK && GC_MIN_MARKERS] (GC_thr_init): Likewise. * tests/test.c [GC_DEBUG && SAVE_CALL_CHAIN && SAVE_CALL_COUNT] (check_heap_stats): Use NFRAMES instead of SAVE_CALL_COUNT (i.e. do not use value of SAVE_CALL_COUNT).
* Eliminate 'value of DATASTART2 unknown' cppcheck info messagesIvan Maidanski2016-10-221-1/+1
| | | | | | | | | | * dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_register_dynamic_libraries_dl_iterate_phdr): Replace defined(DATASTART2) with defined(GC_HAVE_DATAREGION2). * os_dep.c [!OS2 && !MSWIN32 && !OPENBSD] (GC_register_data_segments): Likewise. * include/private/gcconfig.h [DATASTART2] (GC_HAVE_DATAREGION2): New macro.
* Eliminate 'printf format specifies type void*' GCC pedantic warningsIvan Maidanski2016-10-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly cast pointer arguments (passed to printf and ABORT_ARGn) to void* to match %p format specifier. * allchblk.c [!NO_DEBUGGING] (GC_dump_regions): Cast arguments to void* those printf format specifier is %p. * alloc.c [!NO_DEBUGGING] (GC_print_heap_sects): Likewise. * backgraph.c [MAKE_BACK_GRAPH] (backwards_height): Likewise. * blacklst.c (GC_default_print_heap_obj_proc): Likewise. * blacklst.c [PRINT_BLACK_LIST] (GC_print_blacklisted_ptr): Likewise. * cord/cordbscs.c (CORD_dump_inner): Likewise. * darwin_stop_world.c [DEBUG_THREADS_EXTRA] (GC_FindTopOfStack): Likewise. * darwin_stop_world.c [DEBUG_THREADS] (GC_stack_range_for): Likewise. * dbg_mlc.c (GC_print_obj): Likewise. * dbg_mlc.c [!SHORT_DBG_HDRS] (GC_print_smashed_obj): Likewise. * dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_register_dynamic_libraries_dl_iterate_phdr): Likewise. * dyn_load.c [IRIX5] (GC_register_dynamic_libraries): Likewise. * finalize.c [!NO_DEBUGGING] (GC_dump_finalization_links, GC_dump_finalization): Likewise. * include/private/gc_pmark.h [MARK_BIT_PER_GRANULE || MARK_BIT_PER_OBJ] (PUSH_CONTENTS_HDR): Likewise. * mark.c [ENABLE_TRACE] (GC_mark_from): Likewise. * mark_rts.c [!NO_DEBUGGING] (GC_print_static_roots): Likewise. * mark_rts.c [DEBUG_ADD_DEL_ROOTS] (GC_add_roots_inner, GC_remove_root_at_pos): Likewise. * misc.c [ENABLE_TRACE] (GC_init): Likewise. * os_dep.c [LINUX || HURD] (GC_init_linux_data_start): Likewise. * os_dep.c [!OS2 && !MSWIN32] (GC_register_data_segments): Likewise. * os_dep.c [USE_MUNMAP && !USE_WINALLOC && !NACL] (GC_remap): Likewise. * os_dep.c [!DARWIN && !MSWIN32 && !MSWINCE] (GC_write_fault_handler): Likewise. * os_dep.c [PROC_VDB && DEBUG_DIRTY_BITS] (GC_read_dirty): Likewise. * os_dep.c [MPROTECT_VDB && DARWIN && BROKEN_EXCEPTION_HANDLING] (catch_exception_raise): Likewise. * pthread_stop_world.c [DEBUG_THREADS] (GC_push_all_stacks): Likewise. * pthread_support.c [DEBUG_THREADS] (GC_unregister_my_thread_inner, GC_unregister_my_thread, GC_start_rtn_prepare_thread): Likewise. * reclaim.c [!NO_DEBUGGING] (GC_print_free_list): Likewise. * specific.c [USE_CUSTOM_SPECIFIC && GC_ASSERTIONS] (GC_check_tsd_marks): Likewise. * win32_threads.c [DEBUG_THREADS] (GC_push_stack_for): Likewise. * win32_threads.c [GC_PTHREADS && DEBUG_THREADS] (GC_pthread_join, GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc): Likewise. * dbg_mlc.c: Remove duplicate check of SHORT_DBG_HDRS. * include/private/gc_pmark.h [MARK_BIT_PER_GRANULE || MARK_BIT_PER_OBJ] (PUSH_CONTENTS_HDR): Add missing parentheses around "source" argument when casting it to ptr_t.
* Fix 'variable unused' compiler warning in FirstDLOpenedLinkMapIvan Maidanski2016-10-191-1/+2
| | | | | * dyn_load.c [!USE_PROC_FOR_LIBRARIES] (GC_FirstDLOpenedLinkMap): Declare dp local variable only if !NETBSD or !RTLD_DI_LINKMAP.
* Workaround 'obsolete function alloca() called' cppcheck warningsIvan Maidanski2016-10-181-6/+14
| | | | | | * dyn_load.c [AIX] (GC_register_dynamic_libraries): Code refactoring to have alloca() call only once (at the beginning of a block); use variable-length array instead of alloca() if CPPCHECK.
* Fix 'variable assigned a value that is never used' cppcheck style warningsIvan Maidanski2016-10-181-13/+0
| | | | | | | | | | | | | | * dyn_load.c [USE_PROC_FOR_LIBRARIES] (GC_register_map_entries): Remove datastart local variable. * extra/AmigaOS.c [GC_AMIGA_DS] (GC_register_data_segments): Remove num local variable. * extra/MacOS.c (firstTime): Remove. * extra/MacOS.c (GC_MacTemporaryNewPtr): Do not define firstTime if SHARED_LIBRARY_BUILD. * extra/MacOS.c (GC_MacFreeTemporaryMemory): Do not define (and update) totalMemoryUsed if SHARED_LIBRARY_BUILD. * extra/msvc_dbg.c (GetDescriptionFromAddress): Do not assign size variable when its value no longer used.
* Eliminate more 'scope of variable can be reduced' cppcheck style warningsIvan Maidanski2016-10-141-34/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allchblk.c [MARK_BIT_PER_GRANULE] (setup_header): Move local variable declarations to the inner scope where the variables are actually used. * alloc.c [!SMALL_CONFIG] (GC_try_to_collect_inner, GC_finish_collection): Likewise. * alloc.c (GC_stopped_mark): Likewise. * backgraph.c [MAKE_BACK_GRAPH] (add_edge): Likewise. * darwin_stop_world.c [GC_DARWIN_THREADS] (GC_push_all_stacks, GC_stop_world, GC_thread_resume): Likewise. * dyn_load.c [USE_PROC_FOR_LIBRARIES] (sort_heap_sects): Likewise. * dyn_load.c [ALPHA && OSF1 || HPUX] (GC_register_dynamic_libraries): Likewise. * dyn_load.c [DARWIN] (GC_dyld_image_add, GC_dyld_image_remove): Likewise. * extra/AmigaOS.c (GC_amiga_free_all_mem, GC_amiga_allocwrapper_any): Likewise. * extra/msvc_dbg.c (GetDescriptionFromAddress): Likewise. * gcj_mlc.c [GC_GCJ_SUPPORT] (GC_core_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. * include/new_gc_alloc.h (single_client_gc_alloc_template::deallocate, single_client_gc_alloc_template::ptr_free_deallocate, single_client_traceable_alloc_template::deallocate, single_client_traceable_alloc_template::ptr_free_deallocate): Likewise. * malloc.c [THREADS] (GC_free_inner): Likewise. * mark_rts.c (GC_add_roots_inner): Likewise. * misc.c (GC_clear_stack): Likewise. * os_dep.c [GWW_VDB] (GC_gww_read_dirty): Likewise. * os_dep.c [MPROTECT_VDB] (GC_protect_heap): Likewise. * os_dep.c [PROC_VDB] (GC_read_dirty): Likewise. * os_dep.c [MPROTECT_VDB && DARWIN] (catch_exception_raise): Likewise. * pthread_stop_world.c [GC_NETBSD_THREADS_WORKAROUND] (GC_start_world): Likewise. * pthread_support.c [!GC_NO_PTHREAD_SIGMASK] (pthread_sigmask): Likewise. * reclaim.c [!SMALL_CONFIG] (GC_reclaim_all): Likewise. * tests/test.c (run_one_test): Likewise. * tests/test.c [MACOS] (SetMinimumStack): Likewise. * thread_local_alloc.c [THREAD_LOCAL_ALLOC] (return_single_freelist): Likewise. * typd_mlc.c (GC_make_descriptor): Likewise. * win32_threads.c (GC_start_world, GC_CreateThread): Likewise. * win32_threads.c [!GC_PTHREADS_PARAMARK] (GC_start_mark_threads_inner): Likewise. * win32_threads.c [!MSWINCE && !CYGWIN32] (GC_beginthreadex): Likewise.
* Workaround more '#error' cppcheck error messagesIvan Maidanski2016-10-131-2/+4
| | | | | | | | | | | | | | | | | | | | * darwin_stop_world.c (GC_stack_range_for): Skip #error pragma if CPPCHECK. * dyn_load.c [DYNAMIC_LOADING && !PCR && !DARWIN]: Likewise. * dyn_load.c [SOLARISDL && !PCR && !GC_SOLARIS_THREADS && THREADS]: Likewise. * include/private/gc_priv.h [!POWERPC && !I386 && !X86_64 && !ARM32 && !AARCH64] (GC_THREAD_STATE_T): Likewise. * include/private/gcconfig.h [GC_IRIX_THREADS && !IRIX5 || ...]: Likewise. * include/private/gcconfig.h [PARALLEL_MARK && !THREADS]: Likewise. * include/private/gcconfig.h [MARK_BIT_PER_GRANULE && MARK_BIT_PER_OBJ || ...]: Likewise. * pcr_interface.c [PCR] (GC_enumerate_block): Likewise. * win32_threads.c [!I386 && !X86_64 && !ARM32 && !SHx && !MIPS && !PPC && !ALPHA] (GC_push_stack_for): Likewise. * darwin_stop_world.c (GC_stack_range_for): Initialize "lo" local variable even if platform unsupported.
* Fix missing #error pragmaIvan Maidanski2016-10-121-3/+3
| | | | | | | | | * dyn_load.c [DYNAMIC_LOADING && !PCR && !DARWIN]: Replace "-->" with * dyn_load.c [SOLARISDL && !PCR && !GC_SOLARIS_THREADS && THREADS]: Likewise. * include/private/gc_hdrs [CPP_WORDSZ!=32 && CPP_WORDSZ<36]: Likewise. * include/private/gc_priv.h [!HBLKSIZE]: Likewise. * pthread_stop_world.c [!NSIG]: Likewise.
* Eliminate more 'scope of variable can be reduced' cppcheck style warningsIvan Maidanski2016-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * allchblk.c (GC_compute_large_free_bytes, GC_print_hblkfreelist, free_list_index_of, GC_dump_regions, GC_add_to_fl, GC_unmap_old, GC_allochblk_nth): Move local variable declaration to the inner scope where the variable is actually used. * alloc.c (GC_maybe_gc, GC_collect_a_little_inner, GC_set_fl_marks, GC_clear_fl_marks): Likewise. * dyn_load.c (GC_register_dynamic_libraries): Likewise. * finalize.c (GC_ignore_self_finalize_mark_proc, GC_register_finalizer_inner, GC_dump_finalization_links, GC_dump_finalization, GC_make_disappearing_links_disappear, GC_remove_dangling_disappearing_links, GC_invoke_finalizers): Likewise. * headers.c (GC_install_counts): Likewise. * malloc.c (GC_malloc_kind_global, GC_generic_malloc_uncollectable, GC_free): Likewise. * mark.c (GC_push_all_eager, GC_push_marked1, GC_push_marked2, GC_push_marked4): Likewise. * mark_rts.c (GC_next_exclusion, GC_exclude_static_roots_inner, GC_push_conditional_with_exclusions): Likewise. * misc.c (GC_base, GC_parse_mem_size_arg, GC_write): Likewise. * os_dep.c (GC_repeat_read, GC_get_maps, GC_least_described_address, GC_register_root_section, GC_register_data_segments): Likewise. * reclaim.c (GC_reclaim_block, GC_start_reclaim): Likewise. * finalize.c (ITERATE_DL_HASHTBL_BEGIN): Declare prev_dl local variable.
* Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)Ivan Maidanski2016-08-171-6/+7
| | | | | | * dyn_load.c (GC_init_dyld): Cast _dyld_register_func_for_add_image and _dyld_register_func_for_remove_image argument to void compiler warning about incompatible pointer types; update relevant comment.
* Do not report multiple load-seg-overflow warnings per one dl-iterateIvan Maidanski2016-08-011-2/+7
| | | | | | | | | | | | | (fix commit 017bd0a) * dyn_load.c [HAVE_DL_ITERATE_PHDR && PT_GNU_RELRO] (load_segs_overflow): New static variable. * dyn_load.c [HAVE_DL_ITERATE_PHDR && PT_GNU_RELRO] (GC_register_dynlib_callback): Do not call WARN if load_segs_overflow; set load_segs_overflow to true after calling WARN. * dyn_load.c [HAVE_DL_ITERATE_PHDR && PT_GNU_RELRO] (GC_register_dynamic_libraries_dl_iterate_phdr): Reset load_segs_overflow.
* Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)Kjetil Matheussen2016-07-271-69/+63
| | | | | | | | | | | This is needed in case a PT_GNU_RELRO segment is placed before its corresponding PT_LOAD segments. (It might be that this is guaranteed never to be the case, but at least this way we do not have to worry about it.) * dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_register_dynlib_callback): Process PT_LOAD segments in a separate pass before PT_GNU_RELRO ones; replace FIXME with TODO; reformat code.
* Handle load_segs overflow in register_dynlib_callback gracefullyKjetil Matheussen2016-07-221-6/+11
| | | | | | | * dyn_load.c [HAVE_DL_ITERATE_PHDR and PT_GNU_RELRO] (GC_register_dynlib_callback): If n_load_segs reaches MAX_LOAD_SEGS then call WARN (with the appropriate message) and call GC_add_roots_inner to register the segment directly instead of ABORT.
* Do not warn of missing PT_GNU_RELRO segment when custom DSO filter usedKjetil Matheussen2016-07-221-2/+5
| | | | | | | | | | | | | | | | It is most likely that it is not found just because the segment had been excluded. Alternatively, we could have registered all segments, and checked the callback afterwards, but then we could break programs that rely on GC_has_static_roots_func to avoid overflowing the maximum number of roots. In addition, it would make the logic slightly more complicated, probably without a very good reason since the chance of this warning to show without the segment being excluded is likely to be none. * dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_register_dynlib_callback): Do not call WARN() if GC_has_static_roots callback is set.
* Fix missing new-line and redundant trailing dot in WARN messagesIvan Maidanski2016-07-221-1/+1
| | | | | | | | | | | | | * allchblk.c (GC_get_first_part, GC_allochblk_nth): Remove '.' before '\n' in WARN message. * os_dep.c (GC_read_dirty, GC_mprotect_thread, GC_dirty_init): Likewise. * win32_threads.c (GC_start_mark_threads_inner): Likewise. * alloc.c (GC_collect_or_expand): Remove space before '...' in WARN message. * dyn_load.c (GC_register_dynlib_callback): Add '\n' at the end of WARN message. * os_dep.c (GC_unix_mmap_get_mem, GC_unix_mmap_get_mem): Likewise.
* Check DATASTART is less than DATAEND even assertions offIvan Maidanski2015-10-261-0/+9
| | | | | | | | | | | * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Abort with the appropriate message if DATASTART is NULL or greater than DATAEND (same for DATASTART2 and DATAEND2). * os_dep.c (GC_init_linux_data_start, GC_register_data_segments): Likewise. * os_dep.c (GC_init_linux_data_start, GC_register_data_segments): Remove assertion about DATASTART and DATAEND. * os_dep.c (GC_init_linux_data_start): Code refactoring.
* Consistently set type of DATASTART/END to ptr_tIvan Maidanski2015-10-161-5/+5
| | | | | | | | | | | (code refactoring) * dyn_load.c (GC_register_map_entries, GC_register_dynamic_libraries_dl_iterate_phdr): Remove redundant casting to ptr_t of DATASTART, DATAEND, DATAEND2. * os_dep.c (GC_register_data_segments): Likewise. * include/private/gcconfig.h (DATAEND, DATASTART): Add cast to ptr_t where missing.
* NaCl runtime fixesElijah Taylor2015-10-061-13/+13
| | | | | | | | | | | | | | | | (Apply commit b328e88 from 'mono_libgc' branch.) * fix compile/runtime issues caused by upstream changes * add NaCl glibc support * various changes to support running tests in NaCl glibc from 'make check' Conflicts: * dyn_load.c * include/private/gcconfig.h * misc.c * pthread_stop_world.c * pthread_support.c
* Support Android API level 21Ivan Maidanski2015-09-091-3/+3
| | | | | | | (fix 'link_map redefinition' error on Android with API level 21+) * dyn_load.c (link_map, r_debug): Do not define if android-21 (or higher) API is used; update comment.
* Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)Tsugutomo Enami2014-11-021-2/+9
| | | | | | | | | | | | | | Current GC_FirstDLOpenedLinkMap() for NetBSD calls dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &lm) to find link_map. So it will find link_map of libgc. With guile's case, libgc is link to libguile and libguile is linked to the guile command, so libgc is not the first one in the link_map chain. That is why, data section of libguile, where scm_protects exists, is not added to GC root and GC_is_visible fails. * dyn_load.c (GC_FirstDLOpenedLinkMap): Iterate over link_map (provided by dlinfo(RTLD_SELF)) to return 2nd element instead of the provided one which might not always belong to libgc (only for NETBSD and defined RTLD_DI_LINKMAP).
* Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android link.hIvan Maidanski2013-11-111-19/+32
| | | | | | | | | (revert part of commit a6e4ee9) * dyn_load.c: Include asm/elf.h and linux/elf-em.h explicitly, and undefine ELF_DATA and EM_ALPHA (if PLATFORM_ANDROID and BIONIC_ELFDATA_REDEF_BUG are defined) to avoid "macro redefined" warnings reported for link.h of Android Bionic.
* Fix dyn_load.c compilation for Android 4.3Ivan Maidanski2013-11-091-14/+19
| | | | | | | | * dyn_load.c (struct link_map, r_debug): Define explicitly (matching that of Android 4.2 Bionic) instead of include linker.h (only if PLATFORM_ANDROID); remove workaround enabled by BIONIC_ELFDATA_REDEF_BUG regarding ELF_DATA redefinition (as linker.h is not included); update comment.
* Fix typos in commentsOndrej Bilka2013-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * blacklst.c: Fix typo ("even though"). * cord/cordbscs.c: Fix typo ("exponentially"). * cord/cordxtra.c: Fix typo ("represented"). * dyn_load.c: Fix typos ("uncollectible", "occurred"). * extra/AmigaOS: Fix typos ("specific", "necessary", "always", "effectiveness"). * finalize.c: Fix typo ("descendants"). * include/cord.h: Fix typo ("idiosyncrasies"). * include/gc.h: Fix typo ("collectible"). * include/gc_allocator.h: Fix typos ("allocator", "[un]collectible"). * mach_dep.c: Fix typo ("erroneously"). * malloc.c: Fix typos ("[un]collectible", "pointer-free", "initialization"). * mallocx.c: Fix typos ("largely", "pointer-free", "uncollectible"). * mark.c: Fix typos ("[un]collectible", "even though"). * misc.c: Fix typo ("erroneously"). * os_dep.c: Fix typos ("non-addressable", "happening", "pointer-free"). * tests/test.c: Fix typos ("uncollectible", "reversed"). * tests/test_cpp.cc: Fix typos ("[un]collectible"). * typd_mlc.c: Fix typo ("copyright"). * win32_threads.c: Fix typos ("optimization", "uncollectible").
* Register dynamic libraries via dl_iterate_phdr on OpenBSDKurt Miller2013-06-021-1/+8
| | | | | * dyn_load.c (HAVE_DL_ITERATE_PHDR): Define for OpenBSD (with release date 2005.19 or later).
* Register dynamic libraries via dl_iterate_phdr on Android if possibleIvan Maidanski2013-06-011-4/+9
| | | | | | * dyn_load.c (HAVE_DL_ITERATE_PHDR): Define also for Android. * dyn_load.c (dl_iterate_phdr): Declare explicitly for Android (since no prototype in NDK link.h for ARM).
* Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.hIvan Maidanski2013-02-251-0/+9
| | | | | | | | * dyn_load.c: Include asm/elf.h and linux/elf-em.h explicitly, and undefine ELF_DATA and EM_ALPHA (if PLATFORM_ANDROID and BIONIC_ELFDATA_REDEF_BUG are defined) to workaround a bug (avoiding "macro redefined" warnings) in Android 4.1 (and 4.2) Bionic which has the mismatching macro definitions in headers included from linker.h.
* Replace '`' symbol with double-quote in commentsIvan Maidanski2012-12-151-1/+1
| | | | | | | | | * doc/README.win32: Replace "`" symbol (and paring single-quote) with double-quote symbol. * dyn_load.c (GC_register_dynlib_callback): Likewise. * finalize.c (GC_should_invoke_finalizers): Likewise. * include/private/gc_priv (GC_INLINE, ptr_t): Likewise. * include/private/gcconfig.h (DATAEND): Likewise.
* Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()Ivan Maidanski2012-12-111-20/+13
| | | | | | | | | | | | | | | | | | | | | | (code refactoring) * allchblk.c (GC_freehblk): Replace GC_COND_LOG_PRINTF (or GC_log_printf, or GC_err_printf) followed by ABORT with ABORT_ARG<n> (where 'n' is the number of arguments matching format string). * alloc.c (GC_check_fl_marks): Likewise. * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change, GC_debug_free, GC_debug_realloc): Likewise. * dyn_load.c (GC_register_dynamic_libraries): Likewise. * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap, PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise. * pthread_stop_world.c (GC_suspend_all, GC_start_world): Likewise. * ptr_chck.c (GC_default_same_obj_print_proc, GC_default_is_valid_displacement_print_proc, GC_default_is_visible_print_proc): Likewise. * specific.c (GC_check_tsd_marks): Likewise. * win32_threads.c (GC_register_my_thread_inner): Likewise. * include/private/gc_priv.h (ABORT_ARG1, ABORT_ARG2, ABORT_ARG3): New macro.
* Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTFIvan Maidanski2012-11-121-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * allchblk.c (GC_freehblk): Replace "if (GC_print_stats) GC_log_printf" with GC_COND_LOG_PRINTF. * alloc.c (GC_timeout_stop_func, GC_maybe_gc, GC_try_to_collect_inner, GC_stopped_mark, GC_finish_collection, GC_expand_hp_inner, GC_collect_or_expand): Likewise. * backgraph.c (backwards_height, GC_print_back_graph_stats): Likewise. * checksums.c (GC_check_blocks, GC_check_dirty): Likewise. * dyn_load.c (GC_register_dynamic_libraries): Likewise. * finalize.c (GC_general_register_disappearing_link, GC_register_finalizer_inner): Likewise. * gcj_mlc.c (GC_init_gcj_malloc): Likewise. * headers.c (GC_scratch_alloc): Likewise. * mark.c (GC_mark_some_inner, GC_mark_some, GC_signal_mark_stack_overflow, GC_return_mark_stack, alloc_mark_stack): Likewise. * obj_map.c (GC_add_map_entry): Likewise. * os_dep.c (GC_get_maps, backing_store_base_from_proc, GC_register_data_segments, detect_GetWriteWatch, GC_add_current_malloc_heap, GC_remap, PROTECT, GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise. * pthread_stop_world.c (GC_stop_world, GC_start_world, GC_stop_init): Likewise. * pthread_support.c (start_mark_threads, GC_thr_init): Likewise. * win32_threads.c (GC_register_my_thread_inner, GC_thr_init): Likewise. * alloc.c (GC_finish_collection): Replace "if (GC_print_stats == VERBOSE) GC_log_printf" with GC_VERBOSE_LOG_PRINTF. * blacklst.c (GC_promote_black_lists): Likewise. * darwin_stop_world.c (GC_push_all_stacks): Likewise. * mark.c (GC_mark_local, GC_do_parallel_mark): Likewise. * os_dep.c (GC_dirty_init): Likewise. * pthread_stop_world.c (GC_push_all_stacks): Likewise. * win32_threads.c (GC_push_all_stacks): Likewise. * include/private/gc_priv.h (GC_COND_LOG_PRINTF, GC_VERBOSE_LOG_PRINTF): New macro (check GC_print_stats and call GC_log_printf if enabled). * os_dep.c (GC_dirty_init, GC_read_dirty): Replace "if (GC_print_stats) GC_err_printf" with WARN.
* Add comment for _DYNAMIC[] compared to NULL in GC_FirstDLOpenedLinkMapIvan Maidanski2012-10-171-2/+4
| | | | | | * dyn_load.c (GC_FirstDLOpenedLinkMap): Add comment for _DYNAMIC-is-NULL code branch; cast _DYNAMIC (array symbol) to ptr_t in comparison to NULL (0).
* Fix all address-of-dummy operations by using GC_approx_sp() insteadIvan Maidanski2012-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (previous commit 'd6acbda' has not solved this problem) * alloc.c (min_bytes_allocd, GC_stopped_mark): Use GC_approx_sp() instead of "&dummy"; remove 'dummy' local variable. * dyn_load.c (GC_cond_add_roots): Likewise. * misc.c (GC_init): Likewise. * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): Likewise. * pthread_stop_world.c (GC_suspend_handler_inner, nacl_pre_syscall_hook, __nacl_suspend_thread_if_needed): Likewise. * pthread_support.c (GC_thr_init): Likewise. * ptr_chck.c (GC_on_stack): Likewise. * win32_threads.c (GC_push_stack_for): Likewise. * misc.c (GC_clear_stack_inner): Store address of volatile 'dummy' local array (i.e. 'sp' value) to its first element (and use it in the comparison of addresses) to prevent any harmful optimizations as C officially disallows comparisons of pointers to different objects (e.g., some Mac OS X clang releases might turn a conditional expression that uses 'dummy' address into a constant); update comment. * misc.c (GC_call_with_stack_base): Use "&base" instead of "&dummy" (it is safe to use address of base here); remove dummy variable. * os_dep.c (currently_updating): Change type from "word" to "int*". * os_dep.c (async_set_pht_entry_from_index): Remove volatile and casts for 'update_dummy' local variable. * tools/setjmp_t.c (main): Define volatile 'sp' local variable, store its address to it and use it instead of "&dummy"; remove 'dummy' local variable.
* Fix all address-of-dummy operations by adding volatileIvan Maidanski2012-08-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (min_bytes_allocd, GC_stopped_mark): Use volatile for 'dummy' local variable (used to get 'sp' value) to prevent any harmful optimizations (e.g., some Mac OS X clang releases might turn a conditional expression that uses 'dummy' address into a constant). * dyn_load.c (GC_cond_add_roots): Likewise. * mach_dep.c (GC_with_callee_saves_pushed): Likewise. * misc.c (GC_clear_stack_inner, GC_init, GC_call_with_stack_base): Likewise. * os_dep.c (GC_get_stack_base, GC_get_main_stack_base, async_set_pht_entry_from_index): Likewise. * pthread_stop_world.c (nacl_pre_syscall_hook, __nacl_suspend_thread_if_needed): Likewise. * pthread_support.c (GC_thr_init): Likewise. * ptr_chck.c (GC_on_stack): Likewise. * tools/setjmp_t.c (main): Likewise. * win32_threads.c (GC_push_stack_for): Likewise. * dyn_load.c (dummy): Change variable type from char to int. * include/private/gcconfig.h: Update comment about GC_stackbottom initialization. * os_dep.c (GC_get_stack_base): Remove 'sp' local variable. * os_dep.c (GC_get_main_stack_base): Define and use volatile 'dummy' variable (instead of 'result') to get 'sp' value (revert part of commit bddc75f). * os_dep.c (GC_get_stack_base): Add missing cast of 'dummy' address (only if NEED_FIND_LIMIT). * pthread_stop_world.c (GC_suspend_handler_inner): Define and use volatile 'dummy' variable (instead of 'me') to get 'sp' value (revert part of commit 31fc0f6). * pthread_stop_world.c (nacl_pre_syscall_hook, __nacl_suspend_thread_if_needed): Rename 'local_dummy' to 'dummy' local variable.
* Replace sprintf with defensive snprintfIvan Maidanski2012-07-201-3/+6
| | | | | | | | | | | * dyn_load.c (GC_register_dynamic_libraries): Replace sprintf with snprintf add put traling '\0' to buffer to prevent buffer overrun; cast snprintf result to void (to suppress compiler warning). * cord/tests/cordtest.c (test_printf): Likewise. * os_dep.c (GC_print_callers): Likewise. * os_dep.c (GC_dirty_init): Likewise (if PROC_VDB). * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Put trailing '\0' to buffer and cast snprintf result to void (Darwin).
* Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGVIvan Maidanski2012-06-071-0/+2
| | | | | | | | | | | | | | | (if out of memory) * dyn_load.c (GC_register_dynamic_libraries): If GC_scratch_alloc fails (returns null) then abort (with the appropriate message) instead of causing SEGV. * os_dep.c (GC_dirty_init): Likewise. * headers.c (GC_init_headers): Report error and exit if GC_scratch_alloc fails. * include/private/gc_priv.h (GC_scratch_alloc): Improve comment. * os_dep.c (GC_print_address_map): If GC_get_maps return null then print the appropriate message (instead of passing null to GC_err_puts thus causing SEGV).
* Fix GC_FirstDLOpenedLinkMap() for FreeBSD 9 releaseTsugutomo Enami2012-06-011-0/+8
| | | | | | * dyn_load.c: Include sys/param.h and dlfcn.h on FreeBSD. * dyn_load.c (GC_FirstDLOpenedLinkMap): Obtain link map using dlinfo() on FreeBSD if RTLD_DI_LINKMAP feature present (defined).
* Fix a typo and improve comment in dyn_load.c (Android)Ivan Maidanski2012-03-261-1/+1
|
* Replace pointer relational comparisons with non-pointer onesIvan Maidanski2012-03-051-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allchblk.c (GC_dump_regions, GC_allochblk_nth): Cast pointers to word type in relational (less-greater) comparisons. * alloc.c (GC_add_to_heap, GC_print_heap_sects, GC_expand_hp_inner): Likewise. * backgraph.c (ensure_struct, add_back_edges): Likewise. * blacklst.c (GC_number_stack_black_listed): Likewise. * checksums.c (GC_checksum, GC_check_dirty): Likewise. * darwin_stop_world.c (GC_push_all_stacks): Likewise. * dbg_mlc.c (GC_get_back_ptr_info, GC_print_smashed_obj, GC_check_heap_block): Likewise. * dyn_load.c (sort_heap_sects, GC_register_map_entries, GC_register_dynlib_callback, GC_register_dynamic_libraries_dl_iterate_phdr, GC_register_dynamic_libraries, GC_cond_add_roots): Likewise. * finalize.c (GC_ignore_self_finalize_mark_proc): Likewise. * headers.c (GC_scratch_alloc, GC_install_counts, GC_remove_counts): Likewise. * include/private/gc_pmark.h (PUSH_OBJ, PUsH_CONTENTS_HDR, GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP, GC_mark_stack_empty): Likewise. * include/private/gc_priv.h (MAKE_COOLER, COOLER_THAN): Likewise. * mach_dep.c (GC_with_callee_saves_pushed): Likewise. * malloc.c (calloc, free): Likewise. * mark.c (GC_mark_some_inner, GC_mark_from, GC_steal_mark_stack, GC_return_mark_stack, GC_do_local_mark, GC_mark_local, GC_push_all, GC_push_selected, GC_push_all_eager, GC_push_marked1, GC_push_marked2, GC_push_marked4, GC_push_marked, GC_push_unconditionally): Likewise. * mark_rts.c (GC_is_static_root, GC_add_roots_inner, GC_remove_roots_inner, GC_is_tmp_root, GC_exclude_static_roots_inner, GC_push_conditional_with_exclusions, GC_push_all_register_sections, GC_push_all_stack_sections, GC_push_all_stack_partially_eager, GC_push_all_stack_part_eager_sections, GC_push_current_stack): Likewise. * misc.c (GC_clear_stack_inner, GC_clear_stack, GC_base, GC_call_with_gc_active): Likewise. * new_hblk.c (GC_build_fl_clear2, GC_build_fl_clear4, GC_build_fl2, GC_build_fl4, GC_build_fl): Likewise. * os_dep.c (GC_enclosing_mapping, GC_text_mapping, tiny_sbrk, GC_find_limit_openbsd, GC_skip_hole_openbsd, GC_find_limit_with_bound, GC_get_main_stack_base, GC_get_stack_base, GC_least_described_address, GC_register_root_section, GC_register_data_segments, GC_unmap_start, GC_gww_read_dirty, GC_remove_protection, GC_protect_heap, GC_unprotect_range, GC_read_dirty, GC_page_was_dirty, GC_save_callers, GC_print_callers): Likewise. * pcr_interface.c (GC_enumerate_block): Likewise. * pthread_support.c (GC_is_thread_tsd_valid, GC_segment_is_thread_stack, GC_greatest_stack_base_below, GC_call_with_gc_active): Likewise. * ptr_chck.c (GC_same_obj, GC_is_valid_displacement, GC_on_stack, GC_is_visible): Likewise. * reclaim.c (GC_reclaim_clear, GC_reclaim_uninit, GC_disclaim_and_reclaim, GC_reclaim_check, GC_start_reclaim): Likewise. * tests/test.c (cons): Likewise. * tools/setjmp_t.c (main): Likewise. * typd_mlc.c (GC_typed_mark_proc): Likewise. * win32_threads.c (GC_is_thread_tsd_valid, GC_call_with_gc_active, GC_push_stack_for, GC_get_next_stack): Likewise. * extra/msvc_dbg.c (GetDescriptionFromAddress, GetDescriptionFromStack): Cast pointers to GC_ULONG_PTR in relational comparisons. * include/gc.h (GC_DATASTART, GC_DATAEND): Cast pointers to GC_word in relational comparisons. * misc.c (GC_init): Remove static assertion on ((ptr_t)-1 > 0) since no longer required; add the comment. * pcr_interface.c: Expand tabs to spaces.
* Remove unsupported MMAP_STACKS (specific to Solaris threads)Ivan Maidanski2012-02-141-3/+0
| | | | | | | * doc/README.macros (MMAP_STACKS): Remove. * dyn_load.c (GC_register_dynamic_libraries): Remove check of MMAP_STACKS since GC_is_thread_stack is missing since removal of Solaris threads support (IRIX5).
* Code refactoring of Darwin GC_dyld_image_add/remove (make read-onlyIvan Maidanski2012-01-291-6/+6
| | | | | | | | | array 'const' and remove trailing NULL) * dyn_load.c (GC_dyld_add_sect_fmts): Add 'const' keyword to global array definition; remove trailing NULL. * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Test array index boundary instead of testing for trailing NULL.
* Remove Android-specific code inside Solaris-specific code in dyn_loadIvan Maidanski2012-01-251-4/+1
| | | | | * dyn_load.c (GC_register_dynamic_libraries): Remove PLATFORM_ANDROID macro check from Solaris-specific code.
* Use EXPECT for checking various 'initialized' boolean variablesIvan Maidanski2011-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (GC_try_to_collect_general, GC_expand_hp): Use "expect true" for GC_is_initialized value. * gcj_mlc.c (maybe_finalize): Likewise. * malloc.c (GC_alloc_large, GC_generic_malloc_inner, malloc): Likewise. * mallocx.c (GC_generic_malloc_many): Likewise. * mark_rts.c (GC_add_roots, GC_clear_roots): Likewise. * misc.c (GC_base, GC_init): Likewise. * ptr_chck.c (GC_same_obj, GC_is_valid_displacement, GC_is_visible): Likewise. * darwin_stop_world.c (GC_push_all_stacks): Use "expect true" for GC_thr_initialized value. * pthread_stop_world.c (GC_push_all_stacks): Likewise. * pthread_support.c (pthread_create): Likewise. * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use "expect true" for excluded_segs value. * include/private/gc_priv.h (COND_DUMP): Use "expect false" for GC_dump_regularly value. * malloc.c (GC_generic_malloc): Use "expect false" for GC_have_errors value. * mallocx.c (GC_generic_malloc_ignore_off_page, GC_generic_malloc_many): Likewise. * malloc.c (calloc): Use "expect true" for lib_bounds_set value. * os_dep.c (GC_unix_mmap_get_mem): Use "expect true" for "initialized" value. * pthread_stop_world.c (GC_nacl_initialize_gc_thread): Use "expect true" for GC_nacl_thread_parking_inited value. * pthread_support.c (INIT_REAL_SYMS): Use "expect true" for GC_syms_initialized value; remove redundant trailing ';'. * pthread_support.c (GC_new_thread): Use "expect true" for first_thread_used value. * win32_threads.c (GC_new_thread): Likewise. * pthread_support.c (pthread_create): Use "expect true" for parallel_initialized value. * win32_threads.c (GC_CreateThread, GC_beginthreadex, GC_pthread_join, GC_pthread_create, GC_pthread_sigmask, GC_pthread_detach): Likewise. * pthread_support.c (pthread_create): Use "expect false" for "si" value to be NULL. * thread_local_alloc.c (GC_init_thread_local): Use "expect true" for keys_initialized value. * typd_mlc.c (GC_make_descriptor): Use "expect true" for GC_explicit_typing_initialized value.
* Fix compiler warning in GC_dyld_image_add/remove (Darwin)Ivan Maidanski2011-12-281-2/+2
| | | | | | * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Declare i, j local variables as unsigned (to prevent compiler warning in a comparison involving sizeof)
* Resolve "comparison of signed and unsigned values" compiler warnings.Ivan Maidanski2011-09-081-1/+1
| | | | | | | | | | | | | | | | | | | * cord/cordprnt.c (CORD_vsprintf): Cast "prec" and "width" local variables to size_t. * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Change type of "i" local variable to int. * pthread_support.c (start_mark_threads): Likewise. * os_dep.c (GC_repeat_read): Change type of "num_read" to size_t. * os_dep.c (GC_get_maps): Change type of "result" local variable from int to ssize_t; cast "result" to size_t in comparison. * pthread_support.c (GC_remove_all_threads_but_me): Cast "result" to int. * pthread_support.c (GC_wait_for_gc_completion): Change type of "old_gc_no" local variable to word. * pthread_support.c (GC_lock): Change type of "i" local variable to unsigned. * tests/staticrootstest.c (main): Cast sizeof() value to int in comparisons.
* Remove information about the authors from the source files.Ivan Maidanski2011-08-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This information could be observed via "git log" or by looking into the original version of a file.) * Makefile.am: Remove original-author and modified-by information (as well as a time-stamp) from the file header. * configure.ac: Ditto. * cord/cordbscs.c: Ditto. * cord/cordprnt.c: Ditto. * cord/cordxtra.c: Ditto. * cord/de.c: Ditto. * cord/de_cmds.h: Ditto. * cord/de_win.h: Ditto. * doc/README.arm.cross: Ditto. * doc/doc.am: Ditto. * dyn_load.c: Ditto. * gc_cpp.cc: Ditto. * gc_dlopen.c: Ditto. * include/cord.h: Ditto. * include/include.am: Ditto. * include/private/cord_pos.h: Ditto. * include/private/gc_hdrs.h: Ditto. * include/weakpointer.h: Ditto. * m4/gc_set_version.m4: Ditto. * tests/test_cpp.cc: Ditto. * cord/cordprnt.c: Fix a typo in a comment. * AUTHORS: Add authors. * cord/cordprnt.c: Expand all tabs to spaces; remove trailing spaces at EOLn. * cord/de.c: Ditto. * cord/de_cmds.h: Ditto. * cord/de_win.c: Ditto. * cord/de_win.h: Ditto. * doc/README.arm.cross: Ditto. * include/private/cord_pos.h: Ditto. * include/weakpointer.h: Ditto. * m4/gc_set_version.m4: Ditto.
* 2011-07-05 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-5/+3
| | | | | | | | | | | | | | * dyn_load.c (GC_register_dynamic_libraries): Remove duplicate call of GC_FirstDLOpenedLinkMap (twice). * dyn_load.c (GC_register_main_static_data): Add comment. * cord/cordbscs.c (CORD_riter): Check for empty string passed (do not call CORD_riter4 if CORD_len() returned zero). * cord/cordbscs.c (CORD_init_min_len): Replace the K&R-style function definition with the ANSI C one. * cord/cordbscs.c: Expand all tabs to spaces; remove trailing spaces at EOLn. * tests/threadkey_test.c (on_thread_exit_inner): Check GC_pthread_create() result.
* 2011-06-30 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-1/+0
| | | | | | | | | | | | | | | | | * dyn_load.c (GC_register_map_entries): Remove "count" local variable as unused. * gc_dlopen.c (disable_gc_for_dlopen): Define only if not USE_PROC_FOR_LIBRARIES. * malloc.c (calloc): Add parentheses around '&&' operator. * mark.c (GC_noop_sink): New global variable (instead of a static local variable inside GC_noop1). * mark.c (GC_noop1): Use GC_noop_sink variable (to prevent "variable set but not used" compiler warning). * include/private/gcconfig.h (USE_PROC_FOR_LIBRARIES): Define only if undefined yet. * tests/smash_test.c (main): Don't dereference "p" local variable if it is NULL. * tests/staticrootslib.c (main): Ditto.