mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] make inflate work with gcc3.5 and 4k stacks
@ 2004-03-20 19:50 Matt Mackall
  2004-03-20 21:00 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Mackall @ 2004-03-20 19:50 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel

Quick fix to work around gcc3.5's automatic inline and broken stack
requirements calculation. Without this, I see stack overflows at boot
with 4k stacks.

gcc3.5 - fix inflate inlining

 tiny-mpm/lib/inflate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN lib/inflate.c~inflate-noinline lib/inflate.c
--- tiny/lib/inflate.c~inflate-noinline	2004-03-20 13:39:18.000000000 -0600
+++ tiny-mpm/lib/inflate.c	2004-03-20 13:40:13.000000000 -0600
@@ -686,7 +686,7 @@ DEBG("<stor");
 
 
 
-STATIC int inflate_fixed(void)
+STATIC int noinline inflate_fixed(void)
 /* decompress an inflated type 1 (fixed Huffman codes) block.  We should
    either replace this with a custom decoder, or at least precompute the
    Huffman tables. */
@@ -740,7 +740,7 @@ DEBG("<fix");
 
 
 
-STATIC int inflate_dynamic(void)
+STATIC int noinline inflate_dynamic(void)
 /* decompress an inflated type 2 (dynamic Huffman codes) block. */
 {
   int i;                /* temporary variables */

_


-- 
Matt Mackall : http://www.selenic.com : Linux development and consulting

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] make inflate work with gcc3.5 and 4k stacks
  2004-03-20 19:50 [patch] make inflate work with gcc3.5 and 4k stacks Matt Mackall
@ 2004-03-20 21:00 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2004-03-20 21:00 UTC (permalink / raw)
  To: Matt Mackall; +Cc: linux-kernel

Matt Mackall <mpm@selenic.com> wrote:
>
> Quick fix to work around gcc3.5's automatic inline and broken stack
>  requirements calculation. Without this, I see stack overflows at boot
>  with 4k stacks.
> 
>  gcc3.5 - fix inflate inlining
> 
>  -STATIC int inflate_fixed(void)
>  +STATIC int noinline inflate_fixed(void)

Thanks.  I added appropriate comments to this, as one should always do when
adding otherwise-utterly-mystifying code.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-20 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-20 19:50 [patch] make inflate work with gcc3.5 and 4k stacks Matt Mackall
2004-03-20 21:00 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®