On Wed, Oct 13, 2021 at 3:32 AM Martin Sebor via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > On 10/11/21 6:26 PM, Joseph Myers wrote: > > The testcase uses the __seg_fs address space, which is x86-specific, but > > it isn't in an x86-specific directory or otherwise restricted to x86 > > targets; thus, I'd expect it to fail for other architectures. > > > > This is not a review of the rest of the patch. > > > > Good point! I thought I might make the test target-independent > (via macros) but it looks like just i386 defines the hook to > something other than false so I should probably move it under > i386.
The patch is OK with the testcase moved. Note I don't think we should warn about *(int *)0xdeadbee0, /* Pointer constants other than null are most likely the result - of erroneous null pointer addition/subtraction. Set size to - zero. For null pointers, set size to the maximum for now - since those may be the result of jump threading. */ there's too much "may be" and "most likely" for my taste. How can the user mark a deliberate valid constant address? Maybe we can use better (target dependent?) heuristic based on what virtual addresses are likely unmapped (the zero page, the page "before" the zero page)? Richard. > Thanks > Martin