|
Message-ID: <20140221170903.GZ184@brightrain.aerifal.cx> Date: Fri, 21 Feb 2014 12:09:03 -0500 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: Re: Removing sbrk and brk On Fri, Feb 21, 2014 at 05:47:05PM +0100, Daniel Cegiełka wrote: > 2014-02-21 17:36 GMT+01:00 Szabolcs Nagy <nsz@...t70.net>: > > * Daniel Cegie?ka <daniel.cegielka@...il.com> [2014-02-21 17:03:36 +0100]: > >> And what do we do with failures when sbrk is used? > >> > > > > most of these only call sbrk(0) which is supported > > ok, thank you for the information. > > > >> http://ex-vi.cvs.sourceforge.net/viewvc/ex-vi/ex-vi/ex_subr.c?revision=1.8&view=markup > >> > > > > the "old musl" did not support sbrk either (the cited code uses it > > with malloc), the "new musl" just helps you find the bug more easily > > ex/vi doesn't work with the new musl. Too bad, because it is the > traditional unix ex/vi. Maybe Gunnar Ritter still fixes bugs. Then it didn't work before either; it was silently corrupting memory. The only difference now is that you know that it's not working. The lazy way around this would be writing a fake sbrk that just mmaps a huge PROT_NONE region the first time it's called then mprotects more of it to PROT_READ|PROT_WRITE every time sbrk is called to make more available. This is a *portable* fake sbrk that should work on any system. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.