Efficiently detecting all dangling pointer uses in production servers

被引:47
作者
Dhurjati, Dinakar [1 ]
Adve, Vikram [1 ]
机构
[1] Univ Illinois, 201 N Goodwin Ave, Urbana, IL 61801 USA
来源
DSN 2006 INTERNATIONAL CONFERENCE ON DEPENDABLE SYSTEMS AND NETWORKS, PROCEEDINGS | 2006年
关键词
D O I
10.1109/DSN.2006.31
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
In this paper, we propose a novel technique to detect alldangling pointer uses at run-time that is efficient enough for production use in server codes. One idea (previously used by Electric Fence, PageHeap) is to use a new virtual page for each allocation of the program and rely on page protection mechanisms to check dangling pointer accesses. This naive approach has two limitations that makes it impractical to use in production software: increased physical memory usage and increased address space usage. We propose two key improvements that alleviate both these problems. First, we use a new virtual page for each allocation of the program but map it to the same physical page as the original allocator This allows using nearly identical physical memory as the original program while still retaining the dangling pointer detection capability. We also show how to implement this idea without requiring any changes to the underlying memory allocator Our second idea alleviates the problem of virtual address space exhaustion by using a previously developed compiler transformation called Automatic Pool Allocation to reuse many virtual pages. The transformation partitions the memory of the program based on their lifetimes and allows us to reuse virtual pages when portions of memory become inaccessible. Experimentally we-find that the run-time overhead for five unix servers is less than 4%, for other unix utilities less than 15%. However, in case of allocation intensive benchmarks, we find our overheads are much worse (up to 11x slowdown).
引用
收藏
页码:269 / 278
页数:10
相关论文
共 19 条
[1]  
[Anonymous], 2004, P INT S COD GEN OPT
[2]  
AUSTIN TM, 1994, ACM SIGPLAN C PROGR
[3]  
Dhurjati D., 2006, ACM SIGPLAN C PROGR
[4]  
DHURJATI D, 2005, ACT T EMBEDDED COMPU
[5]  
Dhurjati D., 2006, P 28 INT C SOFTW ENG
[6]  
DOBROVITSKI I, EXPLOIT CVS DOUBLE F
[7]  
HASTINGS R, 1992, WINTER USENIX
[8]  
JONES RWM, 1997, AUTOMATED ALGORITHMI, P13
[9]  
LATTNER C, 2005, MSP CHIC JUN
[10]  
LATTNER C, 2005, P ACM SIGPLAN C PROG