[Skiboot] [PATCH 2/3] VAS: use local_free to free local_alloc memory

Nicholas Piggin npiggin at gmail.com
Mon May 15 19:37:56 AEST 2023


On Mon May 15, 2023 at 6:32 AM AEST, Stewart Smith wrote:
>
> > On May 13, 2023, at 04:31, Nicholas Piggin <npiggin at gmail.com> wrote:
> > 
> > free() asserts because local_alloc() doesn't allocate from the skiboot
> > heap region. Fix this by using local_free().
>
> Well, there’s something I probably didn’t catch in review a while ago :)
>
> It may be possible to have valgrind pick up some of these in the unit tests too with some improved annotations and possible wrapping, as it can do warnings that the right kind of alloc/free was called. Although IIRC for *most* of the unit tests we end up not bringing in the skiboot allocator for ease of not going completely up the wall with looking too much like normal libc.

The asserts in the allocator picked it up at least so if we had a test
case that hit it it would explode. Trouble is the error path doesn't
happen without some hardware or hostboot issue. I was mucking with
HDAT (so I guess I deserve whatever I get).

Thanks,
Nick


More information about the Skiboot mailing list