Hi!
libreadline is exporting symbols for its internal helper
xmalloc/xrealloc/xfree functions. These function names are
quite common, but might not behave exactly the same way as
readline expects.
Attached patch fixes the problem by adding a "hidden" attribute to
them.
I'm also attaching a test case.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
diff -ur readline-6.0.old/xmalloc.h readline-6.0/xmalloc.h
--- readline-6.0.old/xmalloc.h 2009-01-04 20:32:34.000000000 +0100
+++ readline-6.0/xmalloc.h 2009-06-04 15:54:31.000000000 +0200
@@ -38,8 +38,8 @@
#endif /* !PTR_T */
-extern PTR_T xmalloc PARAMS((size_t));
-extern PTR_T xrealloc PARAMS((void *, size_t));
-extern void xfree PARAMS((void *));
+extern PTR_T xmalloc PARAMS((size_t)) __attribute__ ((visibility ("hidden")));
+extern PTR_T xrealloc PARAMS((void *, size_t)) __attribute__ ((visibility ("hidden")));
+extern void xfree PARAMS((void *)) __attribute__ ((visibility ("hidden")));
#endif /* _XMALLOC_H_ */
#include <stdio.h>
#include <stdlib.h>
#include <readline/readline.h>
void *
xrealloc (int s)
{
exit (1);
}
main ()
{
printf ("%s\n", readline (NULL));
}
_______________________________________________
Bug-readline mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-readline