On Thu, Jun 05, 2025 at 03:52:21PM -0700, Kees Cook wrote:
> On Mon, May 19, 2025 at 11:23:34AM -0700, Kees Cook wrote:
> > On Fri, May 16, 2025 at 01:34:14PM +0000, Qing Zhao wrote:
> > > Adding -fdiagnotics-details into GCC to provide more hints to the
> > > end users on how the warnings come from, in order to help the user
> > > to locate the exact location in source code on the specific warnings
> > > due to compiler optimizations.
> > 
> > I just needed to examine an unexpected -Wrestrict warning, and
> > discovered that this patch didn't help with it, but in looking at the
> > implementation details, it turned out to be trivial to expand coverage
> > to include -Wrestrict, which worked for me, and got me the
> > diagnostics I needed[1].
> 
> I found another case[1] where I didn't get detailed diagnostics, so I
> tried to instrument that too, but it didn't do anything. Here's the patch
> (trying to get more coverage for stringop-overflow), but I don't know
> what I did wrong:

I think this may be a known bug. It looks very similar to this:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97490
and is somehow related to -fsanitize=kernel-address

-- 
Kees Cook

Reply via email to