debian/0000775000000000000000000000000013050475662007200 5ustar debian/libgc1c2.install0000664000000000000000000000002612155065243012147 0ustar usr/lib/*/libgc*.so.* debian/libgc-dev.install0000664000000000000000000000053012155065243012415 0ustar usr/include usr/lib/*/libgc*.so usr/lib/*/libgc*.a usr/lib/*/pkgconfig/bdw-gc.pc usr/share/doc/gc/*.html usr/share/doc/libgc1c2 usr/share/doc/gc/barrett_diagram usr/share/doc/libgc1c2 usr/share/doc/gc/README usr/share/doc/libgc1c2 usr/share/doc/gc/README.contributors usr/share/doc/libgc1c2 usr/share/doc/gc/README.linux usr/share/doc/libgc1c2 debian/compat0000664000000000000000000000000212155063050010363 0ustar 7 debian/libgc1c2.symbols0000664000000000000000000005133112171513446012177 0ustar # SymbolsHelper-Confirmed: 1:7.2d alpha amd64 armel armhf hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mips mipsel powerpc s390 s390x sparc sparc64 x32 libgc.so.1 libgc1c2 #MINVER# GC_FirstDLOpenedLinkMap@Base 1:7.2d (arch=kfreebsd-amd64 kfreebsd-i386)GC_FreeBSDGetDataStart@Base 1:7.2d (arch=sparc sparc64)GC_SysVGetDataStart@Base 1:7.2d GC_abort@Base 1:7.2d GC_add_ext_descriptor@Base 1:7.2d GC_add_map_entry@Base 1:7.2d GC_add_roots@Base 1:7.2d GC_add_roots_inner@Base 1:7.2d GC_add_smashed@Base 1:7.2d GC_add_to_black_list_normal@Base 1:7.2d GC_add_to_black_list_stack@Base 1:7.2d GC_add_to_fl@Base 1:7.2d GC_add_to_heap@Base 1:7.2d GC_adj_bytes_allocd@Base 1:7.2d GC_all_bottom_indices@Base 1:7.2d GC_all_bottom_indices_end@Base 1:7.2d GC_all_interior_pointers@Base 1:7.2d GC_alloc_large@Base 1:7.2d GC_alloc_large_and_clear@Base 1:7.2d GC_alloc_reclaim_list@Base 1:7.2d GC_allocate_ml@Base 1:7.2d GC_allochblk@Base 1:7.2d GC_allochblk_nth@Base 1:7.2d GC_allocobj@Base 1:7.2d GC_allow_register_threads@Base 1:7.2d GC_aobjfreelist_ptr@Base 1:7.2d GC_apply_to_all_blocks@Base 1:7.2d GC_approx_sp@Base 1:7.2d GC_arobjfreelist@Base 1:7.2d GC_array_kind@Base 1:7.2d GC_array_mark_proc@Base 1:7.2d GC_array_mark_proc_index@Base 1:7.2d GC_arrays@Base 1:7.2d GC_auobjfreelist_ptr@Base 1:7.2d GC_avail_descr@Base 1:7.2d GC_base@Base 1:7.2d GC_bl_init@Base 1:7.2d GC_bl_init_no_interiors@Base 1:7.2d GC_black_list_spacing@Base 1:7.2d GC_block_empty@Base 1:7.2d GC_block_nearly_full@Base 1:7.2d GC_block_was_dirty@Base 1:7.2d GC_bm_table@Base 1:7.2d GC_build_fl2@Base 1:7.2d GC_build_fl4@Base 1:7.2d GC_build_fl@Base 1:7.2d GC_build_fl_clear2@Base 1:7.2d GC_build_fl_clear4@Base 1:7.2d GC_bytes_found@Base 1:7.2d GC_call_with_alloc_lock@Base 1:7.2d GC_call_with_gc_active@Base 1:7.2d GC_call_with_stack_base@Base 1:7.2d GC_calloc_explicitly_typed@Base 1:7.2d GC_change_stubborn@Base 1:7.2d GC_check_annotated_obj@Base 1:7.2d GC_check_finalizer_nested@Base 1:7.2d GC_check_heap@Base 1:7.2d GC_check_heap_block@Base 1:7.2d GC_check_heap_proc@Base 1:7.2d GC_check_leaked@Base 1:7.2d GC_clear_a_few_frames@Base 1:7.2d GC_clear_bl@Base 1:7.2d GC_clear_fl_links@Base 1:7.2d GC_clear_fl_marks@Base 1:7.2d GC_clear_hdr_marks@Base 1:7.2d GC_clear_mark_bit@Base 1:7.2d GC_clear_marks@Base 1:7.2d GC_clear_roots@Base 1:7.2d GC_clear_stack@Base 1:7.2d GC_clear_stack_inner@Base 1:7.2d GC_collect_a_little@Base 1:7.2d GC_collect_a_little_inner@Base 1:7.2d GC_collect_at_heapsize@Base 1:7.2d GC_collect_or_expand@Base 1:7.2d GC_collecting@Base 1:7.2d GC_collection_in_progress@Base 1:7.2d GC_cond_register_dynamic_libraries@Base 1:7.2d GC_continue_reclaim@Base 1:7.2d GC_copy_bl@Base 1:7.2d GC_copyright@Base 1:7.2d GC_core_gcj_malloc@Base 1:7.2d GC_core_malloc@Base 1:7.2d GC_core_malloc_atomic@Base 1:7.2d GC_current_warn_proc@Base 1:7.2d (arch=!arm64 !kfreebsd-amd64 !kfreebsd-i386 !mips !mipsel !s390 !s390x !sparc !sparc64)GC_data_start@Base 1:7.2d GC_debug_change_stubborn@Base 1:7.2d GC_debug_end_stubborn_change@Base 1:7.2d GC_debug_free@Base 1:7.2d GC_debug_gcj_malloc@Base 1:7.2d GC_debug_header_size@Base 1:7.2d GC_debug_invoke_finalizer@Base 1:7.2d GC_debug_malloc@Base 1:7.2d GC_debug_malloc_atomic@Base 1:7.2d GC_debug_malloc_atomic_ignore_off_page@Base 1:7.2d GC_debug_malloc_atomic_uncollectable@Base 1:7.2d GC_debug_malloc_ignore_off_page@Base 1:7.2d GC_debug_malloc_replacement@Base 1:7.2d GC_debug_malloc_stubborn@Base 1:7.2d GC_debug_malloc_uncollectable@Base 1:7.2d GC_debug_print_heap_obj_proc@Base 1:7.2d GC_debug_realloc@Base 1:7.2d GC_debug_realloc_replacement@Base 1:7.2d GC_debug_register_displacement@Base 1:7.2d GC_debug_register_finalizer@Base 1:7.2d GC_debug_register_finalizer_ignore_self@Base 1:7.2d GC_debug_register_finalizer_no_order@Base 1:7.2d GC_debug_register_finalizer_unreachable@Base 1:7.2d GC_debug_strdup@Base 1:7.2d GC_debug_strndup@Base 1:7.2d GC_debugging_started@Base 1:7.2d GC_default_is_valid_displacement_print_proc@Base 1:7.2d GC_default_is_visible_print_proc@Base 1:7.2d GC_default_oom_fn@Base 1:7.2d GC_default_print_heap_obj_proc@Base 1:7.2d GC_default_push_other_roots@Base 1:7.2d GC_default_same_obj_print_proc@Base 1:7.2d GC_default_stop_func@Base 1:7.2d GC_default_warn_proc@Base 1:7.2d GC_deficit@Base 1:7.2d GC_delete_gc_thread@Base 1:7.2d GC_delete_thread@Base 1:7.2d GC_descr_obj_size@Base 1:7.2d GC_describe_type_fns@Base 1:7.2d GC_destroy_thread_local@Base 1:7.2d GC_dirty_init@Base 1:7.2d GC_dirty_maintained@Base 1:7.2d GC_disable@Base 1:7.2d GC_dl_entries@Base 1:7.2d GC_dlopen@Base 1:7.2d GC_do_blocking@Base 1:7.2d GC_do_blocking_inner@Base 1:7.2d GC_dont_expand@Base 1:7.2d GC_dont_gc@Base 1:7.2d GC_dont_precollect@Base 1:7.2d GC_double_descr@Base 1:7.2d GC_dump@Base 1:7.2d GC_dump_finalization@Base 1:7.2d GC_dump_regions@Base 1:7.2d GC_dump_regularly@Base 1:7.2d GC_ed_size@Base 1:7.2d GC_enable@Base 1:7.2d GC_enable_incremental@Base 1:7.2d (arch=ia64)GC_enclosing_mapping@Base 1:7.2d GC_end_stubborn_change@Base 1:7.2d GC_enqueue_all_finalizers@Base 1:7.2d GC_eobjfreelist@Base 1:7.2d GC_err_printf@Base 1:7.2d GC_err_puts@Base 1:7.2d GC_excl_table_entries@Base 1:7.2d GC_exclude_static_roots@Base 1:7.2d GC_exclude_static_roots_inner@Base 1:7.2d GC_exit_check@Base 1:7.2d GC_expand_hp@Base 1:7.2d GC_expand_hp_inner@Base 1:7.2d GC_explicit_kind@Base 1:7.2d GC_explicit_typing_initialized@Base 1:7.2d GC_ext_descriptors@Base 1:7.2d GC_extend_size_map@Base 1:7.2d GC_fail_count@Base 1:7.2d (arch=!arm64 !mips !mipsel !s390 !s390x)GC_fault_handler@Base 1:7.2d (arch=alpha amd64 i386 ia64 m68k x32)GC_fault_handler_lock@Base 1:7.2d GC_finalize@Base 1:7.2d GC_finalize_all@Base 1:7.2d GC_finalize_now@Base 1:7.2d GC_finalize_on_demand@Base 1:7.2d GC_finalizer_notifier@Base 1:7.2d GC_find_header@Base 1:7.2d GC_find_leak@Base 1:7.2d (arch=!arm64 !mips !mipsel !s390 !s390x)GC_find_limit@Base 1:7.2d (arch=!arm64 !mips !mipsel !s390 !s390x)GC_find_limit_with_bound@Base 1:7.2d GC_findleak_delay_free@Base 1:7.2d GC_finish_collection@Base 1:7.2d GC_fo_entries@Base 1:7.2d GC_force_unmap_on_gcollect@Base 1:7.2d (arch=!hurd-i386)GC_fork_child_proc@Base 1:7.2d (arch=!hurd-i386)GC_fork_parent_proc@Base 1:7.2d (arch=!hurd-i386)GC_fork_prepare_proc@Base 1:7.2d GC_free@Base 1:7.2d GC_free_block_ending_at@Base 1:7.2d GC_free_bytes@Base 1:7.2d GC_free_inner@Base 1:7.2d GC_free_space_divisor@Base 1:7.2d (arch=kfreebsd-amd64 kfreebsd-i386)GC_freebsd_main_stack_base@Base 1:7.2d GC_freehblk@Base 1:7.2d GC_full_freq@Base 1:7.2d GC_gc_no@Base 1:7.2d GC_gcj_debug_kind@Base 1:7.2d GC_gcj_fake_mark_proc@Base 1:7.2d GC_gcj_kind@Base 1:7.2d GC_gcj_malloc@Base 1:7.2d GC_gcj_malloc_ignore_off_page@Base 1:7.2d GC_gcj_malloc_initialized@Base 1:7.2d GC_gcjdebugobjfreelist@Base 1:7.2d GC_gcjobjfreelist@Base 1:7.2d GC_gcollect@Base 1:7.2d GC_gcollect_and_unmap@Base 1:7.2d GC_general_register_disappearing_link@Base 1:7.2d GC_generic_lock@Base 1:7.2d GC_generic_malloc@Base 1:7.2d GC_generic_malloc_ignore_off_page@Base 1:7.2d GC_generic_malloc_inner@Base 1:7.2d GC_generic_malloc_inner_ignore_off_page@Base 1:7.2d GC_generic_malloc_many@Base 1:7.2d GC_generic_or_special_malloc@Base 1:7.2d GC_get_all_interior_pointers@Base 1:7.2d GC_get_bytes_since_gc@Base 1:7.2d GC_get_dont_expand@Base 1:7.2d GC_get_dont_precollect@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_get_file_len@Base 1:7.2d GC_get_finalize_on_demand@Base 1:7.2d GC_get_finalizer_notifier@Base 1:7.2d GC_get_find_leak@Base 1:7.2d GC_get_first_part@Base 1:7.2d GC_get_force_unmap_on_gcollect@Base 1:7.2d GC_get_free_bytes@Base 1:7.2d GC_get_free_space_divisor@Base 1:7.2d GC_get_full_freq@Base 1:7.2d GC_get_gc_no@Base 1:7.2d GC_get_heap_size@Base 1:7.2d GC_get_heap_usage_safe@Base 1:7.2d GC_get_java_finalization@Base 1:7.2d GC_get_main_stack_base@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_get_maps@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_get_maps_len@Base 1:7.2d GC_get_max_retries@Base 1:7.2d GC_get_no_dls@Base 1:7.2d GC_get_non_gc_bytes@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_get_nprocs@Base 1:7.2d (arch=armel armhf)GC_get_nprocs_present@Base 1:7.2d GC_get_oom_fn@Base 1:7.2d GC_get_pages_executable@Base 1:7.2d GC_get_parallel@Base 1:7.2d (arch=ia64)GC_get_register_stack_base@Base 1:7.2d GC_get_stack_base@Base 1:7.2d GC_get_start_callback@Base 1:7.2d GC_get_stop_func@Base 1:7.2d GC_get_suspend_signal@Base 1:7.2d GC_get_time_limit@Base 1:7.2d GC_get_total_bytes@Base 1:7.2d GC_get_unmapped_bytes@Base 1:7.2d GC_get_version@Base 1:7.2d GC_get_warn_proc@Base 1:7.2d GC_greatest_plausible_heap_addr@Base 1:7.2d (arch=ia64)GC_greatest_stack_base_below@Base 1:7.2d GC_grow_table@Base 1:7.2d (arch=!hurd-i386)GC_handle_fork@Base 1:7.2d GC_has_other_debug_info@Base 1:7.2d GC_has_static_roots@Base 1:7.2d GC_have_errors@Base 1:7.2d GC_hblk_fl_from_blocks@Base 1:7.2d GC_hblkfreelist@Base 1:7.2d GC_header_cache_miss@Base 1:7.2d GC_ignore_self_finalize_mark_proc@Base 1:7.2d GC_ignore_warn_proc@Base 1:7.2d GC_in_thread_creation@Base 1:7.2d GC_incomplete_normal_bl@Base 1:7.2d GC_incomplete_stack_bl@Base 1:7.2d GC_incr_bytes_allocd@Base 1:7.2d GC_incr_bytes_freed@Base 1:7.2d GC_incremental@Base 1:7.2d GC_incremental_protection_needs@Base 1:7.2d GC_init@Base 1:7.2d GC_init_explicit_typing@Base 1:7.2d GC_init_gcj_malloc@Base 1:7.2d GC_init_headers@Base 1:7.2d (arch=!arm64 !kfreebsd-amd64 !kfreebsd-i386 !mips !mipsel !s390 !s390x !sparc !sparc64)GC_init_linux_data_start@Base 1:7.2d GC_init_parallel@Base 1:7.2d GC_init_size_map@Base 1:7.2d GC_init_thread_local@Base 1:7.2d GC_initialize_offsets@Base 1:7.2d GC_initiate_gc@Base 1:7.2d GC_inner_start_routine@Base 1:7.2d GC_install_counts@Base 1:7.2d GC_install_header@Base 1:7.2d GC_invalidate_mark_state@Base 1:7.2d GC_invoke_finalizers@Base 1:7.2d GC_is_black_listed@Base 1:7.2d GC_is_disabled@Base 1:7.2d GC_is_full_gc@Base 1:7.2d GC_is_initialized@Base 1:7.2d GC_is_marked@Base 1:7.2d GC_is_valid_displacement@Base 1:7.2d GC_is_valid_displacement_print_proc@Base 1:7.2d GC_is_visible@Base 1:7.2d GC_is_visible_print_proc@Base 1:7.2d GC_java_finalization@Base 1:7.2d (arch=!arm64 !mips !mipsel !s390 !s390x)GC_jmp_buf@Base 1:7.2d (arch=armel armhf hurd-i386)GC_key_create@Base 1:7.2d GC_large_alloc_warn_interval@Base 1:7.2d GC_large_alloc_warn_suppressed@Base 1:7.2d GC_leaked@Base 1:7.2d GC_least_plausible_heap_addr@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_linux_main_stack_base@Base 1:7.2d GC_lock@Base 1:7.2d GC_lock_holder@Base 1:7.2d GC_log@Base 1:7.2d GC_log_printf@Base 1:7.2d GC_lookup_thread@Base 1:7.2d GC_make_array_descriptor@Base 1:7.2d GC_make_closure@Base 1:7.2d GC_make_descriptor@Base 1:7.2d GC_make_sequence_descriptor@Base 1:7.2d GC_malloc@Base 1:7.2d GC_malloc_atomic@Base 1:7.2d GC_malloc_atomic_ignore_off_page@Base 1:7.2d GC_malloc_atomic_uncollectable@Base 1:7.2d GC_malloc_explicitly_typed@Base 1:7.2d GC_malloc_explicitly_typed_ignore_off_page@Base 1:7.2d GC_malloc_ignore_off_page@Base 1:7.2d GC_malloc_many@Base 1:7.2d GC_malloc_stubborn@Base 1:7.2d GC_malloc_uncollectable@Base 1:7.2d GC_mark_and_push@Base 1:7.2d GC_mark_and_push_stack@Base 1:7.2d GC_mark_from@Base 1:7.2d GC_mark_init@Base 1:7.2d GC_mark_some@Base 1:7.2d GC_mark_stack@Base 1:7.2d GC_mark_stack_empty@Base 1:7.2d GC_mark_stack_limit@Base 1:7.2d GC_mark_stack_size@Base 1:7.2d GC_mark_stack_too_small@Base 1:7.2d GC_mark_stack_top@Base 1:7.2d GC_mark_state@Base 1:7.2d GC_mark_thread_local_fls_for@Base 1:7.2d GC_mark_thread_local_free_lists@Base 1:7.2d GC_max_retries@Base 1:7.2d GC_maybe_gc@Base 1:7.2d GC_memalign@Base 1:7.2d GC_n_attempts@Base 1:7.2d GC_n_heap_sects@Base 1:7.2d GC_n_kinds@Base 1:7.2d GC_n_leaked@Base 1:7.2d GC_n_mark_procs@Base 1:7.2d GC_n_rescuing_pages@Base 1:7.2d GC_n_set_marks@Base 1:7.2d GC_n_smashed@Base 1:7.2d GC_need_full_gc@Base 1:7.2d GC_need_to_lock@Base 1:7.2d GC_never_stop_func@Base 1:7.2d GC_new_free_list@Base 1:7.2d GC_new_free_list_inner@Base 1:7.2d GC_new_hblk@Base 1:7.2d GC_new_kind@Base 1:7.2d GC_new_kind_inner@Base 1:7.2d GC_new_proc@Base 1:7.2d GC_new_proc_inner@Base 1:7.2d GC_new_thread@Base 1:7.2d GC_next_exclusion@Base 1:7.2d GC_next_used_block@Base 1:7.2d GC_no_dls@Base 1:7.2d GC_non_gc_bytes@Base 1:7.2d GC_noop1@Base 1:7.2d GC_noop@Base 1:7.2d GC_noop_sink@Base 1:7.2d GC_normal_finalize_mark_proc@Base 1:7.2d GC_notify_or_invoke_finalizers@Base 1:7.2d GC_nprocs@Base 1:7.2d GC_null_finalize_mark_proc@Base 1:7.2d GC_number_stack_black_listed@Base 1:7.2d GC_obj_kinds@Base 1:7.2d GC_objects_are_marked@Base 1:7.2d GC_objfreelist_ptr@Base 1:7.2d (arch=alpha amd64 i386 ia64 m68k x32)GC_old_bus_handler@Base 1:7.2d (arch=alpha amd64 i386 ia64 m68k x32)GC_old_bus_handler_used_si@Base 1:7.2d GC_old_dl_entries@Base 1:7.2d GC_old_normal_bl@Base 1:7.2d (arch=alpha amd64 i386 ia64 m68k x32)GC_old_segv_handler@Base 1:7.2d (arch=alpha amd64 i386 ia64 m68k x32)GC_old_segv_handler_used_si@Base 1:7.2d GC_old_stack_bl@Base 1:7.2d GC_oom_fn@Base 1:7.2d GC_page_size@Base 1:7.2d GC_page_was_dirty@Base 1:7.2d GC_pages_executable@Base 1:7.2d GC_parallel@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_parse_map_entry@Base 1:7.2d GC_parse_mem_size_arg@Base 1:7.2d GC_pause@Base 1:7.2d GC_posix_memalign@Base 1:7.2d GC_post_incr@Base 1:7.2d GC_pre_incr@Base 1:7.2d GC_prev_block@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_print_address_map@Base 1:7.2d GC_print_all_errors@Base 1:7.2d GC_print_all_smashed@Base 1:7.2d GC_print_all_smashed_proc@Base 1:7.2d GC_print_back_height@Base 1:7.2d GC_print_block_descr@Base 1:7.2d GC_print_block_list@Base 1:7.2d (arch=ia64)GC_print_callers@Base 1:7.2d GC_print_finalization_stats@Base 1:7.2d GC_print_free_list@Base 1:7.2d GC_print_hblkfreelist@Base 1:7.2d GC_print_heap_obj@Base 1:7.2d GC_print_heap_sects@Base 1:7.2d GC_print_obj@Base 1:7.2d GC_print_smashed_obj@Base 1:7.2d GC_print_static_roots@Base 1:7.2d GC_print_stats@Base 1:7.2d GC_print_type@Base 1:7.2d GC_printf@Base 1:7.2d GC_promote_black_lists@Base 1:7.2d (arch=alpha amd64 i386 ia64 m68k x32)GC_protect_heap@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_pthread_cancel@Base 1:7.2d GC_pthread_create@Base 1:7.2d GC_pthread_detach@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_pthread_exit@Base 1:7.2d GC_pthread_join@Base 1:7.2d GC_pthread_sigmask@Base 1:7.2d GC_push_all@Base 1:7.2d GC_push_all_eager@Base 1:7.2d (arch=ia64)GC_push_all_register_sections@Base 1:7.2d GC_push_all_stack@Base 1:7.2d GC_push_all_stack_sections@Base 1:7.2d GC_push_all_stacks@Base 1:7.2d GC_push_complex_descriptor@Base 1:7.2d GC_push_conditional@Base 1:7.2d GC_push_conditional_with_exclusions@Base 1:7.2d GC_push_current_stack@Base 1:7.2d GC_push_finalizer_structures@Base 1:7.2d GC_push_gc_structures@Base 1:7.2d GC_push_marked1@Base 1:7.2d (arch=!m68k)GC_push_marked2@Base 1:7.2d (arch=!m68k)GC_push_marked4@Base 1:7.2d GC_push_marked@Base 1:7.2d GC_push_next_marked@Base 1:7.2d GC_push_next_marked_dirty@Base 1:7.2d GC_push_next_marked_uncollectable@Base 1:7.2d GC_push_one@Base 1:7.2d GC_push_other_roots@Base 1:7.2d GC_push_regs_and_stack@Base 1:7.2d GC_push_roots@Base 1:7.2d GC_push_selected@Base 1:7.2d GC_push_thread_structures@Base 1:7.2d GC_push_typed_structures@Base 1:7.2d GC_push_typed_structures_proc@Base 1:7.2d GC_quiet@Base 1:7.2d GC_read_dirty@Base 1:7.2d GC_realloc@Base 1:7.2d GC_rebuild_root_index@Base 1:7.2d GC_reclaim_all@Base 1:7.2d GC_reclaim_block@Base 1:7.2d GC_reclaim_check@Base 1:7.2d GC_reclaim_clear@Base 1:7.2d GC_reclaim_generic@Base 1:7.2d GC_reclaim_small_nonempty_block@Base 1:7.2d GC_reclaim_uninit@Base 1:7.2d GC_register_data_segments@Base 1:7.2d GC_register_describe_type_fn@Base 1:7.2d GC_register_disappearing_link@Base 1:7.2d GC_register_displacement@Base 1:7.2d GC_register_displacement_inner@Base 1:7.2d GC_register_dynamic_libraries@Base 1:7.2d GC_register_dynamic_libraries_dl_iterate_phdr@Base 1:7.2d GC_register_dynlib_callback@Base 1:7.2d GC_register_finalizer@Base 1:7.2d GC_register_finalizer_ignore_self@Base 1:7.2d GC_register_finalizer_inner@Base 1:7.2d GC_register_finalizer_no_order@Base 1:7.2d GC_register_finalizer_unreachable@Base 1:7.2d GC_register_has_static_roots_callback@Base 1:7.2d GC_register_main_static_data@Base 1:7.2d GC_register_my_thread@Base 1:7.2d GC_register_my_thread_inner@Base 1:7.2d (arch=ia64)GC_register_stackbottom@Base 1:7.2d (arch=!hurd-i386)GC_remove_all_threads_but_me@Base 1:7.2d GC_remove_allowed_signals@Base 1:7.2d GC_remove_counts@Base 1:7.2d GC_remove_from_fl@Base 1:7.2d GC_remove_header@Base 1:7.2d GC_remove_protection@Base 1:7.2d GC_remove_root_at_pos@Base 1:7.2d GC_remove_roots@Base 1:7.2d GC_remove_roots_inner@Base 1:7.2d (arch=armel armhf hurd-i386)GC_remove_specific@Base 1:7.2d GC_remove_tmp_roots@Base 1:7.2d (arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)GC_repeat_read@Base 1:7.2d (arch=!arm64 !mips !mipsel !s390 !s390x)GC_reset_fault_handler@Base 1:7.2d GC_reset_finalizer_nested@Base 1:7.2d GC_restart_handler@Base 1:7.2d GC_retry_signals@Base 1:7.2d GC_root_size@Base 1:7.2d GC_roots_present@Base 1:7.2d GC_same_obj@Base 1:7.2d GC_same_obj_print_proc@Base 1:7.2d (arch=ia64 sparc sparc64)GC_save_regs_in_stack@Base 1:7.2d (arch=ia64 sparc sparc64)GC_save_regs_ret_val@Base 1:7.2d GC_scratch_alloc@Base 1:7.2d GC_set_all_interior_pointers@Base 1:7.2d GC_set_and_save_fault_handler@Base 1:7.2d GC_set_dont_expand@Base 1:7.2d GC_set_dont_precollect@Base 1:7.2d GC_set_finalize_on_demand@Base 1:7.2d GC_set_finalizer_notifier@Base 1:7.2d GC_set_find_leak@Base 1:7.2d GC_set_fl_marks@Base 1:7.2d GC_set_force_unmap_on_gcollect@Base 1:7.2d GC_set_free_space_divisor@Base 1:7.2d GC_set_full_freq@Base 1:7.2d GC_set_handle_fork@Base 1:7.2d GC_set_hdr_marks@Base 1:7.2d GC_set_java_finalization@Base 1:7.2d GC_set_mark_bit@Base 1:7.2d GC_set_max_heap_size@Base 1:7.2d GC_set_max_retries@Base 1:7.2d GC_set_no_dls@Base 1:7.2d GC_set_non_gc_bytes@Base 1:7.2d GC_set_oom_fn@Base 1:7.2d GC_set_pages_executable@Base 1:7.2d GC_set_start_callback@Base 1:7.2d GC_set_stop_func@Base 1:7.2d GC_set_time_limit@Base 1:7.2d GC_set_warn_proc@Base 1:7.2d GC_setpagesize@Base 1:7.2d (arch=armel armhf hurd-i386)GC_setspecific@Base 1:7.2d (arch=!arm64 !mips !mipsel !s390 !s390x)GC_setup_temporary_fault_handler@Base 1:7.2d GC_should_collect@Base 1:7.2d GC_should_invoke_finalizers@Base 1:7.2d GC_signal_mark_stack_overflow@Base 1:7.2d GC_size@Base 1:7.2d (arch=armel armhf hurd-i386)GC_slow_getspecific@Base 1:7.2d GC_smashed@Base 1:7.2d GC_split_block@Base 1:7.2d GC_stackbottom@Base 1:7.2d GC_start_call_back@Base 1:7.2d GC_start_debugging@Base 1:7.2d GC_start_reclaim@Base 1:7.2d GC_start_routine@Base 1:7.2d GC_start_rtn_prepare_thread@Base 1:7.2d GC_start_time@Base 1:7.2d GC_start_world@Base 1:7.2d GC_stderr@Base 1:7.2d GC_stdout@Base 1:7.2d GC_stop_count@Base 1:7.2d GC_stop_init@Base 1:7.2d GC_stop_world@Base 1:7.2d GC_stopped_mark@Base 1:7.2d GC_store_debug_info@Base 1:7.2d GC_store_debug_info_inner@Base 1:7.2d GC_strdup@Base 1:7.2d GC_strndup@Base 1:7.2d GC_suspend_ack_sem@Base 1:7.2d GC_suspend_all@Base 1:7.2d GC_suspend_handler@Base 1:7.2d GC_suspend_handler_inner@Base 1:7.2d GC_thr_init@Base 1:7.2d GC_thr_initialized@Base 1:7.2d GC_thread_exit_proc@Base 1:7.2d GC_thread_key@Base 1:7.2d GC_threads@Base 1:7.2d GC_time_limit@Base 1:7.2d GC_timeout_stop_func@Base 1:7.2d GC_total_stack_black_listed@Base 1:7.2d GC_total_stacksize@Base 1:7.2d GC_try_to_collect@Base 1:7.2d GC_try_to_collect_general@Base 1:7.2d GC_try_to_collect_inner@Base 1:7.2d GC_typed_mark_proc@Base 1:7.2d GC_typed_mark_proc_index@Base 1:7.2d GC_unix_get_mem@Base 1:7.2d (arch=!hurd-i386)GC_unix_mmap_get_mem@Base 1:7.2d GC_unix_sbrk_get_mem@Base 1:7.2d GC_unpromote_black_lists@Base 1:7.2d GC_unreachable_finalize_mark_proc@Base 1:7.2d GC_unregister_disappearing_link@Base 1:7.2d GC_unregister_my_thread@Base 1:7.2d GC_unregister_my_thread_inner@Base 1:7.2d GC_uobjfreelist_ptr@Base 1:7.2d GC_use_entire_heap@Base 1:7.2d GC_used_heap_size_after_full@Base 1:7.2d GC_version@Base 1:7.2d GC_wait_for_gc_completion@Base 1:7.2d GC_with_callee_saves_pushed@Base 1:7.2d GC_world_is_stopped@Base 1:7.2d GC_world_stopped@Base 1:7.2d GC_write@Base 1:7.2d (arch=alpha amd64 i386 ia64 m68k x32)GC_write_fault_handler@Base 1:7.2d (arch=sparc sparc64)_etext@Base 1:7.2d (arch=kfreebsd-amd64 kfreebsd-i386)etext@Base 1:7.2d libgccpp.so.1 libgc1c2 #MINVER# _ZdaPv@Base 1:7.2d _ZdlPv@Base 1:7.2d (arch=!arm64|subst)_Zna{size_t}@Base 1:7.2d (arch=!arm64|subst)_Znw{size_t}@Base 1:7.2d (arch=sparc sparc64)_etext@Base 1:7.2d (arch=kfreebsd-amd64 kfreebsd-i386)etext@Base 1:7.2d debian/source/0000775000000000000000000000000012155063050010465 5ustar debian/source/format0000664000000000000000000000001412155063050011673 0ustar 3.0 (quilt) debian/control0000664000000000000000000000416613050452413010577 0ustar Source: libgc Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Christoph Egger Section: libs Priority: standard Build-Depends: debhelper (>= 9), autoconf, dh-autoreconf, libatomic-ops-dev (>= 7.3~), pkg-config, pkg-kde-tools [!arm64] Standards-Version: 3.9.4 Homepage: http://www.hpl.hp.com/personal/Hans_Boehm/gc/ Vcs-Git: git://git.debian.org/git/collab-maint/libgc.git Vcs-Browser: http://git.debian.org/?p=collab-maint/libgc.git;a=summary Package: libgc1c2 Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: libgc1 Replaces: libgc1, libgc1c3 Multi-Arch: same Description: conservative garbage collector for C and C++ Boehm-Demers-Weiser's GC is a garbage collecting storage allocator that is intended to be used as a plug-in replacement for C's malloc or C++'s new(). . It allows you to allocate memory basically as you normally would without explicitly deallocating memory that is no longer useful. The collector automatically recycles memory when it determines that it can no longer be used. . This version of the collector is thread safe, has C++ support and uses the defaults for everything else. However, it does not work as a drop-in malloc(3) replacement. Package: libgc-dev Architecture: any Priority: optional Section: libdevel Depends: ${misc:Depends}, libgc1c2 (= ${binary:Version}), libc-dev Multi-Arch: same Description: conservative garbage collector for C (development) Boehm-Demers-Weiser's GC is a garbage collecting storage allocator that is intended to be used as a plug-in replacement for C's malloc or C++'s new(). . It allows you to allocate memory basically as you normally would without explicitly deallocating memory that is no longer useful. The collector automatically recycles memory when it determines that it can no longer be used. . This version of the collector is thread safe, has C++ support and uses the defaults for everything else. However, it does not work as a drop-in malloc(3) replacement. . This package is required to compile and link programs that use libgc1c2. debian/watch0000664000000000000000000000017412155063050010220 0ustar version=3 opts="uversionmangle=s/alpha/~alpha/" \ http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-?(.*)\.tar\.gz debian/patches/0000775000000000000000000000000013050475615010625 5ustar debian/patches/03-add-avr32-support.diff0000664000000000000000000000543512155066217015102 0ustar Index: libgc/include/private/gcconfig.h =================================================================== --- libgc.orig/include/private/gcconfig.h 2013-06-09 13:26:20.000000000 +0200 +++ libgc/include/private/gcconfig.h 2013-06-09 13:52:33.028299704 +0200 @@ -273,6 +273,10 @@ # define SPARC # define mach_type_known # endif +# if defined(LINUX) && defined(__avr32__) +# define AVR32 +# define mach_type_known +# endif # if defined(LINUX) && defined(__sh__) # define SH # define mach_type_known @@ -1996,6 +2000,19 @@ # endif #endif +# ifdef AVR32 +# define MACH_TYPE "AVR32" +# define CPP_WORDSZ 32 +# define ALIGNMENT 4 +# define OS_TYPE "LINUX" +# define DYNAMIC_LOADING +# define LINUX_STACKBOTTOM +# define USE_GENERIC_PUSH_REGS +# define SEARCH_FOR_DATA_START + extern int _end[]; +# define DATAEND (_end) +# endif + # ifdef CRIS # define MACH_TYPE "CRIS" # define CPP_WORDSZ 32 Index: libgc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/avr32.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ libgc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/avr32.h 2013-06-09 13:52:33.028299704 +0200 @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2009 Bradley Smith + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "../all_atomic_load_store.h" + +#include "../ordered.h" /* There are no multiprocessor implementations. */ + +#include "../test_and_set_t_is_ao_t.h" + +AO_INLINE AO_TS_VAL_t +AO_test_and_set(volatile AO_TS_t *addr) { + int ret; + + __asm__ __volatile__( + "xchg %[old], %[mem], %[newv]" + : [old] "=&r"(ret) + : [mem] "r"(addr), [newv] "r"(1) + : "memory"); + + return ret; +} + +#define AO_HAVE_test_and_set debian/patches/02-manpage.diff0000664000000000000000000000135712155063050013303 0ustar Various manpage changes. Imported semi-automatically from .diff.gz. diff --git a/doc/gc.man b/doc/gc.man index 2a550c7..5c0232a 100644 --- a/doc/gc.man +++ b/doc/gc.man @@ -1,8 +1,8 @@ -.TH GC_MALLOC 1L "2 October 2003" +.TH GC_MALLOC 3 "2 October 2003" .SH NAME GC_malloc, GC_malloc_atomic, GC_free, GC_realloc, GC_enable_incremental, GC_register_finalizer, GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page, GC_set_warn_proc \- Garbage collecting malloc replacement .SH SYNOPSIS -#include "gc.h" +#include .br void * GC_malloc(size_t size); .br @@ -11,7 +11,7 @@ void GC_free(void *ptr); void * GC_realloc(void *ptr, size_t size); .br .sp -cc ... gc.a ++ cc ... -I/usr/include/gc -lgc .LP .SH DESCRIPTION .I GC_malloc debian/patches/CVE-2016-9427-prereq.patch0000664000000000000000000001570713050475603014557 0ustar commit 175b8d2c17a37fddbd76302baf42d73688b8bccb Author: Ivan Maidanski Date: Sun Mar 30 12:31:49 2014 +0400 Description: Fix GET_MEM argument rounding in GC_scratch_alloc and similar Fix GET_MEM argument rounding in GC_scratch_alloc and similar (Prevent abort in GC_unix_mmap_get_mem if the allocation size is not a multiple of a page size.) (Apply commit 62bfeb0 from 'release-7_4' branch.) * backgraph.c (new_back_edges, push_in_progress): Use ROUNDUP_PAGESIZE_IF_MMAP() to adjust GET_MEM() argument (when needed). * headers.c (GC_scratch_alloc): Likewise. * misc.c (GC_envfile_init): Likewise. * include/private/gc_priv.h (ROUNDUP_PAGESIZE_IF_MMAP): New macro. * include/private/gcconfig.h (MMAP_SUPPORTED): Move definition from os_dep.c (as needed for ROUNDUP_PAGESIZE_IF_MMAP() definition). * include/private/gcconfig.h (GET_MEM): Refine comment (regarding its argument). Conflicts: include/private/gcconfig.h os_dep.c diff --git a/backgraph.c b/backgraph.c index b0193e3..79dcecf 100644 --- a/backgraph.c +++ b/backgraph.c @@ -86,8 +86,9 @@ static back_edges *avail_back_edges = 0; static back_edges * new_back_edges(void) { if (0 == back_edge_space) { - back_edge_space = (back_edges *) - GET_MEM(MAX_BACK_EDGE_STRUCTS*sizeof(back_edges)); + back_edge_space = (back_edges *)GET_MEM( + ROUNDUP_PAGESIZE_IF_MMAP(MAX_BACK_EDGE_STRUCTS + * sizeof(back_edges))); GC_add_to_our_memory((ptr_t)back_edge_space, MAX_BACK_EDGE_STRUCTS*sizeof(back_edges)); } @@ -127,7 +128,9 @@ static void push_in_progress(ptr_t p) { if (n_in_progress >= in_progress_size) { if (in_progress_size == 0) { - in_progress_size = INITIAL_IN_PROGRESS; + in_progress_size = ROUNDUP_PAGESIZE_IF_MMAP(INITIAL_IN_PROGRESS + * sizeof(ptr_t)) + / sizeof(ptr_t); in_progress_space = (ptr_t *)GET_MEM(in_progress_size * sizeof(ptr_t)); GC_add_to_our_memory((ptr_t)in_progress_space, in_progress_size * sizeof(ptr_t)); diff --git a/headers.c b/headers.c index eac3e9f..8aeb04a 100644 --- a/headers.c +++ b/headers.c @@ -130,28 +130,22 @@ GC_INNER ptr_t GC_scratch_alloc(size_t bytes) if (bytes_to_get <= bytes) { /* Undo the damage, and get memory directly */ - bytes_to_get = bytes; -# ifdef USE_MMAP - bytes_to_get += GC_page_size - 1; - bytes_to_get &= ~(GC_page_size - 1); -# endif + bytes_to_get = ROUNDUP_PAGESIZE_IF_MMAP(bytes); result = (ptr_t)GET_MEM(bytes_to_get); GC_add_to_our_memory(result, bytes_to_get); scratch_free_ptr -= bytes; GC_scratch_last_end_ptr = result + bytes; return(result); } + + bytes_to_get = ROUNDUP_PAGESIZE_IF_MMAP(bytes_to_get); /* for safety */ result = (ptr_t)GET_MEM(bytes_to_get); GC_add_to_our_memory(result, bytes_to_get); if (result == 0) { if (GC_print_stats) GC_log_printf("Out of memory - trying to allocate less\n"); scratch_free_ptr -= bytes; - bytes_to_get = bytes; -# ifdef USE_MMAP - bytes_to_get += GC_page_size - 1; - bytes_to_get &= ~(GC_page_size - 1); -# endif + bytes_to_get = ROUNDUP_PAGESIZE_IF_MMAP(bytes); result = (ptr_t)GET_MEM(bytes_to_get); GC_add_to_our_memory(result, bytes_to_get); return result; diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 3fdb687..0e0fbae 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -1288,6 +1288,18 @@ GC_EXTERN word GC_n_heap_sects; /* Number of separately added heap */ GC_EXTERN word GC_page_size; +/* Round up allocation size to a multiple of a page size. */ +/* GC_setpagesize() is assumed to be already invoked. */ +#define ROUNDUP_PAGESIZE(bytes) \ + (((bytes) + GC_page_size - 1) & ~(GC_page_size - 1)) + +/* Same as above but used to make GET_MEM() argument safe. */ +#ifdef MMAP_SUPPORTED +# define ROUNDUP_PAGESIZE_IF_MMAP(bytes) ROUNDUP_PAGESIZE(bytes) +#else +# define ROUNDUP_PAGESIZE_IF_MMAP(bytes) (bytes) +#endif + #if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) struct _SYSTEM_INFO; GC_EXTERN struct _SYSTEM_INFO GC_sysinfo; diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index bea1a76..f5b62a7 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2459,6 +2459,12 @@ # define GC_DISABLE_INCREMENTAL #endif +#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(IRIX5) \ + || ((defined(USE_MMAP) || defined(USE_MUNMAP)) \ + && !defined(MSWIN32) && !defined(MSWINCE)) +# define MMAP_SUPPORTED +#endif + #if defined(GC_DISABLE_INCREMENTAL) || defined(MANUAL_VDB) # undef GWW_VDB # undef MPROTECT_VDB @@ -2770,8 +2776,8 @@ /* REDIRECT_MALLOC macro defined. */ /* GET_MEM() returns a HLKSIZE aligned chunk. */ /* 0 is taken to mean failure. */ - /* In the case os USE_MMAP, the argument must also be a */ - /* physical page size. */ + /* In case of MMAP_SUPPORTED, the argument must also be */ + /* a multiple of a physical page size. */ /* GET_MEM is currently not assumed to retrieve 0 filled space, */ /* though we should perhaps take advantage of the case in which */ /* does. */ diff --git a/misc.c b/misc.c index 5bc689d..91e218a 100644 --- a/misc.c +++ b/misc.c @@ -542,7 +542,7 @@ GC_API void GC_CALL GC_get_heap_usage_safe(GC_word *pheap_size, } /* At this execution point, GC_setpagesize() and GC_init_win32() */ /* must already be called (for GET_MEM() to work correctly). */ - content = (char *)GET_MEM(len + 1); + content = (char *)GET_MEM(ROUNDUP_PAGESIZE_IF_MMAP(len + 1)); if (content == NULL) { CloseHandle(hFile); return; /* allocation failure */ diff --git a/os_dep.c b/os_dep.c index 25bd568..e6283ac 100644 --- a/os_dep.c +++ b/os_dep.c @@ -97,12 +97,6 @@ # include /* for locking */ #endif -#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(IRIX5) \ - || ((defined(USE_MMAP) || defined(USE_MUNMAP)) \ - && !defined(MSWIN32) && !defined(MSWINCE)) -# define MMAP_SUPPORTED -#endif - #if defined(MMAP_SUPPORTED) || defined(ADD_HEAP_GUARD_PAGES) # if defined(USE_MUNMAP) && !defined(USE_MMAP) # error "invalid config - USE_MUNMAP requires USE_MMAP" debian/patches/04-fix-sparc-ftbfs.diff0000664000000000000000000000071412155066226014677 0ustar Index: libgc/configure.ac =================================================================== --- libgc.orig/configure.ac 2013-06-09 13:51:58.524131019 +0200 +++ libgc/configure.ac 2013-06-09 13:52:50.476385004 +0200 @@ -482,6 +482,9 @@ sparc*-*-linux*) machdep="mach_dep.lo sparc_mach_dep.lo" ;; + sparc*-*-linux*) + machdep="mach_dep.lo sparc_mach_dep.lo" + ;; sparc-*-netbsd*) machdep="mach_dep.lo sparc_netbsd_mach_dep.lo" ;; debian/patches/06-m68k-no-getcontext.diff0000664000000000000000000000115212155063050015251 0ustar Index: libgc-7.1/mach_dep.c =================================================================== --- libgc-7.1.orig/mach_dep.c 2011-05-07 14:21:31.000000000 +0000 +++ libgc-7.1/mach_dep.c 2011-05-07 14:21:44.000000000 +0000 @@ -175,7 +175,7 @@ # if defined(HAVE_PUSH_REGS) GC_push_regs(); # elif defined(UNIX_LIKE) && !defined(DARWIN) && !defined(ARM32) && \ - !defined(HURD) && !defined(AVR32) + !defined(HURD) && !defined(AVR32) && !defined(M68K) /* Older versions of Darwin seem to lack getcontext(). */ /* ARM Linux often doesn't support a real getcontext(). */ ucontext_t ctxt; debian/patches/aarch64.diff0000664000000000000000000000430012171471771012706 0ustar Index: b/include/private/gcconfig.h =================================================================== --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -70,6 +70,13 @@ # define I386 # define mach_type_known # endif +#if defined(__aarch64__) +# define AARCH64 +# if !defined(LINUX) +# define NOSYS +# define mach_type_known +# endif +# endif # if defined(__arm) || defined(__arm__) || defined(__thumb__) # define ARM32 # if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) \ @@ -250,6 +257,10 @@ # define IA64 # define mach_type_known # endif +# if defined(LINUX) && defined(__aarch64__) +# define AARCH64 +# define mach_type_known +# endif # if defined(LINUX) && (defined(__arm) || defined(__arm__)) # define ARM32 # define mach_type_known @@ -541,6 +552,7 @@ /* running Amdahl UTS4 */ /* S390 ==> 390-like machine */ /* running LINUX */ + /* AARCH64 ==> ARM AArch64 */ /* ARM32 ==> Intel StrongARM */ /* IA64 ==> Intel IPF */ /* (e.g. Itanium) */ @@ -1903,6 +1915,32 @@ # endif # endif +# ifdef AARCH64 +# define CPP_WORDSZ 64 +# define MACH_TYPE "AARCH64" +# define ALIGNMENT 8 +# ifndef HBLKSIZE +# define HBLKSIZE 4096 +# endif +# ifdef LINUX +# define OS_TYPE "LINUX" +# define LINUX_STACKBOTTOM +# define USE_GENERIC_PUSH_REGS +# define DYNAMIC_LOADING + extern int __data_start[]; +# define DATASTART ((ptr_t)__data_start) + extern char _end[]; +# define DATAEND ((ptr_t)(&_end)) +# endif +# ifdef NOSYS + /* __data_start is usually defined in the target linker script. */ + extern int __data_start[]; +# define DATASTART ((ptr_t)__data_start) + extern void *__stack_base__; +# define STACKBOTTOM ((ptr_t)__stack_base__) +# endif +# endif + # ifdef ARM32 # define CPP_WORDSZ 32 # define MACH_TYPE "ARM32" debian/patches/01-catch-all-linux.diff0000664000000000000000000000165612155066131014664 0ustar Catch all linux variants. -- Chris Lamb Wed, 12 Aug 2009 01:14:45 +0100 Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -122,8 +122,7 @@ THREADS=posix AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,) case "$host" in - x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* \ - | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*) + *-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) if test "${enable_parallel_mark}" = yes; then @@ -132,10 +131,6 @@ AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN("Explicit GC_INIT() calls may be required."); ;; - *-*-linux*) - AC_DEFINE(GC_LINUX_THREADS) - AC_DEFINE(_REENTRANT) - ;; *-*-aix*) AC_DEFINE(GC_AIX_THREADS) AC_DEFINE(_REENTRANT) debian/patches/05_libgc_fix_threadlocal.patch0000664000000000000000000000133512155063050016433 0ustar Description: BDWGC change for stop scanning freelist of dead threads Author: NIIBE Yutaka Forwarded: Yes Last-Update: 2010-04-16 2010-04-16 NIIBE Yutaka * pthread_support.c (GC_mark_thread_local_free_lists): Mark only for live threads. --- gauche-0.9.orig/gc/pthread_support.c 5 Mar 2010 14:26:16 -0000 +++ gauche-0.9/gc/pthread_support.c 2010-04-16 17:04:59.000000000 +0900 @@ -235,7 +235,9 @@ void GC_mark_thread_local_free_lists(voi for (i = 0; i < THREAD_TABLE_SZ; ++i) { for (p = GC_threads[i]; 0 != p; p = p -> next) { - GC_mark_thread_local_fls_for(&(p->tlfs)); + if (!(p -> flags & FINISHED)) { + GC_mark_thread_local_fls_for(&(p->tlfs)); + } } } } debian/patches/CVE-2016-9427-2.patch0000664000000000000000000010110313050475553013410 0ustar commit 2ea6d85adc5fe07d7e9c5d35f2e5886857338681 Author: Ivan Maidanski Date: Tue Sep 20 00:07:47 2016 +0300 Description: Fix malloc routines to prevent size value wrap-around Fix malloc routines to prevent size value wrap-around (Cherry-pick commit 0b68187 from 'release-7_4' branch.) See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; cast ROUNDUP_PAGESIZE argument to size_t; prevent overflow when computing GC_heapsize+bytes > GC_max_heapsize. * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_generic_malloc_inner, GC_debug_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn, GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, GC_debug_malloc_atomic_uncollectable): Use SIZET_SAT_ADD (instead of "+" operator) to add extra bytes to lb value. * gcj_mlc.c (GC_debug_gcj_malloc): Likewise. * include/private/gc_priv.h (ROUNDUP_GRANULE_SIZE, ROUNDED_UP_GRANULES, ADD_SLOP, ROUNDUP_PAGESIZE): Likewise. * include/private/gcconfig.h (GET_MEM): Likewise. * mallocx.c (GC_malloc_many, GC_memalign): Likewise. * os_dep.c (GC_wince_get_mem, GC_win32_get_mem): Likewise. * typd_mlc.c (GC_malloc_explicitly_typed, GC_malloc_explicitly_typed_ignore_off_page, GC_calloc_explicitly_typed): Likewise. * headers.c (GC_scratch_alloc): Change type of bytes_to_get from word to size_t (because ROUNDUP_PAGESIZE_IF_MMAP result type changed). * include/private/gc_priv.h: Include limits.h (unless SIZE_MAX already defined). * include/private/gc_priv.h (GC_SIZE_MAX, GC_SQRT_SIZE_MAX): Move from malloc.c file. * include/private/gc_priv.h (SIZET_SAT_ADD): New macro (defined before include gcconfig.h). * include/private/gc_priv.h (EXTRA_BYTES, GC_page_size): Change type to size_t. * os_dep.c (GC_page_size): Likewise. * include/private/gc_priv.h (ROUNDUP_GRANULE_SIZE, ROUNDED_UP_GRANULES, ADD_SLOP, ROUNDUP_PAGESIZE): Add comment about the argument. * include/private/gcconfig.h (GET_MEM): Likewise. * include/private/gc_priv.h (ROUNDUP_GRANULE_SIZE, ROUNDED_UP_GRANULES, ADD_SLOP, OBJ_SZ_TO_BLOCKS, ROUNDUP_PAGESIZE, ROUNDUP_PAGESIZE_IF_MMAP): Rename argument to "lb". * include/private/gc_priv.h (OBJ_SZ_TO_BLOCKS_CHECKED): New macro. * include/private/gcconfig.h (GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Change argument type from word to int. * os_dep.c (GC_unix_mmap_get_mem, GC_unix_get_mem, GC_unix_sbrk_get_mem, GC_wince_get_mem, GC_win32_get_mem): Likewise. * malloc.c (GC_alloc_large_and_clear): Call OBJ_SZ_TO_BLOCKS only if no value wrap around is guaranteed. * malloc.c (GC_generic_malloc): Do not check for lb_rounded < lb case (because ROUNDED_UP_GRANULES and GRANULES_TO_BYTES guarantees no value wrap around). * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise. * misc.c (GC_init_size_map): Change "i" local variable type from int to size_t. * os_dep.c (GC_write_fault_handler, catch_exception_raise): Likewise. * misc.c (GC_envfile_init): Cast len to size_t when passed to ROUNDUP_PAGESIZE_IF_MMAP. * os_dep.c (GC_setpagesize): Cast GC_sysinfo.dwPageSize and GETPAGESIZE() to size_t (when setting GC_page_size). * os_dep.c (GC_unix_mmap_get_mem): Expand ROUNDUP_PAGESIZE macro but without value wrap-around checking (the argument is of word type). * os_dep.c (GC_unix_mmap_get_mem): Replace -GC_page_size with ~GC_page_size+1 (because GC_page_size is unsigned); remove redundant cast to size_t. * os_dep.c (GC_unix_sbrk_get_mem): Add explicit cast of GC_page_size to SBRK_ARG_T. * os_dep.c (GC_wince_get_mem): Change type of res_bytes local variable to size_t. * typd_mlc.c: Do not include limits.h. * typd_mlc.c (GC_SIZE_MAX, GC_SQRT_SIZE_MAX): Remove (as defined in gc_priv.h now). Index: libgc-7.2d/allchblk.c =================================================================== --- libgc-7.2d.orig/allchblk.c +++ libgc-7.2d/allchblk.c @@ -594,7 +594,7 @@ GC_allochblk(size_t sz, int kind, unsign /* split. */ GC_ASSERT((sz & (GRANULE_BYTES - 1)) == 0); - blocks = OBJ_SZ_TO_BLOCKS(sz); + blocks = OBJ_SZ_TO_BLOCKS_CHECKED(sz); if ((signed_word)(blocks * HBLKSIZE) < 0) { return 0; } @@ -661,7 +661,7 @@ GC_allochblk_nth(size_t sz, int kind, un signed_word size_needed; /* number of bytes in requested objects */ signed_word size_avail; /* bytes available in this block */ - size_needed = HBLKSIZE * OBJ_SZ_TO_BLOCKS(sz); + size_needed = HBLKSIZE * OBJ_SZ_TO_BLOCKS_CHECKED(sz); /* search for a big enough block in free list */ hbp = GC_hblkfreelist[n]; Index: libgc-7.2d/alloc.c =================================================================== --- libgc-7.2d.orig/alloc.c +++ libgc-7.2d/alloc.c @@ -1138,21 +1138,16 @@ GC_word GC_max_retries = 0; */ GC_INNER GC_bool GC_expand_hp_inner(word n) { - word bytes; + size_t bytes; struct hblk * space; word expansion_slop; /* Number of bytes by which we expect the */ /* heap to expand soon. */ if (n < MINHINCR) n = MINHINCR; - bytes = n * HBLKSIZE; - /* Make sure bytes is a multiple of GC_page_size */ - { - word mask = GC_page_size - 1; - bytes += mask; - bytes &= ~mask; - } - - if (GC_max_heapsize != 0 && GC_heapsize + bytes > GC_max_heapsize) { + bytes = ROUNDUP_PAGESIZE((size_t)n * HBLKSIZE); + if (GC_max_heapsize != 0 + && (GC_max_heapsize < (word)bytes + || GC_heapsize > GC_max_heapsize - (word)bytes)) { /* Exceeded self-imposed limit */ return(FALSE); } @@ -1176,7 +1171,7 @@ GC_INNER GC_bool GC_expand_hp_inner(word if ((GC_last_heap_addr == 0 && !((word)space & SIGNB)) || (GC_last_heap_addr != 0 && GC_last_heap_addr < (ptr_t)space)) { /* Assume the heap is growing up */ - word new_limit = (word)space + bytes + expansion_slop; + word new_limit = (word)space + (word)bytes + expansion_slop; if (new_limit > (word)space) { GC_greatest_plausible_heap_addr = (void *)GC_max((word)GC_greatest_plausible_heap_addr, Index: libgc-7.2d/dbg_mlc.c =================================================================== --- libgc-7.2d.orig/dbg_mlc.c +++ libgc-7.2d/dbg_mlc.c @@ -461,7 +461,7 @@ GC_API void * GC_CALL GC_debug_malloc(si /* Note that according to malloc() specification, if size is 0 then */ /* malloc() returns either NULL, or a unique pointer value that can */ /* later be successfully passed to free(). We always do the latter. */ - result = GC_malloc(lb + DEBUG_BYTES); + result = GC_malloc(SIZET_SAT_ADD(lb, DEBUG_BYTES)); if (result == 0) { GC_err_printf("GC_debug_malloc(%lu) returning NULL (", @@ -480,7 +480,7 @@ GC_API void * GC_CALL GC_debug_malloc(si GC_API void * GC_CALL GC_debug_malloc_ignore_off_page(size_t lb, GC_EXTRA_PARAMS) { - void * result = GC_malloc_ignore_off_page(lb + DEBUG_BYTES); + void * result = GC_malloc_ignore_off_page(SIZET_SAT_ADD(lb, DEBUG_BYTES)); if (result == 0) { GC_err_printf("GC_debug_malloc_ignore_off_page(%lu) returning NULL (", @@ -499,7 +499,8 @@ GC_API void * GC_CALL GC_debug_malloc_ig GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(size_t lb, GC_EXTRA_PARAMS) { - void * result = GC_malloc_atomic_ignore_off_page(lb + DEBUG_BYTES); + void * result = GC_malloc_atomic_ignore_off_page( + SIZET_SAT_ADD(lb, DEBUG_BYTES)); if (result == 0) { GC_err_printf("GC_debug_malloc_atomic_ignore_off_page(%lu)" @@ -523,7 +524,8 @@ GC_API void * GC_CALL GC_debug_malloc_at /* we already hold the GC lock. */ GC_INNER void * GC_debug_generic_malloc_inner(size_t lb, int k) { - void * result = GC_generic_malloc_inner(lb + DEBUG_BYTES, k); + void * result = GC_generic_malloc_inner( + SIZET_SAT_ADD(lb, DEBUG_BYTES), k); if (result == 0) { GC_err_printf("GC internal allocation (%lu bytes) returning NULL\n", @@ -538,7 +540,7 @@ GC_API void * GC_CALL GC_debug_malloc_at int k) { void * result = GC_generic_malloc_inner_ignore_off_page( - lb + DEBUG_BYTES, k); + SIZET_SAT_ADD(lb, DEBUG_BYTES), k); if (result == 0) { GC_err_printf("GC internal allocation (%lu bytes) returning NULL\n", @@ -553,7 +555,7 @@ GC_API void * GC_CALL GC_debug_malloc_at #ifdef STUBBORN_ALLOC GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS) { - void * result = GC_malloc_stubborn(lb + DEBUG_BYTES); + void * result = GC_malloc_stubborn(SIZET_SAT_ADD(lb, DEBUG_BYTES)); if (result == 0) { GC_err_printf("GC_debug_malloc(%lu) returning NULL (", @@ -619,7 +621,7 @@ GC_API void * GC_CALL GC_debug_malloc_at GC_API void * GC_CALL GC_debug_malloc_atomic(size_t lb, GC_EXTRA_PARAMS) { - void * result = GC_malloc_atomic(lb + DEBUG_BYTES); + void * result = GC_malloc_atomic(SIZET_SAT_ADD(lb, DEBUG_BYTES)); if (result == 0) { GC_err_printf("GC_debug_malloc_atomic(%lu) returning NULL (", @@ -702,7 +704,8 @@ GC_API char * GC_CALL GC_debug_strndup(c GC_API void * GC_CALL GC_debug_malloc_uncollectable(size_t lb, GC_EXTRA_PARAMS) { - void * result = GC_malloc_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES); + void * result = GC_malloc_uncollectable( + SIZET_SAT_ADD(lb, UNCOLLECTABLE_DEBUG_BYTES)); if (result == 0) { GC_err_printf("GC_debug_malloc_uncollectable(%lu) returning NULL (", @@ -722,8 +725,8 @@ GC_API void * GC_CALL GC_debug_malloc_un GC_API void * GC_CALL GC_debug_malloc_atomic_uncollectable(size_t lb, GC_EXTRA_PARAMS) { - void * result = - GC_malloc_atomic_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES); + void * result = GC_malloc_atomic_uncollectable( + SIZET_SAT_ADD(lb, UNCOLLECTABLE_DEBUG_BYTES)); if (result == 0) { GC_err_printf( Index: libgc-7.2d/gcj_mlc.c =================================================================== --- libgc-7.2d.orig/gcj_mlc.c +++ libgc-7.2d/gcj_mlc.c @@ -216,7 +216,8 @@ GC_API void * GC_CALL GC_debug_gcj_mallo /* confuse the backtrace. */ LOCK(); maybe_finalize(); - result = GC_generic_malloc_inner(lb + DEBUG_BYTES, GC_gcj_debug_kind); + result = GC_generic_malloc_inner(SIZET_SAT_ADD(lb, DEBUG_BYTES), + GC_gcj_debug_kind); if (result == 0) { GC_oom_func oom_fn = GC_oom_fn; UNLOCK(); Index: libgc-7.2d/headers.c =================================================================== --- libgc-7.2d.orig/headers.c +++ libgc-7.2d/headers.c @@ -119,8 +119,7 @@ GC_INNER ptr_t GC_scratch_alloc(size_t b { register ptr_t result = scratch_free_ptr; - bytes += GRANULE_BYTES-1; - bytes &= ~(GRANULE_BYTES-1); + bytes = ROUNDUP_GRANULE_SIZE(bytes); scratch_free_ptr += bytes; if (scratch_free_ptr <= GC_scratch_end_ptr) { return(result); Index: libgc-7.2d/include/private/gc_priv.h =================================================================== --- libgc-7.2d.orig/include/private/gc_priv.h +++ libgc-7.2d/include/private/gc_priv.h @@ -90,6 +90,20 @@ typedef char * ptr_t; /* A generic poi /* byte displacements and which can be used */ /* for address comparisons. */ +#ifndef SIZE_MAX +# include +#endif +#ifdef SIZE_MAX +# define GC_SIZE_MAX SIZE_MAX +#else +# define GC_SIZE_MAX (~(size_t)0) +#endif + +/* Saturated addition of size_t values. Used to avoid value wrap */ +/* around on overflow. The arguments should have no side effects. */ +#define SIZET_SAT_ADD(a, b) \ + ((a) < GC_SIZE_MAX - (b) ? (a) + (b) : GC_SIZE_MAX) + #ifndef GCCONFIG_H # include "gcconfig.h" #endif @@ -245,9 +259,9 @@ typedef char * ptr_t; /* A generic poi # ifdef LINT2 /* Explicitly instruct the code analysis tool that */ /* GC_all_interior_pointers is assumed to have only 0 or 1 value. */ -# define EXTRA_BYTES (GC_all_interior_pointers? 1 : 0) +# define EXTRA_BYTES ((size_t)(GC_all_interior_pointers? 1 : 0)) # else -# define EXTRA_BYTES GC_all_interior_pointers +# define EXTRA_BYTES (size_t)GC_all_interior_pointers # endif # define MAX_EXTRA_BYTES 1 #else @@ -655,6 +669,7 @@ GC_EXTERN GC_warn_proc GC_current_warn_p # define LOG_HBLKSIZE ((size_t)CPP_LOG_HBLKSIZE) # define HBLKSIZE ((size_t)CPP_HBLKSIZE) +#define GC_SQRT_SIZE_MAX ((((size_t)1) << (WORDSZ / 2)) - 1) /* max size objects supported by freelist (larger objects are */ /* allocated directly with allchblk(), by rounding to the next */ @@ -683,9 +698,12 @@ GC_EXTERN GC_warn_proc GC_current_warn_p # define HBLKDISPL(objptr) (((size_t) (objptr)) & (HBLKSIZE-1)) +/* Round up allocation size (in bytes) to a multiple of a granule. */ +#define ROUNDUP_GRANULE_SIZE(lb) /* lb should have no side-effect */ \ + (SIZET_SAT_ADD(lb, GRANULE_BYTES - 1) & ~(GRANULE_BYTES - 1)) /* Round up byte allocation requests to integral number of words, etc. */ -# define ROUNDED_UP_GRANULES(n) \ - BYTES_TO_GRANULES((n) + (GRANULE_BYTES - 1 + EXTRA_BYTES)) +# define ROUNDED_UP_GRANULES(lb) /* lb should have no side-effect */ \ + BYTES_TO_GRANULES(SIZET_SAT_ADD(lb, GRANULE_BYTES - 1 + EXTRA_BYTES)) # if MAX_EXTRA_BYTES == 0 # define SMALL_OBJ(bytes) EXPECT((bytes) <= (MAXOBJBYTES), TRUE) # else @@ -695,7 +713,8 @@ GC_EXTERN GC_warn_proc GC_current_warn_p /* This really just tests bytes <= MAXOBJBYTES - EXTRA_BYTES. */ /* But we try to avoid looking up EXTRA_BYTES. */ # endif -# define ADD_SLOP(bytes) ((bytes) + EXTRA_BYTES) +# define ADD_SLOP(lb) /* lb should have no side-effect */ \ + SIZET_SAT_ADD(lb, EXTRA_BYTES) # ifndef MIN_WORDS # define MIN_WORDS 2 /* FIXME: obsolete */ # endif @@ -892,9 +911,11 @@ struct hblk { # define HBLK_IS_FREE(hdr) (((hdr) -> hb_flags & FREE_BLK) != 0) -# define OBJ_SZ_TO_BLOCKS(sz) divHBLKSZ((sz) + HBLKSIZE-1) +# define OBJ_SZ_TO_BLOCKS(lb) divHBLKSZ((lb) + HBLKSIZE-1) +# define OBJ_SZ_TO_BLOCKS_CHECKED(lb) /* lb should have no side-effect */ \ + divHBLKSZ(SIZET_SAT_ADD(lb, HBLKSIZE - 1)) /* Size of block (in units of HBLKSIZE) needed to hold objects of */ - /* given sz (in bytes). */ + /* given lb (in bytes). The checked variant prevents wrap around. */ /* Object free list link */ # define obj_link(p) (*(void **)(p)) @@ -1262,18 +1283,18 @@ GC_EXTERN word GC_n_heap_sects; /* Numbe /* sections. */ #endif -GC_EXTERN word GC_page_size; +GC_EXTERN size_t GC_page_size; /* Round up allocation size to a multiple of a page size. */ /* GC_setpagesize() is assumed to be already invoked. */ -#define ROUNDUP_PAGESIZE(bytes) \ - (((bytes) + GC_page_size - 1) & ~(GC_page_size - 1)) +#define ROUNDUP_PAGESIZE(lb) /* lb should have no side-effect */ \ + (SIZET_SAT_ADD(lb, GC_page_size - 1) & ~(GC_page_size - 1)) /* Same as above but used to make GET_MEM() argument safe. */ #ifdef MMAP_SUPPORTED -# define ROUNDUP_PAGESIZE_IF_MMAP(bytes) ROUNDUP_PAGESIZE(bytes) +# define ROUNDUP_PAGESIZE_IF_MMAP(lb) ROUNDUP_PAGESIZE(lb) #else -# define ROUNDUP_PAGESIZE_IF_MMAP(bytes) (bytes) +# define ROUNDUP_PAGESIZE_IF_MMAP(lb) (lb) #endif #if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) Index: libgc-7.2d/include/private/gcconfig.h =================================================================== --- libgc-7.2d.orig/include/private/gcconfig.h +++ libgc-7.2d/include/private/gcconfig.h @@ -2803,7 +2803,8 @@ /* usually makes it possible to merge consecutively allocated */ /* chunks. It also avoids unintended recursion with */ /* REDIRECT_MALLOC macro defined. */ - /* GET_MEM() returns a HLKSIZE aligned chunk. */ + /* GET_MEM() argument should be of size_t type and have */ + /* no side-effect. GET_MEM() returns HLKSIZE-aligned chunk; */ /* 0 is taken to mean failure. */ /* In case of MMAP_SUPPORTED, the argument must also be */ /* a multiple of a physical page size. */ @@ -2813,45 +2814,52 @@ struct hblk; /* See gc_priv.h. */ # if defined(PCR) char * real_malloc(size_t bytes); -# define GET_MEM(bytes) HBLKPTR(real_malloc((size_t)(bytes) + GC_page_size) \ +# define GET_MEM(bytes) HBLKPTR(real_malloc(SIZET_SAT_ADD(bytes, \ + GC_page_size)) \ + GC_page_size-1) # elif defined(OS2) void * os2_alloc(size_t bytes); -# define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc((size_t)(bytes) \ - + GC_page_size) + GC_page_size-1) +# define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc( \ + SIZET_SAT_ADD(bytes, \ + GC_page_size)) \ + + GC_page_size-1) # elif defined(NEXT) || defined(DOS4GW) || defined(NONSTOP) \ || (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) \ || (defined(SOLARIS) && !defined(USE_MMAP)) || defined(RTEMS) \ || defined(__CC_ARM) # define GET_MEM(bytes) HBLKPTR((size_t)calloc(1, \ - (size_t)(bytes) + GC_page_size) \ + SIZET_SAT_ADD(bytes, \ + GC_page_size)) \ + GC_page_size - 1) # elif defined(MSWIN32) || defined(CYGWIN32) - ptr_t GC_win32_get_mem(GC_word bytes); + ptr_t GC_win32_get_mem(size_t bytes); # define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes) # elif defined(MACOS) # if defined(USE_TEMPORARY_MEMORY) Ptr GC_MacTemporaryNewPtr(size_t size, Boolean clearMemory); -# define GET_MEM(bytes) HBLKPTR( \ - GC_MacTemporaryNewPtr((bytes) + GC_page_size, true) \ +# define GET_MEM(bytes) HBLKPTR(GC_MacTemporaryNewPtr( \ + SIZET_SAT_ADD(bytes, \ + GC_page_size), true) \ + GC_page_size-1) # else -# define GET_MEM(bytes) HBLKPTR(NewPtrClear((bytes) + GC_page_size) \ +# define GET_MEM(bytes) HBLKPTR(NewPtrClear(SIZET_SAT_ADD(bytes, \ + GC_page_size)) \ + GC_page_size-1) # endif # elif defined(MSWINCE) - ptr_t GC_wince_get_mem(GC_word bytes); + ptr_t GC_wince_get_mem(size_t bytes); # define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes) # elif defined(AMIGA) && defined(GC_AMIGA_FASTALLOC) - void *GC_amiga_get_mem(size_t size); -# define GET_MEM(bytes) HBLKPTR((size_t) \ - GC_amiga_get_mem((size_t)(bytes) + GC_page_size) \ + void *GC_amiga_get_mem(size_t bytes); +# define GET_MEM(bytes) HBLKPTR((size_t)GC_amiga_get_mem( \ + SIZET_SAT_ADD(bytes, \ + GC_page_size)) \ + GC_page_size-1) # elif defined(SN_TARGET_PS3) void *ps3_get_mem(size_t size); # define GET_MEM(bytes) (struct hblk*)ps3_get_mem(bytes) # else - ptr_t GC_unix_get_mem(GC_word bytes); + ptr_t GC_unix_get_mem(size_t bytes); # define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes) # endif #endif /* GC_PRIVATE_H */ Index: libgc-7.2d/malloc.c =================================================================== --- libgc-7.2d.orig/malloc.c +++ libgc-7.2d/malloc.c @@ -46,9 +46,8 @@ GC_INNER ptr_t GC_alloc_large(size_t lb, ptr_t result; GC_bool retry = FALSE; - /* Round up to a multiple of a granule. */ - lb = (lb + GRANULE_BYTES - 1) & ~(GRANULE_BYTES - 1); - n_blocks = OBJ_SZ_TO_BLOCKS(lb); + lb = ROUNDUP_GRANULE_SIZE(lb); + n_blocks = OBJ_SZ_TO_BLOCKS_CHECKED(lb); if (!GC_is_initialized) GC_init(); /* Do our share of marking work */ if (GC_incremental && !GC_dont_gc) @@ -84,10 +83,11 @@ GC_INNER ptr_t GC_alloc_large(size_t lb, STATIC ptr_t GC_alloc_large_and_clear(size_t lb, int k, unsigned flags) { ptr_t result = GC_alloc_large(lb, k, flags); - word n_blocks = OBJ_SZ_TO_BLOCKS(lb); if (0 == result) return 0; if (GC_debugging_started || GC_obj_kinds[k].ok_init) { + word n_blocks = OBJ_SZ_TO_BLOCKS(lb); + /* Clear the whole block, in case of GC_realloc call. */ BZERO(result, n_blocks * HBLKSIZE); } @@ -167,8 +167,6 @@ GC_API void * GC_CALL GC_generic_malloc( GC_bool init; lg = ROUNDED_UP_GRANULES(lb); lb_rounded = GRANULES_TO_BYTES(lg); - if (lb_rounded < lb) - return((*GC_get_oom_fn())(lb)); n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded); init = GC_obj_kinds[k].ok_init; LOCK(); @@ -375,15 +373,6 @@ void * malloc(size_t lb) } #endif /* GC_LINUX_THREADS */ -#include -#ifdef SIZE_MAX -# define GC_SIZE_MAX SIZE_MAX -#else -# define GC_SIZE_MAX (~(size_t)0) -#endif - -#define GC_SQRT_SIZE_MAX ((1U << (WORDSZ / 2)) - 1) - void * calloc(size_t n, size_t lb) { if ((lb | n) > GC_SQRT_SIZE_MAX /* fast initial test */ Index: libgc-7.2d/mallocx.c =================================================================== --- libgc-7.2d.orig/mallocx.c +++ libgc-7.2d/mallocx.c @@ -182,8 +182,6 @@ GC_INNER void * GC_generic_malloc_ignore return(GC_generic_malloc((word)lb, k)); lg = ROUNDED_UP_GRANULES(lb); lb_rounded = GRANULES_TO_BYTES(lg); - if (lb_rounded < lb) - return((*GC_get_oom_fn())(lb)); n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded); init = GC_obj_kinds[k].ok_init; if (GC_have_errors) GC_print_all_errors(); @@ -434,9 +432,11 @@ GC_API void GC_CALL GC_generic_malloc_ma GC_API void * GC_CALL GC_malloc_many(size_t lb) { void *result; - GC_generic_malloc_many((lb + EXTRA_BYTES + GRANULE_BYTES-1) - & ~(GRANULE_BYTES-1), - NORMAL, &result); + /* Add EXTRA_BYTES and round up to a multiple of a granule. */ + lb = SIZET_SAT_ADD(lb, EXTRA_BYTES + GRANULE_BYTES - 1) + & ~(GRANULE_BYTES - 1); + + GC_generic_malloc_many(lb, NORMAL, &result); return result; } @@ -460,7 +460,7 @@ GC_API void * GC_CALL GC_memalign(size_t } /* We could also try to make sure that the real rounded-up object size */ /* is a multiple of align. That would be correct up to HBLKSIZE. */ - new_lb = lb + align - 1; + new_lb = SIZET_SAT_ADD(lb, align - 1); result = GC_malloc(new_lb); offset = (word)result % align; if (offset != 0) { Index: libgc-7.2d/misc.c =================================================================== --- libgc-7.2d.orig/misc.c +++ libgc-7.2d/misc.c @@ -184,7 +184,7 @@ GC_API void GC_CALL GC_set_handle_fork(i /* quantization algorithm (but we precompute it). */ STATIC void GC_init_size_map(void) { - int i; + size_t i; /* Map size 0 to something bigger. */ /* This avoids problems at lower levels. */ @@ -542,7 +542,7 @@ GC_API void GC_CALL GC_get_heap_usage_sa } /* At this execution point, GC_setpagesize() and GC_init_win32() */ /* must already be called (for GET_MEM() to work correctly). */ - content = (char *)GET_MEM(ROUNDUP_PAGESIZE_IF_MMAP(len + 1)); + content = (char *)GET_MEM(ROUNDUP_PAGESIZE_IF_MMAP((size_t)len + 1)); if (content == NULL) { CloseHandle(hFile); return; /* allocation failure */ Index: libgc-7.2d/os_dep.c =================================================================== --- libgc-7.2d.orig/os_dep.c +++ libgc-7.2d/os_dep.c @@ -684,7 +684,7 @@ struct o32_obj { # endif /* OS/2 */ /* Find the page size */ -GC_INNER word GC_page_size = 0; +GC_INNER size_t GC_page_size = 0; #if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) # ifndef VER_PLATFORM_WIN32_CE @@ -698,7 +698,7 @@ GC_INNER word GC_page_size = 0; GC_INNER void GC_setpagesize(void) { GetSystemInfo(&GC_sysinfo); - GC_page_size = GC_sysinfo.dwPageSize; + GC_page_size = (size_t)GC_sysinfo.dwPageSize; # if defined(MSWINCE) && !defined(_WIN32_WCE_EMULATION) { OSVERSIONINFO verInfo; @@ -775,7 +775,7 @@ GC_INNER word GC_page_size = 0; GC_INNER void GC_setpagesize(void) { # if defined(MPROTECT_VDB) || defined(PROC_VDB) || defined(USE_MMAP) - GC_page_size = GETPAGESIZE(); + GC_page_size = (size_t)GETPAGESIZE(); if (!GC_page_size) ABORT("getpagesize() failed"); # else /* It's acceptable to fake it. */ @@ -2025,7 +2025,7 @@ void GC_register_data_segments(void) # define HEAP_START ((ptr_t)0) #endif -STATIC ptr_t GC_unix_mmap_get_mem(word bytes) +STATIC ptr_t GC_unix_mmap_get_mem(size_t bytes) { void *result; static ptr_t last_addr = HEAP_START; @@ -2054,7 +2054,7 @@ STATIC ptr_t GC_unix_mmap_get_mem(word b /* Oops. We got the end of the address space. This isn't */ /* usable by arbitrary C code, since one-past-end pointers */ /* don't work, so we discard it and try again. */ - munmap(result, (size_t)(-GC_page_size) - (size_t)result); + munmap(result, ~GC_page_size - (size_t)result + 1); /* Leave last page mapped, so we can't repeat. */ return GC_unix_mmap_get_mem(bytes); } @@ -2067,13 +2067,13 @@ STATIC ptr_t GC_unix_mmap_get_mem(word b # endif /* MMAP_SUPPORTED */ #if defined(USE_MMAP) - ptr_t GC_unix_get_mem(word bytes) + ptr_t GC_unix_get_mem(size_t bytes) { return GC_unix_mmap_get_mem(bytes); } #else /* !USE_MMAP */ -STATIC ptr_t GC_unix_sbrk_get_mem(word bytes) +STATIC ptr_t GC_unix_sbrk_get_mem(size_t bytes) { ptr_t result; # ifdef IRIX5 @@ -2090,7 +2090,7 @@ STATIC ptr_t GC_unix_sbrk_get_mem(word b goto out; } if (lsbs != 0) { - if((ptr_t)sbrk(GC_page_size - lsbs) == (ptr_t)(-1)) { + if((ptr_t)sbrk((SBRK_ARG_T)GC_page_size - lsbs) == (ptr_t)(-1)) { result = 0; goto out; } @@ -2114,7 +2114,7 @@ STATIC ptr_t GC_unix_sbrk_get_mem(word b return(result); } -ptr_t GC_unix_get_mem(word bytes) +ptr_t GC_unix_get_mem(size_t bytes) { # if defined(MMAP_SUPPORTED) /* By default, we try both sbrk and mmap, in that order. */ @@ -2183,7 +2183,7 @@ void * os2_alloc(size_t bytes) #endif /* MSWIN32 */ #if defined(MSWIN32) || defined(CYGWIN32) - ptr_t GC_win32_get_mem(word bytes) + ptr_t GC_win32_get_mem(size_t bytes) { ptr_t result; @@ -2194,8 +2194,8 @@ void * os2_alloc(size_t bytes) /* VirtualAlloc doesn't like PAGE_EXECUTE_READWRITE. */ /* There are also unconfirmed rumors of other */ /* problems, so we dodge the issue. */ - result = (ptr_t) GlobalAlloc(0, bytes + HBLKSIZE); - result = (ptr_t)(((word)result + HBLKSIZE - 1) & ~(HBLKSIZE-1)); + result = (ptr_t)(((word)GlobalAlloc(0, SIZET_SAT_ADD(bytes, HBLKSIZE)) + + HBLKSIZE - 1) & ~(HBLKSIZE - 1)); } else { /* VirtualProtect only works on regions returned by a */ /* single VirtualAlloc call. Thus we allocate one */ @@ -2222,12 +2222,13 @@ void * os2_alloc(size_t bytes) /* available. Otherwise we waste resources or possibly */ /* cause VirtualAlloc to fail (observed in Windows 2000 */ /* SP2). */ - result = (ptr_t) VirtualAlloc(NULL, bytes + VIRTUAL_ALLOC_PAD, - GetWriteWatch_alloc_flag + result = (ptr_t) VirtualAlloc(NULL, + SIZET_SAT_ADD(bytes, VIRTUAL_ALLOC_PAD), + GetWriteWatch_alloc_flag | (MEM_COMMIT | MEM_RESERVE) | GC_mem_top_down, - GC_pages_executable ? PAGE_EXECUTE_READWRITE : - PAGE_READWRITE); + GC_pages_executable ? PAGE_EXECUTE_READWRITE : + PAGE_READWRITE); # undef IGNORE_PAGES_EXECUTABLE } # endif /* !CYGWIN32 */ @@ -2265,7 +2266,7 @@ void * os2_alloc(size_t bytes) #ifdef MSWINCE - ptr_t GC_wince_get_mem(word bytes) + ptr_t GC_wince_get_mem(size_t bytes) { ptr_t result = 0; /* initialized to prevent warning. */ word i; @@ -2285,8 +2286,9 @@ void * os2_alloc(size_t bytes) if (i == GC_n_heap_bases) { /* Reserve more pages */ - word res_bytes = (bytes + GC_sysinfo.dwAllocationGranularity-1) - & ~(GC_sysinfo.dwAllocationGranularity-1); + size_t res_bytes = + SIZET_SAT_ADD(bytes, (size_t)GC_sysinfo.dwAllocationGranularity-1) + & ~((size_t)GC_sysinfo.dwAllocationGranularity-1); /* If we ever support MPROTECT_VDB here, we will probably need to */ /* ensure that res_bytes is strictly > bytes, so that VirtualProtect */ /* never spans regions. It seems to be OK for a VirtualFree */ @@ -3109,7 +3111,7 @@ STATIC void GC_default_push_other_roots( char * addr = (char *) (exc_info -> ExceptionRecord -> ExceptionInformation[1]); # endif - unsigned i; + size_t i; if (SIG_OK && CODE_OK) { register struct hblk * h = @@ -4280,7 +4282,7 @@ catch_exception_raise(mach_port_t except kern_return_t r; char *addr; struct hblk *h; - unsigned int i; + size_t i; thread_state_flavor_t flavor = DARWIN_EXC_STATE; mach_msg_type_number_t exc_state_count = DARWIN_EXC_STATE_COUNT; DARWIN_EXC_STATE_T exc_state; Index: libgc-7.2d/typd_mlc.c =================================================================== --- libgc-7.2d.orig/typd_mlc.c +++ libgc-7.2d/typd_mlc.c @@ -587,8 +587,8 @@ GC_API void * GC_CALL GC_malloc_explicit size_t lg; DCL_LOCK_STATE; - lb += TYPD_EXTRA_BYTES; - if(SMALL_OBJ(lb)) { + lb = SIZET_SAT_ADD(lb, TYPD_EXTRA_BYTES); + if (SMALL_OBJ(lb)) { lg = GC_size_map[lb]; opp = &(GC_eobjfreelist[lg]); LOCK(); @@ -622,8 +622,8 @@ GC_API void * GC_CALL GC_malloc_explicit size_t lg; DCL_LOCK_STATE; - lb += TYPD_EXTRA_BYTES; - if( SMALL_OBJ(lb) ) { + lb = SIZET_SAT_ADD(lb, TYPD_EXTRA_BYTES); + if (SMALL_OBJ(lb)) { lg = GC_size_map[lb]; opp = &(GC_eobjfreelist[lg]); LOCK(); @@ -649,15 +649,6 @@ GC_API void * GC_CALL GC_malloc_explicit return((void *) op); } -#include -#ifdef SIZE_MAX -# define GC_SIZE_MAX SIZE_MAX -#else -# define GC_SIZE_MAX (~(size_t)0) -#endif - -#define GC_SQRT_SIZE_MAX ((((size_t)1) << (WORDSZ / 2)) - 1) - GC_API void * GC_CALL GC_calloc_explicitly_typed(size_t n, size_t lb, GC_descr d) { @@ -681,10 +672,11 @@ GC_API void * GC_CALL GC_calloc_explicit case SIMPLE: return GC_malloc_explicitly_typed(lb, simple_descr); case LEAF: - lb += sizeof(struct LeafDescriptor) + TYPD_EXTRA_BYTES; + lb = SIZET_SAT_ADD(lb, + sizeof(struct LeafDescriptor) + TYPD_EXTRA_BYTES); break; case COMPLEX: - lb += TYPD_EXTRA_BYTES; + lb = SIZET_SAT_ADD(lb, TYPD_EXTRA_BYTES); break; } if( SMALL_OBJ(lb) ) { debian/patches/series0000664000000000000000000000043413050450637012040 0ustar 01-catch-all-linux.diff 02-manpage.diff 03-add-avr32-support.diff 04-fix-sparc-ftbfs.diff #05-s390-includes.diff enable-threads.diff allow-automake-1.13 aarch64.diff CVE-2016-9427-test.patch CVE-2016-9427-prereq.patch CVE-2016-9427-1.patch CVE-2016-9427-2.patch CVE-2016-9427-3.patch debian/patches/allow-automake-1.130000664000000000000000000000104712155070351014045 0ustar Index: libgc/autogen.sh =================================================================== --- libgc.orig/autogen.sh 2013-06-09 13:26:20.252610791 +0200 +++ libgc/autogen.sh 2013-06-09 14:10:20.893520227 +0200 @@ -1,11 +1,11 @@ -#! /bin/sh +#! /bin/bash set -e # These version are ok, pre-1.7 is not. Post 1.7 may produce a lot of # warnings for unrelated projects, so prefer 1.7 for now. am_version= -for v in 1.10 1.9 1.8 1.7; do +for v in 1.11 1.10 1.9 1.8 1.7; do if type -p &>/dev/null automake-$v; then am_version="-$v" break debian/patches/CVE-2016-9427-test.patch0000664000000000000000000000724113050475615014235 0ustar commit e273661227b4684265c09e04f75db81f7c5e697e Author: Ivan Maidanski Date: Thu Sep 29 00:32:47 2016 +0300 Description: Add more cases to huge_test to cover sizes close to word-type maximum Add more cases to huge_test to cover sizes close to word-type maximum * tests/huge_test.c (GC_WORD_MAX): New macro. * tests/huge_test.c (GC_SWORD_MAX): Use GC_WORD_MAX. * tests/huge_test.c (main): Add GC_SWORD_MAX+1, GC_WORD_MAX, GC_WORD_MAX-4/8/16/1024 test cases. [NOTE: this patch updates the version of huge_test.c to e273661227b4684265c09e04f75db81f7c5e697e, incorporating intermediate commits. -- sbeattie] Index: libgc-7.4.2/tests/huge_test.c =================================================================== --- libgc-7.4.2.orig/tests/huge_test.c +++ libgc-7.4.2/tests/huge_test.c @@ -5,11 +5,19 @@ #ifndef GC_IGNORE_WARN /* Ignore misleading "Out of Memory!" warning (which is printed on */ - /* every GC_MALLOC(LONG_MAX) call) by defining this macro before */ - /* "gc.h" inclusion. */ + /* every GC_MALLOC call below) by defining this macro before "gc.h" */ + /* inclusion. */ # define GC_IGNORE_WARN #endif +#ifndef GC_MAXIMUM_HEAP_SIZE +# define GC_MAXIMUM_HEAP_SIZE 100 * 1024 * 1024 +# define GC_INITIAL_HEAP_SIZE GC_MAXIMUM_HEAP_SIZE / 20 + /* Otherwise heap expansion aborts when deallocating large block. */ + /* That's OK. We test this corner case mostly to make sure that */ + /* it fails predictably. */ +#endif + #include "gc.h" /* @@ -19,34 +27,31 @@ * expected manner. */ +#define CHECK_ALLOC_FAILED(r, sz_str) \ + do { \ + if (NULL != (r)) { \ + fprintf(stderr, \ + "Size " sz_str " allocation unexpectedly succeeded\n"); \ + exit(1); \ + } \ + } while (0) + +#define GC_WORD_MAX ((GC_word)-1) +#define GC_SWORD_MAX ((GC_signed_word)(GC_WORD_MAX >> 1)) + int main(void) { GC_INIT(); - GC_set_max_heap_size(100*1024*1024); - /* Otherwise heap expansion aborts when deallocating large block. */ - /* That's OK. We test this corner case mostly to make sure that */ - /* it fails predictably. */ - GC_expand_hp(1024*1024*5); - if (sizeof(long) == sizeof(void *)) { - void *r = GC_MALLOC(LONG_MAX-1024); - if (0 != r) { - fprintf(stderr, - "Size LONG_MAX-1024 allocation unexpectedly succeeded\n"); - exit(1); - } - r = GC_MALLOC(LONG_MAX); - if (0 != r) { - fprintf(stderr, - "Size LONG_MAX allocation unexpectedly succeeded\n"); - exit(1); - } - r = GC_MALLOC((size_t)LONG_MAX + 1024); - if (0 != r) { - fprintf(stderr, - "Size LONG_MAX+1024 allocation unexpectedly succeeded\n"); - exit(1); - } - } + CHECK_ALLOC_FAILED(GC_MALLOC(GC_SWORD_MAX - 1024), "SWORD_MAX-1024"); + CHECK_ALLOC_FAILED(GC_MALLOC(GC_SWORD_MAX), "SWORD_MAX"); + CHECK_ALLOC_FAILED(GC_MALLOC((GC_word)GC_SWORD_MAX + 1), "SWORD_MAX+1"); + CHECK_ALLOC_FAILED(GC_MALLOC((GC_word)GC_SWORD_MAX + 1024), + "SWORD_MAX+1024"); + CHECK_ALLOC_FAILED(GC_MALLOC(GC_WORD_MAX - 1024), "WORD_MAX-1024"); + CHECK_ALLOC_FAILED(GC_MALLOC(GC_WORD_MAX - 16), "WORD_MAX-16"); + CHECK_ALLOC_FAILED(GC_MALLOC(GC_WORD_MAX - 8), "WORD_MAX-8"); + CHECK_ALLOC_FAILED(GC_MALLOC(GC_WORD_MAX - 4), "WORD_MAX-4"); + CHECK_ALLOC_FAILED(GC_MALLOC(GC_WORD_MAX), "WORD_MAX"); return 0; } debian/patches/CVE-2012-2673-calloc-2.diff0000664000000000000000000000213712155063050014441 0ustar From 6a93f8e5bcad22137f41b6c60a1c7384baaec2b3 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 15 Mar 2012 20:30:11 +0400 Subject: [PATCH] Fix calloc-related code to prevent SIZE_MAX redefinition in sys headers * malloc.c: Include limits.h for SIZE_MAX. * malloc.c (SIZE_MAX, calloc): Define GC_SIZE_MAX instead of SIZE_MAX. --- malloc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Index: libgc/malloc.c =================================================================== --- libgc.orig/malloc.c 2012-07-08 18:08:40.030368600 +0200 +++ libgc/malloc.c 2012-07-08 18:08:45.420373752 +0200 @@ -344,12 +344,16 @@ } #endif -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#include +#ifdef SIZE_MAX +# define GC_SIZE_MAX SIZE_MAX +#else +# define GC_SIZE_MAX (~(size_t)0) #endif + void * calloc(size_t n, size_t lb) { - if (lb && n > SIZE_MAX / lb) + if (lb && n > GC_SIZE_MAX / lb) return NULL; # if defined(GC_LINUX_THREADS) /* && !defined(USE_PROC_FOR_LIBRARIES) */ /* libpthread allocated some memory that is only pointed to by */ debian/patches/CVE-2016-9427-1.patch0000664000000000000000000000430413050475536013415 0ustar commit a230ee8b21111b88749a97e6801048db1859a0fc Author: Ivan Maidanski Date: Thu Sep 15 18:40:21 2016 +0300 Description: Fix calloc_explicitly_typed in case of lb*n overflow Fix calloc_explicitly_typed in case of lb*n overflow (Cherry-pick commit 41a9ed4 from 'release-7_4' branch.) * typd_mlc.c: Include limits.h (for SIZE_MAX). * typd_mlc.c (GC_SIZE_MAX, GC_SQRT_SIZE_MAX): New macro (same as in malloc.c). * typd_mlc.c (GC_calloc_explicitly_typed): Return NULL if lb * n overflows (same algorithm as in calloc defined in malloc.c); eliminate lb *= n code duplication. diff --git a/typd_mlc.c b/typd_mlc.c index 982a3b2..777faa4 100644 --- a/typd_mlc.c +++ b/typd_mlc.c @@ -650,6 +650,15 @@ GC_API void * GC_CALL GC_malloc_explicitly_typed_ignore_off_page(size_t lb, return((void *) op); } +#include +#ifdef SIZE_MAX +# define GC_SIZE_MAX SIZE_MAX +#else +# define GC_SIZE_MAX (~(size_t)0) +#endif + +#define GC_SQRT_SIZE_MAX ((((size_t)1) << (WORDSZ / 2)) - 1) + GC_API void * GC_CALL GC_calloc_explicitly_typed(size_t n, size_t lb, GC_descr d) { @@ -662,17 +671,20 @@ GC_API void * GC_CALL GC_calloc_explicitly_typed(size_t n, size_t lb, struct LeafDescriptor leaf; DCL_LOCK_STATE; - descr_type = GC_make_array_descriptor((word)n, (word)lb, d, - &simple_descr, &complex_descr, &leaf); + descr_type = GC_make_array_descriptor((word)n, (word)lb, d, &simple_descr, + &complex_descr, &leaf); + if ((lb | n) > GC_SQRT_SIZE_MAX /* fast initial check */ + && lb > 0 && n > GC_SIZE_MAX / lb) + return NULL; /* n*lb overflow */ + lb *= n; switch(descr_type) { case NO_MEM: return(0); - case SIMPLE: return(GC_malloc_explicitly_typed(n*lb, simple_descr)); + case SIMPLE: + return GC_malloc_explicitly_typed(lb, simple_descr); case LEAF: - lb *= n; lb += sizeof(struct LeafDescriptor) + TYPD_EXTRA_BYTES; break; case COMPLEX: - lb *= n; lb += TYPD_EXTRA_BYTES; break; } debian/patches/CVE-2016-9427-3.patch0000664000000000000000000000271413050475567013426 0ustar commit 949a7533d47e0ce0976e2d7aa3daa3bf9f31cabd Author: Ivan Maidanski Date: Tue Sep 27 10:12:18 2016 +0300 Description: Fix GC_collect_or_expand to prevent allocation size value wrap-around Fix GC_collect_or_expand to prevent allocation size value wrap-around (Cherry-pick commit 1f3c938 from 'release-7_4' branch.) Relates to issue #135 on Github. * alloc.c (GC_WORD_MAX): New macro. * alloc.c (GC_collect_or_expand): Limit blocks_to_get by GC_WORD_MAX / HBLKSIZE value (to avoid multiplication overflow in GC_expand_hp_inner). Index: libgc-7.2d/alloc.c =================================================================== --- libgc-7.2d.orig/alloc.c +++ libgc-7.2d/alloc.c @@ -1216,6 +1216,8 @@ GC_INNER unsigned GC_fail_count = 0; /* How many consecutive GC/expansion failures? */ /* Reset by GC_allochblk. */ +#define GC_WORD_MAX (~(word)0) + /* Collect or expand heap in an attempt make the indicated number of */ /* free blocks available. Should be called until the blocks are */ /* available (seting retry value to TRUE unless this is the first call */ @@ -1264,6 +1266,8 @@ GC_INNER GC_bool GC_collect_or_expand(wo } else { blocks_to_get = MAXHINCR; } + if (blocks_to_get > divHBLKSZ(GC_WORD_MAX)) + blocks_to_get = divHBLKSZ(GC_WORD_MAX); } if (!GC_expand_hp_inner(blocks_to_get) debian/patches/CVE-2012-2673-calloc-3.diff0000664000000000000000000000217012155063050014437 0ustar From 83231d0ab5ed60015797c3d1ad9056295ac3b2bb Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Thu, 15 Mar 2012 21:09:05 +0400 Subject: [PATCH] Speedup calloc size overflow check by preventing division if small values * malloc.c (GC_SQRT_SIZE_MAX): New macro. * malloc.c (calloc): Add fast initial size overflow check to avoid integer division for reasonably small values passed. --- malloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Index: libgc/malloc.c =================================================================== --- libgc.orig/malloc.c 2012-07-08 17:54:21.530370090 +0200 +++ libgc/malloc.c 2012-07-08 17:54:21.000000000 +0200 @@ -351,9 +351,12 @@ # define GC_SIZE_MAX (~(size_t)0) #endif +#define GC_SQRT_SIZE_MAX ((1U << (WORDSZ / 2)) - 1) + void * calloc(size_t n, size_t lb) { - if (lb && n > GC_SIZE_MAX / lb) + if ((lb | n) > GC_SQRT_SIZE_MAX /* fast initial test */ + && lb && n > GC_SIZE_MAX / lb) return NULL; # if defined(GC_LINUX_THREADS) /* && !defined(USE_PROC_FOR_LIBRARIES) */ /* libpthread allocated some memory that is only pointed to by */ debian/patches/05-s390-includes.diff0000664000000000000000000000140212155063050014167 0ustar diff -urNad /tmp/bp-build/gc-7.1.orig/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h /tmp/bp-build/gc-7.1/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h --- gc-7.1.orig/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h 2009-08-14 00:10:47.000000000 +0100 +++ gc-7.1/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h 2009-08-14 00:11:40.000000000 +0100 @@ -30,8 +30,8 @@ /* may be delayed. Otherwise everything is ordered. */ /* - There is a hardware compare-and-swap (CS) instruction. */ -#include "ordered_except_wr.h" -#include "all_aligned_atomic_load_store.h" +#include "../ordered_except_wr.h" +#include "../all_aligned_atomic_load_store.h" #include "../test_and_set_t_is_ao_t.h" /* FIXME: Is there a way to do byte-sized test-and-set? */ debian/patches/enable-threads.diff0000664000000000000000000000100712155066255014334 0ustar Index: libgc/include/gc_config_macros.h =================================================================== --- libgc.orig/include/gc_config_macros.h 2013-06-09 13:26:20.000000000 +0200 +++ libgc/include/gc_config_macros.h 2013-06-09 13:53:15.012504958 +0200 @@ -121,6 +121,10 @@ # if defined(__rtems__) && (defined(i386) || defined(__i386__)) # define GC_RTEMS_PTHREADS # endif +# if defined(__gnu_hurd__) +# define GC_GNU_THREADS +# define GC_PTHREADS +# endif #endif /* GC_THREADS */ #undef GC_PTHREADS debian/patches/CVE-2012-2673-calloc-1.diff0000664000000000000000000000164512155063050014443 0ustar From e10c1eb9908c2774c16b3148b30d2f3823d66a9a Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Thu, 15 Mar 2012 04:46:49 +0800 Subject: [PATCH] Fix calloc() overflow * malloc.c (calloc): Check multiplication overflow in calloc(), assuming REDIRECT_MALLOC. --- malloc.c | 5 +++++ 1 file changed, 5 insertions(+) Index: libgc/malloc.c =================================================================== --- libgc.orig/malloc.c 2008-03-10 06:33:41.000000000 +0100 +++ libgc/malloc.c 2012-07-08 18:08:40.030368600 +0200 @@ -344,8 +344,13 @@ } #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif void * calloc(size_t n, size_t lb) { + if (lb && n > SIZE_MAX / lb) + return NULL; # if defined(GC_LINUX_THREADS) /* && !defined(USE_PROC_FOR_LIBRARIES) */ /* libpthread allocated some memory that is only pointed to by */ /* mmapped thread stacks. Make sure it's not collectable. */ debian/patches/CVE-2012-2673-malloc.diff0000664000000000000000000000261712155063050014317 0ustar From be9df82919960214ee4b9d3313523bff44fd99e1 Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Thu, 15 Mar 2012 04:55:08 +0800 Subject: [PATCH] Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise. --- malloc.c | 2 ++ mallocx.c | 2 ++ 2 files changed, 4 insertions(+) Index: libgc/malloc.c =================================================================== --- libgc.orig/malloc.c 2012-07-08 18:23:03.980370526 +0200 +++ libgc/malloc.c 2012-07-08 18:24:58.640366221 +0200 @@ -165,6 +165,9 @@ GC_bool init; lw = ROUNDED_UP_WORDS(lb); lb_rounded = WORDS_TO_BYTES(lw); + if (lb_rounded < lb) + return((*GC_oom_fn)(lb)); + n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded); init = GC_obj_kinds[k].ok_init; LOCK(); Index: libgc/mallocx.c =================================================================== --- libgc.orig/mallocx.c 2012-07-08 18:21:54.800368132 +0200 +++ libgc/mallocx.c 2012-07-08 18:25:13.620365430 +0200 @@ -179,6 +179,9 @@ return(GC_generic_malloc((word)lb, k)); lw = ROUNDED_UP_WORDS(lb); lb_rounded = WORDS_TO_BYTES(lw); + if (lb_rounded < lb) + return((*GC_oom_fn)(lb)); + n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded); init = GC_obj_kinds[k].ok_init; if (GC_have_errors) GC_print_all_errors(); debian/libgc1c2.docs0000664000000000000000000000002712155063050011424 0ustar doc/README.environment debian/copyright0000664000000000000000000000242512155063050011123 0ustar This package was debianized by Mike Goldman on Tue, 9 Feb 1999 09:14:37 -0500, and taken over by Ryan Murray on Sat Jan 19 02:13:04 PST 2002 It was downloaded from http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/ Upstream Author: Hans-J. Boehm Copyright: Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. The file linux_threads.c is also Copyright (c) 1998 by Fergus Henderson. All rights reserved. The files Makefile.am, and configure.in are Copyright (c) 2001 by Red Hat Inc. All rights reserved. THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. Permission is hereby granted to use or copy this program for any purpose, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. Some code modified for Debian GNU/Linux by Ryan Murray debian/rules0000775000000000000000000000265612250745653010272 0ustar #!/usr/bin/make -f DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_BUILD_ARCH:=$(shell dpkg --print-architecture) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) LDFLAGS += -pthread ifeq ($(DEB_HOST_MULTIARCH),aarch64-linux-gnu) dh_args = autoreconf else dh_args = autoreconf,pkgkde_symbolshelper endif %: dh $@ --with $(dh_args) override_dh_auto_configure: [ ! -d libatomic_ops-1.2 ] || mv libatomic_ops-1.2 libatomic_ops-1.2.bak autoconf EXTRA_TEST_LIBS="-lpthread" \ ./configure \ $(CONFIG_OPTS) \ --enable-cplusplus \ --disable-dependency-tracking \ --with-tags=CXX \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --datadir=\$${prefix}/share/doc \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) $(MAKE) check endif override_dh_install: install -D doc/gc.man debian/tmp/usr/share/man/man3/gc_malloc.3 dh_install override_dh_auto_clean: [ -d libatomic_ops-1.2 ] || [ ! -d libatomic_ops-1.2.bak ] || mv libatomic_ops-1.2.bak libatomic_ops-1.2 dh_auto_clean rm -rf autom4te.cache libatomic_ops atomic_ops_sysdeps.S atomic_ops.c override_dh_installchangelogs: dh_installchangelogs doc/README.changes debian/changelog0000664000000000000000000004611013050452376011051 0ustar libgc (1:7.2d-5ubuntu2.1) trusty-security; urgency=medium * SECURITY UPDATE: multiple integer overflows leading to pointers to memory zones smaller than requested size. - d/p/CVE-2016-9427-1.patch: Fix calloc_explicitly_typed in case of lb*n overflow. - d/p/CVE-2016-9427-2.patch: Fix malloc routines to prevent size value wrap-around of lb*n overflow. - d/p/CVE-2016-9427-3.patch: Fix GC_collect_or_expand to prevent allocation size value wrap-around - d/p/CVE-2016-9427-prereq.patch: add/use ROUNDUP_PAGESIZE_IF_MMAP macro needed for actual fixes. - d/p/CVE-2016-9427-test.patch: add test cases - CVE-2016-9427 -- Steve Beattie Mon, 13 Feb 2017 16:50:59 -0800 libgc (1:7.2d-5ubuntu2) trusty; urgency=medium * Don't run the tests when cross building. -- Matthias Klose Sun, 08 Dec 2013 02:30:22 +0100 libgc (1:7.2d-5ubuntu1) saucy; urgency=low * Backport Aarch64 changes. * Build-depend on dh-autoreconf, use autoreconf. * Don't build-depend on pkg-kde-tools on arm64, not yet built. * Update symbols file for arm64. * Link the tests with -lpthread. -- Matthias Klose Wed, 17 Jul 2013 12:39:59 +0200 libgc (1:7.2d-5) unstable; urgency=low * Add Replaces: libgc1c3 for Ubuntu * Import symbol diffs from debian-ports -- Christoph Egger Wed, 03 Jul 2013 22:14:42 +0200 libgc (1:7.2d-4) unstable; urgency=low * Import refined symbols for arm and mips -- Christoph Egger Tue, 02 Jul 2013 17:35:01 +0200 libgc (1:7.2d-3) unstable; urgency=low * Upload to unstable * 7.2 misses some private symbols which are now properly hidden by libgc and were unused by other software in debian * Generate Symbols file by pkg-kde helper scripts -- Christoph Egger Mon, 01 Jul 2013 22:48:07 +0200 libgc (1:7.2d-2) experimental; urgency=low * Improve symbols file using pkg-kde-tools -- Christoph Egger Sun, 09 Jun 2013 16:33:34 +0200 libgc (1:7.2d-1) experimental; urgency=low * New upstream release (Closes: #673965) * Add build-dependency for pkg-config to allow detection of libatomic_ops * Import patch Christian M. Amsüss to enable multiarch (Closes: #687493) -- Christoph Egger Sun, 09 Jun 2013 13:26:37 +0200 libgc (1:7.1-9.1) unstable; urgency=low * Non-maintainer upload. * libgc-dev.preinst: handle symlink replaced by a directory on upgrade from Squeeze (Closes: #696073) -- David Prévot Wed, 26 Dec 2012 19:49:03 -0400 libgc (1:7.1-9) unstable; urgency=medium * Import patches to fix CVE-2012-2673 from upstream git (Closes: #677195) -- Christoph Egger Sun, 08 Jul 2012 18:27:48 +0200 libgc (1:7.1-8) unstable; urgency=low * Import patch by Thorsten Glaser * d/p/06-m68k-no-getcontext.diff: new, don’t use getcontext(2) on m68k because it’s not implemented there (Closes: #624833) * Import patch by Aaron M. Ucko * build with GC_THREADS on non-linux platforms as well * remove *.la files (Closes: #621660) * update policy version from 3.9.1 to 3.9.2, no changes -- Christoph Egger Sun, 29 May 2011 18:55:21 +0200 libgc (1:7.1-7) unstable; urgency=low * Add ppc64 symbol file (Closes: #615469) * Add sh4 symbol file (Closes: #614744) * Add armhf symbol file * Add powerpcspe symbol file * Handle sparc64 the same as sparc * Clear non-arch symbol file to support building on not yet captured architectures * add -pthread to fix build with --no-add-needed -- Christoph Egger Wed, 02 Mar 2011 13:43:18 +0100 libgc (1:7.1-6) unstable; urgency=low * include pkg-config file (Closes: #546833) * Include Hurd symbol file (Closes: #611643) thanks to Svante Signell for providing it * add hppa symbol file -- Christoph Egger Tue, 22 Feb 2011 17:17:54 +0100 libgc (1:7.1-5) unstable; urgency=low * Upload to unstable -- Christoph Egger Sat, 19 Feb 2011 12:19:56 +0100 libgc (1:7.1-4) experimental; urgency=low * Adopt package (Closes: #590772) * Adopt debian/control git headers (moved to collab-maint) * Convert to source format 3.0 (quilt) * Build against system libatomic-ops (Closes: #559345) * Now builds on mipsen as well (Closes: #542285) * Include correct arch-specific symbols file for mipsen * Remove atomic-ops specific symbols from symbols file * Drop patch for automic-ops on s390 * Fix dependency on debhelper (needs 7.0.50 > 7) * Bump standards version to 3.9.1 * Fix symbol files (Closes: #565778) -- Christoph Egger Sat, 09 Oct 2010 16:08:53 +0200 libgc (1:7.1-3) experimental; urgency=low * Add symbols for armel and i386. -- Chris Lamb Sun, 16 Aug 2009 20:28:41 +0100 libgc (1:7.1-2) experimental; urgency=low * Fix FTBFS on sparc by specifying correct machine-dependent code. * Fix FTBFS on s390 by correcting #include directory. * Add avr32 support. Patch by Bradley Smith . (Closes: #528406) * Symbols maintenance: - Add Build-Depends-Package - Add required arch-dependent symbols for sparc, powerpc, s390 and avr32 * Add Vcs-{Git,Browser} headers. -- Chris Lamb Fri, 14 Aug 2009 00:15:45 +0100 libgc (1:7.1-1) experimental; urgency=low * New maintainer. (Closes: #541015) * New upstream release. (Closes: #434106, #446068) * Fix debian/watch file. Thanks Jonny and Ruben Molina . (Closes: #535985) * debian/patches/* - Extract changes from .diff.gz into quilt patch series - Update architecture patches for new upstream; partly applied upstream * Move to debhelper 7. * Add symbols file for libgc1c2. * debian/control: - Bump Standards-Version to 3.8.2. - Add Homepage: field. - Add ${misc:Depends} for all binary packages. - Use ${binary:Version} in libgc-dev => libgcX versioned dependency. - Drop duplicate "Section:" heading in libgc1c2. - Update long description, clarifying ambiguity caused by Debian's choice of configuration. (Closes: #329338) * Remove some cruft from debian/rules. * Install README.environment via dh_installdocs, not dh_install. * Don't install README.cords if we aren't shipping that library (Closes: #422440) -- Chris Lamb Wed, 12 Aug 2009 02:16:30 +0100 libgc (1:6.8-1.2) unstable; urgency=low * Non-maintainer upload. * Apply patch support for GNU/kFreeBSD amd64. (closes: #405669) -- Aurelien Jarno Thu, 14 Aug 2008 21:21:44 +0200 libgc (1:6.8-1.1) unstable; urgency=low * Non-maintainer upload. * Enable local malloc on all linux arches. (closes: #431424) -- Bastian Blank Wed, 18 Jul 2007 20:27:44 +0000 libgc (1:6.8-1) unstable; urgency=low * New upstream release (closes: #366864) * Apply patch to fix m68k (closes: #383817) -- Ryan Murray Fri, 22 Sep 2006 20:08:09 -0700 libgc (1:6.7-2) unstable; urgency=low * Disable --enable-redirect-malloc again (closes: #371886) -- Ryan Murray Tue, 13 Jun 2006 17:28:27 -0700 libgc (1:6.7-1) unstable; urgency=low * New upstream release (closes: #356246) * Fix typo in description (closes: #341086) -- Ryan Murray Sun, 28 May 2006 20:19:58 -0700 libgc (1:6.6-2) unstable; urgency=low * Apply libgc-6.6-arm-swp-fix.diff to fix arm build (closes: #343612) -- Ryan Murray Fri, 16 Dec 2005 10:53:15 -0800 libgc (1:6.6-1) unstable; urgency=low * New upstream release (closes: #335816, #342586) * Run make check from debian/rules * Disable threads for hurd-i386 (closes: #319912) -- Ryan Murray Thu, 15 Dec 2005 00:53:36 -0800 libgc (1:6.5-1) unstable; urgency=low * New upstream release * Rename libgc1 to libgc1c2 for C++ transition. * Update libgc-dev description (closes: #264124) * Add debian/watch file (currently ignores alpha versions) * Remove obsolete Replaces and Conflicts on libgc-dev -- Ryan Murray Sun, 10 Jul 2005 10:51:20 -0700 libgc (1:6.4-1) unstable; urgency=low * New upstream release (closes: #292708) -- Ryan Murray Thu, 3 Feb 2005 00:50:53 -0800 libgc (1:6.3-1) unstable; urgency=low * New upstream release (closes: #253171) -- Ryan Murray Fri, 9 Jul 2004 08:38:53 -0700 libgc (1:6.2+6.3alpha4-1) unstable; urgency=low * New upstream release * Apply fix to check stack end for prelinked binaries (closes: #233233) -- Ryan Murray Sat, 28 Feb 2004 01:09:04 -0800 libgc (1:6.2+6.3alpha2-1) unstable; urgency=low * New upstream release * Link libgccpp against libgc (closes: #215966) -- Ryan Murray Sat, 18 Oct 2003 03:34:33 -0700 libgc (1:6.2+6.3alpha1-1) unstable; urgency=low * New upstream release (closes: #197031) * Switch to using upstream's autoconf (and therefore upstream's sonames, so rename packages to match the sonames) (closes: #178869) * Relibtoolize. -- Ryan Murray Mon, 11 Aug 2003 15:57:57 -0700 libgc (1:6.1-2) unstable; urgency=low * Change GLIBC_MINOR check for mips to look for version 2.2 or better. glibc has had __libc_stack_end since at least then, and possibly sometime in 2.1.x -- Ryan Murray Fri, 17 Jan 2003 14:17:22 -0800 libgc (1:6.1-1) unstable; urgency=low * New upstream release * g++-3.2 transition -- Ryan Murray Fri, 17 Jan 2003 04:41:04 -0800 libgc (1:6.0+6.1alpha4-3) unstable; urgency=low * Fix ia64 build. -- Ryan Murray Mon, 25 Mar 2002 20:27:15 -0800 libgc (1:6.0+6.1alpha4-2) unstable; urgency=low * Add -lstdc++ to link line for now -- Ryan Murray Tue, 19 Mar 2002 01:08:01 -0800 libgc (1:6.0+6.1alpha4-1) unstable; urgency=low * New upstream release (closes: #96661) * build with OPERATOR_NEW_ARRY (closes: #127608) * link libgc with g++ for now * remove duplicate manpage (closes: #137511) -- Ryan Murray Mon, 18 Mar 2002 22:13:32 -0800 libgc (1:6.0-3) unstable; urgency=low * Fix builds on mips, mipsel, and powerpc * Disable threading on arm until someone has time to fix it. -- Ryan Murray Fri, 25 Jan 2002 08:36:00 -0800 libgc (1:6.0-2) unstable; urgency=low * New Maintainer (closes: #129586) * Enable threading on Linux, disable on hurd (closes: #129525, #110157) * Add patch already in upstream alphas to fix leak_detector for calloc and realloc. The strdup support will come when I upgrade to a 6.1 version (closes: #118455) * Add upstream changelog, fix typo in manpage (closes: #115374) -- Ryan Murray Sat, 19 Jan 2002 02:31:58 -0800 libgc (1:6.0-1) unstable; urgency=medium (closes several serious and important bugs) * Adopted NMU fixes by Rick Younie and Ryan Murray (closes: #84608, #87184, #89970, #102652, #103078) * New upstream release, updates support for SPARC (closes: #89211) -- Mike Goldman Sun, 19 Aug 2001 07:30:19 -0400 libgc (1:5.3-2.2) unstable; urgency=low * NMU * Fix build on m68k (closes: #89970, 103078) -- Rick Younie Wed, 1 Aug 2001 12:12:33 -0700 libgc (1:5.3-2.1) unstable; urgency=low * Fix build on mips(el) (closes: #102652, 84608) * Fix build on alpha (closes: #87184) -- Ryan Murray Mon, 2 Jul 2001 08:32:17 -0700 libgc (1:5.3-2) unstable; urgency=low * Fixed dependency on libgc5 to same version (closes: #87339). -- Mike Goldman Sat, 24 Feb 2001 12:22:07 -0500 libgc (1:5.3-1) unstable; urgency=medium * Updated to latest version of released upstream 5.x version (closes: #83041, #65044), * Tuned for larger heap sizes (-DLARGE_CONFIG) (closes: #62400). -- Mike Goldman Thu, 22 Feb 2001 12:34:45 -0500 libgc (1:5.0.alpha4-8) frozen unstable; urgency=medium * Applied patch by Philip Blundell to provide Linux ARM support (closes: #58950) -- Mike Goldman Fri, 25 Feb 2000 03:38:48 -0500 libgc (1:5.0.alpha4-7) frozen unstable; urgency=low * Include "../gcconfig.h" in cordprnt.c for correct PPC compilation (patch supplied by susumu-o@debian.or.jp) -- Closes: #57360 * Uploaded to frozen and unstable (closes: #57147, #57293) -- Mike Goldman Tue, 8 Feb 2000 15:58:24 -0500 libgc (1:5.0.alpha4-6) frozen; urgency=low * Replaced C++-style comments from gc_priv.h with C comments -- required for standards-conforming C programs (closes: #55577) * debian/rules now copies include/private files automatically -- Mike Goldman Fri, 4 Feb 2000 03:56:44 -0500 libgc (1:5.0.alpha4-5) unstable; urgency=low * Fixed misapplied patch from Daniel Jacobowitz. -- Mike Goldman Fri, 31 Dec 1999 12:23:26 -0500 libgc (1:5.0.alpha4-4) unstable; urgency=low * Added -DPIC flag to DEBIAN_PIC. * Updated standards version. -- Mike Goldman Thu, 30 Dec 1999 09:34:25 -0500 libgc (1:5.0.alpha4-3) unstable; urgency=low * Copied gcconfig.h to include/private (closes #53599) * Added DEBIAN_PIC flag to pass -fPIC to mach_dep.o (closes #53600) -- Mike Goldman Thu, 30 Dec 1999 08:36:31 -0500 libgc (1:5.0.alpha4-2) unstable; urgency=low * Incorporated fix from Daniel Jacobowitz for building on powerpc (closes: #53112) -- Mike Goldman Sun, 26 Dec 1999 02:57:32 -0500 libgc (1:5.0.alpha4-1) unstable; urgency=low * New upstream release. * Incorporated fix from Dave Love for building on sparc (closes: #51208) -- Mike Goldman Sun, 12 Dec 1999 04:47:28 -0500 libgc (1:5.0.alpha3-7) unstable; urgency=low * Once and for all ensuring that this will build on powerpc, CORD_vsprintf on that platform may well not work, however. Closes: #46092 -- Mike Goldman Sat, 30 Oct 1999 09:00:32 -0400 libgc (1:5.0.alpha3-6) unstable; urgency=low * Manual implementation of /usr/doc -> /usr/share/doc policy removed, defers to debhelper now. -- Mike Goldman Sat, 9 Oct 1999 18:07:40 -0400 libgc (1:5.0.alpha3-5) unstable; urgency=low * Another pass at fixing va_list copy on POWERPC. -- Mike Goldman Fri, 8 Oct 1999 12:40:21 -0400 libgc (1:5.0.alpha3-4) unstable; urgency=low * Restrict invalid initializer bugfix to POWERPC, breaks other platforms. Closes: Bug#45559 (again) -- Mike Goldman Thu, 7 Oct 1999 06:43:27 -0400 libgc (1:5.0.alpha3-3) unstable; urgency=low * Fixed invalid initializer bug copying va_list in cord/cordprnt.c. Closes: Bug#45559 -- Mike Goldman Tue, 21 Sep 1999 13:53:53 -0400 libgc (1:5.0.alpha3-2) unstable; urgency=low * Moved libgc5 to section libs. -- Mike Goldman Sat, 18 Sep 1999 22:52:45 -0400 libgc (1:5.0.alpha3-1) unstable; urgency=low * New upstream (testing) release. * Complies with Debian Technical Committee on /usr/share/doc. -- Mike Goldman Sat, 18 Sep 1999 21:52:43 -0400 libgc (1:5.0.alpha2-2) unstable; urgency=low * Some documentation was being copied to the wrong place. -- Mike Goldman Tue, 31 Aug 1999 06:14:53 -0400 libgc (1:5.0.alpha2-1) unstable; urgency=low * New upstream (testing) release. * Unlike 4.14, this should work on Linux Alpha. -- Mike Goldman Tue, 31 Aug 1999 05:02:44 -0400 libgc (1:4.14-3) unstable; urgency=low * Symlinks were written to /usr/include/gc.h. Fixed. -- Mike Goldman Thu, 29 Jul 1999 13:11:04 -0400 libgc (1:4.14-2) unstable; urgency=low * Incorporated NMU updates by Adam DiCarlo (thanks!) (Closes Bug#41222) * libgc4-dev conflicts with bigloo less than 2.0e-1, since that package had a libgc.so symlink in it (Closes Bug#39427) * the bigloo maintainer and the w3m maintainer's experience seems to support the notion that threading even on i386 is not a good idea. It might be desired later to have a threaded version of libgc provided somehow as well, but AFAI(Adam)CT, threading is causing problems and isn't necessary for any software using libgc * must disable threads on non-i386 architectures because gc_priv.h only has an implementation for GC_test_and_set in i386 assembly (closes important Bug#39285) * adapt patch for powerpc GC_test_and_set (closes Bug#41063), allowing powerpc to use LINUX_THREADS * compile with the '-DDONT_ADD_BYTE_AT_END' switch, claimed to be needed by bigloo -- Mike Goldman Thu, 29 Jul 1999 02:07:53 -0400 libgc (1:4.14-1) unstable; urgency=low * New upstream release (Closes Bug#38715) * Replace hard links with symbolic links (Closes Bug#41062) -- Mike Goldman Wed, 28 Jul 1999 15:20:47 -0400 libgc (1:4.13-2) unstable; urgency=low * Changed upstream URL -- Mike Goldman Thu, 18 Mar 1999 04:27:11 -0500 libgc (1:4.13-1) unstable; urgency=low * New upstream release * Eliminated LinuxThreads check for internal library symbol, which caused glibc2.1 incompatibility * Closes bug #34609 -- Mike Goldman Thu, 18 Mar 1999 03:34:50 -0500 libgc (1:4.12.4.13alpha3-3) unstable; urgency=low * Replaces libgc4 packages with new debhelper-ized version. * Incorporates non-maintainer patch by Hartmut Koptein for powerpc * Warns on non-i386 of no GC_test_and_set() * Closes bug #31937 -- Mike Goldman Tue, 9 Feb 1999 09:14:37 -0500 libgc4 (4.12-4.13alpha3-2) unstable; urgency=low * Incorporated non-maintainer fix by Paul Slootman : On Alpha, preprocess the asm source explicitly, apparently 'as' does not invoke the preprocessor. -- Mike Goldman Mon, 28 Dec 1998 04:38:37 -0500 libgc4 (4.12-4.13alpha3-1) unstable; urgency=low * New upstream release. -- Mike Goldman Sat, 12 Dec 1998 02:44:53 -0500 libgc4 (4.12-4.13alpha2-4) unstable; urgency=low * Fixed several serious lintian errors. -- Mike Goldman Fri, 11 Dec 1998 09:08:02 -0500 libgc4 (4.12-4.13alpha2-3) unstable; urgency=low * Split into libgc4, libgc4-dev -- Mike Goldman Thu, 10 Dec 1998 08:42:34 -0500 libgc4 (4.12-4.13alpha2-2) unstable; urgency=low * Needed to link with -lpthreads. -- Mike Goldman Mon, 7 Dec 1998 15:22:10 -0500 libgc4 (4.12-4.13alpha2-1) unstable; urgency=low * New upstream maintainer release. * Now supports LinuxThreads. Please read README.linux first. -- Mike Goldman Sun, 6 Dec 1998 05:44:51 -0500 libgc4 (4.12-4.13alpha1-2) unstable; urgency=low * Manpage links in *wrong* place (fixed). -- Rob Browning Wed, 1 Jul 1998 14:50:22 -0500 libgc4 (4.12-4.13alpha1-1) unstable; urgency=low * Initial release. This will need to be split into -dev, etc later... -- Rob Browning Fri, 26 Jun 1998 23:48:09 -0500 debian/libgc-dev.preinst0000664000000000000000000000025612155063054012436 0ustar #! /bin/sh set -e # Delete symlink that will be replaced by a directory docdir="/usr/share/doc/libgc-dev" if [ -L $docdir ]; then rm $docdir 2>/dev/null fi #DEBHELPER#