Commit 7d63de7a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] make inflate use less stack space with gcc3.5

From: Matt Mackall <mpm@selenic.com>

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.
parent 07bba9c3
......@@ -685,8 +685,10 @@ DEBG("<stor");
}
STATIC int inflate_fixed(void)
/*
* We use `noinline' here to prevent gcc-3.5 from using too much stack space
*/
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. */
......@@ -739,8 +741,10 @@ DEBG("<fix");
}
STATIC int inflate_dynamic(void)
/*
* We use `noinline' here to prevent gcc-3.5 from using too much stack space
*/
STATIC int noinline inflate_dynamic(void)
/* decompress an inflated type 2 (dynamic Huffman codes) block. */
{
int i; /* temporary variables */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment