From nobody Fri Dec 10 14:45:04 2021 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9159318E9C6F for ; Fri, 10 Dec 2021 14:45:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J9YbN242wz4jK7 for ; Fri, 10 Dec 2021 14:45:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 236831C264 for ; Fri, 10 Dec 2021 14:45:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1BAEj4Rb014551 for ; Fri, 10 Dec 2021 14:45:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1BAEj4Z8014550 for ports-bugs@FreeBSD.org; Fri, 10 Dec 2021 14:45:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 260303] lang/sdcc: seg fault during build (ASLR fallout) Date: Fri, 10 Dec 2021 14:45:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dgr@semihalf.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639147504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6PedFlVpleDYAyHuYK9t72Rg2jKIvA9uM6wNe6mdUIY=; b=M+L4rxlXJtSQsLJKHutwJtjdn6H4n3z+UuOf6J5vD/ijq86p4L8wWrAxEp8IehaC0PXZ0o resjPDQOZgyIywyQVbG67oVKvJNDYmMiHOaaWkKdRmi4eb6MXs7ZFDI3CfI/yRUWkCvJaW LmD04pST9KMgWQALQVQY3D55O27z0z5gTjKS84YIzbDG+Oas7oCbGkv2z6FyKk+52UURw4 1X0xz7pOkYPzcOtlURLOBpDS/GJlFPqVEdW5u1EzxYU2a/AHzhmAQhEo4VdxfiPgLsojxH skm4iNRAA6dV+ytVQWzj5XBjjNqPR43GVdQRy/4br04P7vsa4aFYXmp1fVKceA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639147504; a=rsa-sha256; cv=none; b=S1KRrrvHcJxV7l+FsqGXKI/ay4bJqur1yGJmE2nAiE5h2fxVB7MqD0rjYjR+iahZ+8TATD nBqO26LkxyrAAy+EdYax/sAmSrOZnYnQSk58/yjyAs3qXZRPFWbf/iOUr1yR79eS78PVD+ k0xlOvvRv4CwwW/nE//EAv04qj8vkxaQOavXrw9x1XVlHH31HfASqojm9EztFK2UVZ/us0 NzIccvBuL37idOCfmum7OBonKyoee1sgrWCiYqnVKIdS12iDHYnYORuQO9NqiEHKCIMAG7 WlBGgo0GEFBtJ5pKG7gnq0NrUY46In5KzfpGLPqQHIT8bmodhmGu8e+jqq5Qlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260303 Dawid Gorecki changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dgr@semihalf.com --- Comment #2 from Dawid Gorecki --- Yeah, this problem is caused by stack gap. The program crashes immediately after calling setrlimit because it limits the stack to a very low value(4M). The stack gap in FreeBSD is often larger than that, for amd64 it can be by default as large as 15M. If the stack gap is larger than stack resource lim= it then you can see what happens. The commit Dimitry linked is related to this issue. However, while we take = into account the size of the stack gap when calculating stack limit, we only do = so for rlim_cur, rlim_max acts as a hard limit, which is not adjusted. The only way to fix this issue currently is by either disabling the stack gap or by setting rlim_max to a larger value. 20M should be enough. In that situation rlim_cur would automatically adjust itself to 4M + stack_gap. --=20 You are receiving this mail because: You are the assignee for the bug.=