Index: firmware/screendump.c =================================================================== --- firmware/screendump.c (revision 31161) +++ firmware/screendump.c (working copy) @@ -112,11 +112,9 @@ unsigned val; #endif #if LCD_DEPTH <= 8 - unsigned char *dst, *dst_end; - unsigned char linebuf[DUMP_BMP_LINESIZE]; + unsigned char *dst, *dst_end, *linebuf; #elif LCD_DEPTH <= 16 - unsigned short *dst, *dst_end; - unsigned short linebuf[DUMP_BMP_LINESIZE/2]; + unsigned short *dst, *dst_end, *linebuf; #endif #if CONFIG_RTC @@ -130,6 +128,9 @@ if (fd < 0) return; + /* Allocate linebuf now, because creat() needed a lot of stack space */ + linebuf = __builtin_alloca(DUMP_BMP_LINESIZE); + if (screen_dump_hook) { screen_dump_hook(fd);