> On 17 Sep 2019, at 11:56, Konstantin Belousov <kostik...@gmail.com> wrote: > > On Mon, Sep 16, 2019 at 08:28:09PM +0000, Toomas Soome wrote: >> Author: tsoome >> Date: Mon Sep 16 20:28:08 2019 >> New Revision: 352421 >> URL: https://svnweb.freebsd.org/changeset/base/352421 >> >> Log: >> loader: Malloc(0) should return NULL. >> >> We really should not allocate anything with size 0. > Why ? This is quite unexpected from other environments, where > malloc(0) returns unique object. > Hiding bugs. And, we are not getting unique object, we are getting chunk of memory with payload length of 0 and the memory content depends on if head and tail guards are used - the chunk is with size at least MALLOCALIGN (16 or 64 bytes) and the chunk is from random location of heap. rgds, toomas _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r352421 - head/stand/libsa
Toomas Soome via svn-src-all Tue, 17 Sep 2019 02:05:57 -0700
- svn commit: r352421 - head/stand/libsa Toomas Soome
- Re: svn commit: r352421 - head/stand/lib... Konstantin Belousov
- Re: svn commit: r352421 - head/stand... Toomas Soome via svn-src-all
- Re: svn commit: r352421 - head/s... Konstantin Belousov