[7.2d]
2012-08-09 Ivan Maidanski <ivmai@mail.ru>
* doc/README: Change version to 7.2d (rev. D).
2012-08-05 Ivan Maidanski <ivmai@mail.ru>
* config.guess: Regenerate (by autoreconf -vif using autoconf-2.68,
automake-1.11.1 and libtool-2.4).
* config.sub: Likewise.
* m4/libtool.m4: Likewise.
2012-08-02 Ivan Maidanski <ivmai@mail.ru>
* misc.c (GC_clear_stack_inner): Use GC_approx_sp() instead of
"dummy[0]" set to "&dummy" value (that worked as expected only for
STACK_GROWS_DOWN case).
2012-08-02 Ivan Maidanski <ivmai@mail.ru>
* alloc.c (min_bytes_allocd, GC_stopped_mark): Use GC_approx_sp()
instead of "&dummy"; remove 'dummy' local variable.
* dyn_load.c (GC_cond_add_roots): Likewise.
* misc.c (GC_init): Likewise.
* os_dep.c (GC_get_stack_base, GC_get_main_stack_base): Likewise.
* pthread_stop_world.c (GC_suspend_handler_inner,
nacl_pre_syscall_hook, __nacl_suspend_thread_if_needed): Likewise.
* pthread_support.c (GC_thr_init): Likewise.
* ptr_chck.c (GC_on_stack): Likewise.
* win32_threads.c (GC_push_stack_for): Likewise.
* extra/setjmp_t.c (main): Define volatile 'sp' local variable, store
its address to it and use it instead of "&dummy"; remove 'dummy' local
variable.
* mach_dep.c (GC_with_callee_saves_pushed): Use volatile for 'dummy'
local variable.
* misc.c (GC_clear_stack_inner): Store address of volatile 'dummy'
local array (i.e. 'sp' value) to its first element (and use it in the
comparison of addresses) to prevent any harmful optimizations as C
officially disallows comparisons of pointers to different objects
(e.g., some Mac OS X clang releases might turn a conditional
expression that uses 'dummy' address into a constant); update comment.
* misc.c (GC_call_with_stack_base): Use "&base" instead of "&dummy"
(it is safe to use address of base here); remove dummy variable.
2012-08-01 Ivan Maidanski <ivmai@mail.ru>
* misc.c (GC_call_with_stack_base): Call GC_noop1 after fn()
invocation to prevent a tail-call optimization.
2012-07-21 Ivan Maidanski <ivmai@mail.ru>
* os_dep.c (GC_get_stack_base): Abort if pthread_stackseg_np fails
(if GC_OPENBSD_THREADS).
* pthread_stop_world.c (GC_suspend_all): Get correct stack_ptr by
calling pthread_stackseg_np (subtracting ss_size from ss_sp) instead
of retrieving it from OpenBSD pthread implementation-dependent context
(if GC_OPENBSD_THREADS); remove comment.
2012-06-17 Ivan Maidanski <ivmai@mail.ru>
* tests/initsecondarythread.c: Include "private/config.h" if
HAVE_CONFIG_H (mostly to have GC_WIN32_PTHREADS defined for
pthreads-w32 target).
* tests/thread_leak_test.c: Likewise.
* tests/threadkey_test.c: Likewise.
2012-06-16 Ivan Maidanski <ivmai@mail.ru>
* tests/test_cpp.cc (WinMain): Prevent SEGV in strtok() by checking
"cmd" WinMain argument for NULL (in that case "argc" local variable is
set to 0).
2012-06-16 Ivan Maidanski <ivmai@mail.ru>
* tests/test_cpp.cc (main): Call GC_set_all_interior_pointers(1)
before GC_INIT to ensure that the collector considers pointers to
object interiors as valid ones (such a pointer could emerge as
a result of a type cast to subclass in case of multiple inheritance);
add comment.
The results of GC_MALLOC_ATOMIC, GC_get_maps, and GC_scratch_alloc
are now properly checked, avoiding segmentation faults. Several
private symbols have been made externally visible to aid third
party software which unfortunately relies on them. Minor NetBSD
issues have been resolved.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
Replace first hunk of patch-af with CONFIGURE_ARGS.
Remove next two hunks of patch-af installing some private headers.
This shouldn't be necessary in the 7.x versions. If it is, the author
is willing to help fix the underlying problems.
patch-aa and -ab will be included in the next upstream release.
Bump PKGREVISION.
* doc/gcinterface.html: Improve C++ interface documentation.
* allchblk.c (GC_allochblk): Check for overflow during size
rounding.
* malloc.c: (free replacement) Fix caller address space check.
* finalize.c (GC_grow_table): Dereference table in null-check.
* allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
and refine assertions to handle huge unmergable blocks.
* allchblk.c (GC_enough_large_bytes_left): No longer take
parameters; return free list index bound.
(GC_merge_unmapped): Don't access nexthdr until after null test.
(Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate
when splitting is allowable only once here, not when considering each
block. (GC_allchblk_nth): Accept new may_split parameter.
Avoid some redundant tests for exact size matches.
* alloc.c (GC_should_collect): Cache min_bytes_allocd.
(GC_maybe_gc): Make locking assertion testable.
* mark_rts.c: Fix indentation.
* pthread_stop_world.c: Replace old GC_err_printf1 reference.
* misc.c (GC_init_inner): Assert !GC_need_to_lock only when
defined. (GC_call_with_stack_base): Add GC_API.
* os_dep.c (GC_get_stack_base): Add GC_API.
* win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
Add GC_API.
* include/gc.h: Add GC_API annotations.
* include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
PCR.
* include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
Add GC_push_typed_structures() to push GC_ext_descriptors.
* allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
blocks large enough that their size, when interpreted as a signed
value, would be negative.
* include/private/gc_priv.h: Update MAX_ROOT_SETS
and LOG_PHT_ENTRIES to handle larger heaps.
* allchblk.c, alloc.c, include/private/gc_priv.h:
Track GC_bytes_dropped and use in GC triggering decisions.
* alloc.c (min_bytes_allocd): Weight atomic blocks less.
* alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
adjusting p.
* alloc.c: Define GC_version instead of in version.h.
* version.h: Remove.
* include/gc_version.h: Move most of version.h here.
* include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
* alloc.c: Deal correctly with address wrapping for
GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
* finalize.c, include/gc.h (GC_register_disappearing_link,
GC_register_finalizer_inner): Improve out-of-memory handling.
* dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
GC_GETSECTBYNAME instead.
* include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
architecture (Darwin).
* thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
granules, not bytes, to GC_FAST_MALLOC_GRANS.
* include/gc.h: Never include gc_local_alloc.h.
* malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
* allchblk.c: Sanity check GC_max_large_allocd_bytes.
* include/extra/gc.h, include/extra/gc_cpp.h: New.
* include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
again.
* dbg_mlc.c: Use random() on all glibc systems.
* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
HURD. Add comment.
* pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accomodate
systems without SA_SIGINFO.
* alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
Maintain GC_our_memory and GC_n_memory.
* dbg_mlc.c (GC_print_smashed_obj): Improve message.
(GC_print_all_smashed_proc): Pass client object address instead of
base.
* dyn_load.c (sort_heap_sects): New. (GC_register_map_entries):
Register sections that are contiguous and merged with our heap.
* malloc.c, os_dep.c (GC_text_mapping): Check for just base name
of libraries.
* malloc.c (calloc): Check for special callers even with
USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary
malloc/free tracing.
* misc.c: No longer call GC_init_lib_bounds explicitly.
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
initialize on demand.
* alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
while world is still running.
* os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
with world stopped.
* include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
* misc.c (GC_init/GC_init_inner): Perform all work in
GC_init_inner.
Changes relative to 6.8 include, in no particular order:
- Change C code to require at least C89. Clean up code in various
other respects.
- Win64 port.
- Always count how much live data there is in the heap. Add more
robust heap expansion heuristic which relies on this.
- Remove old-style Solaris threads support and some other obsolete
platform support.
- Restructure mark code, hopefully resulting in some performance
improvements.
- Change the GC code to traffic mostly in either bytes or allocation
granules, not words, internally.
- Provide for fast inline allocation that requires less frequent client
recompilations. (Needs more testing.)
- Removed SILENT configuration macro and PRINTSTATS and GATHERSTATS
macros. Control is now via GC_PRINT_STATS and GC_PRINT_VERBOSE_STATS
encironment variables.
- Thread local allocation is now performed without needing to call
special allocation functions. The configuration macro
THREAD_LOCAL_ALLOC
continues to determine whether this is supported.
- Thread local allocation is supported on more platforms.
- Win32 threads code was rewritten and is hopefully more sane.
- Allocation routines now decide whether to lock dynamically, based on
whether a second thread has been created.
- Mostly untested support for a compiler write barrier.
- Use libatomic_ops for atomic operations.
- Limited support for malloc redirection with Linux threads (& NPTL ).
- Various bug fixes and some new platform support.
configure script since pkgsrc will set MACHINE_GNU_PLATFORM to
sparc-sun-solaris2 on a solaris/sparc machine. This gets this package closer
to building on solaris with the sunpro compiler.
Changes since 6.7:
- Added some support for Dragonfly BSD. (Thanks to Joerg Sonnenberger and
Thomas Klausner.)
- Improvements to the HP/UX section of configure.in.
(Thanks to Andreas Tobler.)
- GC_unix_get_mem could neglect to release the malloc lock on Irix, under
extremely unlikely circumstances. Thanks to Jean-Baptiste Nivois for
some careful code reading.
- Added support for kFreeBSD + glibc (Thanks to Petr Salinger)
- Fix more MacOS threads memory leaks (Thanks to Allan Hsu)
- Added initial Solaris/X86-64 support (Thanks to Rainer Orth)
- Applied a long-lost MINGW patch from Gerard Allan for malloc redirection
with threads. This one probably makes no sense for 7.0, and was not applied
there.
- The Solaris/SPARC definition of GC_INIT() in gc.h wasn't C++-compilable.
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.
For example, "make show-buildlink3" in fonts/Xft2 displays:
zlib
fontconfig
iconv
zlib
freetype2
expat
freetype2
Xrender
renderproto
RECOMMENDED is removed. It becomes ABI_DEPENDS.
BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo.
BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo.
BUILDLINK_DEPENDS does not change.
IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS
which defaults to "yes".
Added to obsolete.mk checking for IGNORE_RECOMMENDED.
I did not manually go through and fix any aesthetic tab/spacing issues.
I have tested the above patch on DragonFly building and packaging
subversion and pkglint and their many dependencies.
I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I
have used IGNORE_RECOMMENDED for a long time). I have been an active user
of IGNORE_RECOMMENDED since it was available.
As suggested, I removed the documentation sentences suggesting bumping for
"security" issues.
As discussed on tech-pkg.
I will commit to revbump, pkglint, pkg_install, createbuildlink separately.
Note that if you use wip, it will fail! I will commit to pkgsrc-wip
later (within day).
Since 6.6:
- Add "int" to Solaris "end" and "etext" declaration in gc.h. Declared
the symbols with underscores and as arrays, since that's what's actually
used. Perhaps this could all just be removed? (Thanks to John Bowman.)
- Fixed ARM GC_test_and_set code. (Thanks to Kazu Hirata and Paul Brook.)
- Added casts for assignments to hb_last_reclaimed, which truncate the
value. Added a cast to GC_adj_words_allocd. Use GetModuleHandleA
when retrieving a handle to kernel32.dll under win32. (Thanks to the
Visual Prolog developers.)
- Added Tandem S-Series support. (Thanks to Craig McDaniel. A modified
version of his patch was applied, and hence breakage is probably not
his fault.)
- Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h.
(Thanks to Hanno Boeck.)
- Changed a test for LINUX in config_macros.h to one for __linux__.
- Fix ppc 64 test_and_set code by removing it. (Thanks to Christian
Thalinger.)
- Add prototypes for GC_finalizer_notifier and GC_thr_init. (Thanks to
David Ayers.)
- Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack.
(Thanks to Andreas Tobler.)
- Add support for Darwin/X86. (Thanks to Geoff Norton and the Mono
developers.)
- Merge in some recent gcc fixes. Add ppc64 asm code. (Thanks to Bryce
McKinley and other gcj developers.)
- Scan MEM_PRIVATE sections under Windows ME and predecessors.
- Interior pointers with some largish offsets into large objects could
be ignored, if GC_all_interior_pointers was set. (Oddly this worked
correctly for stack references if it was not set. Otherwise it failed
for both stack and heap references.) Thanks to Andrew McKinlay for the
critical test case.
- Integrated Tatsuya Bizenn's NETBSD threads support, with some
minimally tested changes.
- Added GC_strdup and friends to make leak detection work correctly
for strdup clients. (Thanks to Jon Moore.) Fixed the existing strdup
with malloc redirection to handle a null malloc return correctly.
- Fix Makefile.am, so it handles exe extensions under Cygwin correctly
for gctest.
Since 6.5
- Fix CPU count detection for Irix and FreeBSD. (Thanks to Dan Bonachea.)
- Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
- Integrated Andreas Tobler's FreeBSD/PowerPC patch.
- Don't access the GC thread structure from the restart handler. It's
unsafe, since the handler may run too late. (Thanks to Ben Maurer for
tracking this down.)
- Applied Christian Thalinger's patch to change comment syntax in
alpha_mach_dep.S.
- Added test for GC_no_dls in GC_dyld_image_add for DARWIN. (Thanks to
Juan Jose Garcia Ripoli).
- Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM. (Thanks to Sugioka
Toshinobu and Christian Thalinger.)
- Rewrote GC_parse_map_entry. This assumed a fixed column layout of
/proc/self/maps on Linux. This ceased to be true about 2 years ago.
The old code is probably quite problemetic with -DREDIRECT_MALLOC. It
is also used by default for IA64, though I haven't seen actual failures
there.
- More consistently define HBLKSIZE to 4096 on 64 bit architectures with
4K pages. (Thanks to Andrew Haley.)
- With win32 threads, GC_stop_world needs to acquire GC_write_cs. (Thanks
to Ben Hutchings for the observation and patch.)
- Move up struct callinfo declaration to make gcc 4.0.2. happy.
which can take multiple values -- "pax" or "gtar". The default value
of EXTRACT_USING is "pax", which more closely matches reality since
before, we were using bootstrap "tar" for ${GTAR} and it was actually
pax-as-tar. Also, stop pretending pax-as-tar from the bootstrap kit
or on NetBSD is GNU tar. Lastly, in bsd.pkg.extract.mk, note whether
we need "pax" or "gtar" depending on what we need to extract the
distfiles.
- Merge gcconfig.h changes from gcc tree.
- Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
aix_irix_threads.c, and solaris_threads.c to get thread definitions.
- Start marker threads in GC_thr_init, so that they get started even
if no other threads are ever started. (Oddly enough, the parallel
collector worked correctly, though not well, with no helper threads.)
- Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
is set. (Thanks to Alexander Petrossian.)
- GC_PRINT_BACK_HEIGHT would deadlock with thread support.
- Let in_progress_space in backgraph.s grow dynamically.
- Fix README.solaris2. The GC_thr_init() hack doesn't work anymore.
- Convert GC_finalizer_mem_freed to bytes in allchblk.c.
- Add missing declaration for GC_generic_malloc_words_small_inner.
Without it, s390x breaks. (Thanks to Ulrich Weigand.)
- Applied several MacOSX patches to support older tool chains.
(Thanks to Stefan Ring.)
- Bug fix for NetBSD/amd64. (Thanks to Marc Recht.) Add NetBSD/sh3
support. (Thanks to Uchiyama Yasushi.)
- Fixed an uninitialized variable in cordprnt.c. (Thanks to gcc for
providing the warning.)
- Eliminated some, but not all, gcc -Wall warnings.
- Changed some old style casts to reinterpret_cast in new_gc_alloc.h.
(Thanks to Dan Grayson.)
- GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
GC_DONT_ADD_BYTE_AT_END is set.
- Changed some (long) casts to (word) in preparation for win64.
(Thanks to Peter Colson.)
- Changed "int stack_size" declaration in pthread_support.c to use
size_t. (Only mattered with GC_ASSERTIONS enabled.)
- Added CRIS (etrax) support. (Thanks to Simon Posnjak and
Hans-Peter Nilsson.)
- Removed GC_IGNORE_FB frame buffer recognition, and replaced
it with a check that the mapping type is MEM_IMAGE.
In theory, this should work much better, but it is a high
risk change for win32. (Thanks to Ashley Bone for the crucial
experimental data behind this, and to Rutger Ovidus for
some further experiments.)
- Fixed print_block_list to print the correct kind number for
STUBBORN. (Thanks to Rutger Ovidus.)
- GC_allochblk_nth incremented GC_words_wasted by bytes rather than
words.
- Consider GC_words_wasted in GC_adj_words_allocd only if it is within
reason. (A hack to avoid some extremely unlikely scenarios in which
we manage to allocate only "wasted" space. 7.0 has a better fix.)
- Changed PowerPC GC_clear implementation to use lwsync instead of
eieio, since the documentation recommends against eieio, and
it seems to be incorrect if the preceding memory op is a load.
- Fixed print_block_list to print the correct kind number for
STUBBORN. (Thanks to Rutger Ovidus.)
- GC_allochblk_nth incremented GC_words_wasted by bytes rather than
words.
- Have configure.in generate an error if it is asked to support
pthreads, but doesn't know how to.
- Added Kazuhiro Inaoka's patch for Renesas M32R support.
- Have the GNU build mechanism link with -ldl. Rename THREADLIBS
to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.)
- Added Hannes Mehnert's patch for FreeBSD/SPARC support.
- Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
(Thanks tp John Merryweather Cooper.)
- Define MPROTECT_VDB on MACOSX only if threads are being used, since the
dirty page tracking mechanism uses threads. (This avoids an undefined
reference to _GC_darwin_register_mach_handler_thread.)
- By popular demand, use __libc symbols only if we are built with
USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
- Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
The GC itself will dirty lots of pages in this cases, probably making
it counterproductive on all platforms. And the DARWIN port crashes.
in the process. (More information on tech-pkg.)
Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.
Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
All library names listed by *.la files no longer need to be listed
in the PLIST, e.g., instead of:
lib/libfoo.a
lib/libfoo.la
lib/libfoo.so
lib/libfoo.so.0
lib/libfoo.so.0.1
one simply needs:
lib/libfoo.la
and bsd.pkg.mk will automatically ensure that the additional library
names are listed in the installed package +CONTENTS file.
Also make LIBTOOLIZE_PLIST default to "yes".
changes:
- Add a patch provided by UCHIYAMA Yasushi in PR 26180 to support NetBSD/sh3.
- Correctly define ELFSIZE for NetBSD. Fixes PR 26252 by Kouichirou Hiratsuka.
Bump BUILDLINK_DEPNDS to 6.3nb1 for the ELFSIZE fix.