]> sourceware.org Git - systemtap.git/commit
PR30442: failing optional statement probes should not trigger pass2 exceptions
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 12 May 2023 15:13:45 +0000 (11:13 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 12 May 2023 15:13:45 +0000 (11:13 -0400)
commitab0c5c25509600b7c9cecc9e10baebc984082b50
treef742481fb002742e1a4f6c5cc59381eaaa5be533
parent44f5d948eb6194b87401cc1986c06852624a8b56
PR30442: failing optional statement probes should not trigger pass2 exceptions

In tapsets.cxx, query_cu() and query_module() aggressively caught &
sess-print_error'd semantic_errors from subsidiary call sites.  They
are unaware of whether the probe in question is being resolved within
an optional (? or !) context.  Instead of this, they now simply let
the exceptions propagate out to derive_probes() or similar, which does
know whether exceptions are errors in that context.  That means
exceptions can propagate through elfutils iteration machinery too,
perhaps risking C level memory leaks, but so be it.

This fix goes well beyond statement probes per se, but hand-testing
and the testsuite appear not to show regressions related to this.

Added semok/badstmt.exp to test.
tapsets.cxx
testsuite/semok/stmtbad.stp [new file with mode: 0755]
This page took 0.025915 seconds and 5 git commands to generate.