Skip to content

Conversation

@kleisauke
Copy link
Member

../nip4-9.0.1-2/src/kplot/reallocarray.c:33:16: warning: shift count >= width of type [-Wshift-count-overflow]
   33 |         if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
      |                       ^~~~~~~~~~~~~~~
../nip4-9.0.1-2/src/kplot/reallocarray.c:28:30: note: expanded from macro 'MUL_NO_OVERFLOW'
   28 | #define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4))
      |                              ^  ~~~~~~~~~~~~~~~~~~~~
../nip4-9.0.1-2/src/kplot/reallocarray.c:33:43: warning: shift count >= width of type [-Wshift-count-overflow]
   33 |         if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
      |                                                  ^~~~~~~~~~~~~~~
../nip4-9.0.1-2/src/kplot/reallocarray.c:28:30: note: expanded from macro 'MUL_NO_OVERFLOW'
   28 | #define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4))
      |                              ^  ~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

```
../nip4-9.0.1-2/src/kplot/reallocarray.c:33:16: warning: shift count >= width of type [-Wshift-count-overflow]
   33 |         if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
      |                       ^~~~~~~~~~~~~~~
../nip4-9.0.1-2/src/kplot/reallocarray.c:28:30: note: expanded from macro 'MUL_NO_OVERFLOW'
   28 | #define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4))
      |                              ^  ~~~~~~~~~~~~~~~~~~~~
../nip4-9.0.1-2/src/kplot/reallocarray.c:33:43: warning: shift count >= width of type [-Wshift-count-overflow]
   33 |         if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
      |                                                  ^~~~~~~~~~~~~~~
../nip4-9.0.1-2/src/kplot/reallocarray.c:28:30: note: expanded from macro 'MUL_NO_OVERFLOW'
   28 | #define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4))
      |                              ^  ~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
```
@jcupitt
Copy link
Member

jcupitt commented Feb 25, 2025

Is that all it was!?!?! I feel silly for not having checked that, I assumed their size maths was OK sigh.

(I hope this hasn't taken too much time off your day job!)

@jcupitt jcupitt merged commit c525fc9 into libvips:main Feb 25, 2025
@kleisauke
Copy link
Member Author

That's all. I was wondering why my breakpoint on realloc() wasn’t triggered, and then I noticed this in the logs. 😅

@kleisauke kleisauke deleted the reallocarray-win32 branch February 25, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants