[1/4,libbacktrace] Test check_PROGRAMS without mmap

Message ID 20181123204724.GA1927@delia
State New
Headers show
Series
  • [1/4,libbacktrace] Test check_PROGRAMS without mmap
Related show

Commit Message

Tom de Vries Nov. 23, 2018, 8:47 p.m.
[ was: [PATCH 1/2][libbacktrace] Handle realloc returning NULL if size == 0 ]

On Thu, Nov 22, 2018 at 01:35:43PM +0100, Tom de Vries wrote:
> Hi,

> 

> Build and tested on x86_64, with mmap.c replaced by alloc.c to ensure that

> backtrace_vector_release in alloc.c is tested.


Hi,

I came up with a more structural solution.

OK for trunk?

Thanks,
- Tom

[libbacktrace] Test check_PROGRAMS without mmap

When building libbacktrace, we typically use mmapio.c and mmap.c, and don't
build read.c and alloc.c.

Add testcases that use read.c and alloc.c to ensure that we also build and
test those on a typical development setup.

Bootstrapped and reg-tested on x86_64.

2018-11-23  Tom de Vries  <tdevries@suse.de>

	* configure.ac (HAVE_MMAP): New AM_CONDITIONAL.
	* configure: Regenerate.
	* Makefile.am : Add _with_alloc version for each test in
	check_PROGRAMS.
	* Makefile.in: Regenerate.

---
 libbacktrace/Makefile.am  |  45 ++++++++
 libbacktrace/Makefile.in  | 284 +++++++++++++++++++++++++++++++++++++++++++---
 libbacktrace/configure    |  18 ++-
 libbacktrace/configure.ac |   1 +
 4 files changed, 331 insertions(+), 17 deletions(-)

Comments

Tom de Vries Nov. 28, 2018, 12:15 p.m. | #1
On 23-11-18 21:47, Tom de Vries wrote:
> [ was: [PATCH 1/2][libbacktrace] Handle realloc returning NULL if size == 0 ]

> 

> On Thu, Nov 22, 2018 at 01:35:43PM +0100, Tom de Vries wrote:

>> Hi,

>>

>> Build and tested on x86_64, with mmap.c replaced by alloc.c to ensure that

>> backtrace_vector_release in alloc.c is tested.

> 

> Hi,

> 

> I came up with a more structural solution.

> 

> OK for trunk?

> 


Hi Jeff,

to follow up on your question about relevance of the remaining patches:

If we would have had the test-cases in this patch already committed, we
would have immediately noticed that the patch for a libbacktrace memory
leak proposed here (
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88063#c12 ) exposed the
problem that calling backtrace_vector_release with vec->size == 0
generates superfluous error messages (which now has been fixed by
"[libbacktrace] Avoid realloc with size == 0 in backtrace_vector_release").

Instead, I posted the patch, then remembered at some point to double
check using the alloc.c allocator instead of the mmap.c allocator, which
I implemented by hand-editing mmap.c to include alloc.c.

Having this patch in trunk will replace this forgot-to-do-it-prone and
manual-thus-error-prone process with an automated one, which I'd hope
makes life easier for all of us.

Thanks,
- Tom

> [libbacktrace] Test check_PROGRAMS without mmap

> 

> When building libbacktrace, we typically use mmapio.c and mmap.c, and don't

> build read.c and alloc.c.

> 

> Add testcases that use read.c and alloc.c to ensure that we also build and

> test those on a typical development setup.

> 

> Bootstrapped and reg-tested on x86_64.

> 

> 2018-11-23  Tom de Vries  <tdevries@suse.de>

> 

> 	* configure.ac (HAVE_MMAP): New AM_CONDITIONAL.

> 	* configure: Regenerate.

> 	* Makefile.am : Add _with_alloc version for each test in

> 	check_PROGRAMS.

> 	* Makefile.in: Regenerate.

> 

> ---

>  libbacktrace/Makefile.am  |  45 ++++++++

>  libbacktrace/Makefile.in  | 284 +++++++++++++++++++++++++++++++++++++++++++---

>  libbacktrace/configure    |  18 ++-

>  libbacktrace/configure.ac |   1 +

>  4 files changed, 331 insertions(+), 17 deletions(-)

> 

> diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am

> index 3c1bd49dd7b..ee47daee415 100644

> --- a/libbacktrace/Makefile.am

> +++ b/libbacktrace/Makefile.am

> @@ -95,11 +95,25 @@ btest_CFLAGS = $(AM_CFLAGS) -g -O

>  btest_LDADD = libbacktrace.la

>  

>  check_PROGRAMS += btest

> +if HAVE_MMAP

> +libbacktrace_with_alloc = $(libbacktrace_la_OBJECTS) \

> +	$(filter-out mmap.lo mmapio.lo,$(libbacktrace_la_LIBADD)) \

> +	alloc.lo read.lo

> +btest_with_alloc_SOURCES = $(btest_SOURCES)

> +btest_with_alloc_CFLAGS = $(btest_CFLAGS)

> +btest_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +check_PROGRAMS += btest_with_alloc

> +endif

>  

>  stest_SOURCES = stest.c

>  stest_LDADD = libbacktrace.la

>  

>  check_PROGRAMS += stest

> +if HAVE_MMAP

> +stest_with_alloc_SOURCES = $(stest_SOURCES)

> +stest_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +check_PROGRAMS += stest_with_alloc

> +endif

>  

>  ztest_SOURCES = ztest.c testlib.c

>  ztest_CFLAGS = -DSRCDIR=\"$(srcdir)\"

> @@ -111,11 +125,23 @@ endif

>  ztest_LDADD += $(CLOCK_GETTIME_LINK)

>  

>  check_PROGRAMS += ztest

> +if HAVE_MMAP

> +ztest_with_alloc_SOURCES = $(ztest_SOURCES)

> +ztest_with_alloc_CFLAGS = $(ztest_CFLAGS)

> +ztest_with_alloc_LDADD = $(libbacktrace_with_alloc) \

> +	$(filter-out libbacktrace.la, $(ztest_LDADD))

> +check_PROGRAMS += ztest_with_alloc

> +endif

>  

>  edtest_SOURCES = edtest.c edtest2_build.c testlib.c

>  edtest_LDADD = libbacktrace.la

>  

>  check_PROGRAMS += edtest

> +if HAVE_MMAP

> +edtest_with_alloc_SOURCES = $(edtest_SOURCES)

> +edtest_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +check_PROGRAMS += edtest_with_alloc

> +endif

>  

>  edtest2_build.c: gen_edtest2_build; @true

>  gen_edtest2_build: $(srcdir)/edtest2.c

> @@ -126,6 +152,12 @@ gen_edtest2_build: $(srcdir)/edtest2.c

>  if HAVE_PTHREAD

>  

>  check_PROGRAMS += ttest

> +if HAVE_MMAP

> +ttest_with_alloc_SOURCES = $(ttest_SOURCES)

> +ttest_with_alloc_CFLAGS = $(ttest_CFLAGS)

> +ttest_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +check_PROGRAMS += ttest_with_alloc

> +endif

>  

>  ttest_SOURCES = ttest.c testlib.c

>  ttest_CFLAGS = $(AM_CFLAGS) -pthread

> @@ -156,6 +188,19 @@ ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi

>  ctesta_LDADD = libbacktrace.la

>  

>  check_PROGRAMS += ctestg ctesta

> +if HAVE_MMAP

> +ctestg_with_alloc_SOURCES = $(ctestg_SOURCES)

> +ctestg_with_alloc_CFLAGS = $(ctestg_CFLAGS)

> +ctestg_with_alloc_LDFLAGS = $(ctestg_LDFLAGS)

> +ctestg_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +

> +ctesta_with_alloc_SOURCES = $(ctesta_SOURCES)

> +ctesta_with_alloc_CFLAGS = $(ctesta_CFLAGS)

> +ctesta_with_alloc_LDFLAGS = $(ctesta_LDFLAGS)

> +ctesta_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +

> +check_PROGRAMS += ctestg_with_alloc ctesta_with_alloc

> +endif

>  

>  endif

>  

> diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in

> index 60a9d887dba..2b984bc127e 100644

> --- a/libbacktrace/Makefile.in

> +++ b/libbacktrace/Makefile.in

> @@ -120,12 +120,24 @@ POST_UNINSTALL = :

>  build_triplet = @build@

>  host_triplet = @host@

>  target_triplet = @target@

> -check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)

> -@NATIVE_TRUE@am__append_1 = btest stest ztest edtest

> -@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_2 = -lz

> -@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_3 = ttest

> -@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_4 = dtest

> -@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_5 = ctestg ctesta

> +check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \

> +	$(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \

> +	$(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9) \

> +	$(am__EXEEXT_10) $(am__EXEEXT_11) $(am__EXEEXT_12)

> +@NATIVE_TRUE@am__append_1 = btest

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_2 = btest_with_alloc

> +@NATIVE_TRUE@am__append_3 = stest

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_4 = stest_with_alloc

> +@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_5 = -lz

> +@NATIVE_TRUE@am__append_6 = ztest

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_7 = ztest_with_alloc

> +@NATIVE_TRUE@am__append_8 = edtest

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_9 = edtest_with_alloc

> +@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_10 = ttest

> +@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_11 = ttest_with_alloc

> +@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_12 = dtest

> +@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_13 = ctestg ctesta

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_14 = ctestg_with_alloc ctesta_with_alloc

>  subdir = .

>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4

>  am__aclocal_m4_deps = $(top_srcdir)/../config/cet.m4 \

> @@ -158,12 +170,22 @@ AM_V_lt = $(am__v_lt_@AM_V@)

>  am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)

>  am__v_lt_0 = --silent

>  am__v_lt_1 = 

> -@NATIVE_TRUE@am__EXEEXT_1 = btest$(EXEEXT) stest$(EXEEXT) \

> -@NATIVE_TRUE@	ztest$(EXEEXT) edtest$(EXEEXT)

> -@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = ttest$(EXEEXT)

> -@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__EXEEXT_3 =  \

> +@NATIVE_TRUE@am__EXEEXT_1 = btest$(EXEEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = btest_with_alloc$(EXEEXT)

> +@NATIVE_TRUE@am__EXEEXT_3 = stest$(EXEEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_4 = stest_with_alloc$(EXEEXT)

> +@NATIVE_TRUE@am__EXEEXT_5 = ztest$(EXEEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_6 = ztest_with_alloc$(EXEEXT)

> +@NATIVE_TRUE@am__EXEEXT_7 = edtest$(EXEEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_8 =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	edtest_with_alloc$(EXEEXT)

> +@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_9 = ttest$(EXEEXT)

> +@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_10 = ttest_with_alloc$(EXEEXT)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__EXEEXT_11 =  \

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg$(EXEEXT) \

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta$(EXEEXT)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_12 = ctestg_with_alloc$(EXEEXT) \

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@	ctesta_with_alloc$(EXEEXT)

>  @NATIVE_TRUE@am_btest_OBJECTS = btest-btest.$(OBJEXT) \

>  @NATIVE_TRUE@	btest-testlib.$(OBJEXT)

>  btest_OBJECTS = $(am_btest_OBJECTS)

> @@ -171,6 +193,17 @@ btest_OBJECTS = $(am_btest_OBJECTS)

>  btest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \

>  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(btest_CFLAGS) $(CFLAGS) \

>  	$(AM_LDFLAGS) $(LDFLAGS) -o $@

> +@NATIVE_TRUE@am__objects_1 = btest_with_alloc-btest.$(OBJEXT) \

> +@NATIVE_TRUE@	btest_with_alloc-testlib.$(OBJEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_btest_with_alloc_OBJECTS =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_1)

> +btest_with_alloc_OBJECTS = $(am_btest_with_alloc_OBJECTS)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_DEPENDENCIES =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc)

> +btest_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \

> +	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \

> +	$(btest_with_alloc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \

> +	-o $@

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctesta_OBJECTS = ctesta-btest.$(OBJEXT) \

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta-testlib.$(OBJEXT)

>  ctesta_OBJECTS = $(am_ctesta_OBJECTS)

> @@ -179,6 +212,15 @@ ctesta_OBJECTS = $(am_ctesta_OBJECTS)

>  ctesta_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \

>  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctesta_CFLAGS) $(CFLAGS) \

>  	$(ctesta_LDFLAGS) $(LDFLAGS) -o $@

> +@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__objects_2 = ctesta_with_alloc-btest.$(OBJEXT) \

> +@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta_with_alloc-testlib.$(OBJEXT)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_ctesta_with_alloc_OBJECTS = $(am__objects_2)

> +ctesta_with_alloc_OBJECTS = $(am_ctesta_with_alloc_OBJECTS)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_DEPENDENCIES = $(libbacktrace_with_alloc)

> +ctesta_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \

> +	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \

> +	$(ctesta_with_alloc_CFLAGS) $(CFLAGS) \

> +	$(ctesta_with_alloc_LDFLAGS) $(LDFLAGS) -o $@

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctestg_OBJECTS = ctestg-btest.$(OBJEXT) \

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg-testlib.$(OBJEXT)

>  ctestg_OBJECTS = $(am_ctestg_OBJECTS)

> @@ -187,13 +229,35 @@ ctestg_OBJECTS = $(am_ctestg_OBJECTS)

>  ctestg_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \

>  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctestg_CFLAGS) $(CFLAGS) \

>  	$(ctestg_LDFLAGS) $(LDFLAGS) -o $@

> +@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__objects_3 = ctestg_with_alloc-btest.$(OBJEXT) \

> +@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg_with_alloc-testlib.$(OBJEXT)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_ctestg_with_alloc_OBJECTS = $(am__objects_3)

> +ctestg_with_alloc_OBJECTS = $(am_ctestg_with_alloc_OBJECTS)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_DEPENDENCIES = $(libbacktrace_with_alloc)

> +ctestg_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \

> +	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \

> +	$(ctestg_with_alloc_CFLAGS) $(CFLAGS) \

> +	$(ctestg_with_alloc_LDFLAGS) $(LDFLAGS) -o $@

>  @NATIVE_TRUE@am_edtest_OBJECTS = edtest.$(OBJEXT) \

>  @NATIVE_TRUE@	edtest2_build.$(OBJEXT) testlib.$(OBJEXT)

>  edtest_OBJECTS = $(am_edtest_OBJECTS)

>  @NATIVE_TRUE@edtest_DEPENDENCIES = libbacktrace.la

> +@NATIVE_TRUE@am__objects_4 = edtest.$(OBJEXT) edtest2_build.$(OBJEXT) \

> +@NATIVE_TRUE@	testlib.$(OBJEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_edtest_with_alloc_OBJECTS =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_4)

> +edtest_with_alloc_OBJECTS = $(am_edtest_with_alloc_OBJECTS)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@edtest_with_alloc_DEPENDENCIES =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc)

>  @NATIVE_TRUE@am_stest_OBJECTS = stest.$(OBJEXT)

>  stest_OBJECTS = $(am_stest_OBJECTS)

>  @NATIVE_TRUE@stest_DEPENDENCIES = libbacktrace.la

> +@NATIVE_TRUE@am__objects_5 = stest.$(OBJEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_stest_with_alloc_OBJECTS =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_5)

> +stest_with_alloc_OBJECTS = $(am_stest_with_alloc_OBJECTS)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@stest_with_alloc_DEPENDENCIES =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc)

>  @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am_ttest_OBJECTS =  \

>  @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest-ttest.$(OBJEXT) \

>  @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest-testlib.$(OBJEXT)

> @@ -202,6 +266,15 @@ ttest_OBJECTS = $(am_ttest_OBJECTS)

>  ttest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \

>  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ttest_CFLAGS) $(CFLAGS) \

>  	$(AM_LDFLAGS) $(LDFLAGS) -o $@

> +@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__objects_6 = ttest_with_alloc-ttest.$(OBJEXT) \

> +@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest_with_alloc-testlib.$(OBJEXT)

> +@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am_ttest_with_alloc_OBJECTS = $(am__objects_6)

> +ttest_with_alloc_OBJECTS = $(am_ttest_with_alloc_OBJECTS)

> +@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_DEPENDENCIES = $(libbacktrace_with_alloc)

> +ttest_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \

> +	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \

> +	$(ttest_with_alloc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \

> +	-o $@

>  @NATIVE_TRUE@am_ztest_OBJECTS = ztest-ztest.$(OBJEXT) \

>  @NATIVE_TRUE@	ztest-testlib.$(OBJEXT)

>  ztest_OBJECTS = $(am_ztest_OBJECTS)

> @@ -210,6 +283,19 @@ ztest_OBJECTS = $(am_ztest_OBJECTS)

>  ztest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \

>  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ztest_CFLAGS) $(CFLAGS) \

>  	$(AM_LDFLAGS) $(LDFLAGS) -o $@

> +@NATIVE_TRUE@am__objects_7 = ztest_with_alloc-ztest.$(OBJEXT) \

> +@NATIVE_TRUE@	ztest_with_alloc-testlib.$(OBJEXT)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_ztest_with_alloc_OBJECTS =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_7)

> +ztest_with_alloc_OBJECTS = $(am_ztest_with_alloc_OBJECTS)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_DEPENDENCIES =  \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc) \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(filter-out libbacktrace.la, \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(ztest_LDADD))

> +ztest_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \

> +	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \

> +	$(ztest_with_alloc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \

> +	-o $@

>  AM_V_P = $(am__v_P_@AM_V@)

>  am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)

>  am__v_P_0 = false

> @@ -244,9 +330,13 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)

>  am__v_CCLD_0 = @echo "  CCLD    " $@;

>  am__v_CCLD_1 = 

>  SOURCES = $(libbacktrace_la_SOURCES) $(EXTRA_libbacktrace_la_SOURCES) \

> -	$(btest_SOURCES) $(ctesta_SOURCES) $(ctestg_SOURCES) \

> -	$(edtest_SOURCES) $(stest_SOURCES) $(ttest_SOURCES) \

> -	$(ztest_SOURCES)

> +	$(btest_SOURCES) $(btest_with_alloc_SOURCES) $(ctesta_SOURCES) \

> +	$(ctesta_with_alloc_SOURCES) $(ctestg_SOURCES) \

> +	$(ctestg_with_alloc_SOURCES) $(edtest_SOURCES) \

> +	$(edtest_with_alloc_SOURCES) $(stest_SOURCES) \

> +	$(stest_with_alloc_SOURCES) $(ttest_SOURCES) \

> +	$(ttest_with_alloc_SOURCES) $(ztest_SOURCES) \

> +	$(ztest_with_alloc_SOURCES)

>  am__can_run_installinfo = \

>    case $$AM_UPDATE_INFO_DIR in \

>      n|no|NO) false;; \

> @@ -654,18 +744,37 @@ libbacktrace_la_LIBADD = \

>  	$(ALLOC_FILE)

>  

>  libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)

> -TESTS = $(check_PROGRAMS) $(am__append_4)

> +TESTS = $(check_PROGRAMS) $(am__append_12)

>  @NATIVE_TRUE@btest_SOURCES = btest.c testlib.c

>  @NATIVE_TRUE@btest_CFLAGS = $(AM_CFLAGS) -g -O

>  @NATIVE_TRUE@btest_LDADD = libbacktrace.la

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@libbacktrace_with_alloc = $(libbacktrace_la_OBJECTS) \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(filter-out mmap.lo mmapio.lo,$(libbacktrace_la_LIBADD)) \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	alloc.lo read.lo

> +

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_SOURCES = $(btest_SOURCES)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_CFLAGS = $(btest_CFLAGS)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_LDADD = $(libbacktrace_with_alloc)

>  @NATIVE_TRUE@stest_SOURCES = stest.c

>  @NATIVE_TRUE@stest_LDADD = libbacktrace.la

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@stest_with_alloc_SOURCES = $(stest_SOURCES)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@stest_with_alloc_LDADD = $(libbacktrace_with_alloc)

>  @NATIVE_TRUE@ztest_SOURCES = ztest.c testlib.c

>  @NATIVE_TRUE@ztest_CFLAGS = -DSRCDIR=\"$(srcdir)\"

> -@NATIVE_TRUE@ztest_LDADD = libbacktrace.la $(am__append_2) \

> +@NATIVE_TRUE@ztest_LDADD = libbacktrace.la $(am__append_5) \

>  @NATIVE_TRUE@	$(CLOCK_GETTIME_LINK)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_SOURCES = $(ztest_SOURCES)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_CFLAGS = $(ztest_CFLAGS)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_LDADD = $(libbacktrace_with_alloc) \

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(filter-out libbacktrace.la, $(ztest_LDADD))

> +

>  @NATIVE_TRUE@edtest_SOURCES = edtest.c edtest2_build.c testlib.c

>  @NATIVE_TRUE@edtest_LDADD = libbacktrace.la

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@edtest_with_alloc_SOURCES = $(edtest_SOURCES)

> +@HAVE_MMAP_TRUE@@NATIVE_TRUE@edtest_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_SOURCES = $(ttest_SOURCES)

> +@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_CFLAGS = $(ttest_CFLAGS)

> +@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_LDADD = $(libbacktrace_with_alloc)

>  @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_SOURCES = ttest.c testlib.c

>  @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS = $(AM_CFLAGS) -pthread

>  @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_LDADD = libbacktrace.la

> @@ -677,6 +786,14 @@ TESTS = $(check_PROGRAMS) $(am__append_4)

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_CFLAGS = $(AM_CFLAGS) -g

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi

>  @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDADD = libbacktrace.la

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_SOURCES = $(ctestg_SOURCES)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_CFLAGS = $(ctestg_CFLAGS)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_LDFLAGS = $(ctestg_LDFLAGS)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_LDADD = $(libbacktrace_with_alloc)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_SOURCES = $(ctesta_SOURCES)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_CFLAGS = $(ctesta_CFLAGS)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_LDFLAGS = $(ctesta_LDFLAGS)

> +@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_LDADD = $(libbacktrace_with_alloc)

>  

>  # We can't use automake's automatic dependency tracking, because it

>  # breaks when using bootstrap-lean.  Automatic dependency tracking

> @@ -780,30 +897,58 @@ btest$(EXEEXT): $(btest_OBJECTS) $(btest_DEPENDENCIES) $(EXTRA_btest_DEPENDENCIE

>  	@rm -f btest$(EXEEXT)

>  	$(AM_V_CCLD)$(btest_LINK) $(btest_OBJECTS) $(btest_LDADD) $(LIBS)

>  

> +btest_with_alloc$(EXEEXT): $(btest_with_alloc_OBJECTS) $(btest_with_alloc_DEPENDENCIES) $(EXTRA_btest_with_alloc_DEPENDENCIES) 

> +	@rm -f btest_with_alloc$(EXEEXT)

> +	$(AM_V_CCLD)$(btest_with_alloc_LINK) $(btest_with_alloc_OBJECTS) $(btest_with_alloc_LDADD) $(LIBS)

> +

>  ctesta$(EXEEXT): $(ctesta_OBJECTS) $(ctesta_DEPENDENCIES) $(EXTRA_ctesta_DEPENDENCIES) 

>  	@rm -f ctesta$(EXEEXT)

>  	$(AM_V_CCLD)$(ctesta_LINK) $(ctesta_OBJECTS) $(ctesta_LDADD) $(LIBS)

>  

> +ctesta_with_alloc$(EXEEXT): $(ctesta_with_alloc_OBJECTS) $(ctesta_with_alloc_DEPENDENCIES) $(EXTRA_ctesta_with_alloc_DEPENDENCIES) 

> +	@rm -f ctesta_with_alloc$(EXEEXT)

> +	$(AM_V_CCLD)$(ctesta_with_alloc_LINK) $(ctesta_with_alloc_OBJECTS) $(ctesta_with_alloc_LDADD) $(LIBS)

> +

>  ctestg$(EXEEXT): $(ctestg_OBJECTS) $(ctestg_DEPENDENCIES) $(EXTRA_ctestg_DEPENDENCIES) 

>  	@rm -f ctestg$(EXEEXT)

>  	$(AM_V_CCLD)$(ctestg_LINK) $(ctestg_OBJECTS) $(ctestg_LDADD) $(LIBS)

>  

> +ctestg_with_alloc$(EXEEXT): $(ctestg_with_alloc_OBJECTS) $(ctestg_with_alloc_DEPENDENCIES) $(EXTRA_ctestg_with_alloc_DEPENDENCIES) 

> +	@rm -f ctestg_with_alloc$(EXEEXT)

> +	$(AM_V_CCLD)$(ctestg_with_alloc_LINK) $(ctestg_with_alloc_OBJECTS) $(ctestg_with_alloc_LDADD) $(LIBS)

> +

>  edtest$(EXEEXT): $(edtest_OBJECTS) $(edtest_DEPENDENCIES) $(EXTRA_edtest_DEPENDENCIES) 

>  	@rm -f edtest$(EXEEXT)

>  	$(AM_V_CCLD)$(LINK) $(edtest_OBJECTS) $(edtest_LDADD) $(LIBS)

>  

> +edtest_with_alloc$(EXEEXT): $(edtest_with_alloc_OBJECTS) $(edtest_with_alloc_DEPENDENCIES) $(EXTRA_edtest_with_alloc_DEPENDENCIES) 

> +	@rm -f edtest_with_alloc$(EXEEXT)

> +	$(AM_V_CCLD)$(LINK) $(edtest_with_alloc_OBJECTS) $(edtest_with_alloc_LDADD) $(LIBS)

> +

>  stest$(EXEEXT): $(stest_OBJECTS) $(stest_DEPENDENCIES) $(EXTRA_stest_DEPENDENCIES) 

>  	@rm -f stest$(EXEEXT)

>  	$(AM_V_CCLD)$(LINK) $(stest_OBJECTS) $(stest_LDADD) $(LIBS)

>  

> +stest_with_alloc$(EXEEXT): $(stest_with_alloc_OBJECTS) $(stest_with_alloc_DEPENDENCIES) $(EXTRA_stest_with_alloc_DEPENDENCIES) 

> +	@rm -f stest_with_alloc$(EXEEXT)

> +	$(AM_V_CCLD)$(LINK) $(stest_with_alloc_OBJECTS) $(stest_with_alloc_LDADD) $(LIBS)

> +

>  ttest$(EXEEXT): $(ttest_OBJECTS) $(ttest_DEPENDENCIES) $(EXTRA_ttest_DEPENDENCIES) 

>  	@rm -f ttest$(EXEEXT)

>  	$(AM_V_CCLD)$(ttest_LINK) $(ttest_OBJECTS) $(ttest_LDADD) $(LIBS)

>  

> +ttest_with_alloc$(EXEEXT): $(ttest_with_alloc_OBJECTS) $(ttest_with_alloc_DEPENDENCIES) $(EXTRA_ttest_with_alloc_DEPENDENCIES) 

> +	@rm -f ttest_with_alloc$(EXEEXT)

> +	$(AM_V_CCLD)$(ttest_with_alloc_LINK) $(ttest_with_alloc_OBJECTS) $(ttest_with_alloc_LDADD) $(LIBS)

> +

>  ztest$(EXEEXT): $(ztest_OBJECTS) $(ztest_DEPENDENCIES) $(EXTRA_ztest_DEPENDENCIES) 

>  	@rm -f ztest$(EXEEXT)

>  	$(AM_V_CCLD)$(ztest_LINK) $(ztest_OBJECTS) $(ztest_LDADD) $(LIBS)

>  

> +ztest_with_alloc$(EXEEXT): $(ztest_with_alloc_OBJECTS) $(ztest_with_alloc_DEPENDENCIES) $(EXTRA_ztest_with_alloc_DEPENDENCIES) 

> +	@rm -f ztest_with_alloc$(EXEEXT)

> +	$(AM_V_CCLD)$(ztest_with_alloc_LINK) $(ztest_with_alloc_OBJECTS) $(ztest_with_alloc_LDADD) $(LIBS)

> +

>  mostlyclean-compile:

>  	-rm -f *.$(OBJEXT)

>  

> @@ -831,6 +976,18 @@ btest-testlib.o: testlib.c

>  btest-testlib.obj: testlib.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_CFLAGS) $(CFLAGS) -c -o btest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

>  

> +btest_with_alloc-btest.o: btest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c

> +

> +btest_with_alloc-btest.obj: btest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`

> +

> +btest_with_alloc-testlib.o: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c

> +

> +btest_with_alloc-testlib.obj: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

> +

>  ctesta-btest.o: btest.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_CFLAGS) $(CFLAGS) -c -o ctesta-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c

>  

> @@ -843,6 +1000,18 @@ ctesta-testlib.o: testlib.c

>  ctesta-testlib.obj: testlib.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_CFLAGS) $(CFLAGS) -c -o ctesta-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

>  

> +ctesta_with_alloc-btest.o: btest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c

> +

> +ctesta_with_alloc-btest.obj: btest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`

> +

> +ctesta_with_alloc-testlib.o: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c

> +

> +ctesta_with_alloc-testlib.obj: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

> +

>  ctestg-btest.o: btest.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_CFLAGS) $(CFLAGS) -c -o ctestg-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c

>  

> @@ -855,6 +1024,18 @@ ctestg-testlib.o: testlib.c

>  ctestg-testlib.obj: testlib.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_CFLAGS) $(CFLAGS) -c -o ctestg-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

>  

> +ctestg_with_alloc-btest.o: btest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c

> +

> +ctestg_with_alloc-btest.obj: btest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`

> +

> +ctestg_with_alloc-testlib.o: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c

> +

> +ctestg_with_alloc-testlib.obj: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

> +

>  ttest-ttest.o: ttest.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_CFLAGS) $(CFLAGS) -c -o ttest-ttest.o `test -f 'ttest.c' || echo '$(srcdir)/'`ttest.c

>  

> @@ -867,6 +1048,18 @@ ttest-testlib.o: testlib.c

>  ttest-testlib.obj: testlib.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_CFLAGS) $(CFLAGS) -c -o ttest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

>  

> +ttest_with_alloc-ttest.o: ttest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-ttest.o `test -f 'ttest.c' || echo '$(srcdir)/'`ttest.c

> +

> +ttest_with_alloc-ttest.obj: ttest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-ttest.obj `if test -f 'ttest.c'; then $(CYGPATH_W) 'ttest.c'; else $(CYGPATH_W) '$(srcdir)/ttest.c'; fi`

> +

> +ttest_with_alloc-testlib.o: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c

> +

> +ttest_with_alloc-testlib.obj: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

> +

>  ztest-ztest.o: ztest.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_CFLAGS) $(CFLAGS) -c -o ztest-ztest.o `test -f 'ztest.c' || echo '$(srcdir)/'`ztest.c

>  

> @@ -879,6 +1072,18 @@ ztest-testlib.o: testlib.c

>  ztest-testlib.obj: testlib.c

>  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_CFLAGS) $(CFLAGS) -c -o ztest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

>  

> +ztest_with_alloc-ztest.o: ztest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-ztest.o `test -f 'ztest.c' || echo '$(srcdir)/'`ztest.c

> +

> +ztest_with_alloc-ztest.obj: ztest.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-ztest.obj `if test -f 'ztest.c'; then $(CYGPATH_W) 'ztest.c'; else $(CYGPATH_W) '$(srcdir)/ztest.c'; fi`

> +

> +ztest_with_alloc-testlib.o: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c

> +

> +ztest_with_alloc-testlib.obj: testlib.c

> +	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`

> +

>  mostlyclean-libtool:

>  	-rm -f *.lo

>  

> @@ -1095,6 +1300,13 @@ btest.log: btest$(EXEEXT)

>  	--log-file $$b.log --trs-file $$b.trs \

>  	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

>  	"$$tst" $(AM_TESTS_FD_REDIRECT)

> +btest_with_alloc.log: btest_with_alloc$(EXEEXT)

> +	@p='btest_with_alloc$(EXEEXT)'; \

> +	b='btest_with_alloc'; \

> +	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \

> +	--log-file $$b.log --trs-file $$b.trs \

> +	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

> +	"$$tst" $(AM_TESTS_FD_REDIRECT)

>  stest.log: stest$(EXEEXT)

>  	@p='stest$(EXEEXT)'; \

>  	b='stest'; \

> @@ -1102,6 +1314,13 @@ stest.log: stest$(EXEEXT)

>  	--log-file $$b.log --trs-file $$b.trs \

>  	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

>  	"$$tst" $(AM_TESTS_FD_REDIRECT)

> +stest_with_alloc.log: stest_with_alloc$(EXEEXT)

> +	@p='stest_with_alloc$(EXEEXT)'; \

> +	b='stest_with_alloc'; \

> +	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \

> +	--log-file $$b.log --trs-file $$b.trs \

> +	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

> +	"$$tst" $(AM_TESTS_FD_REDIRECT)

>  ztest.log: ztest$(EXEEXT)

>  	@p='ztest$(EXEEXT)'; \

>  	b='ztest'; \

> @@ -1109,6 +1328,13 @@ ztest.log: ztest$(EXEEXT)

>  	--log-file $$b.log --trs-file $$b.trs \

>  	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

>  	"$$tst" $(AM_TESTS_FD_REDIRECT)

> +ztest_with_alloc.log: ztest_with_alloc$(EXEEXT)

> +	@p='ztest_with_alloc$(EXEEXT)'; \

> +	b='ztest_with_alloc'; \

> +	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \

> +	--log-file $$b.log --trs-file $$b.trs \

> +	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

> +	"$$tst" $(AM_TESTS_FD_REDIRECT)

>  edtest.log: edtest$(EXEEXT)

>  	@p='edtest$(EXEEXT)'; \

>  	b='edtest'; \

> @@ -1116,6 +1342,13 @@ edtest.log: edtest$(EXEEXT)

>  	--log-file $$b.log --trs-file $$b.trs \

>  	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

>  	"$$tst" $(AM_TESTS_FD_REDIRECT)

> +edtest_with_alloc.log: edtest_with_alloc$(EXEEXT)

> +	@p='edtest_with_alloc$(EXEEXT)'; \

> +	b='edtest_with_alloc'; \

> +	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \

> +	--log-file $$b.log --trs-file $$b.trs \

> +	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

> +	"$$tst" $(AM_TESTS_FD_REDIRECT)

>  ttest.log: ttest$(EXEEXT)

>  	@p='ttest$(EXEEXT)'; \

>  	b='ttest'; \

> @@ -1123,6 +1356,13 @@ ttest.log: ttest$(EXEEXT)

>  	--log-file $$b.log --trs-file $$b.trs \

>  	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

>  	"$$tst" $(AM_TESTS_FD_REDIRECT)

> +ttest_with_alloc.log: ttest_with_alloc$(EXEEXT)

> +	@p='ttest_with_alloc$(EXEEXT)'; \

> +	b='ttest_with_alloc'; \

> +	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \

> +	--log-file $$b.log --trs-file $$b.trs \

> +	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

> +	"$$tst" $(AM_TESTS_FD_REDIRECT)

>  ctestg.log: ctestg$(EXEEXT)

>  	@p='ctestg$(EXEEXT)'; \

>  	b='ctestg'; \

> @@ -1137,6 +1377,20 @@ ctesta.log: ctesta$(EXEEXT)

>  	--log-file $$b.log --trs-file $$b.trs \

>  	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

>  	"$$tst" $(AM_TESTS_FD_REDIRECT)

> +ctestg_with_alloc.log: ctestg_with_alloc$(EXEEXT)

> +	@p='ctestg_with_alloc$(EXEEXT)'; \

> +	b='ctestg_with_alloc'; \

> +	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \

> +	--log-file $$b.log --trs-file $$b.trs \

> +	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

> +	"$$tst" $(AM_TESTS_FD_REDIRECT)

> +ctesta_with_alloc.log: ctesta_with_alloc$(EXEEXT)

> +	@p='ctesta_with_alloc$(EXEEXT)'; \

> +	b='ctesta_with_alloc'; \

> +	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \

> +	--log-file $$b.log --trs-file $$b.trs \

> +	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \

> +	"$$tst" $(AM_TESTS_FD_REDIRECT)

>  dtest.log: dtest

>  	@p='dtest'; \

>  	b='dtest'; \

> diff --git a/libbacktrace/configure b/libbacktrace/configure

> index c316dde1ad2..ad2e27cbc62 100755

> --- a/libbacktrace/configure

> +++ b/libbacktrace/configure

> @@ -646,6 +646,8 @@ HAVE_PTHREAD_FALSE

>  HAVE_PTHREAD_TRUE

>  PTHREAD_CFLAGS

>  CLOCK_GETTIME_LINK

> +HAVE_MMAP_FALSE

> +HAVE_MMAP_TRUE

>  BACKTRACE_USES_MALLOC

>  ALLOC_FILE

>  VIEW_FILE

> @@ -11440,7 +11442,7 @@ else

>    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2

>    lt_status=$lt_dlunknown

>    cat > conftest.$ac_ext <<_LT_EOF

> -#line 11443 "configure"

> +#line 11445 "configure"

>  #include "confdefs.h"

>  

>  #if HAVE_DLFCN_H

> @@ -11546,7 +11548,7 @@ else

>    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2

>    lt_status=$lt_dlunknown

>    cat > conftest.$ac_ext <<_LT_EOF

> -#line 11549 "configure"

> +#line 11551 "configure"

>  #include "confdefs.h"

>  

>  #if HAVE_DLFCN_H

> @@ -12956,6 +12958,14 @@ if test "$ALLOC_FILE" = "alloc.lo"; then

>    BACKTRACE_USES_MALLOC=1

>  fi

>  

> + if test "$have_mmap" == "yes"; then

> +  HAVE_MMAP_TRUE=

> +  HAVE_MMAP_FALSE='#'

> +else

> +  HAVE_MMAP_TRUE='#'

> +  HAVE_MMAP_FALSE=

> +fi

> +

>  

>  # Check for dl_iterate_phdr.

>  for ac_header in link.h

> @@ -13558,6 +13568,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then

>    as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.

>  Usually this means the macro was only invoked conditionally." "$LINENO" 5

>  fi

> +if test -z "${HAVE_MMAP_TRUE}" && test -z "${HAVE_MMAP_FALSE}"; then

> +  as_fn_error $? "conditional \"HAVE_MMAP\" was never defined.

> +Usually this means the macro was only invoked conditionally." "$LINENO" 5

> +fi

>  if test -z "${HAVE_PTHREAD_TRUE}" && test -z "${HAVE_PTHREAD_FALSE}"; then

>    as_fn_error $? "conditional \"HAVE_PTHREAD\" was never defined.

>  Usually this means the macro was only invoked conditionally." "$LINENO" 5

> diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac

> index c75fc9d7ebc..4eb9b06d781 100644

> --- a/libbacktrace/configure.ac

> +++ b/libbacktrace/configure.ac

> @@ -319,6 +319,7 @@ if test "$ALLOC_FILE" = "alloc.lo"; then

>    BACKTRACE_USES_MALLOC=1

>  fi

>  AC_SUBST(BACKTRACE_USES_MALLOC)

> +AM_CONDITIONAL(HAVE_MMAP, test "$have_mmap" == "yes")

>  

>  # Check for dl_iterate_phdr.

>  AC_CHECK_HEADERS(link.h)

>
y2s1982 via Gcc-patches Nov. 29, 2018, 6:26 p.m. | #2
On Fri, Nov 23, 2018 at 12:47 PM, Tom de Vries <tdevries@suse.de> wrote:
> [ was: [PATCH 1/2][libbacktrace] Handle realloc returning NULL if size == 0 ]

>

> On Thu, Nov 22, 2018 at 01:35:43PM +0100, Tom de Vries wrote:

>> Hi,

>>

>> Build and tested on x86_64, with mmap.c replaced by alloc.c to ensure that

>> backtrace_vector_release in alloc.c is tested.

>

> Hi,

>

> I came up with a more structural solution.

>

> OK for trunk?

>

> Thanks,

> - Tom

>

> [libbacktrace] Test check_PROGRAMS without mmap

>

> When building libbacktrace, we typically use mmapio.c and mmap.c, and don't

> build read.c and alloc.c.

>

> Add testcases that use read.c and alloc.c to ensure that we also build and

> test those on a typical development setup.

>

> Bootstrapped and reg-tested on x86_64.

>

> 2018-11-23  Tom de Vries  <tdevries@suse.de>

>

>         * configure.ac (HAVE_MMAP): New AM_CONDITIONAL.

>         * configure: Regenerate.

>         * Makefile.am : Add _with_alloc version for each test in

>         check_PROGRAMS.

>         * Makefile.in: Regenerate.

>

> ---

>  libbacktrace/Makefile.am  |  45 ++++++++

>  libbacktrace/Makefile.in  | 284 +++++++++++++++++++++++++++++++++++++++++++---

>  libbacktrace/configure    |  18 ++-

>  libbacktrace/configure.ac |   1 +

>  4 files changed, 331 insertions(+), 17 deletions(-)

>

> diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am

> index 3c1bd49dd7b..ee47daee415 100644

> --- a/libbacktrace/Makefile.am

> +++ b/libbacktrace/Makefile.am

> @@ -95,11 +95,25 @@ btest_CFLAGS = $(AM_CFLAGS) -g -O

>  btest_LDADD = libbacktrace.la

>

>  check_PROGRAMS += btest

> +if HAVE_MMAP

> +libbacktrace_with_alloc = $(libbacktrace_la_OBJECTS) \

> +       $(filter-out mmap.lo mmapio.lo,$(libbacktrace_la_LIBADD)) \

> +       alloc.lo read.lo



As far as I know libbacktrace does not currently rely on using GNU
make.  I'd rather not add that dependency for this purpose (I don't
mind adding this kind of testing but to me this seems only of mild
interest--I expect that all significant libbacktrace users have mmap).
You should be able to write something like

libbacktrace_alloc_la_SOURCES = $(libbacktrace_SOURCES)
libbacktrace_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) read.c alloc.c

Then I wouldn't bother with only running the tests with HAVE_MMAP,
just add unconditional tests for btest_alloc, etc.  It's OK to run
duplicate tests for the incredibly rare case of a host that doesn't
support mmap.

Ian
Tom de Vries Nov. 30, 2018, 9:04 a.m. | #3
On 29-11-18 19:26, Ian Lance Taylor wrote:
> On Fri, Nov 23, 2018 at 12:47 PM, Tom de Vries <tdevries@suse.de> wrote:

>> [ was: [PATCH 1/2][libbacktrace] Handle realloc returning NULL if size == 0 ]

>>

>> On Thu, Nov 22, 2018 at 01:35:43PM +0100, Tom de Vries wrote:

>>> Hi,

>>>

>>> Build and tested on x86_64, with mmap.c replaced by alloc.c to ensure that

>>> backtrace_vector_release in alloc.c is tested.

>>

>> Hi,

>>

>> I came up with a more structural solution.

>>

>> OK for trunk?

>>

>> Thanks,

>> - Tom

>>

>> [libbacktrace] Test check_PROGRAMS without mmap

>>

>> When building libbacktrace, we typically use mmapio.c and mmap.c, and don't

>> build read.c and alloc.c.

>>

>> Add testcases that use read.c and alloc.c to ensure that we also build and

>> test those on a typical development setup.

>>

>> Bootstrapped and reg-tested on x86_64.

>>

>> 2018-11-23  Tom de Vries  <tdevries@suse.de>

>>

>>         * configure.ac (HAVE_MMAP): New AM_CONDITIONAL.

>>         * configure: Regenerate.

>>         * Makefile.am : Add _with_alloc version for each test in

>>         check_PROGRAMS.

>>         * Makefile.in: Regenerate.

>>

>> ---

>>  libbacktrace/Makefile.am  |  45 ++++++++

>>  libbacktrace/Makefile.in  | 284 +++++++++++++++++++++++++++++++++++++++++++---

>>  libbacktrace/configure    |  18 ++-

>>  libbacktrace/configure.ac |   1 +

>>  4 files changed, 331 insertions(+), 17 deletions(-)

>>

>> diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am

>> index 3c1bd49dd7b..ee47daee415 100644

>> --- a/libbacktrace/Makefile.am

>> +++ b/libbacktrace/Makefile.am

>> @@ -95,11 +95,25 @@ btest_CFLAGS = $(AM_CFLAGS) -g -O

>>  btest_LDADD = libbacktrace.la

>>

>>  check_PROGRAMS += btest

>> +if HAVE_MMAP

>> +libbacktrace_with_alloc = $(libbacktrace_la_OBJECTS) \

>> +       $(filter-out mmap.lo mmapio.lo,$(libbacktrace_la_LIBADD)) \

>> +       alloc.lo read.lo

> 

> 

> As far as I know libbacktrace does not currently rely on using GNU

> make.  I'd rather not add that dependency for this purpose (I don't

> mind adding this kind of testing but to me this seems only of mild

> interest--I expect that all significant libbacktrace users have mmap).

> You should be able to write something like

> 

> libbacktrace_alloc_la_SOURCES = $(libbacktrace_SOURCES)

> libbacktrace_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) read.c alloc.c

> 


Done.

> Then I wouldn't bother with only running the tests with HAVE_MMAP,

> just add unconditional tests for btest_alloc, etc.  It's OK to run

> duplicate tests for the incredibly rare case of a host that doesn't

> support mmap.


Done.

OK for trunk?

Thanks,
- Tom
[libbacktrace] Test check_PROGRAMS without mmap

When building libbacktrace, we typically use mmapio.c and mmap.c, and don't
build read.c and alloc.c.

Add testcases that use read.c and alloc.c to ensure that we also build and
test those on a typical development setup.

Bootstrapped and reg-tested on x86_64.

2018-11-23  Tom de Vries  <tdevries@suse.de>

	* Makefile.am : Add _with_alloc version for each test in
	check_PROGRAMS.
	* Makefile.in: Regenerate.

---
 libbacktrace/Makefile.am |  54 ++++++++
 libbacktrace/Makefile.in | 319 +++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 349 insertions(+), 24 deletions(-)

diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am
index 13e94f27aef..e7e9c7b6697 100644
--- a/libbacktrace/Makefile.am
+++ b/libbacktrace/Makefile.am
@@ -89,38 +89,74 @@ check_PROGRAMS =
 TESTS = $(check_PROGRAMS)
 
 if NATIVE
+check_LTLIBRARIES = libbacktrace_alloc.la
+
+libbacktrace_alloc_la_SOURCES = $(libbacktrace_la_SOURCES)
+libbacktrace_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) read.lo alloc.lo
+
+libbacktrace_alloc_la_DEPENDENCIES = $(libbacktrace_alloc_la_LIBADD)
+
 unittest_SOURCES = unittest.c testlib.c
 unittest_LDADD = libbacktrace.la
 
 check_PROGRAMS += unittest
 
+unittest_alloc_SOURCES = $(unittest_SOURCES)
+unittest_alloc_LDADD = libbacktrace_alloc.la
+
+check_PROGRAMS += unittest_alloc
+
 btest_SOURCES = btest.c testlib.c
 btest_CFLAGS = $(AM_CFLAGS) -g -O
 btest_LDADD = libbacktrace.la
 
 check_PROGRAMS += btest
 
+btest_alloc_SOURCES = $(btest_SOURCES)
+btest_alloc_CFLAGS = $(btest_CFLAGS)
+btest_alloc_LDADD = libbacktrace_alloc.la
+
+check_PROGRAMS += btest_alloc
+
 stest_SOURCES = stest.c
 stest_LDADD = libbacktrace.la
 
 check_PROGRAMS += stest
 
+stest_alloc_SOURCES = $(stest_SOURCES)
+stest_alloc_LDADD = libbacktrace_alloc.la
+
+check_PROGRAMS += stest_alloc
+
 ztest_SOURCES = ztest.c testlib.c
 ztest_CFLAGS = -DSRCDIR=\"$(srcdir)\"
 ztest_LDADD = libbacktrace.la
+ztest_alloc_LDADD = libbacktrace_alloc.la
 
 if HAVE_ZLIB
 ztest_LDADD += -lz
+ztest_alloc_LDADD += -lz
 endif
 ztest_LDADD += $(CLOCK_GETTIME_LINK)
+ztest_alloc_LDADD += $(CLOCK_GETTIME_LINK)
 
 check_PROGRAMS += ztest
 
+ztest_alloc_SOURCES = $(ztest_SOURCES)
+ztest_alloc_CFLAGS = $(ztest_CFLAGS)
+
+check_PROGRAMS += ztest_alloc
+
 edtest_SOURCES = edtest.c edtest2_build.c testlib.c
 edtest_LDADD = libbacktrace.la
 
 check_PROGRAMS += edtest
 
+edtest_alloc_SOURCES = $(edtest_SOURCES)
+edtest_alloc_LDADD = libbacktrace_alloc.la
+
+check_PROGRAMS += edtest_alloc
+
 edtest2_build.c: gen_edtest2_build; @true
 gen_edtest2_build: $(srcdir)/edtest2.c
 	cat $(srcdir)/edtest2.c > tmp-edtest2_build.c
@@ -135,6 +171,12 @@ ttest_SOURCES = ttest.c testlib.c
 ttest_CFLAGS = $(AM_CFLAGS) -pthread
 ttest_LDADD = libbacktrace.la
 
+check_PROGRAMS += ttest_alloc
+
+ttest_alloc_SOURCES = $(ttest_SOURCES)
+ttest_alloc_CFLAGS = $(ttest_CFLAGS)
+ttest_alloc_LDADD = libbacktrace_alloc.la
+
 endif HAVE_PTHREAD
 
 if HAVE_OBJCOPY_DEBUGLINK
@@ -161,6 +203,18 @@ ctesta_LDADD = libbacktrace.la
 
 check_PROGRAMS += ctestg ctesta
 
+ctestg_alloc_SOURCES = $(ctestg_SOURCES)
+ctestg_alloc_CFLAGS = $(ctestg_CFLAGS)
+ctestg_alloc_LDFLAGS = $(ctestg_LDFLAGS)
+ctestg_alloc_LDADD = libbacktrace_alloc.la
+
+ctesta_alloc_SOURCES = $(ctesta_SOURCES)
+ctesta_alloc_CFLAGS = $(ctesta_CFLAGS)
+ctesta_alloc_LDFLAGS = $(ctesta_LDFLAGS)
+ctesta_alloc_LDADD = libbacktrace_alloc.la
+
+check_PROGRAMS += ctestg_alloc ctesta_alloc
+
 endif
 
 endif NATIVE
diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in
index 2d62ce20b9a..119d3d2bbc1 100644
--- a/libbacktrace/Makefile.in
+++ b/libbacktrace/Makefile.in
@@ -121,11 +121,16 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
-@NATIVE_TRUE@am__append_1 = unittest btest stest ztest edtest
+@NATIVE_TRUE@am__append_1 = unittest unittest_alloc btest btest_alloc \
+@NATIVE_TRUE@	stest stest_alloc ztest ztest_alloc edtest \
+@NATIVE_TRUE@	edtest_alloc
 @HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_2 = -lz
-@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_3 = ttest
-@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_4 = dtest
-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_5 = ctestg ctesta
+@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_3 = -lz
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_4 = ttest ttest_alloc
+@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_5 = dtest
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_6 = ctestg ctesta \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg_alloc \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta_alloc
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/cet.m4 \
@@ -158,12 +163,23 @@ AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-@NATIVE_TRUE@am__EXEEXT_1 = unittest$(EXEEXT) btest$(EXEEXT) \
-@NATIVE_TRUE@	stest$(EXEEXT) ztest$(EXEEXT) edtest$(EXEEXT)
-@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = ttest$(EXEEXT)
+am__objects_1 = atomic.lo dwarf.lo fileline.lo posix.lo print.lo \
+	sort.lo state.lo
+@NATIVE_TRUE@am_libbacktrace_alloc_la_OBJECTS = $(am__objects_1)
+libbacktrace_alloc_la_OBJECTS = $(am_libbacktrace_alloc_la_OBJECTS)
+@NATIVE_TRUE@am_libbacktrace_alloc_la_rpath =
+@NATIVE_TRUE@am__EXEEXT_1 = unittest$(EXEEXT) unittest_alloc$(EXEEXT) \
+@NATIVE_TRUE@	btest$(EXEEXT) btest_alloc$(EXEEXT) \
+@NATIVE_TRUE@	stest$(EXEEXT) stest_alloc$(EXEEXT) \
+@NATIVE_TRUE@	ztest$(EXEEXT) ztest_alloc$(EXEEXT) \
+@NATIVE_TRUE@	edtest$(EXEEXT) edtest_alloc$(EXEEXT)
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = ttest$(EXEEXT) \
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest_alloc$(EXEEXT)
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__EXEEXT_3 =  \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg$(EXEEXT) \
-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta$(EXEEXT)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta$(EXEEXT) \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg_alloc$(EXEEXT) \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta_alloc$(EXEEXT)
 @NATIVE_TRUE@am_btest_OBJECTS = btest-btest.$(OBJEXT) \
 @NATIVE_TRUE@	btest-testlib.$(OBJEXT)
 btest_OBJECTS = $(am_btest_OBJECTS)
@@ -171,6 +187,14 @@ btest_OBJECTS = $(am_btest_OBJECTS)
 btest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(btest_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+@NATIVE_TRUE@am__objects_2 = btest_alloc-btest.$(OBJEXT) \
+@NATIVE_TRUE@	btest_alloc-testlib.$(OBJEXT)
+@NATIVE_TRUE@am_btest_alloc_OBJECTS = $(am__objects_2)
+btest_alloc_OBJECTS = $(am_btest_alloc_OBJECTS)
+@NATIVE_TRUE@btest_alloc_DEPENDENCIES = libbacktrace_alloc.la
+btest_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(btest_alloc_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctesta_OBJECTS = ctesta-btest.$(OBJEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta-testlib.$(OBJEXT)
 ctesta_OBJECTS = $(am_ctesta_OBJECTS)
@@ -179,6 +203,15 @@ ctesta_OBJECTS = $(am_ctesta_OBJECTS)
 ctesta_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctesta_CFLAGS) $(CFLAGS) \
 	$(ctesta_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__objects_3 = ctesta_alloc-btest.$(OBJEXT) \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta_alloc-testlib.$(OBJEXT)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctesta_alloc_OBJECTS =  \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	$(am__objects_3)
+ctesta_alloc_OBJECTS = $(am_ctesta_alloc_OBJECTS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_alloc_DEPENDENCIES = libbacktrace_alloc.la
+ctesta_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctesta_alloc_CFLAGS) \
+	$(CFLAGS) $(ctesta_alloc_LDFLAGS) $(LDFLAGS) -o $@
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctestg_OBJECTS = ctestg-btest.$(OBJEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg-testlib.$(OBJEXT)
 ctestg_OBJECTS = $(am_ctestg_OBJECTS)
@@ -187,13 +220,31 @@ ctestg_OBJECTS = $(am_ctestg_OBJECTS)
 ctestg_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctestg_CFLAGS) $(CFLAGS) \
 	$(ctestg_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__objects_4 = ctestg_alloc-btest.$(OBJEXT) \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg_alloc-testlib.$(OBJEXT)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctestg_alloc_OBJECTS =  \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	$(am__objects_4)
+ctestg_alloc_OBJECTS = $(am_ctestg_alloc_OBJECTS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_alloc_DEPENDENCIES = libbacktrace_alloc.la
+ctestg_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctestg_alloc_CFLAGS) \
+	$(CFLAGS) $(ctestg_alloc_LDFLAGS) $(LDFLAGS) -o $@
 @NATIVE_TRUE@am_edtest_OBJECTS = edtest.$(OBJEXT) \
 @NATIVE_TRUE@	edtest2_build.$(OBJEXT) testlib.$(OBJEXT)
 edtest_OBJECTS = $(am_edtest_OBJECTS)
 @NATIVE_TRUE@edtest_DEPENDENCIES = libbacktrace.la
+@NATIVE_TRUE@am__objects_5 = edtest.$(OBJEXT) edtest2_build.$(OBJEXT) \
+@NATIVE_TRUE@	testlib.$(OBJEXT)
+@NATIVE_TRUE@am_edtest_alloc_OBJECTS = $(am__objects_5)
+edtest_alloc_OBJECTS = $(am_edtest_alloc_OBJECTS)
+@NATIVE_TRUE@edtest_alloc_DEPENDENCIES = libbacktrace_alloc.la
 @NATIVE_TRUE@am_stest_OBJECTS = stest.$(OBJEXT)
 stest_OBJECTS = $(am_stest_OBJECTS)
 @NATIVE_TRUE@stest_DEPENDENCIES = libbacktrace.la
+@NATIVE_TRUE@am__objects_6 = stest.$(OBJEXT)
+@NATIVE_TRUE@am_stest_alloc_OBJECTS = $(am__objects_6)
+stest_alloc_OBJECTS = $(am_stest_alloc_OBJECTS)
+@NATIVE_TRUE@stest_alloc_DEPENDENCIES = libbacktrace_alloc.la
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am_ttest_OBJECTS =  \
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest-ttest.$(OBJEXT) \
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest-testlib.$(OBJEXT)
@@ -202,10 +253,25 @@ ttest_OBJECTS = $(am_ttest_OBJECTS)
 ttest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ttest_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__objects_7 =  \
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest_alloc-ttest.$(OBJEXT) \
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest_alloc-testlib.$(OBJEXT)
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am_ttest_alloc_OBJECTS =  \
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	$(am__objects_7)
+ttest_alloc_OBJECTS = $(am_ttest_alloc_OBJECTS)
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_alloc_DEPENDENCIES =  \
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	libbacktrace_alloc.la
+ttest_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ttest_alloc_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 @NATIVE_TRUE@am_unittest_OBJECTS = unittest.$(OBJEXT) \
 @NATIVE_TRUE@	testlib.$(OBJEXT)
 unittest_OBJECTS = $(am_unittest_OBJECTS)
 @NATIVE_TRUE@unittest_DEPENDENCIES = libbacktrace.la
+@NATIVE_TRUE@am__objects_8 = unittest.$(OBJEXT) testlib.$(OBJEXT)
+@NATIVE_TRUE@am_unittest_alloc_OBJECTS = $(am__objects_8)
+unittest_alloc_OBJECTS = $(am_unittest_alloc_OBJECTS)
+@NATIVE_TRUE@unittest_alloc_DEPENDENCIES = libbacktrace_alloc.la
 @NATIVE_TRUE@am_ztest_OBJECTS = ztest-ztest.$(OBJEXT) \
 @NATIVE_TRUE@	ztest-testlib.$(OBJEXT)
 ztest_OBJECTS = $(am_ztest_OBJECTS)
@@ -214,6 +280,15 @@ ztest_OBJECTS = $(am_ztest_OBJECTS)
 ztest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ztest_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+@NATIVE_TRUE@am__objects_9 = ztest_alloc-ztest.$(OBJEXT) \
+@NATIVE_TRUE@	ztest_alloc-testlib.$(OBJEXT)
+@NATIVE_TRUE@am_ztest_alloc_OBJECTS = $(am__objects_9)
+ztest_alloc_OBJECTS = $(am_ztest_alloc_OBJECTS)
+@NATIVE_TRUE@ztest_alloc_DEPENDENCIES = libbacktrace_alloc.la \
+@NATIVE_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ztest_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ztest_alloc_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -248,9 +323,14 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
 SOURCES = $(libbacktrace_la_SOURCES) $(EXTRA_libbacktrace_la_SOURCES) \
-	$(btest_SOURCES) $(ctesta_SOURCES) $(ctestg_SOURCES) \
-	$(edtest_SOURCES) $(stest_SOURCES) $(ttest_SOURCES) \
-	$(unittest_SOURCES) $(ztest_SOURCES)
+	$(libbacktrace_alloc_la_SOURCES) $(btest_SOURCES) \
+	$(btest_alloc_SOURCES) $(ctesta_SOURCES) \
+	$(ctesta_alloc_SOURCES) $(ctestg_SOURCES) \
+	$(ctestg_alloc_SOURCES) $(edtest_SOURCES) \
+	$(edtest_alloc_SOURCES) $(stest_SOURCES) \
+	$(stest_alloc_SOURCES) $(ttest_SOURCES) $(ttest_alloc_SOURCES) \
+	$(unittest_SOURCES) $(unittest_alloc_SOURCES) $(ztest_SOURCES) \
+	$(ztest_alloc_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -658,23 +738,43 @@ libbacktrace_la_LIBADD = \
 	$(ALLOC_FILE)
 
 libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)
-TESTS = $(check_PROGRAMS) $(am__append_4)
+TESTS = $(check_PROGRAMS) $(am__append_5)
+@NATIVE_TRUE@check_LTLIBRARIES = libbacktrace_alloc.la
+@NATIVE_TRUE@libbacktrace_alloc_la_SOURCES = $(libbacktrace_la_SOURCES)
+@NATIVE_TRUE@libbacktrace_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) read.lo alloc.lo
+@NATIVE_TRUE@libbacktrace_alloc_la_DEPENDENCIES = $(libbacktrace_alloc_la_LIBADD)
 @NATIVE_TRUE@unittest_SOURCES = unittest.c testlib.c
 @NATIVE_TRUE@unittest_LDADD = libbacktrace.la
+@NATIVE_TRUE@unittest_alloc_SOURCES = $(unittest_SOURCES)
+@NATIVE_TRUE@unittest_alloc_LDADD = libbacktrace_alloc.la
 @NATIVE_TRUE@btest_SOURCES = btest.c testlib.c
 @NATIVE_TRUE@btest_CFLAGS = $(AM_CFLAGS) -g -O
 @NATIVE_TRUE@btest_LDADD = libbacktrace.la
+@NATIVE_TRUE@btest_alloc_SOURCES = $(btest_SOURCES)
+@NATIVE_TRUE@btest_alloc_CFLAGS = $(btest_CFLAGS)
+@NATIVE_TRUE@btest_alloc_LDADD = libbacktrace_alloc.la
 @NATIVE_TRUE@stest_SOURCES = stest.c
 @NATIVE_TRUE@stest_LDADD = libbacktrace.la
+@NATIVE_TRUE@stest_alloc_SOURCES = $(stest_SOURCES)
+@NATIVE_TRUE@stest_alloc_LDADD = libbacktrace_alloc.la
 @NATIVE_TRUE@ztest_SOURCES = ztest.c testlib.c
 @NATIVE_TRUE@ztest_CFLAGS = -DSRCDIR=\"$(srcdir)\"
 @NATIVE_TRUE@ztest_LDADD = libbacktrace.la $(am__append_2) \
 @NATIVE_TRUE@	$(CLOCK_GETTIME_LINK)
+@NATIVE_TRUE@ztest_alloc_LDADD = libbacktrace_alloc.la $(am__append_3) \
+@NATIVE_TRUE@	$(CLOCK_GETTIME_LINK)
+@NATIVE_TRUE@ztest_alloc_SOURCES = $(ztest_SOURCES)
+@NATIVE_TRUE@ztest_alloc_CFLAGS = $(ztest_CFLAGS)
 @NATIVE_TRUE@edtest_SOURCES = edtest.c edtest2_build.c testlib.c
 @NATIVE_TRUE@edtest_LDADD = libbacktrace.la
+@NATIVE_TRUE@edtest_alloc_SOURCES = $(edtest_SOURCES)
+@NATIVE_TRUE@edtest_alloc_LDADD = libbacktrace_alloc.la
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_SOURCES = ttest.c testlib.c
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS = $(AM_CFLAGS) -pthread
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_LDADD = libbacktrace.la
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_alloc_SOURCES = $(ttest_SOURCES)
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_alloc_CFLAGS = $(ttest_CFLAGS)
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_alloc_LDADD = libbacktrace_alloc.la
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_SOURCES = btest.c testlib.c
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_CFLAGS = $(AM_CFLAGS) -g
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu
@@ -683,6 +783,14 @@ TESTS = $(check_PROGRAMS) $(am__append_4)
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_CFLAGS = $(AM_CFLAGS) -g
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDADD = libbacktrace.la
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_alloc_SOURCES = $(ctestg_SOURCES)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_alloc_CFLAGS = $(ctestg_CFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_alloc_LDFLAGS = $(ctestg_LDFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_alloc_LDADD = libbacktrace_alloc.la
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_alloc_SOURCES = $(ctesta_SOURCES)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_alloc_CFLAGS = $(ctesta_CFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_alloc_LDFLAGS = $(ctesta_LDFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_alloc_LDADD = libbacktrace_alloc.la
 
 # We can't use automake's automatic dependency tracking, because it
 # breaks when using bootstrap-lean.  Automatic dependency tracking
@@ -759,6 +867,17 @@ distclean-hdr:
 backtrace-supported.h: $(top_builddir)/config.status $(srcdir)/backtrace-supported.h.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 
+clean-checkLTLIBRARIES:
+	-test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
+	@list='$(check_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
 clean-noinstLTLIBRARIES:
 	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
 	@list='$(noinst_LTLIBRARIES)'; \
@@ -773,6 +892,9 @@ clean-noinstLTLIBRARIES:
 libbacktrace.la: $(libbacktrace_la_OBJECTS) $(libbacktrace_la_DEPENDENCIES) $(EXTRA_libbacktrace_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(LINK)  $(libbacktrace_la_OBJECTS) $(libbacktrace_la_LIBADD) $(LIBS)
 
+libbacktrace_alloc.la: $(libbacktrace_alloc_la_OBJECTS) $(libbacktrace_alloc_la_DEPENDENCIES) $(EXTRA_libbacktrace_alloc_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(LINK) $(am_libbacktrace_alloc_la_rpath) $(libbacktrace_alloc_la_OBJECTS) $(libbacktrace_alloc_la_LIBADD) $(LIBS)
+
 clean-checkPROGRAMS:
 	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
 	echo " rm -f" $$list; \
@@ -786,34 +908,66 @@ btest$(EXEEXT): $(btest_OBJECTS) $(btest_DEPENDENCIES) $(EXTRA_btest_DEPENDENCIE
 	@rm -f btest$(EXEEXT)
 	$(AM_V_CCLD)$(btest_LINK) $(btest_OBJECTS) $(btest_LDADD) $(LIBS)
 
+btest_alloc$(EXEEXT): $(btest_alloc_OBJECTS) $(btest_alloc_DEPENDENCIES) $(EXTRA_btest_alloc_DEPENDENCIES) 
+	@rm -f btest_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(btest_alloc_LINK) $(btest_alloc_OBJECTS) $(btest_alloc_LDADD) $(LIBS)
+
 ctesta$(EXEEXT): $(ctesta_OBJECTS) $(ctesta_DEPENDENCIES) $(EXTRA_ctesta_DEPENDENCIES) 
 	@rm -f ctesta$(EXEEXT)
 	$(AM_V_CCLD)$(ctesta_LINK) $(ctesta_OBJECTS) $(ctesta_LDADD) $(LIBS)
 
+ctesta_alloc$(EXEEXT): $(ctesta_alloc_OBJECTS) $(ctesta_alloc_DEPENDENCIES) $(EXTRA_ctesta_alloc_DEPENDENCIES) 
+	@rm -f ctesta_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ctesta_alloc_LINK) $(ctesta_alloc_OBJECTS) $(ctesta_alloc_LDADD) $(LIBS)
+
 ctestg$(EXEEXT): $(ctestg_OBJECTS) $(ctestg_DEPENDENCIES) $(EXTRA_ctestg_DEPENDENCIES) 
 	@rm -f ctestg$(EXEEXT)
 	$(AM_V_CCLD)$(ctestg_LINK) $(ctestg_OBJECTS) $(ctestg_LDADD) $(LIBS)
 
+ctestg_alloc$(EXEEXT): $(ctestg_alloc_OBJECTS) $(ctestg_alloc_DEPENDENCIES) $(EXTRA_ctestg_alloc_DEPENDENCIES) 
+	@rm -f ctestg_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ctestg_alloc_LINK) $(ctestg_alloc_OBJECTS) $(ctestg_alloc_LDADD) $(LIBS)
+
 edtest$(EXEEXT): $(edtest_OBJECTS) $(edtest_DEPENDENCIES) $(EXTRA_edtest_DEPENDENCIES) 
 	@rm -f edtest$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(edtest_OBJECTS) $(edtest_LDADD) $(LIBS)
 
+edtest_alloc$(EXEEXT): $(edtest_alloc_OBJECTS) $(edtest_alloc_DEPENDENCIES) $(EXTRA_edtest_alloc_DEPENDENCIES) 
+	@rm -f edtest_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(edtest_alloc_OBJECTS) $(edtest_alloc_LDADD) $(LIBS)
+
 stest$(EXEEXT): $(stest_OBJECTS) $(stest_DEPENDENCIES) $(EXTRA_stest_DEPENDENCIES) 
 	@rm -f stest$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(stest_OBJECTS) $(stest_LDADD) $(LIBS)
 
+stest_alloc$(EXEEXT): $(stest_alloc_OBJECTS) $(stest_alloc_DEPENDENCIES) $(EXTRA_stest_alloc_DEPENDENCIES) 
+	@rm -f stest_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(stest_alloc_OBJECTS) $(stest_alloc_LDADD) $(LIBS)
+
 ttest$(EXEEXT): $(ttest_OBJECTS) $(ttest_DEPENDENCIES) $(EXTRA_ttest_DEPENDENCIES) 
 	@rm -f ttest$(EXEEXT)
 	$(AM_V_CCLD)$(ttest_LINK) $(ttest_OBJECTS) $(ttest_LDADD) $(LIBS)
 
+ttest_alloc$(EXEEXT): $(ttest_alloc_OBJECTS) $(ttest_alloc_DEPENDENCIES) $(EXTRA_ttest_alloc_DEPENDENCIES) 
+	@rm -f ttest_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ttest_alloc_LINK) $(ttest_alloc_OBJECTS) $(ttest_alloc_LDADD) $(LIBS)
+
 unittest$(EXEEXT): $(unittest_OBJECTS) $(unittest_DEPENDENCIES) $(EXTRA_unittest_DEPENDENCIES) 
 	@rm -f unittest$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(unittest_OBJECTS) $(unittest_LDADD) $(LIBS)
 
+unittest_alloc$(EXEEXT): $(unittest_alloc_OBJECTS) $(unittest_alloc_DEPENDENCIES) $(EXTRA_unittest_alloc_DEPENDENCIES) 
+	@rm -f unittest_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(unittest_alloc_OBJECTS) $(unittest_alloc_LDADD) $(LIBS)
+
 ztest$(EXEEXT): $(ztest_OBJECTS) $(ztest_DEPENDENCIES) $(EXTRA_ztest_DEPENDENCIES) 
 	@rm -f ztest$(EXEEXT)
 	$(AM_V_CCLD)$(ztest_LINK) $(ztest_OBJECTS) $(ztest_LDADD) $(LIBS)
 
+ztest_alloc$(EXEEXT): $(ztest_alloc_OBJECTS) $(ztest_alloc_DEPENDENCIES) $(EXTRA_ztest_alloc_DEPENDENCIES) 
+	@rm -f ztest_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ztest_alloc_LINK) $(ztest_alloc_OBJECTS) $(ztest_alloc_LDADD) $(LIBS)
+
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 
@@ -841,6 +995,18 @@ btest-testlib.o: testlib.c
 btest-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_CFLAGS) $(CFLAGS) -c -o btest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+btest_alloc-btest.o: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_alloc_CFLAGS) $(CFLAGS) -c -o btest_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
+
+btest_alloc-btest.obj: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_alloc_CFLAGS) $(CFLAGS) -c -o btest_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`
+
+btest_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_alloc_CFLAGS) $(CFLAGS) -c -o btest_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+btest_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_alloc_CFLAGS) $(CFLAGS) -c -o btest_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ctesta-btest.o: btest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_CFLAGS) $(CFLAGS) -c -o ctesta-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
 
@@ -853,6 +1019,18 @@ ctesta-testlib.o: testlib.c
 ctesta-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_CFLAGS) $(CFLAGS) -c -o ctesta-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ctesta_alloc-btest.o: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
+
+ctesta_alloc-btest.obj: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`
+
+ctesta_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ctesta_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ctestg-btest.o: btest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_CFLAGS) $(CFLAGS) -c -o ctestg-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
 
@@ -865,6 +1043,18 @@ ctestg-testlib.o: testlib.c
 ctestg-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_CFLAGS) $(CFLAGS) -c -o ctestg-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ctestg_alloc-btest.o: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
+
+ctestg_alloc-btest.obj: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`
+
+ctestg_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ctestg_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ttest-ttest.o: ttest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_CFLAGS) $(CFLAGS) -c -o ttest-ttest.o `test -f 'ttest.c' || echo '$(srcdir)/'`ttest.c
 
@@ -877,6 +1067,18 @@ ttest-testlib.o: testlib.c
 ttest-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_CFLAGS) $(CFLAGS) -c -o ttest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ttest_alloc-ttest.o: ttest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_alloc_CFLAGS) $(CFLAGS) -c -o ttest_alloc-ttest.o `test -f 'ttest.c' || echo '$(srcdir)/'`ttest.c
+
+ttest_alloc-ttest.obj: ttest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_alloc_CFLAGS) $(CFLAGS) -c -o ttest_alloc-ttest.obj `if test -f 'ttest.c'; then $(CYGPATH_W) 'ttest.c'; else $(CYGPATH_W) '$(srcdir)/ttest.c'; fi`
+
+ttest_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_alloc_CFLAGS) $(CFLAGS) -c -o ttest_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ttest_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_alloc_CFLAGS) $(CFLAGS) -c -o ttest_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ztest-ztest.o: ztest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_CFLAGS) $(CFLAGS) -c -o ztest-ztest.o `test -f 'ztest.c' || echo '$(srcdir)/'`ztest.c
 
@@ -889,6 +1091,18 @@ ztest-testlib.o: testlib.c
 ztest-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_CFLAGS) $(CFLAGS) -c -o ztest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ztest_alloc-ztest.o: ztest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_alloc_CFLAGS) $(CFLAGS) -c -o ztest_alloc-ztest.o `test -f 'ztest.c' || echo '$(srcdir)/'`ztest.c
+
+ztest_alloc-ztest.obj: ztest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_alloc_CFLAGS) $(CFLAGS) -c -o ztest_alloc-ztest.obj `if test -f 'ztest.c'; then $(CYGPATH_W) 'ztest.c'; else $(CYGPATH_W) '$(srcdir)/ztest.c'; fi`
+
+ztest_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_alloc_CFLAGS) $(CFLAGS) -c -o ztest_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ztest_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_alloc_CFLAGS) $(CFLAGS) -c -o ztest_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -1087,7 +1301,7 @@ check-TESTS:
 	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
 	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
 	exit $$?;
-recheck: all $(check_PROGRAMS)
+recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS)
 	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 	@set +e; $(am__set_TESTS_bases); \
 	bases=`for i in $$bases; do echo $$i; done \
@@ -1105,6 +1319,13 @@ unittest.log: unittest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+unittest_alloc.log: unittest_alloc$(EXEEXT)
+	@p='unittest_alloc$(EXEEXT)'; \
+	b='unittest_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 btest.log: btest$(EXEEXT)
 	@p='btest$(EXEEXT)'; \
 	b='btest'; \
@@ -1112,6 +1333,13 @@ btest.log: btest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+btest_alloc.log: btest_alloc$(EXEEXT)
+	@p='btest_alloc$(EXEEXT)'; \
+	b='btest_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 stest.log: stest$(EXEEXT)
 	@p='stest$(EXEEXT)'; \
 	b='stest'; \
@@ -1119,6 +1347,13 @@ stest.log: stest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+stest_alloc.log: stest_alloc$(EXEEXT)
+	@p='stest_alloc$(EXEEXT)'; \
+	b='stest_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 ztest.log: ztest$(EXEEXT)
 	@p='ztest$(EXEEXT)'; \
 	b='ztest'; \
@@ -1126,6 +1361,13 @@ ztest.log: ztest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ztest_alloc.log: ztest_alloc$(EXEEXT)
+	@p='ztest_alloc$(EXEEXT)'; \
+	b='ztest_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 edtest.log: edtest$(EXEEXT)
 	@p='edtest$(EXEEXT)'; \
 	b='edtest'; \
@@ -1133,6 +1375,13 @@ edtest.log: edtest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+edtest_alloc.log: edtest_alloc$(EXEEXT)
+	@p='edtest_alloc$(EXEEXT)'; \
+	b='edtest_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 ttest.log: ttest$(EXEEXT)
 	@p='ttest$(EXEEXT)'; \
 	b='ttest'; \
@@ -1140,6 +1389,13 @@ ttest.log: ttest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ttest_alloc.log: ttest_alloc$(EXEEXT)
+	@p='ttest_alloc$(EXEEXT)'; \
+	b='ttest_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 ctestg.log: ctestg$(EXEEXT)
 	@p='ctestg$(EXEEXT)'; \
 	b='ctestg'; \
@@ -1154,6 +1410,20 @@ ctesta.log: ctesta$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ctestg_alloc.log: ctestg_alloc$(EXEEXT)
+	@p='ctestg_alloc$(EXEEXT)'; \
+	b='ctestg_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ctesta_alloc.log: ctesta_alloc$(EXEEXT)
+	@p='ctesta_alloc$(EXEEXT)'; \
+	b='ctesta_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 dtest.log: dtest
 	@p='dtest'; \
 	b='dtest'; \
@@ -1176,7 +1446,7 @@ dtest.log: dtest
 @am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
 @am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
 check-am: all-am
-	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
 	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: check-am
 all-am: Makefile $(LTLIBRARIES) config.h all-local
@@ -1216,8 +1486,9 @@ maintainer-clean-generic:
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
-	clean-noinstLTLIBRARIES mostlyclean-am
+clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
+	clean-libtool clean-local clean-noinstLTLIBRARIES \
+	mostlyclean-am
 
 distclean: distclean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -1290,14 +1561,14 @@ uninstall-am:
 .MAKE: all check-am install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am all-local am--refresh check \
-	check-TESTS check-am clean clean-checkPROGRAMS clean-cscope \
-	clean-generic clean-libtool clean-local \
-	clean-noinstLTLIBRARIES cscope cscopelist-am ctags ctags-am \
-	distclean distclean-compile distclean-generic distclean-hdr \
-	distclean-libtool distclean-local distclean-tags dvi dvi-am \
-	html html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-exec-local install-html \
+	check-TESTS check-am clean clean-checkLTLIBRARIES \
+	clean-checkPROGRAMS clean-cscope clean-generic clean-libtool \
+	clean-local clean-noinstLTLIBRARIES cscope cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-local distclean-tags \
+	dvi dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-exec-local install-html \
 	install-html-am install-info install-info-am install-man \
 	install-pdf install-pdf-am install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
y2s1982 via Gcc-patches Nov. 30, 2018, 2:45 p.m. | #4
>> As far as I know libbacktrace does not currently rely on using GNU

>> make.  I'd rather not add that dependency for this purpose (I don't

>> mind adding this kind of testing but to me this seems only of mild

>> interest--I expect that all significant libbacktrace users have mmap).

>> You should be able to write something like

>>

>> libbacktrace_alloc_la_SOURCES = $(libbacktrace_SOURCES)

>> libbacktrace_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) read.c alloc.c

>>

>

> Done.

>

>> Then I wouldn't bother with only running the tests with HAVE_MMAP,

>> just add unconditional tests for btest_alloc, etc.  It's OK to run

>> duplicate tests for the incredibly rare case of a host that doesn't

>> support mmap.

>

> Done.

>

> OK for trunk?


This is OK.  (I assume the tests pass).

Thanks.

Ian

Patch

diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am
index 3c1bd49dd7b..ee47daee415 100644
--- a/libbacktrace/Makefile.am
+++ b/libbacktrace/Makefile.am
@@ -95,11 +95,25 @@  btest_CFLAGS = $(AM_CFLAGS) -g -O
 btest_LDADD = libbacktrace.la
 
 check_PROGRAMS += btest
+if HAVE_MMAP
+libbacktrace_with_alloc = $(libbacktrace_la_OBJECTS) \
+	$(filter-out mmap.lo mmapio.lo,$(libbacktrace_la_LIBADD)) \
+	alloc.lo read.lo
+btest_with_alloc_SOURCES = $(btest_SOURCES)
+btest_with_alloc_CFLAGS = $(btest_CFLAGS)
+btest_with_alloc_LDADD = $(libbacktrace_with_alloc)
+check_PROGRAMS += btest_with_alloc
+endif
 
 stest_SOURCES = stest.c
 stest_LDADD = libbacktrace.la
 
 check_PROGRAMS += stest
+if HAVE_MMAP
+stest_with_alloc_SOURCES = $(stest_SOURCES)
+stest_with_alloc_LDADD = $(libbacktrace_with_alloc)
+check_PROGRAMS += stest_with_alloc
+endif
 
 ztest_SOURCES = ztest.c testlib.c
 ztest_CFLAGS = -DSRCDIR=\"$(srcdir)\"
@@ -111,11 +125,23 @@  endif
 ztest_LDADD += $(CLOCK_GETTIME_LINK)
 
 check_PROGRAMS += ztest
+if HAVE_MMAP
+ztest_with_alloc_SOURCES = $(ztest_SOURCES)
+ztest_with_alloc_CFLAGS = $(ztest_CFLAGS)
+ztest_with_alloc_LDADD = $(libbacktrace_with_alloc) \
+	$(filter-out libbacktrace.la, $(ztest_LDADD))
+check_PROGRAMS += ztest_with_alloc
+endif
 
 edtest_SOURCES = edtest.c edtest2_build.c testlib.c
 edtest_LDADD = libbacktrace.la
 
 check_PROGRAMS += edtest
+if HAVE_MMAP
+edtest_with_alloc_SOURCES = $(edtest_SOURCES)
+edtest_with_alloc_LDADD = $(libbacktrace_with_alloc)
+check_PROGRAMS += edtest_with_alloc
+endif
 
 edtest2_build.c: gen_edtest2_build; @true
 gen_edtest2_build: $(srcdir)/edtest2.c
@@ -126,6 +152,12 @@  gen_edtest2_build: $(srcdir)/edtest2.c
 if HAVE_PTHREAD
 
 check_PROGRAMS += ttest
+if HAVE_MMAP
+ttest_with_alloc_SOURCES = $(ttest_SOURCES)
+ttest_with_alloc_CFLAGS = $(ttest_CFLAGS)
+ttest_with_alloc_LDADD = $(libbacktrace_with_alloc)
+check_PROGRAMS += ttest_with_alloc
+endif
 
 ttest_SOURCES = ttest.c testlib.c
 ttest_CFLAGS = $(AM_CFLAGS) -pthread
@@ -156,6 +188,19 @@  ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi
 ctesta_LDADD = libbacktrace.la
 
 check_PROGRAMS += ctestg ctesta
+if HAVE_MMAP
+ctestg_with_alloc_SOURCES = $(ctestg_SOURCES)
+ctestg_with_alloc_CFLAGS = $(ctestg_CFLAGS)
+ctestg_with_alloc_LDFLAGS = $(ctestg_LDFLAGS)
+ctestg_with_alloc_LDADD = $(libbacktrace_with_alloc)
+
+ctesta_with_alloc_SOURCES = $(ctesta_SOURCES)
+ctesta_with_alloc_CFLAGS = $(ctesta_CFLAGS)
+ctesta_with_alloc_LDFLAGS = $(ctesta_LDFLAGS)
+ctesta_with_alloc_LDADD = $(libbacktrace_with_alloc)
+
+check_PROGRAMS += ctestg_with_alloc ctesta_with_alloc
+endif
 
 endif
 
diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in
index 60a9d887dba..2b984bc127e 100644
--- a/libbacktrace/Makefile.in
+++ b/libbacktrace/Makefile.in
@@ -120,12 +120,24 @@  POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
-@NATIVE_TRUE@am__append_1 = btest stest ztest edtest
-@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_2 = -lz
-@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_3 = ttest
-@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_4 = dtest
-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_5 = ctestg ctesta
+check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+	$(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \
+	$(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9) \
+	$(am__EXEEXT_10) $(am__EXEEXT_11) $(am__EXEEXT_12)
+@NATIVE_TRUE@am__append_1 = btest
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_2 = btest_with_alloc
+@NATIVE_TRUE@am__append_3 = stest
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_4 = stest_with_alloc
+@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_5 = -lz
+@NATIVE_TRUE@am__append_6 = ztest
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_7 = ztest_with_alloc
+@NATIVE_TRUE@am__append_8 = edtest
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_9 = edtest_with_alloc
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_10 = ttest
+@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_11 = ttest_with_alloc
+@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_12 = dtest
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_13 = ctestg ctesta
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__append_14 = ctestg_with_alloc ctesta_with_alloc
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/cet.m4 \
@@ -158,12 +170,22 @@  AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-@NATIVE_TRUE@am__EXEEXT_1 = btest$(EXEEXT) stest$(EXEEXT) \
-@NATIVE_TRUE@	ztest$(EXEEXT) edtest$(EXEEXT)
-@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = ttest$(EXEEXT)
-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__EXEEXT_3 =  \
+@NATIVE_TRUE@am__EXEEXT_1 = btest$(EXEEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = btest_with_alloc$(EXEEXT)
+@NATIVE_TRUE@am__EXEEXT_3 = stest$(EXEEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_4 = stest_with_alloc$(EXEEXT)
+@NATIVE_TRUE@am__EXEEXT_5 = ztest$(EXEEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_6 = ztest_with_alloc$(EXEEXT)
+@NATIVE_TRUE@am__EXEEXT_7 = edtest$(EXEEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_8 =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	edtest_with_alloc$(EXEEXT)
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_9 = ttest$(EXEEXT)
+@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_10 = ttest_with_alloc$(EXEEXT)
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__EXEEXT_11 =  \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg$(EXEEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta$(EXEEXT)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am__EXEEXT_12 = ctestg_with_alloc$(EXEEXT) \
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@	ctesta_with_alloc$(EXEEXT)
 @NATIVE_TRUE@am_btest_OBJECTS = btest-btest.$(OBJEXT) \
 @NATIVE_TRUE@	btest-testlib.$(OBJEXT)
 btest_OBJECTS = $(am_btest_OBJECTS)
@@ -171,6 +193,17 @@  btest_OBJECTS = $(am_btest_OBJECTS)
 btest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(btest_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+@NATIVE_TRUE@am__objects_1 = btest_with_alloc-btest.$(OBJEXT) \
+@NATIVE_TRUE@	btest_with_alloc-testlib.$(OBJEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_btest_with_alloc_OBJECTS =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_1)
+btest_with_alloc_OBJECTS = $(am_btest_with_alloc_OBJECTS)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_DEPENDENCIES =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc)
+btest_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(btest_with_alloc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctesta_OBJECTS = ctesta-btest.$(OBJEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta-testlib.$(OBJEXT)
 ctesta_OBJECTS = $(am_ctesta_OBJECTS)
@@ -179,6 +212,15 @@  ctesta_OBJECTS = $(am_ctesta_OBJECTS)
 ctesta_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctesta_CFLAGS) $(CFLAGS) \
 	$(ctesta_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__objects_2 = ctesta_with_alloc-btest.$(OBJEXT) \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctesta_with_alloc-testlib.$(OBJEXT)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_ctesta_with_alloc_OBJECTS = $(am__objects_2)
+ctesta_with_alloc_OBJECTS = $(am_ctesta_with_alloc_OBJECTS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_DEPENDENCIES = $(libbacktrace_with_alloc)
+ctesta_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ctesta_with_alloc_CFLAGS) $(CFLAGS) \
+	$(ctesta_with_alloc_LDFLAGS) $(LDFLAGS) -o $@
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctestg_OBJECTS = ctestg-btest.$(OBJEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg-testlib.$(OBJEXT)
 ctestg_OBJECTS = $(am_ctestg_OBJECTS)
@@ -187,13 +229,35 @@  ctestg_OBJECTS = $(am_ctestg_OBJECTS)
 ctestg_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ctestg_CFLAGS) $(CFLAGS) \
 	$(ctestg_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__objects_3 = ctestg_with_alloc-btest.$(OBJEXT) \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@	ctestg_with_alloc-testlib.$(OBJEXT)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_ctestg_with_alloc_OBJECTS = $(am__objects_3)
+ctestg_with_alloc_OBJECTS = $(am_ctestg_with_alloc_OBJECTS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_DEPENDENCIES = $(libbacktrace_with_alloc)
+ctestg_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ctestg_with_alloc_CFLAGS) $(CFLAGS) \
+	$(ctestg_with_alloc_LDFLAGS) $(LDFLAGS) -o $@
 @NATIVE_TRUE@am_edtest_OBJECTS = edtest.$(OBJEXT) \
 @NATIVE_TRUE@	edtest2_build.$(OBJEXT) testlib.$(OBJEXT)
 edtest_OBJECTS = $(am_edtest_OBJECTS)
 @NATIVE_TRUE@edtest_DEPENDENCIES = libbacktrace.la
+@NATIVE_TRUE@am__objects_4 = edtest.$(OBJEXT) edtest2_build.$(OBJEXT) \
+@NATIVE_TRUE@	testlib.$(OBJEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_edtest_with_alloc_OBJECTS =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_4)
+edtest_with_alloc_OBJECTS = $(am_edtest_with_alloc_OBJECTS)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@edtest_with_alloc_DEPENDENCIES =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc)
 @NATIVE_TRUE@am_stest_OBJECTS = stest.$(OBJEXT)
 stest_OBJECTS = $(am_stest_OBJECTS)
 @NATIVE_TRUE@stest_DEPENDENCIES = libbacktrace.la
+@NATIVE_TRUE@am__objects_5 = stest.$(OBJEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_stest_with_alloc_OBJECTS =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_5)
+stest_with_alloc_OBJECTS = $(am_stest_with_alloc_OBJECTS)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@stest_with_alloc_DEPENDENCIES =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc)
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am_ttest_OBJECTS =  \
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest-ttest.$(OBJEXT) \
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest-testlib.$(OBJEXT)
@@ -202,6 +266,15 @@  ttest_OBJECTS = $(am_ttest_OBJECTS)
 ttest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ttest_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__objects_6 = ttest_with_alloc-ttest.$(OBJEXT) \
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@	ttest_with_alloc-testlib.$(OBJEXT)
+@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am_ttest_with_alloc_OBJECTS = $(am__objects_6)
+ttest_with_alloc_OBJECTS = $(am_ttest_with_alloc_OBJECTS)
+@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_DEPENDENCIES = $(libbacktrace_with_alloc)
+ttest_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ttest_with_alloc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
 @NATIVE_TRUE@am_ztest_OBJECTS = ztest-ztest.$(OBJEXT) \
 @NATIVE_TRUE@	ztest-testlib.$(OBJEXT)
 ztest_OBJECTS = $(am_ztest_OBJECTS)
@@ -210,6 +283,19 @@  ztest_OBJECTS = $(am_ztest_OBJECTS)
 ztest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ztest_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+@NATIVE_TRUE@am__objects_7 = ztest_with_alloc-ztest.$(OBJEXT) \
+@NATIVE_TRUE@	ztest_with_alloc-testlib.$(OBJEXT)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@am_ztest_with_alloc_OBJECTS =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(am__objects_7)
+ztest_with_alloc_OBJECTS = $(am_ztest_with_alloc_OBJECTS)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_DEPENDENCIES =  \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(libbacktrace_with_alloc) \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(filter-out libbacktrace.la, \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(ztest_LDADD))
+ztest_with_alloc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ztest_with_alloc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -244,9 +330,13 @@  am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
 SOURCES = $(libbacktrace_la_SOURCES) $(EXTRA_libbacktrace_la_SOURCES) \
-	$(btest_SOURCES) $(ctesta_SOURCES) $(ctestg_SOURCES) \
-	$(edtest_SOURCES) $(stest_SOURCES) $(ttest_SOURCES) \
-	$(ztest_SOURCES)
+	$(btest_SOURCES) $(btest_with_alloc_SOURCES) $(ctesta_SOURCES) \
+	$(ctesta_with_alloc_SOURCES) $(ctestg_SOURCES) \
+	$(ctestg_with_alloc_SOURCES) $(edtest_SOURCES) \
+	$(edtest_with_alloc_SOURCES) $(stest_SOURCES) \
+	$(stest_with_alloc_SOURCES) $(ttest_SOURCES) \
+	$(ttest_with_alloc_SOURCES) $(ztest_SOURCES) \
+	$(ztest_with_alloc_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -654,18 +744,37 @@  libbacktrace_la_LIBADD = \
 	$(ALLOC_FILE)
 
 libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)
-TESTS = $(check_PROGRAMS) $(am__append_4)
+TESTS = $(check_PROGRAMS) $(am__append_12)
 @NATIVE_TRUE@btest_SOURCES = btest.c testlib.c
 @NATIVE_TRUE@btest_CFLAGS = $(AM_CFLAGS) -g -O
 @NATIVE_TRUE@btest_LDADD = libbacktrace.la
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@libbacktrace_with_alloc = $(libbacktrace_la_OBJECTS) \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(filter-out mmap.lo mmapio.lo,$(libbacktrace_la_LIBADD)) \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	alloc.lo read.lo
+
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_SOURCES = $(btest_SOURCES)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_CFLAGS = $(btest_CFLAGS)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@btest_with_alloc_LDADD = $(libbacktrace_with_alloc)
 @NATIVE_TRUE@stest_SOURCES = stest.c
 @NATIVE_TRUE@stest_LDADD = libbacktrace.la
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@stest_with_alloc_SOURCES = $(stest_SOURCES)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@stest_with_alloc_LDADD = $(libbacktrace_with_alloc)
 @NATIVE_TRUE@ztest_SOURCES = ztest.c testlib.c
 @NATIVE_TRUE@ztest_CFLAGS = -DSRCDIR=\"$(srcdir)\"
-@NATIVE_TRUE@ztest_LDADD = libbacktrace.la $(am__append_2) \
+@NATIVE_TRUE@ztest_LDADD = libbacktrace.la $(am__append_5) \
 @NATIVE_TRUE@	$(CLOCK_GETTIME_LINK)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_SOURCES = $(ztest_SOURCES)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_CFLAGS = $(ztest_CFLAGS)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@ztest_with_alloc_LDADD = $(libbacktrace_with_alloc) \
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@	$(filter-out libbacktrace.la, $(ztest_LDADD))
+
 @NATIVE_TRUE@edtest_SOURCES = edtest.c edtest2_build.c testlib.c
 @NATIVE_TRUE@edtest_LDADD = libbacktrace.la
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@edtest_with_alloc_SOURCES = $(edtest_SOURCES)
+@HAVE_MMAP_TRUE@@NATIVE_TRUE@edtest_with_alloc_LDADD = $(libbacktrace_with_alloc)
+@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_SOURCES = $(ttest_SOURCES)
+@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_CFLAGS = $(ttest_CFLAGS)
+@HAVE_MMAP_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_with_alloc_LDADD = $(libbacktrace_with_alloc)
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_SOURCES = ttest.c testlib.c
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS = $(AM_CFLAGS) -pthread
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_LDADD = libbacktrace.la
@@ -677,6 +786,14 @@  TESTS = $(check_PROGRAMS) $(am__append_4)
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_CFLAGS = $(AM_CFLAGS) -g
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDADD = libbacktrace.la
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_SOURCES = $(ctestg_SOURCES)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_CFLAGS = $(ctestg_CFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_LDFLAGS = $(ctestg_LDFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctestg_with_alloc_LDADD = $(libbacktrace_with_alloc)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_SOURCES = $(ctesta_SOURCES)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_CFLAGS = $(ctesta_CFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_LDFLAGS = $(ctesta_LDFLAGS)
+@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_MMAP_TRUE@@NATIVE_TRUE@ctesta_with_alloc_LDADD = $(libbacktrace_with_alloc)
 
 # We can't use automake's automatic dependency tracking, because it
 # breaks when using bootstrap-lean.  Automatic dependency tracking
@@ -780,30 +897,58 @@  btest$(EXEEXT): $(btest_OBJECTS) $(btest_DEPENDENCIES) $(EXTRA_btest_DEPENDENCIE
 	@rm -f btest$(EXEEXT)
 	$(AM_V_CCLD)$(btest_LINK) $(btest_OBJECTS) $(btest_LDADD) $(LIBS)
 
+btest_with_alloc$(EXEEXT): $(btest_with_alloc_OBJECTS) $(btest_with_alloc_DEPENDENCIES) $(EXTRA_btest_with_alloc_DEPENDENCIES) 
+	@rm -f btest_with_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(btest_with_alloc_LINK) $(btest_with_alloc_OBJECTS) $(btest_with_alloc_LDADD) $(LIBS)
+
 ctesta$(EXEEXT): $(ctesta_OBJECTS) $(ctesta_DEPENDENCIES) $(EXTRA_ctesta_DEPENDENCIES) 
 	@rm -f ctesta$(EXEEXT)
 	$(AM_V_CCLD)$(ctesta_LINK) $(ctesta_OBJECTS) $(ctesta_LDADD) $(LIBS)
 
+ctesta_with_alloc$(EXEEXT): $(ctesta_with_alloc_OBJECTS) $(ctesta_with_alloc_DEPENDENCIES) $(EXTRA_ctesta_with_alloc_DEPENDENCIES) 
+	@rm -f ctesta_with_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ctesta_with_alloc_LINK) $(ctesta_with_alloc_OBJECTS) $(ctesta_with_alloc_LDADD) $(LIBS)
+
 ctestg$(EXEEXT): $(ctestg_OBJECTS) $(ctestg_DEPENDENCIES) $(EXTRA_ctestg_DEPENDENCIES) 
 	@rm -f ctestg$(EXEEXT)
 	$(AM_V_CCLD)$(ctestg_LINK) $(ctestg_OBJECTS) $(ctestg_LDADD) $(LIBS)
 
+ctestg_with_alloc$(EXEEXT): $(ctestg_with_alloc_OBJECTS) $(ctestg_with_alloc_DEPENDENCIES) $(EXTRA_ctestg_with_alloc_DEPENDENCIES) 
+	@rm -f ctestg_with_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ctestg_with_alloc_LINK) $(ctestg_with_alloc_OBJECTS) $(ctestg_with_alloc_LDADD) $(LIBS)
+
 edtest$(EXEEXT): $(edtest_OBJECTS) $(edtest_DEPENDENCIES) $(EXTRA_edtest_DEPENDENCIES) 
 	@rm -f edtest$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(edtest_OBJECTS) $(edtest_LDADD) $(LIBS)
 
+edtest_with_alloc$(EXEEXT): $(edtest_with_alloc_OBJECTS) $(edtest_with_alloc_DEPENDENCIES) $(EXTRA_edtest_with_alloc_DEPENDENCIES) 
+	@rm -f edtest_with_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(edtest_with_alloc_OBJECTS) $(edtest_with_alloc_LDADD) $(LIBS)
+
 stest$(EXEEXT): $(stest_OBJECTS) $(stest_DEPENDENCIES) $(EXTRA_stest_DEPENDENCIES) 
 	@rm -f stest$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(stest_OBJECTS) $(stest_LDADD) $(LIBS)
 
+stest_with_alloc$(EXEEXT): $(stest_with_alloc_OBJECTS) $(stest_with_alloc_DEPENDENCIES) $(EXTRA_stest_with_alloc_DEPENDENCIES) 
+	@rm -f stest_with_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(stest_with_alloc_OBJECTS) $(stest_with_alloc_LDADD) $(LIBS)
+
 ttest$(EXEEXT): $(ttest_OBJECTS) $(ttest_DEPENDENCIES) $(EXTRA_ttest_DEPENDENCIES) 
 	@rm -f ttest$(EXEEXT)
 	$(AM_V_CCLD)$(ttest_LINK) $(ttest_OBJECTS) $(ttest_LDADD) $(LIBS)
 
+ttest_with_alloc$(EXEEXT): $(ttest_with_alloc_OBJECTS) $(ttest_with_alloc_DEPENDENCIES) $(EXTRA_ttest_with_alloc_DEPENDENCIES) 
+	@rm -f ttest_with_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ttest_with_alloc_LINK) $(ttest_with_alloc_OBJECTS) $(ttest_with_alloc_LDADD) $(LIBS)
+
 ztest$(EXEEXT): $(ztest_OBJECTS) $(ztest_DEPENDENCIES) $(EXTRA_ztest_DEPENDENCIES) 
 	@rm -f ztest$(EXEEXT)
 	$(AM_V_CCLD)$(ztest_LINK) $(ztest_OBJECTS) $(ztest_LDADD) $(LIBS)
 
+ztest_with_alloc$(EXEEXT): $(ztest_with_alloc_OBJECTS) $(ztest_with_alloc_DEPENDENCIES) $(EXTRA_ztest_with_alloc_DEPENDENCIES) 
+	@rm -f ztest_with_alloc$(EXEEXT)
+	$(AM_V_CCLD)$(ztest_with_alloc_LINK) $(ztest_with_alloc_OBJECTS) $(ztest_with_alloc_LDADD) $(LIBS)
+
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 
@@ -831,6 +976,18 @@  btest-testlib.o: testlib.c
 btest-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_CFLAGS) $(CFLAGS) -c -o btest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+btest_with_alloc-btest.o: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
+
+btest_with_alloc-btest.obj: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`
+
+btest_with_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+btest_with_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_with_alloc_CFLAGS) $(CFLAGS) -c -o btest_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ctesta-btest.o: btest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_CFLAGS) $(CFLAGS) -c -o ctesta-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
 
@@ -843,6 +1000,18 @@  ctesta-testlib.o: testlib.c
 ctesta-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_CFLAGS) $(CFLAGS) -c -o ctesta-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ctesta_with_alloc-btest.o: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
+
+ctesta_with_alloc-btest.obj: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`
+
+ctesta_with_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ctesta_with_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctesta_with_alloc_CFLAGS) $(CFLAGS) -c -o ctesta_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ctestg-btest.o: btest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_CFLAGS) $(CFLAGS) -c -o ctestg-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
 
@@ -855,6 +1024,18 @@  ctestg-testlib.o: testlib.c
 ctestg-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_CFLAGS) $(CFLAGS) -c -o ctestg-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ctestg_with_alloc-btest.o: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
+
+ctestg_with_alloc-btest.obj: btest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`
+
+ctestg_with_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ctestg_with_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ctestg_with_alloc_CFLAGS) $(CFLAGS) -c -o ctestg_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ttest-ttest.o: ttest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_CFLAGS) $(CFLAGS) -c -o ttest-ttest.o `test -f 'ttest.c' || echo '$(srcdir)/'`ttest.c
 
@@ -867,6 +1048,18 @@  ttest-testlib.o: testlib.c
 ttest-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_CFLAGS) $(CFLAGS) -c -o ttest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ttest_with_alloc-ttest.o: ttest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-ttest.o `test -f 'ttest.c' || echo '$(srcdir)/'`ttest.c
+
+ttest_with_alloc-ttest.obj: ttest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-ttest.obj `if test -f 'ttest.c'; then $(CYGPATH_W) 'ttest.c'; else $(CYGPATH_W) '$(srcdir)/ttest.c'; fi`
+
+ttest_with_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ttest_with_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ttest_with_alloc_CFLAGS) $(CFLAGS) -c -o ttest_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 ztest-ztest.o: ztest.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_CFLAGS) $(CFLAGS) -c -o ztest-ztest.o `test -f 'ztest.c' || echo '$(srcdir)/'`ztest.c
 
@@ -879,6 +1072,18 @@  ztest-testlib.o: testlib.c
 ztest-testlib.obj: testlib.c
 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_CFLAGS) $(CFLAGS) -c -o ztest-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
 
+ztest_with_alloc-ztest.o: ztest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-ztest.o `test -f 'ztest.c' || echo '$(srcdir)/'`ztest.c
+
+ztest_with_alloc-ztest.obj: ztest.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-ztest.obj `if test -f 'ztest.c'; then $(CYGPATH_W) 'ztest.c'; else $(CYGPATH_W) '$(srcdir)/ztest.c'; fi`
+
+ztest_with_alloc-testlib.o: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+ztest_with_alloc-testlib.obj: testlib.c
+	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ztest_with_alloc_CFLAGS) $(CFLAGS) -c -o ztest_with_alloc-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -1095,6 +1300,13 @@  btest.log: btest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+btest_with_alloc.log: btest_with_alloc$(EXEEXT)
+	@p='btest_with_alloc$(EXEEXT)'; \
+	b='btest_with_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 stest.log: stest$(EXEEXT)
 	@p='stest$(EXEEXT)'; \
 	b='stest'; \
@@ -1102,6 +1314,13 @@  stest.log: stest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+stest_with_alloc.log: stest_with_alloc$(EXEEXT)
+	@p='stest_with_alloc$(EXEEXT)'; \
+	b='stest_with_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 ztest.log: ztest$(EXEEXT)
 	@p='ztest$(EXEEXT)'; \
 	b='ztest'; \
@@ -1109,6 +1328,13 @@  ztest.log: ztest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ztest_with_alloc.log: ztest_with_alloc$(EXEEXT)
+	@p='ztest_with_alloc$(EXEEXT)'; \
+	b='ztest_with_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 edtest.log: edtest$(EXEEXT)
 	@p='edtest$(EXEEXT)'; \
 	b='edtest'; \
@@ -1116,6 +1342,13 @@  edtest.log: edtest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+edtest_with_alloc.log: edtest_with_alloc$(EXEEXT)
+	@p='edtest_with_alloc$(EXEEXT)'; \
+	b='edtest_with_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 ttest.log: ttest$(EXEEXT)
 	@p='ttest$(EXEEXT)'; \
 	b='ttest'; \
@@ -1123,6 +1356,13 @@  ttest.log: ttest$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ttest_with_alloc.log: ttest_with_alloc$(EXEEXT)
+	@p='ttest_with_alloc$(EXEEXT)'; \
+	b='ttest_with_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 ctestg.log: ctestg$(EXEEXT)
 	@p='ctestg$(EXEEXT)'; \
 	b='ctestg'; \
@@ -1137,6 +1377,20 @@  ctesta.log: ctesta$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ctestg_with_alloc.log: ctestg_with_alloc$(EXEEXT)
+	@p='ctestg_with_alloc$(EXEEXT)'; \
+	b='ctestg_with_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ctesta_with_alloc.log: ctesta_with_alloc$(EXEEXT)
+	@p='ctesta_with_alloc$(EXEEXT)'; \
+	b='ctesta_with_alloc'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 dtest.log: dtest
 	@p='dtest'; \
 	b='dtest'; \
diff --git a/libbacktrace/configure b/libbacktrace/configure
index c316dde1ad2..ad2e27cbc62 100755
--- a/libbacktrace/configure
+++ b/libbacktrace/configure
@@ -646,6 +646,8 @@  HAVE_PTHREAD_FALSE
 HAVE_PTHREAD_TRUE
 PTHREAD_CFLAGS
 CLOCK_GETTIME_LINK
+HAVE_MMAP_FALSE
+HAVE_MMAP_TRUE
 BACKTRACE_USES_MALLOC
 ALLOC_FILE
 VIEW_FILE
@@ -11440,7 +11442,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11443 "configure"
+#line 11445 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11546,7 +11548,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11549 "configure"
+#line 11551 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12956,6 +12958,14 @@  if test "$ALLOC_FILE" = "alloc.lo"; then
   BACKTRACE_USES_MALLOC=1
 fi
 
+ if test "$have_mmap" == "yes"; then
+  HAVE_MMAP_TRUE=
+  HAVE_MMAP_FALSE='#'
+else
+  HAVE_MMAP_TRUE='#'
+  HAVE_MMAP_FALSE=
+fi
+
 
 # Check for dl_iterate_phdr.
 for ac_header in link.h
@@ -13558,6 +13568,10 @@  if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_MMAP_TRUE}" && test -z "${HAVE_MMAP_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_MMAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_PTHREAD_TRUE}" && test -z "${HAVE_PTHREAD_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_PTHREAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac
index c75fc9d7ebc..4eb9b06d781 100644
--- a/libbacktrace/configure.ac
+++ b/libbacktrace/configure.ac
@@ -319,6 +319,7 @@  if test "$ALLOC_FILE" = "alloc.lo"; then
   BACKTRACE_USES_MALLOC=1
 fi
 AC_SUBST(BACKTRACE_USES_MALLOC)
+AM_CONDITIONAL(HAVE_MMAP, test "$have_mmap" == "yes")
 
 # Check for dl_iterate_phdr.
 AC_CHECK_HEADERS(link.h)