Subject: using alloca in the library

From: Dominik Vogt <[email-masked]>
Date: Mon, 22 Jul 2002 00:31:22 +0200

A number of files in the libs directory, in FvwmPager and
FvwmScript are using the alloca() function to allocate temporary
memory.  With the drop-in version of alloca() that autoconf
provides, you have to regularly call alloca(0) to collect the
garbage from previous alloca() calls and free the memory.  In
other words:  on a platform without a good alloca()
implementation (according to the autoconf man page any platform
without gcc except AIX) most modules leak memory like hell if
the wrong features are used.  We have alloca() without alloca(0)
in:

  libs/Bindings.c
  libs/FBidi.c
  libs/Graphics.c
  libs/Module.c
  libs/PictureImageLoader.c
  modules/FvwmPager/x_pager.c
  modules/FvwmScript/script.c

I suggest we refrain from using alloca() in the library to prevent
module memory leaking.  FvwmPager and FvwmScript have to be fixed
in any case.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]