alloca - is it bad?

Art Neilson art at pilikia.pegasus.com
Sun Mar 24 04:19:57 AEST 1991


In article <1991Mar22.171241.29401 at unhd.unh.edu> pss610 at unhd.unh.edu (Paul S Secinaro) writes:
>
>I've recently been compiling a lot of GNU software on my system, and I've
>noticed that a lot of the README's talk about how some systems have bad
>'alloca' library functions.
>
>My question is: is there any way to find out if my alloca is bad?  I've
>compiled GCC and a few other things with the standard alloca (in libPW.a,
>apparently) and they seem to work okay so far, but you can never tell when
>a bug will pop up (usually, at the worst time).  Will the replacement function
>supplied with EMACS work, and should I use it just to be safe?
>
>I'm using AT&T SVR3.2.1 and the C Software Development Set 4.1.6.

The alloca function in the Sys5r3 libPW.a library works OK as long as
optimization is not enabled when compiling programs which reference
alloca.  Specifically, inlining alloca will break it, if you must have
optimization make sure you disable function inlining via the cc compiler
option -W2,'-y 0'. 
-- 
Arthur W. Neilson III		| INET: art at pilikia.pegasus.com
Bank of Hawaii Tech Support	| UUCP: uunet!ucsd!nosc!pilikia!art



More information about the Comp.unix.sysv386 mailing list