public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug bpf/24953] New: foreach statement not retrieving correct array values in stapbpf
@ 2019-08-30 15:59 sapatel at redhat dot com
  2019-08-30 18:41 ` [Bug bpf/24953] " wcohen at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sapatel at redhat dot com @ 2019-08-30 15:59 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 24953
           Summary: foreach statement not retrieving correct array values
                    in stapbpf
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: sapatel at redhat dot com
  Target Milestone: ---

When using foreach statements with arrays on stapbpf, the incorrect values are
retrieved. For example, the following script demonstrates this:

global arr 

probe begin { arr[1] = 1; arr[2] = 2; exit() } 

probe end { foreach ( v = v1 in arr) { printf("%d ", v) } }'

'1 2 ' should be printed, but rather '0 0 ' is printed.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-26 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 15:59 [Bug bpf/24953] New: foreach statement not retrieving correct array values in stapbpf sapatel at redhat dot com
2019-08-30 18:41 ` [Bug bpf/24953] " wcohen at redhat dot com
2019-08-30 18:52 ` sapatel at redhat dot com
2019-09-03 14:06 ` [Bug bpf/24953] foreach (v = v1,v2) syntax not behaving correctly " me at serhei dot io
2019-09-26 19:55 ` sapatel at redhat dot com

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