Re: [PATCH] For Segmentation Fault when using large external array

From: Anton Blanchard
Date: Tue Sep 30 2003 - 02:05:37 EST



Hi,

> When I compile and run an application with a large external array I get a
> Segmentation Fault.

...

> Comments: The problem is that we don't reserve the bss region for the app
> (via a set_brk/do_brk call) until after we've loaded the loader so they get
> mapped to overlapping memory locations. The fix is to move the update to
> current->mm.* and the set_brk/do_brk call to before the point we call
> load_elf_interp().

Yes it would be nice if we failed more gracefully here. A number of
people have come to me after hitting this problem, not realising that
its the size of their bss that caused the SEGV.

BTW I didnt look at your patch, unfortunately your mailer destroyed it.

Anton
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/