Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread David Malcolm via Gcc
On Wed, 2022-07-13 at 22:26 +0530, Mir Immad wrote: > Hi everyone, > > Reading through the thread, I feel the following attributes look good > and > similar to what I've done: > > __attribute__ ((fd_arg(N))) > __attribute__ ((fd_arg_read(N))) > __attribute__ ((fd_arg_write(N))) > > I believe how

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread Mir Immad via Gcc
Hi everyone, Reading through the thread, I feel the following attributes look good and similar to what I've done: __attribute__ ((fd_arg(N))) __attribute__ ((fd_arg_read(N))) __attribute__ ((fd_arg_write(N))) I believe how to annotate the glibc headers is a separate discussion. Dave: From the

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread David Malcolm via Gcc
On Wed, 2022-07-13 at 16:01 +0200, Florian Weimer wrote: > * David Malcolm: > > > On Wed, 2022-07-13 at 14:05 +0200, Florian Weimer wrote: > > > * Szabolcs Nagy via Gcc: > > > > [adding Immad back to the CC list] > > > > > > > > > to be honest, i'd expect interesting fd bugs to be > > > > dynam

Re: [RISCV] RISC-V GNU Toolchain Biweekly Sync-up call (July 14, 2022)

2022-07-13 Thread 吴伟
Oops the ICS file is out of date now. Feel free to use the attached ics file for the next half of this year if you're using a local calendar. The google calendar link remains the same: https://calendar.google.com/calendar/ical/lm5bddk2krcmtv5iputjgqvoio%40group.calendar.google.com/public/basic.ics

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread Florian Weimer via Gcc
* David Malcolm: > On Wed, 2022-07-13 at 14:05 +0200, Florian Weimer wrote: >> * Szabolcs Nagy via Gcc: > > [adding Immad back to the CC list] > >> >> > to be honest, i'd expect interesting fd bugs to be >> > dynamic and not easy to statically analyze. >> > the use-after-unchecked-open maybe usef

[RISCV] RISC-V GNU Toolchain Biweekly Sync-up call (July 14, 2022)

2022-07-13 Thread jiawei
Hi all, Here is the agenda for tomorrow's RISC-V GNU toolchain meeting. If you have any topics want to discuss or share, please let me know and I will add them to the agenda, thanks. Agenda: - [RFC] RV64E/lp64e supports gcc: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/59830

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread David Malcolm via Gcc
On Wed, 2022-07-13 at 14:05 +0200, Florian Weimer wrote: > * Szabolcs Nagy via Gcc: [adding Immad back to the CC list] > > > to be honest, i'd expect interesting fd bugs to be > > dynamic and not easy to statically analyze. > > the use-after-unchecked-open maybe useful. i would > > not expect th

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread David Malcolm via Gcc
On Wed, 2022-07-13 at 09:37 +0100, Szabolcs Nagy wrote: > The 07/12/2022 18:25, David Malcolm via Libc-alpha wrote: > > On Tue, 2022-07-12 at 18:16 -0400, David Malcolm wrote: > > > On Tue, 2022-07-12 at 23:03 +0530, Mir Immad wrote: > > > GCC's attribute syntax here: > > >   https://gcc.gnu.org/on

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread Florian Weimer via Gcc
* Szabolcs Nagy via Gcc: > to be honest, i'd expect interesting fd bugs to be > dynamic and not easy to statically analyze. > the use-after-unchecked-open maybe useful. i would > not expect the access direction to catch many bugs. You might be right. But I think the annotations could help to cat

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread Andreas Schwab via Gcc
On Jul 13 2022, Szabolcs Nagy via Libc-alpha wrote: > note that glibc headers have to be namespace clean so it > would be more like > > __attribute__((__fd_argument (__access, 1))) > __attribute__((__fd_argument (__read, 1))) > __attribute__((__fd_argument (__write, 1))) > > so it would be e

Re: Adding file descriptor attribute(s) to gcc and glibc

2022-07-13 Thread Szabolcs Nagy via Gcc
The 07/12/2022 18:25, David Malcolm via Libc-alpha wrote: > On Tue, 2022-07-12 at 18:16 -0400, David Malcolm wrote: > > On Tue, 2022-07-12 at 23:03 +0530, Mir Immad wrote: > > GCC's attribute syntax here: > >   https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html > > allows for a parenthesized