This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/59856] Support sparse-style context checking, used to validate locking correctness


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]