libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Bug fixes in libunwind git = make another "release


From: Konstantin Belousov
Subject: Re: [Libunwind-devel] Bug fixes in libunwind git = make another "release"?
Date: Tue, 22 Mar 2011 21:29:40 +0200
User-agent: Mutt/1.4.2.3i

On Tue, Mar 22, 2011 at 08:51:22AM -0700, Arun Sharma wrote:
> On Tue, Mar 22, 2011 at 8:04 AM, Lassi Tuura <address@hidden> wrote:
> 
> > +/* Initialise memory validation method. On linux kernels <2.6.21,
> > +   mincore() returns incorrect value for MAP_PRIVATE mappings,
> > +   such as stacks. If mincore() was available at compile time,
> > +   check if we can actually use it. If not, use msync() instead. */
> > +PROTECTED void
> > +tdep_init_mem_validate (void)
> > +{
> > +#ifdef HAVE_MINCORE
> > +  unsigned char present;
> > +  if (mincore (&present, 1, &present) == 0)
> > +    {
> > +      Debug(1, "using mincore to validate memory\n");
> > +      mem_validate_func = mincore_validate;
> > +    }
> 
> You might want to write to "present" to improve the chances that
> mincore() finds the page in core. Otherwise looks good. Konstantin:
> hope this doesn't break FreeBSD.

It looks so, I will retest after the change is committed.

Currently, to get libunwind to build and package on FreeBSD, I need
the following change:

commit e7e3f15af5125a9dd0e95f4a1f31e7cb31001bbb
Author: Konstantin Belousov <address@hidden>
Date:   Tue Mar 22 21:26:31 2011 +0200

    Fix build and distribution on the FreeBSD.

diff --git a/configure.in b/configure.in
index c0cdd9c..db664c9 100644
--- a/configure.in
+++ b/configure.in
@@ -263,6 +263,12 @@ PKG_MINOR=pkg_minor
 PKG_EXTRA=pkg_extra
 PKG_MAINTAINER=pkg_maintainer
 
+old_LIBS="$LIBS"
+LIBS=""
+AC_SEARCH_LIBS(backtrace, execinfo)
+BACKTRACELIB="$LIBS"
+LIBS="$old_LIBS"
+
 AC_SUBST(build_arch)
 AC_SUBST(target_os)
 AC_SUBST(arch)
@@ -276,6 +282,7 @@ AC_SUBST(PKG_MAINTAINER)
 AC_SUBST(enable_cxx_exceptions)
 AC_SUBST(enable_debug_frame)
 AC_SUBST(DLLIB)
+AC_SUBST(BACKTRACELIB)
 
 AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh
                doc/Makefile doc/common.tex include/libunwind-common.h)
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c1505a..68470ea 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -488,6 +488,7 @@ EXTRA_DIST =        $(libunwind_la_SOURCES_arm)             
        \
                $(libunwind_la_SOURCES_ia64)                    \
                $(libunwind_la_SOURCES_mips)                    \
                $(libunwind_la_SOURCES_x86)                     \
+               $(libunwind_la_SOURCES_os_freebsd)              \
                $(libunwind_la_SOURCES_os_linux)                \
                $(libunwind_la_SOURCES_os_hpux)                 \
                $(libunwind_la_SOURCES_common)                  \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 11f4f30..383f096 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -133,6 +133,7 @@ test_proc_info_LDADD = $(LIBUNWIND)
 test_static_link_LDADD = $(LIBUNWIND)
 test_strerror_LDADD = $(LIBUNWIND)
 rs_race_LDADD = $(LIBUNWIND) -lpthread
+test_varargs_LDADD = @BACKTRACELIB@
 
 Gtest_bt_LDADD = $(LIBUNWIND)
 Gtest_concurrent_LDADD = $(LIBUNWIND) -lpthread

Attachment: pgpvBjBLnZcD1.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]