Inventor(s)

Abstract

Memory safety flaws, such as use-after-free vulnerabilities, are caused when collection structures are modified during active iteration loops. Modifications to an active collection structure are sometimes induced by unexpected execution of a scripting language engine or an inter-process communication mechanism, whereby dangling iterators are produced. To mitigate these flaws, a thread-local counter mechanism is disclosed. A counter within thread-local storage is modified across iterator lifecycle operations, including construction, copy construction, move construction, assignment, and destruction. Within a rendering process, execution of a scripting language engine is blocked via a process termination if a non-zero value is held within the counter. Within a non-rendering process, initiation of inter-process communication is blocked via a process termination if a non-zero value is held within the counter. Through these execution constraints, re-entrant modifications during iteration loops are prevented, and memory safety within an application runtime environment is enhanced.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS