Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6838e747 authored by Ray Essick's avatar Ray Essick Committed by alexax66
Browse files

exec: reserve full virtual stack space at execve()



grows the main process stack at execve() time so that it can reach it's
maximum allowed size. No RAM is allocated until the stack actually uses this
space.
This prevents problems observed around address space randomization where
large heaps grew into and collided with the main process' stack. This
prevented the main stack from growing later.  Early workarounds had the
particular application allocating its stack to be large before going off
to execute the work that grew the heap; that saved the stack's virtual
space but also allocated RAM ahead of the stack needing it.

Change-Id: I131a1afb6e50ddfa580894562c05de653d2e30e7
Signed-off-by: default avatarRay Essick <are002@motorola.com>
Reviewed-on: http://gerrit.mot.com/718024


SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: default avatarJira Key <jirakey@motorola.com>
Reviewed-by: default avatarChristopher Fries <cfries@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
parent a5c00ea1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment