public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "agentzh at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug bpf/27819] New: The current string literal limit for the bpf mode is too conservative
Date: Tue, 04 May 2021 04:29:25 +0000	[thread overview]
Message-ID: <bug-27819-6586@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27819

            Bug ID: 27819
           Summary: The current string literal limit for the bpf mode is
                    too conservative
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: agentzh at gmail dot com
  Target Milestone: ---

Seems like the current string literal limit is very easy to exceed:

```
$ /opt/stap/bin/stap --bpf -e 'probe oneshot { error("you cannot specify option
A and option B at the same time! Try something else.") }'
semantic error: string literal too long: string 'you cannot specify option A
and option B at the same time! Try something else.' at <input>:1:23
        source: probe oneshot { error( ... you cannot specify option A and
option B at the same time! Try something else. ... "you cannot specify option A
and option B at the same time! Try something else.") }
                                           ^

Pass 4: compilation failed.  [man error::pass4]
```

For comparison, the same oneliner works with the kernel runtime:

```
$ /opt/stap/bin/stap -e 'probe oneshot { error("you cannot specify option A and
option B at the same time! Try something else.") }'
ERROR: you cannot specify option A and option B at the same time! Try something
else.
WARNING: Number of errors: 1, skipped probes: 0
WARNING: /opt/stap/bin/staprun exited with status: 1
Pass 5: run failed.  [man error::pass5]
```

More information:

```
$ /opt/stap/bin/stap -V
Systemtap translator/driver (version 4.5/0.183, commit
release-4.4-145-g8ae1d1dcec48)
Copyright (C) 2005-2020 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.12.0-rc
enabled features: BPF
```

And I'm using kernel 5.10.15 built from mainline source on Fedora x86_64.

-- 
You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2021-05-04  4:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-27819-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --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).