[Bug bpf/25298] New: stapbpf unused blocks may cause segmentation fault

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/25298] New: stapbpf unused blocks may cause segmentation fault

tim@mr-dog.net
https://sourceware.org/bugzilla/show_bug.cgi?id=25298

            Bug ID: 25298
           Summary: stapbpf unused blocks may cause segmentation fault
           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: ---

The bpf-optimizer removes any unreachable blocks. As per the current
implementation, these blocks are removed in the following manner.

--------------------------------------------------------------------------------

   // Remove any unreachable blocks.
   for (unsigned i = 0; i < nblocks; ++i)
     if (!visited[i])
       delete p.blocks[i];

--------------------------------------------------------------------------------

However, there could be the case where some unused blocks may lead to other
unused blocks. For example, Block 1 and Block 3 may be unused blocks, and Block
3 leads to Block 1. After Block 1 is deleted, the optimizer will attempt to
delete Block 3 as well. At this time, it may run into a segmentation fault as
Block 3 still contains some references to Block 1.

This problem has been discovered in the work of PR22315.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/25298] stapbpf unused blocks may cause segmentation fault

tim@mr-dog.net
https://sourceware.org/bugzilla/show_bug.cgi?id=25298

Sagar Patel <sapatel at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|systemtap at sourceware dot org    |sapatel at redhat dot com

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