public inbox for
 help / color / mirror / Atom feed
From: "mcermak at redhat dot com" <>
Subject: [Bug runtime/30123] New: bitfield.exp fails with fresh kernels
Date: Tue, 14 Feb 2023 14:01:04 +0000	[thread overview]
Message-ID: <> (raw)

            Bug ID: 30123
           Summary: bitfield.exp fails with fresh kernels
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

With Rawhide or recent RHEL9, the bitfield.exp testcase fails.  The problem
seems to be with @cast().  To demonstrate it, let's have the following code

#include <linux/tcp.h>
static struct tcphdr foo = {0};

function get_ptr:long() %{ STAP_RETVALUE = (long)&foo; /* pure */ %}

probe begin {
    ptr = get_ptr()

    # setter1 (seems to work)
    %{ foo.ack = 1 %}

    # setter2 (doesn't seem to work)
    # @cast(ptr, "tcphdr", "kernel<linux/tcp.h>")->ack = 1

    # printer1 (seems to work)
    println(%{ foo.ack %})

    # printer2 (doesn't seem to work)
    println(@cast(ptr, "tcphdr", "kernel<linux/tcp.h>")->ack)


A success is to write 1 to foo->ack and then read/print it.  When embedded C is
used, things work fine.  Using @cast() however, the experiment fails both to
write the data, and to read it.  Tested with 6.2.0-0.rc8.57.fc39 and

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

             reply	other threads:[~2023-02-14 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 14:01 mcermak at redhat dot com [this message]
2023-02-14 19:26 ` [Bug runtime/30123] " wcohen at redhat dot com
2023-03-09 22:09 ` fche at redhat dot com

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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).