This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59856] Support sparse-style context checking, used to validate locking correctness
- From: "josh at joshtriplett dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Nov 2015 21:29:35 +0000
- Subject: [Bug c/59856] Support sparse-style context checking, used to validate locking correctness
- Auto-submitted: auto-generated
- References: <bug-59856-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59856
--- Comment #8 from Josh Triplett <josh at joshtriplett dot org> ---
(In reply to PaX Team from comment #5)
> (In reply to Josh Triplett from comment #4)
> > Could you represent __context__ as a new GCC builtin? Would that make this
> > any easier?
>
> it can be a builtin or just a regular function declaration, the latter is
> easy to create from a plugin too.
Except as Tom noted, GCC will throw away a regular function declaration early
on, whereas it can handle a builtin differently.
> > So, I suspect the unfortunate answer is that Linux would probably want to
> > ship the plugin as C/C++ and build it at build time if enabled. (Or we could
> > integrate this functionality into GCC itself.)
>
> since PaX already has a checker plugin i subscribed to this bug a while ago
> but completely forgot about it until now ;P. in any case, i've begun to work
> on this along a somewhat different angle: instead of adding completely new
> machinery to detect context imbalances i'd like to reuse existing gcc passes
> to compute this property, we'll see how it goes.
Interesting idea. What'd you have in mind?