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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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.