public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Craig Ringer <craig@2ndquadrant.com>
Cc: systemtap@sourceware.org
Subject: Re: Option to selectively override -Werror to work around new-compiler-version issues
Date: Tue, 18 Aug 2020 15:33:15 -0400	[thread overview]
Message-ID: <87sgcjvjes.fsf@redhat.com> (raw)
In-Reply-To: <CAMsr+YGdMkDMAGeQXgjF0-Hj5+Lxm+GSjM1qL+joTqP1cUK4aw@mail.gmail.com> (Craig Ringer's message of "Mon, 20 Jul 2020 12:03:48 +0800")


craig wrote:

> TL;DR: Would a patch that adds a new "stap" argument that lets you
> selectively disable individual -Werror sub-flags be acceptable? [...]

At one point we actually had a hidden option to block -Werror,
but some fire-breathing monster removed it in commit 2537a8805c.

> The accepted strings would be comma-separated, and confined to the
> [a-z0-9-] pattern to prevent sneaky injection of other flags.
> It doesn't look like it's too hard to implement - I'd be touching main.cxx,
> session.cxx, and buildrun.cxx by the looks.

Sounds like a plausible plan.  OTOH, we now have a precedent for
diagnostic suppression via:

   #pragma GCC diagnostic ignored "-W......"

which one could add to one's own scripts via a top level embedded-C
block.  That might be enough.  Or could be a more tasteful way to inject
warning suppression, than to muck with CFLAGS per se.


> (The eBPF runtime is not usable for the sort of userspace probing and
> tracing I use, and I'm often working on long-lived daemon processes, so the
> kernel runtime is my only option.)

(See also the --dyninst runtime.)


> Comments in the code suggest that -Werror cannot be disabled without
> causing problems-unspecified with stapconf.

The stapconf tests depend on the compiler producing a thorough failure
for questionable constructs, so as to suppress automated casting or such
that might hide subtle API changes.

> I didn't find any supported way to inject my own CPPFLAGS or CFLAGS
> via "stap" or "staprun"; I assume that's mainly a security concern?
> [...]

A stap-server will want to suppress these flags, but otherwise not a
security concern.


- FChE


      reply	other threads:[~2020-08-18 19:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  4:03 Craig Ringer
2020-08-18 19:33 ` Frank Ch. Eigler [this message]

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=87sgcjvjes.fsf@redhat.com \
    --to=fche@redhat.com \
    --cc=craig@2ndquadrant.com \
    --cc=systemtap@sourceware.org \
    /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).