diff options
author | Itamar <itamar8910@gmail.com> | 2021-09-20 12:13:05 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-20 18:32:09 +0200 |
commit | a3360bcee8ee2e652cfbd5de157dee1f0e7e3bb7 (patch) | |
tree | 2d8cd504a82964bf22446087dfdab7716203e015 /Userland/Libraries/LibC/sched.h | |
parent | 01900801e3c704740c215b4a2bb4f8aed638d486 (diff) | |
download | serenity-a3360bcee8ee2e652cfbd5de157dee1f0e7e3bb7.zip |
LibC+DynamicLoader: Store the auxiliary vector address at startup
Previously, getauxval() got the address of the auxiliary vector by
traversing to the end of the `environ` pointer.
The assumption that the auxiliary vector comes after the environment
array is true at program startup, however the environment array may
be re-allocated and change its address during runtime which would cause
getauxval() to work with an incorrect auxiliary vector address.
To fix this, we now get the address of the auxiliary vector once in
__libc_init and store it in a libc-internal pointer which is then used
by getauxval().
Fixes #10087.
Diffstat (limited to 'Userland/Libraries/LibC/sched.h')
0 files changed, 0 insertions, 0 deletions