On Sun, 2026-02-08 at 20:36 +0100, fedang wrote: > Hello David, > I merged the logic of your patch with my tests. > > Also tested on x86_64-linux once again.
Thanks; looks great. Do you want to push this, or do you want me to? Thanks Dave > > Thank you for the opportunity, > Federico > > On 2/7/26 4:36 PM, David Malcolm wrote: > > On Sat, 2026-02-07 at 00:37 +0100, Federico Angelilli wrote: > > > > Hi Federico > > > > > Previously the analyzer emitted a -Wanalyzer-null-dereference > > > even > > > when > > > the target pointer's address space allowed accesses at address 0. > > > > > > This patch uses the targetm.addr_space.zero_address_valid hook to > > > correctly ignore such cases. > > > > > > Tested on x86_64-pc-linux-gnu. > > Thanks for filing the bug and creating the patch. > > > > As it happens, I also wrote a patch for this yesterday which > > survived > > my overnight testing, and I was about to push it when I saw your > > email > > :-) > > > > I'm attaching my patch for reference. > > > > I think I prefer the logic from my patch (having a subroutine for > > the > > test and using it in two places), but it looks like the testsuite > > coverage from your patch is better than mine. > > > > Would you be able to have a go at merging the best parts of the two > > patches and posting an updated version? Or would you prefer me to > > do > > that? (I don't mind either way, I just want to avoid more > > duplicated > > work) > > > > Thanks again for working on this. > > Dave
