• DocumentCode
    1971442
  • Title

    Efficiently Detecting All Dangling Pointer Uses in Production Servers

  • Author

    Dhurjati, Dinakar ; Adve, Vikram

  • Author_Institution
    Illinois Univ., Urbana, IL
  • fYear
    2006
  • fDate
    25-28 June 2006
  • Firstpage
    269
  • Lastpage
    280
  • Abstract
    In this paper, we propose a novel technique to detect all dangling 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 make 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)
  • Keywords
    paged storage; software reusability; storage allocation; automatic pool allocation; compiler transformation; memory allocation; page protection mechanism; physical memory usage; pointer detection; production server; virtual address space exhaustion; virtual page; Buffer overflow; Debugging; Electric fences; Embedded software; Embedded system; Engineering profession; Production; Protection; Runtime; Software performance;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Dependable Systems and Networks, 2006. DSN 2006. International Conference on
  • Conference_Location
    Philadelphia, PA
  • Print_ISBN
    0-7695-2607-1
  • Type

    conf

  • DOI
    10.1109/DSN.2006.31
  • Filename
    1633516