Finding Errors in Registrations of Local Variables Using Coccinelle for Accurate Garbage Collection

Tomoharu Ugawa, Taiki Fujimoto
2020 Journal of Information Processing  
For accurate garbage collection (GC), all pointers belonging to the root set must be found. In a virtual machine (VM) implemented in C language, local variables of C language may contain pointers. Thus, some VMs add the values or addresses of local variables to a table that is visible to GC. However, this approach is error-prone because it requires adding local variables and removing them correctly though the entire source code of the VM. In this research, we checked if local variables are
more » ... variables are added and removed correctly by pattern matching against control flow graphs of the source code of the VM. We applied this check to the VM of a subset of JavaScript we are developing and found that it could identify many cases of missed adding and redundant adding.
doi:10.2197/ipsjjip.28.169 fatcat:csasailmpbfq5cbtrjv2qb2cbe