From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sun, 5 May 2019 14:12:30 -0400 Subject: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram In-Reply-To: <7e9e36ca-5b86-df5f-3565-d5fbaeeab2e1@gmail.com> References: <5fe137d2-4a8e-82a3-58a9-a85e5b520f08@gmail.com> <1bb0e151-274c-8fc1-a1fa-f5844300b228@gmail.com> <71a5ea6e-a001-1f1a-cab7-af503d62f086@gmail.com> <20190505113810.GG31207@bill-the-cat> <7e9e36ca-5b86-df5f-3565-d5fbaeeab2e1@gmail.com> Message-ID: <20190505181230.GM31207@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 Sun, May 05, 2019 at 07:55:10PM +0200, Simon Goldschmidt wrote: > Am 05.05.2019 um 13:38 schrieb Tom Rini: > >On Sat, May 04, 2019 at 08:16:38PM +0200, Simon Goldschmidt wrote: > >>Tom, > >> > >>Am 26.04.2019 um 13:00 schrieb Marek Vasut: > >>>On 4/26/19 12:19 PM, Simon Goldschmidt wrote: > >>>>On Fri, Apr 26, 2019 at 11:56 AM Marek Vasut wrote: > >>>>> > >>>>>On 4/26/19 11:36 AM, Simon Goldschmidt wrote: > >>>>>>On Fri, Apr 26, 2019 at 11:32 AM Marek Vasut wrote: > >>>>>>> > >>>>>>>On 4/26/19 8:19 AM, Simon Goldschmidt wrote: > >>>>>>>>Marek Vasut schrieb am Fr., 26. Apr. 2019, 00:22: > >>>>>>>> > >>>>>>>>>On 4/25/19 9:22 PM, 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 > >> > >>Since there's no way this fits without breaking smartweb, I'd rather drop > >>this for now in order to get 1/2 accepted. > > > >I thought that with 1/2 this fit again, with gcc-7.3 at least? Thanks! > > I'm not sure, as I don't have it here to test. But as this patch doesn't > actually fix a board but fixes an issue in the code that *might* appear in > the future, I'm not convinced it would be the right thing to merge it like > it is. > > And I'm also a little short on time to investigate this further, as it's not > a real bug, currently. OK, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: