[Bug 260303] lang/sdcc: seg fault during build (ASLR fallout)
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 260303] lang/sdcc: seg fault during build (ASLR fallout)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 10 Dec 2021 14:51:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260303 Dimitry Andric <dim@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Andrew@FreeBSD.org --- Comment #3 from Dimitry Andric <dim@FreeBSD.org> --- I'm testing Andrew's suggestion of: diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 793ded63d91c..8ee98473159c 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -672,8 +672,12 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, if (limp->rlim_max < 0) limp->rlim_max = RLIM_INFINITY; - if (which == RLIMIT_STACK && limp->rlim_cur != RLIM_INFINITY) - limp->rlim_cur += p->p_vmspace->vm_stkgap; + if (which == RLIMIT_STACK) { + if (limp->rlim_cur != RLIM_INFINITY) + limp->rlim_cur += p->p_vmspace->vm_stkgap; + if (limp->rlim_max != RLIM_INFINITY) + limp->rlim_max += p->p_vmspace->vm_stkgap; + } oldssiz.rlim_cur = 0; newlim = lim_alloc(); -- You are receiving this mail because: You are the assignee for the bug.