libtool-patches
[Top][All Lists]
Advanced

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

[PATCH] Re: argz_create_sep problem


From: Dalibor Topic
Subject: [PATCH] Re: argz_create_sep problem
Date: Sun, 21 Mar 2004 17:37:55 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040218

Well, ping :)

I just wanted to check if someone could review this patch against 1.5.2, and check it in, eventually.

cheers,
dalibor topic

Dalibor Topic wrote:
Hi all,

we've recently had a small problem with libtool 1.5.2 in kaffe. It turned out that libtool tries to use libtool's own memory management macros to free arguments argz_create_sep instead of using straight free(). That breaks when an application (like kaffe) redefines those to other functions. In our case, we define those to use our GC.

So when libtool uses the operating system's argz_create_sep, the OS uses malloc to allocate them. But libtool tries to free them with LT_DLFREE, which doesn't necessarily have to be free(), and in our case crashes, since the GC is called to free an unknown piece of memory.

For a detailed explanation, see
http://www.kaffe.org/pipermail/kaffe/2004-March/045540.html

We've opted for the patch to simply *always* use libtool's own argz_create_sep replacement. the attached patch removes the check from the m4 file.

ChangeLog

2004-03-12  Jon Nall <address@hidden>

    * libltdl/acinclude.m4:
    Removed check for argz_create_sep.

    * libltdl/configure:
    Regenerated.

cheers,
dalibor topic


------------------------------------------------------------------------

Index: libltdl/acinclude.m4
===================================================================
RCS file: /cvs/kaffe/kaffe/libltdl/acinclude.m4,v
retrieving revision 1.25
diff -u -r1.25 acinclude.m4
--- libltdl/acinclude.m4        27 Jan 2004 11:08:43 -0000      1.25
+++ libltdl/acinclude.m4        12 Mar 2004 17:37:14 -0000
@@ -6369,5 +6369,5 @@
 #  include <argz.h>
 #endif])
-AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
+AC_CHECK_FUNCS([argz_append argz_insert argz_next argz_stringify])
 ])# AC_LTDL_FUNC_ARGZ
Index: libltdl/configure
===================================================================
RCS file: /cvs/kaffe/kaffe/libltdl/configure,v
retrieving revision 1.54
diff -u -r1.54 configure
--- libltdl/configure   11 Mar 2004 11:56:48 -0000      1.54
+++ libltdl/configure   12 Mar 2004 17:37:15 -0000
@@ -21054,7 +21054,7 @@
-for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify
+for ac_func in argz_append argz_insert argz_next argz_stringify
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5


------------------------------------------------------------------------

_______________________________________________
Libtool-patches mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/libtool-patches





reply via email to

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