GNU bug report logs -
#36649
27.0.50; pure space and pdumper
Previous Next
Reported by: Pip Cet <pipcet <at> gmail.com>
Date: Sun, 14 Jul 2019 14:27:01 UTC
Severity: wishlist
Tags: patch
Found in version 27.0.50
Done: Pip Cet <pipcet <at> protonmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: rpluim <at> gmail.com, stefan <at> marxist.se, schwab <at> linux-m68k.org,
> monnier <at> iro.umontreal.ca, 36649 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Wed, 19 May 2021 10:29:06 -0700
>
> On 5/19/21 8:11 AM, Eli Zaretskii wrote:
> > Paul, if this kludge annoys you enough (I hope it will), please
> > suggest a cleaner way out of this conundrum.
>
> configure.ac can define a macro that tells gmalloc.c about the kludge
> situation, and gmalloc.c can refer to that macro to decide whether to
> call rpl_free instead of plain 'free'.
The problem is not in gmalloc.c, the problem is in every src/*.c file
that calls 'free'. That's because we redirect to hybrid_free in
conf_post.h, but Gnulib's stdlib.h is included after that, and it
undoes that redirection:
#if @GNULIB_FREE_POSIX@
# if @REPLACE_FREE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef free
# define free rpl_free
# endif
Then the linker errors out due to unresolved externals, because
there's no rpl_free.
Would it work to add rpl_free to gmalloc.c, perhaps?
> Also, make sure that hybrid_free preserves errno.
If this is the best solution, then okay, will do. I hoped something
cleaner could be possible.
This bug report was last modified 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.