mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +00:00
Thread::make_userspace_stack_for_main_thread is only ever called from Process::do_exec, after all the fun ELF loading and TSS setup has occured. The calculations in there that check if the combined argv + envp size will exceed the default stack size are not used in the rest of the stack setup. So, it should be safe to move this to the beginning of do_exec and bail early with -E2BIG, just like the man pages say. Additionally, advertise this limit in limits.h to be a good POSIX.1 citizen. :)
20 KiB
20 KiB