Re: Fix overflow of nbatch

2025-09-23 Thread Vaibhav Jain
Thank you everyone for the reviews, feedback and the test. Please find attached a new version of the patch. On Tue, Sep 23, 2025 at 7:11 AM Chao Li wrote: > > > On Sep 23, 2025, at 07:35, David Rowley wrote: > > On Tue, 23 Sept 2025 at 11:21, Chao Li wrote: > > I guess that because earlier in

Fix overflow of nbatch

2025-09-22 Thread Vaibhav Jain
Hi Everyone, With a1b4f28, to compute current_space, nbatch is being multiplied by BLCKSZ. nbatch is int and when multiplied with BLCKSZ, it can easily overflow the int limit.To keep the calculation safe for current_space, convert nbatch to size_t. Please find a patch for the same. Thanks, Vaibh