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

2023-02-04 Thread Sam James
> On 4 Feb 2023, at 22:03, Paul Eggert wrote: > > On 2023-02-04 12:23, Sam James wrote: >> 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 >>

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

2023-02-04 Thread Paul Eggert
On 2023-02-04 12:23, Sam James wrote: 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

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

2023-02-04 Thread Sam James
> On 4 Feb 2023, at 20:20, Paul Eggert 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

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

2023-02-04 Thread Paul Eggert
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.

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

2023-02-04 Thread Sam James
> On 4 Feb 2023, at 18:46, Paul Eggert wrote: > > I manually inspected fts.c to look for violations of the C standard that > might draw GCC's attention, and installed the attached patches into Gnulib. > As you can see, they don't fix the technical violations of the C standard. > However, I

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

2023-02-04 Thread Paul Eggert
I manually inspected fts.c to look for violations of the C standard that might draw GCC's attention, and installed the attached patches into Gnulib. As you can see, they don't fix the technical violations of the C standard. However, I hope they keep GCC happy. Please give them a try with "GCC

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

2023-02-04 Thread Sam James
> On 3 Feb 2023, at 22:11, Paul Eggert wrote: > > On 2023-02-03 12:24, Peter Frazier wrote: >> dangling pointers & gcc 13.1 >> problem with: >> coreutils/gnulib, fts.c >> compilation failure: >> -Werror=use-after-free error >> approach to resolution (thus far): >> post free of vars, I set the

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

2023-02-03 Thread Paul Eggert
On 2023-02-03 12:24, Peter Frazier wrote: dangling pointers & gcc 13.1 problem with: coreutils/gnulib, fts.c compilation failure: -Werror=use-after-free error approach to resolution (thus far): post free of vars, I set the vars to NULL, but it did not help Could you be more specific about

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

2023-02-03 Thread Peter Frazier
dangling pointers & gcc 13.1 problem with: coreutils/gnulib, fts.c compilation failure: -Werror=use-after-free error approach to resolution (thus far): post free of vars, I set the vars to NULL, but it did not help Best, 1pf1