bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils/gnulib - fts.c dangling pointers & gcc 13.1


From: Sam James
Subject: Re: coreutils/gnulib - fts.c dangling pointers & gcc 13.1
Date: Sat, 4 Feb 2023 20:23:04 +0000


> On 4 Feb 2023, at 20:20, Paul Eggert <eggert@cs.ucla.edu> wrote:
> 
> On 2023-02-04 11:53, Sam James wrote:
>> I'd consider using #pragma GCC ... to suppress -Wuse-after-free
>> for the "problematic" lines instead. It'd avoid the risk of either 
>> optimisations or sanitisers
>> respectively causing us pain in future.
> 
> I don't see why that pragma would avoid those problems. All it would do is 
> shut off the warnings; GCC's underlying analyses would be the same, and GCC 
> would generate the same machine code. In that sense these warnings are useful 
> - they're canaries in the coal mine.

I guess it's hard for me to say given I don't know what options allowed it to 
be reproduced and I couldn't hit it.

I assumed it must have been -Wstrict-aliasing=2 or lower which makes it more 
aggressive at the risk of false positives.

But if you reproduced it, then it's useful, I suppose.

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]