squid icon indicating copy to clipboard operation
squid copied to clipboard

Fix GCC v12 build [-Walloc-size-larger-than=]

Open sergiodj opened this issue 1 year ago • 1 comments

store/Disks.cc:690: error: argument 1 value 18446744073709551615
    exceeds maximum object size 9223372036854775807
    [-Werror=alloc-size-larger-than=]
const auto tmp = new SwapDir::Pointer[swap->n_allocated];

Arguably, this is likely a compiler bug and not squid's fault. Either way, I believe it's worth having more type safety in this code.

sergiodj avatar Aug 10 '22 01:08 sergiodj

Can one of the admins verify this patch?

squid-prbot avatar Aug 10 '22 01:08 squid-prbot