Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Ted Unangst
On Wed, Jul 23, 2014 at 00:02, Mark Kettenis wrote: > Hmm, I believe, quite strongly, that we should always panic when a > arithmetic overflow is detected. > > The M_CANFAIL flag is really there to allow for failure in certain > low-memory conditions, not to recover from programming bugs. The cu

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Mark Kettenis
> Date: Tue, 22 Jul 2014 21:21:39 + > From: Doug Hogan > > On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: > > That is misleading in the M_CANFAIL case. > > > > I'm not terribly good at wording things, but I suggest something > > more like this instead: > > Hmm I thin

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Theo de Raadt
>On Tue, Jul 22, 2014 at 21:21, Doug Hogan wrote: >> On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: >>> That is misleading in the M_CANFAIL case. >>> >>> I'm not terribly good at wording things, but I suggest something >>> more like this instead: >> >> Hmm I think it's only

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Ted Unangst
On Tue, Jul 22, 2014 at 21:21, Doug Hogan wrote: > On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: >> That is misleading in the M_CANFAIL case. >> >> I'm not terribly good at wording things, but I suggest something >> more like this instead: > > Hmm I think it's only mislead

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Doug Hogan
On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: > That is misleading in the M_CANFAIL case. > > I'm not terribly good at wording things, but I suggest something > more like this instead: Hmm I think it's only misleading in the M_CANFAIL case. I think this diff makes it a l

Re: PATCH: overflow behavior in malloc(9)

2014-07-21 Thread Jean-Philippe Ouellet
On Mon, Jul 21, 2014 at 06:59:12AM +, Doug Hogan wrote: > -objects and checks for arithmetic overflow. > +objects and calls > +.Xr panic 9 > +on arithmetic overflow. That is misleading in the M_CANFAIL case. I'm not terribly good at wording things, but I suggest something more like this inst

Re: PATCH: overflow behavior in malloc(9)

2014-07-21 Thread Jason McIntyre
On Mon, Jul 21, 2014 at 06:59:12AM +, Doug Hogan wrote: > Make it clear what check implies for mallocarray. Thanks to dlg@ for > pointing this behavior out. > some take this, please. jmc > > Index: share/man/man9/malloc.9 > ==

PATCH: overflow behavior in malloc(9)

2014-07-21 Thread Doug Hogan
Make it clear what check implies for mallocarray. Thanks to dlg@ for pointing this behavior out. Index: share/man/man9/malloc.9 === RCS file: /cvs/src/share/man/man9/malloc.9,v retrieving revision 1.56 diff -u -p -d -r1.56 malloc.9