The `libc.auxv` is not supposed to be 0, since it will be dereferenced
by any call to `getauxval`. It should point to a 0 value instead.
Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #53
UK_CRASH("Failed to initialize the main thread\n");
}
+/* We initialize the auxiliary vector to point to a zero value */
+static size_t __libc_auxv[1] = { 0 };
+
static void __uk_init_libc(void)
{
- libc.auxv = 0;
+ libc.auxv = __libc_auxv;
__hwcap = 0;
__sysinfo = 0;
libc.page_size = __PAGE_SIZE;