authorgravatar for 41313082+michaelortmann@users.noreply.github.comMichael Ortmann <41313082+michaelortmann@users.noreply.github.com> 2024-09-29 08:06:28+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-09-28 23:06:28-07:00
log3b465ebec59ee942b6c490ada2f81902ec047d7f
tree52615f6cae3fe816be403dcdbebb7c28a5e8aca3
parent0cdec976e4eaf96e1735ff417b222ab1463727e8
signaturebadge-check Signed by PGP key B5690EEEBB952194

std.start: dont query stack limit for wanted stack size 0 (#21533)


1 files changed, 1 insertions(+), 0 deletions(-)

lib/std/start.zig+1
...@@ -539,6 +539,7 @@ fn expandStackSize(phdrs: []elf.Phdr) void {...@@ -539,6 +539,7 @@ fn expandStackSize(phdrs: []elf.Phdr) void {
539 for (phdrs) |*phdr| {539 for (phdrs) |*phdr| {
540 switch (phdr.p_type) {540 switch (phdr.p_type) {
541 elf.PT_GNU_STACK => {541 elf.PT_GNU_STACK => {
542 if (phdr.p_memsz == 0) break;
542 assert(phdr.p_memsz % std.mem.page_size == 0);543 assert(phdr.p_memsz % std.mem.page_size == 0);
543544
544 // Silently fail if we are unable to get limits.545 // Silently fail if we are unable to get limits.