From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BEE2E3950838; Tue, 27 Apr 2021 18:46:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEE2E3950838 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/27785] New: The ioctl_handler.stp example causes stap to segmentation fault Date: Tue, 27 Apr 2021 18:46:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen 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-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2021 18:46:17 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27785 Bug ID: 27785 Summary: The ioctl_handler.stp example causes stap to segmentation fault Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: wcohen at redhat dot com Target Milestone: --- When looking through the test results for systemtap examples I found that t= he ioctl_handler.stp example failed to build. This can be replicated on the previous systemtap-4.4 and the systemtap built from the current git repo. = It is pretty easy to replicate: $ stap --example -v -p4 ioctl_handler.stp Pass 1: parsed user script and 494 library scripts using 331292virt/95960res/12460shr/83072data kb, in 140usr/20sys/157real ms. Segmentation fault (core dumped) Ran stap in gdb to get a backtrace of where the problem occurred. Looks li= ke catch_error_var field of the try_block is null: Reading symbols from /usr/lib/debug/usr/bin/stap-4.5-1.202104221025.fc33.x86_64.debug... (gdb) run --example -v -p4 ioctl_handler.stp Starting program: /usr/bin/stap --example -v -p4 ioctl_handler.stp Missing separate debuginfos, use: dnf debuginfo-install glibc-2.32-4.fc33.x86_64 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Pass 1: parsed user script and 494 library scripts using 331292virt/95852res/12328shr/83072data kb, in 140usr/30sys/170real ms. Program received signal SIGSEGV, Segmentation fault. 0x0000555555616b92 in symuse_collecting_visitor::visit_try_block (this=3D0x7fffffff8330, s=3D0x555556ff5ff0) at staptree.cxx:2534 2534 if (s->catch_error_var->referent) (gdb) print s $1 =3D (try_block *) 0x555556ff5ff0 (gdb) print *s $2 =3D { =3D { =3D {_vptr.visitable =3D 0x55555585eb3= 0 }, tok =3D 0x55555633dbf0},=20 try_block =3D 0x55555714b220, catch_block =3D 0x5555571524f0, catch_error= _var =3D 0x0} (gdb) where #0 0x0000555555616b92 in symuse_collecting_visitor::visit_try_block (this=3D0x7fffffff8330, s=3D0x555556ff5ff0) at staptree.cxx:2534 #1 0x0000555555614bcc in traversing_visitor::visit_block (this=3D0x7ffffff= f8330, s=3D0x5555564f8320) at staptree.cxx:1957 #2 0x0000555555614bcc in traversing_visitor::visit_block (this=3D0x7ffffff= f8330, s=3D0x55555a992f60) at staptree.cxx:1957 #3 0x0000555555614bcc in traversing_visitor::visit_block (this=3D0x7ffffff= f8330, s=3D0x55555e5a80d0) at staptree.cxx:1957 #4 0x0000555555640250 in probewrite_evaluator::visit_probewrite_op (this=3D0x7fffffff8980, e=3D0x555557c1d400) at elaborate.cxx:4455 #5 0x000055555562726a in update_visitor::require (this=3D0x7fffffff8980, src=3D,=20 clearok=3D) at staptree.h:1300 #6 0x000055555561bc6e in update_visitor::replace (clearok=3Dfa= lse, src=3D@0x55555e5aa3f0: 0x555557c1d400,=20 this=3D0x7fffffff8980) at staptree.h:1331 #7 update_visitor::visit_if_statement (this=3D0x7fffffff8980, s=3D0x55555e= 5aa3e0) at staptree.cxx:3461 #8 0x0000555555626e9a in update_visitor::require (this=3D0x7fffffff8980, src=3D,=20 clearok=3D) at staptree.h:1300 #9 0x000055555561b130 in update_visitor::replace (clearok=3Dfal= se, src=3D, this=3D0x7fffffff8980) at staptree.h:1331 #10 update_visitor::visit_block (this=3D0x7fffffff8980, s=3D0x55555e5aa3b0)= at staptree.cxx:3426 #11 0x0000555555626e9a in update_visitor::require (this=3D0x7fffffff8980, src=3D,=20 clearok=3D) at staptree.h:1300 #12 0x000055555561b130 in update_visitor::replace (clearok=3Dfal= se, src=3D, this=3D0x7fffffff8980) at staptree.h:1331 #13 update_visitor::visit_block (this=3D0x7fffffff8980, s=3D0x55555e5aa770)= at staptree.cxx:3426 #14 0x0000555555626e9a in update_visitor::require (this=3D0x7fffffff8980, src=3D,=20 --Type for more, q to quit, c to continue without paging-- clearok=3D) at staptree.h:1300 #15 0x0000555555626f9e in update_visitor::replace (this=3D0x7fffffff8980, src=3D@0x55555e5a9b90: 0x55555e5aa770,=20 clearok=3D) at staptree.h:1331 #16 0x00005555556318e0 in alias_expansion_builder::build_with_suffix (this=3D0x55555a874db0, sess=3D..., use=3D,=20 location=3D0x55555e475dd0, finished_results=3Dstd::vector of length 0, = capacity 0, suffix=3Dstd::vector of length 0, capacity 0) at elaborate.cxx:938 #17 0x000055555562d385 in alias_expansion_builder::build (this=3D, sess=3D..., use=3D,=20 location=3D, parameters=3D..., finished_results=3D...) at elaborate.cxx:867 #18 0x000055555562c6bc in match_node::find_and_build (this=3D0x55555a874d00, s=3D..., p=3D0x55555e5a7cf0, loc=3D0x55555e475dd0,=20 pos=3D, results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with 0 elements) at elaborate.cxx:479 #19 0x000055555562c861 in match_node::find_and_build (this=3D0x555556c3a730, s=3D..., p=3D0x55555e5a7cf0, loc=3D0x55555e475dd0, pos=3D1,=20 results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with= 0 elements) at elaborate.cxx:653 #20 0x000055555562c861 in match_node::find_and_build (this=3D0x55555589f1c0, s=3D..., p=3D0x55555e5a7cf0, loc=3D0x55555e475dd0, pos=3D0,=20 results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with= 0 elements) at elaborate.cxx:653 #21 0x0000555555630875 in derive_probes (s=3D..., p=3D, dps= =3D..., optional=3D,=20 rethrow_errors=3D) at elaborate.cxx:1020 #22 0x000055555563191a in alias_expansion_builder::build_with_suffix (this=3D0x55555a874ae0, sess=3D..., use=3D,=20 location=3D0x55555a992ed0, finished_results=3Dstd::vector of length 0, = capacity 0, suffix=3Dstd::vector of length 0, capacity 0) at elaborate.cxx:943 #23 0x000055555562d385 in alias_expansion_builder::build (this=3D, sess=3D..., use=3D,=20 location=3D, parameters=3D..., finished_results=3D...) at elaborate.cxx:867 #24 0x000055555562c6bc in match_node::find_and_build (this=3D0x55555a874a30, s=3D..., p=3D0x55555a9920b0, loc=3D0x55555a992ed0,=20 pos=3D, results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with 0 elements) at elaborate.cxx:479 --Type for more, q to quit, c to continue without paging-- #25 0x000055555562c861 in match_node::find_and_build (this=3D0x555559d428a0, s=3D..., p=3D0x55555a9920b0, loc=3D0x55555a992ed0, pos=3D1,=20 results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with= 0 elements) at elaborate.cxx:653 #26 0x000055555562c861 in match_node::find_and_build (this=3D0x55555589f1c0, s=3D..., p=3D0x55555a9920b0, loc=3D0x55555a992ed0, pos=3D0,=20 results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with= 0 elements) at elaborate.cxx:653 #27 0x0000555555630875 in derive_probes (s=3D..., p=3D, dps= =3D..., optional=3D,=20 rethrow_errors=3D) at elaborate.cxx:1020 #28 0x000055555563191a in alias_expansion_builder::build_with_suffix (this=3D0x55555a874540, sess=3D..., use=3D,=20 location=3D0x55555a21a5b0, finished_results=3Dstd::vector of length 0, = capacity 0, suffix=3Dstd::vector of length 0, capacity 0) at elaborate.cxx:943 #29 0x000055555562d385 in alias_expansion_builder::build (this=3D, sess=3D..., use=3D,=20 location=3D, parameters=3D..., finished_results=3D...) at elaborate.cxx:867 #30 0x000055555562c6bc in match_node::find_and_build (this=3D0x55555a874490, s=3D..., p=3D0x55555a7acc10, loc=3D0x55555a21a5b0,=20 pos=3D, results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with 0 elements) at elaborate.cxx:479 #31 0x000055555562c861 in match_node::find_and_build (this=3D0x55555a21cf10, s=3D..., p=3D0x55555a7acc10, loc=3D0x55555a21a5b0, pos=3D1,=20 results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with= 0 elements) at elaborate.cxx:653 #32 0x000055555562c861 in match_node::find_and_build (this=3D0x55555589f1c0, s=3D..., p=3D0x55555a7acc10, loc=3D0x55555a21a5b0, pos=3D0,=20 results=3Dstd::vector of length 0, capacity 0, builders=3Dstd::set with= 0 elements) at elaborate.cxx:653 #33 0x0000555555630875 in derive_probes (s=3D..., p=3D, dps= =3D..., optional=3D,=20 rethrow_errors=3D) at elaborate.cxx:1020 #34 0x00005555555e8f75 in semantic_pass_symbols (s=3D...) at elaborate.cxx:= 1950 #35 semantic_pass (s=3D...) at elaborate.cxx:2540 #36 passes_0_4 (s=3D...) at main.cxx:1049 #37 0x00005555555db94e in main (argc=3D, argv=3D0x7fffffffc1= 38) at main.cxx:1534 (gdb) --=20 You are receiving this mail because: You are the assignee for the bug.=