Options
Identifying use-after-free variables in fire-and-forget tasks
Date Issued
30-06-2017
Author(s)
Jyothi Krishna, V. S.
Litvinov, Vassily
Abstract
Programmers use begin constructs in Chapel to create fire and forget-style tasks, which do not perform any implicit synchronization with the parent task. While this provides a good facility to invoke parallel tasks, it poses issues when the child task accesses a variable declared in the scope of its ancestor. If the parent task exits before the child, its scope is deallocated and the child may end up accessing memory location that is no longer valid. The child task must synchronize with the parent task to ensure legal access to its variables, for example by means of atomic variables, sync statements, or sync and single synchronization variables. In this work, we address the above issue with a compile-time partial inter-procedural analysis for outer variable accesses in begin tasks to identify and report potentially dangerous accesses. We make use of a Concurrent Control Flow Graph to generate all possible run-time Parallel Program States (PPS). All outer variable accesses that are potentially dangerous in the generated PPS-es are then reported to the user for rectification.
Subjects