Skip to content

Commit 3b465eb

Browse files
std.start: dont query stack limit for wanted stack size 0 (#21533)
1 parent 0cdec97 commit 3b465eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/std/start.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ fn expandStackSize(phdrs: []elf.Phdr) void {
539539
for (phdrs) |*phdr| {
540540
switch (phdr.p_type) {
541541
elf.PT_GNU_STACK => {
542+
if (phdr.p_memsz == 0) break;
542543
assert(phdr.p_memsz % std.mem.page_size == 0);
543544

544545
// Silently fail if we are unable to get limits.

0 commit comments

Comments
 (0)