From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Brooks Davis Newsgroups: gmane.emacs.bugs,gmane.os.freebsd.devel.hackers Subject: bug#24892: {s, }brk removed from FreeBSD 11.x and later, arm64 architecture Date: Fri, 18 Nov 2016 20:23:28 +0000 Message-ID: <20161118202328.GA79070@spindle.one-eyed-alien.net> References: <40f8df50-b431-1ebd-221c-df2aa453aa81@cs.ucla.edu> <06ee71fd-1a64-d32b-862e-c725807aef4e@cs.ucla.edu> <876cf047-82fb-f08c-bbb3-024206f6fabd@cs.ucla.edu> <83twb6dnkm.fsf@gnu.org> <8637ipm0nb.fsf@lostca.se> <5ec481c4-41e1-c7dd-433d-f533653b132f@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" X-Trace: blaine.gmane.org 1479500840 8140 195.159.176.226 (18 Nov 2016 20:27:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2016 20:27:20 +0000 (UTC) User-Agent: Mutt/1.7.0 (2016-08-17) Cc: freebsd-hackers@freebsd.org, 24892@debbugs.gnu.org, Ashish SHUKLA To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 18 21:27:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7pkh-0000lx-38 for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 21:27:15 +0100 Original-Received: from localhost ([::1]:38735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7pki-00018e-NQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 15:27:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7pkY-00018V-CB for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 15:27:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7pkV-0001A1-8b for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 15:27:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47079) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7pkV-00019x-5R for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 15:27:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c7pkU-000559-WD; Fri, 18 Nov 2016 15:27:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Brooks Davis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2016 20:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24892 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24892-submit@debbugs.gnu.org id=B24892.147950081419506 (code B ref 24892); Fri, 18 Nov 2016 20:27:02 +0000 Original-Received: (at 24892) by debbugs.gnu.org; 18 Nov 2016 20:26:54 +0000 Original-Received: from localhost ([127.0.0.1]:34244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7pkM-00054T-8H for submit@debbugs.gnu.org; Fri, 18 Nov 2016 15:26:54 -0500 Original-Received: from spindle.one-eyed-alien.net ([199.48.129.229]:41647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7ph3-0004yz-0b for 24892@debbugs.gnu.org; Fri, 18 Nov 2016 15:23:29 -0500 Original-Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 6C6135A9F14; Fri, 18 Nov 2016 20:23:28 +0000 (UTC) Content-Disposition: inline In-Reply-To: <5ec481c4-41e1-c7dd-433d-f533653b132f@cs.ucla.edu> X-Mailman-Approved-At: Fri, 18 Nov 2016 15:26:52 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125847 gmane.os.freebsd.devel.hackers:58200 Archived-At: --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 18, 2016 at 08:21:04AM -0800, Paul Eggert wrote: > Ashish SHUKLA wrote: >=20 > > One of the FreeBSD developer has > > pointed me to this ongoing discussion[1] on freebsd-hackers@ list. > > > > References: > > [1] https://lists.freebsd.org/pipermail/freebsd-hackers/2016-November/= 050144.html >=20 > OK, thanks, I'll CC: freebsd-hackers. FreeBSD hackers: this is following = up on=20 > this serious Emacs bug report, which says that Emacs no longer works on F= reeBSD=20 > 11.x arm64: >=20 > https://bugs.gnu.org/24892 >=20 > The referenced FreeBSD discussion appears to be under the misapprehension= that=20 > sbrk is useful only to estimate how much memory is in use, and since this= use=20 > has long been wrong sbrk should be unceremoniously removed. Unfortunately= , this=20 > assumption is incorrect for Emacs, as (bleeding-edge) Emacs uses its own= =20 > allocator during its build process, and reverts to malloc only during use= r=20 > operation. (The build-time Emacs makes a copy of itself in a new executab= le, and=20 > relies on sbrk during the build.) Obviously this is dicey and we are plan= ning to=20 > change Emacs to make it more portable; however, this will require nontriv= ial=20 > reengineering on our part. >=20 > In the meantime we respectfully request that sbrk functionality be kept i= n=20 > FreeBSD 11.x arm64 for a while. It is fine to mark it as deprecated or ob= solete,=20 > or even rename it, but please do not remove the functionality entirely. Under FreeBSD's stability rules if we shipped ANY release for a platforms (e.g. arm64, riscv) with a system call, we must support it for the life of the architecture (approximately FOREVER). As such, if any other solution is viable, we'd prefer that. What does emacs actually need from sbrk()? Could it get by with something with the same interface allocating from .bss or does it need its allocations to be at the end of .bss? I'm happy to put some time into a userspace workaround if one is viable. -- Brooks --envbJBWh7q8WU6mo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYL2M/AAoJEKzQXbSebgfAIWkH/1lRbnad9HgqjZzmWERuV9hn NqlZjygWmyALFvLnmTQPlEYK0MIWoVKlyRkozd7Okd4CEN5gvgOA/NilDLGktkuF 5Cttp5x9CxhXKOHJS0bABs1jEqXXgCz3B9GnWoDQ2u7JxLdv4UTretvFTBAlgY4G rljgv3B2NGa2+PrvON1cKmmMPJnn/lGkrNr2bOkOYmQFuMgI0XcqpszbxQYfeR2R /zCibyTIAYELxu2fBFJxf5WO5VE7yUkP+hzeTL0DVSGalQgQ4pkTTVUsJaV8uSr+ ++TjPzDqUONgQmr+WKxqwg89Yd/JUdL2OARbpnywqlZeahKxJTXy1w9RfnO1pxI= =IA5Z -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo--