Re: [PATCH 1/4] shallow.c: make paint_alloc slightly more robust

2016-12-05 Thread Duy Nguyen
On Sat, Dec 3, 2016 at 12:14 PM, Jeff King wrote: > On Fri, Dec 02, 2016 at 09:31:01PM +0100, Rasmus Villemoes wrote: > >> I have no idea if this is a real issue, but it's not obvious to me that >> paint_alloc cannot be called with info->nr_bits greater than about >> 4M (\approx

Re: [PATCH 1/4] shallow.c: make paint_alloc slightly more robust

2016-12-02 Thread Jeff King
On Fri, Dec 02, 2016 at 09:31:01PM +0100, Rasmus Villemoes wrote: > I have no idea if this is a real issue, but it's not obvious to me that > paint_alloc cannot be called with info->nr_bits greater than about > 4M (\approx 8*COMMIT_SLAB_SIZE). In that case the new slab would be too > small. So

[PATCH 1/4] shallow.c: make paint_alloc slightly more robust

2016-12-02 Thread Rasmus Villemoes
I have no idea if this is a real issue, but it's not obvious to me that paint_alloc cannot be called with info->nr_bits greater than about 4M (\approx 8*COMMIT_SLAB_SIZE). In that case the new slab would be too small. So just round up the allocation to the maximum of COMMIT_SLAB_SIZE and size.