From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77920 invoked by alias); 30 Aug 2019 15:59:29 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 77883 invoked by uid 48); 30 Aug 2019 15:59:25 -0000 From: "sapatel at redhat dot com" To: systemtap@sourceware.org Subject: [Bug bpf/24953] New: foreach statement not retrieving correct array values in stapbpf Date: Fri, 30 Aug 2019 15:59:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: bpf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sapatel at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q3/txt/msg00053.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24953 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=20 probe begin { arr[1] =3D 1; arr[2] =3D 2; exit() }=20 probe end { foreach ( v =3D v1 in arr) { printf("%d ", v) } }' '1 2 ' should be printed, but rather '0 0 ' is printed. --=20 You are receiving this mail because: You are the assignee for the bug.