From: Joseph Myers <joseph@codesourcery.com>
To: Martin Sebor <msebor@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] add support for -Wmismatched-dealloc
Date: Tue, 15 Dec 2020 01:01:53 +0000 [thread overview]
Message-ID: <alpine.DEB.2.22.394.2012150055550.90010@digraph.polyomino.org.uk> (raw)
In-Reply-To: <758e723b-67cf-a211-7bc2-2ccd3fc744e5@gmail.com>
On Mon, 14 Dec 2020, Martin Sebor via Libc-alpha wrote:
> > I spent some time working around this but in the end it turned out
> > to be too convoluted so I decided to make the attribute a little
> > smarter. Instead of associating all allocation functions with all
> > deallocation functions (such as fdopen, fopen, fopen64, etc. with
> > fclose, freopen, and freopen64) I changed it so that an allocator
> > only needs to be associated with a single deallocator (a reallocator
> > also needs to be associated with itself). That makes things quite
> > a bit simpler.
[...]
> The GCC patches have now been committed and the dependency resolved.
I've looked at the attribute documentation now in GCC, but I'm afraid I'm
unable to understand from that documentation why the proposed glibc patch
constitutes a valid way of specifying that, for example, it's valid to use
freopen as a deallocator for FILE pointers opened by functions whose
attribute only mentions fclose. Unless there's something I'm missing in
the documentation or a separate documentation patch that's not yet
committed, I think more work is needed on the GCC documentation to make
clear the semantics the glibc patch is asserting for valid combinations of
allocators and deallocators, so that those semantics can be reviewed for
correctness.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2020-12-15 1:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 22:52 Martin Sebor
2020-12-09 0:07 ` Joseph Myers
2020-12-12 2:25 ` Martin Sebor
2020-12-14 21:39 ` Martin Sebor
2020-12-14 22:16 ` Florian Weimer
2020-12-15 1:01 ` Joseph Myers [this message]
2020-12-15 16:52 ` Martin Sebor
2020-12-27 23:13 ` Martin Sebor
2021-01-04 15:56 ` Ping: " Martin Sebor
2021-01-04 16:07 ` Florian Weimer
2021-01-04 16:18 ` Martin Sebor
2021-01-04 16:57 ` Florian Weimer
2021-01-04 23:18 ` Martin Sebor
2021-01-10 20:42 ` Ping: " Martin Sebor
2021-01-11 9:13 ` Florian Weimer
2021-01-12 0:00 ` Martin Sebor
2021-01-12 0:01 ` Martin Sebor
2021-01-12 8:59 ` Florian Weimer
2021-01-19 1:08 ` Martin Sebor
2021-01-19 16:54 ` David Malcolm
2021-01-22 21:26 ` DJ Delorie
2021-01-25 10:56 ` Florian Weimer
2021-01-25 11:31 ` Florian Weimer
2021-04-23 0:00 ` Martin Sebor
2021-05-06 23:54 ` Martin Sebor
2021-05-13 21:49 ` Martin Sebor
2021-05-16 21:25 ` Martin Sebor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2012150055550.90010@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=msebor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).