 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v2] lib/ukalloc: fix wrong return value in uk_malloc_ifpages
 Hi Costin,good catch, thanks. Luckily, that doesn't lead to problems right now, because sizeof(uintptr_t) == sizeof(uinptr_t *) on x86_64, but it's bound to break eventually. I'll prepare a fix. Cheers, Florian On 09/06/2018 09:35 AM, Costin Lupu wrote: Hi Florian, Just a minor thing, please see inline. On 08/30/2018 05:08 PM, Florian Schmidt wrote:uk_malloc_ifpages returned the wrong pointer, because it added sizeof(size_t) to a pointer of type size_t. Hence, the return value wasn't offset from intptr by size_t bytes, but by size_t*size_t bytes. This patch makes intptr a uintptr_t in places in which its property as size_t* isn't used. Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx> --- lib/ukalloc/alloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ukalloc/alloc.c b/lib/ukalloc/alloc.c index 52e9a77..fb38bcb 100644 --- a/lib/ukalloc/alloc.c +++ b/lib/ukalloc/alloc.c @@ -167,7 +167,7 @@ static inline size_t uk_alloc_size_to_order(size_t size)void *uk_malloc_ifpages(struct uk_alloc *a, size_t size) -- Dr. Florian Schmidt フローリアン・シュミット Research Scientist, Systems and Machine Learning Group NEC Laboratories Europe Kurfürsten-Anlage 36, D-69115 Heidelberg Tel. +49 (0)6221 4342-265 Fax: +49 (0)6221 4342-155 e-mail: florian.schmidt@xxxxxxxxx ============================================================ Registered at Amtsgericht Mannheim, Germany, HRB728558 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel 
 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |