From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 24 Apr 2019 07:26:56 -0400 Subject: [U-Boot] [PATCH v4 1/2] dlmalloc: fix malloc range at end of ram In-Reply-To: References: <20190401200150.1630-1-simon.k.r.goldschmidt@gmail.com> <20190401200150.1630-2-simon.k.r.goldschmidt@gmail.com> Message-ID: <20190424112656.GA31207@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Apr 23, 2019 at 09:54:10PM -0600, Simon Glass wrote: > On Mon, 1 Apr 2019 at 14:01, Simon Goldschmidt > wrote: > > > > If the malloc range passed to mem_malloc_init() is at the end of address > > range and 'start + size' overflows to 0, following allocations fail as > > mem_malloc_end is zero (which looks like uninitialized). > > > > Fix this by subtracting 1 of 'start + size' overflows to zero. > > > > Signed-off-by: Simon Goldschmidt > > --- > > > > Changes in v4: None > > Changes in v3: None > > > > common/dlmalloc.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > Reviewed-by: Simon Glass So, the problem with this patch is that it increases the generic malloc code size ever so slightly and blows up smartweb :( -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: