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

This commit is contained in:
Michael Ortmann
2024-09-29 08:06:28 +02:00
committed by GitHub
parent 0cdec976e4
commit 3b465ebec5

View File

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