]> sourceware.org Git - systemtap.git/commit
PR24953 Fix: check for existence of value symbol
authorSagar Patel <sapatel@redhat.com>
Thu, 24 Oct 2019 21:05:08 +0000 (17:05 -0400)
committerSagar Patel <sapatel@redhat.com>
Thu, 24 Oct 2019 21:28:10 +0000 (17:28 -0400)
commitb54a0507e445bc80c3671676153b043c78bcfb63
tree1f7646e90446a8a984dffed2d6ba5b520bedd2eb
parent1cd949be2cebee80eba9df209b709866b2b9ce13
PR24953 Fix: check for existence of value symbol

In commit 724b7014a, the code assumed that the foreach loop
structure always had a valid value symbol. However, this is
not true. Consider the following examples:

foreach loop (k in arr) ...
foreach loop (v = k in arr) ...

In the former case, the loop is only iterating over the keys
whereas in the latter case, both the key and value are being
iterated over. Consequently, the former loop will have a
nullptr value symbol.

This patch provides a fix by checking for the existence of a
value symbol and generating the BPF instructions accordingly.
bpf-translate.cxx
This page took 0.02764 seconds and 5 git commands to generate.