Re: 'defer' (n3199) concerns

2025-01-21 Thread Alejandro Colomar via Gcc
Hi all, After some private discussion with JeanHeyd, I'd like to *partially* withdraw my concerns against 'defer', as long as it ends up being as simple as [[gnu::cleanup()]] (or reasonably similar). The -fanalyzer is currently not smart enough to warn about strsep(3), but that's a known bug, and

Re: 'defer' (n3199) concerns

2024-11-08 Thread Serge Hallyn
Nov 8, 2024 09:41:00 Alejandro Colomar : > Hi JeanHeyd, > > I was involved this week in a fix for a bug I wrote some months ago > about a call to free(3) with a bad pointer. > > The simplest reproducer is: > >     $ cat strsep_bad.c >     #include >     #include >     #include > >     int >    

Re: 'defer' (n3199) concerns

2024-11-08 Thread Martin Uecker via Gcc
Am Freitag, dem 08.11.2024 um 16:40 +0100 schrieb Alejandro Colomar via Gcc: > Hi JeanHeyd, > > I was involved this week in a fix for a bug I wrote some months ago > about a call to free(3) with a bad pointer. > > The simplest reproducer is: > > $ cat strsep_bad.c > #include >

'defer' (n3199) concerns

2024-11-08 Thread Alejandro Colomar via Gcc
Hi JeanHeyd, I was involved this week in a fix for a bug I wrote some months ago about a call to free(3) with a bad pointer. The simplest reproducer is: $ cat strsep_bad.c #include #include #include int main(void) { char