07.08.2025 14:31, 'Mark Rotteveel' via firebird-devel:
> Visual Studio warns about a possible NULL dereference in pag.cpp, function PAG_release_pages. Specifically on line 1372, as pages
> could be NULL if cntRelease <= 0.
>
> I'm not sure if that can happen in practice, but the logic in some of some of the callers is complicated enough that I cannot
> exclude the possibility that it might be 0.
cntRelease is a number of pages to release. Of course, it must be > 0.
> What would be the proper fix here? Add a guard clause at the function start to return early if cntRelease <= 0?
Yes, it should be enough and should not harm performance.
And fb_assert() to catch such "impossible" case in DEBUG build, please.
Regards,
Vlad