Robustify stack-size calculation
* src/emacs.c: Include getpagesize.h. (main): Check for integer overflow when computing stack size. Round new rlim_cur to pagesize boundary on all platforms, as this is easy and would have prevented Bug#23622. If setrlimit fails, use current limit to determine re_max_failures.
Showing with 40 additions and 29 deletions