skip to main content
research-article
Open Access

A differential approach to undefined behavior detection

Published:25 February 2016Publication History
First page image

References

  1. Bessey, A., Block, K., Chelf, B., Chou, A., Fulton, B., Hallem, S., Henri-Gros, C., Kamsky, A., McPeak, S., Engler, D. A few billion lines of code later: Using static analysis to find bugs in the real world. Commun. ACM 53, 2 (Feb. 2010), 66--75. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Blackshear, S., Lahiri, S. Almost-correct specifications: A modular semantic framework for assigning confidence to warnings. In Proceedings of the 2013 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (Seattle, WA, Jun. 2013), 209--218. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Boehm, H.-J. Threads cannot be implemented as a library. In Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (Chicago, IL, Jun. 2005), 261--268. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Brummayer, R., Biere, A. Boolector: An efficient SMT solver for bit-vectors and arrays. In Proceedings of the 15th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (York, UK, Mar. 2009), 174--177. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bug 30475 -- <code>assert(int+100 > int)</code> optimized away, 2007. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475.Google ScholarGoogle Scholar
  6. Bug 14287 -- ext4: fixpoint divide exception at <code>ext4_fill_super,</code> 2009. https://bugzilla.kernel.org/show_bug.cgi?id=14287.Google ScholarGoogle Scholar
  7. Bug 49820 -- explicit check for integer negative after <code>abs</code> optimized away, 2011. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49820.Google ScholarGoogle Scholar
  8. Bug 53265 -- warn when undefined behavior implies smaller iteration count, 2013. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53265.Google ScholarGoogle Scholar
  9. Cadar, C., Dunbar, D., Engler, D. KLEE: Unassisted and automatic generation of high-coverage tests for complex systems programs. In Proceedings of the 8th Symposium on Operating Systems Design and Implementation (OSDI) (San Diego, CA, Dec. 2008). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Canet, G., Cuoq, P., Monate, B. A value analysis for C programs. In Proceedings of the 9th IEEE International Working Conference on Source Code Analysis and Manipulation (Edmonton, Canada, Sept. 2009), 123--124. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Chen, H., Mao, Y., Wang, X., Zhou, D., Zeldovich, N., Kaashoek, M.F. Linux kernel vulnerabilities: State-of-the-art defenses and open problems. In Proceedings of the 2nd Asia-Pacific Workshop on Systems (Shanghai, China, Jul. 2011). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Clang Compiler User's Manual: Controlling Code Generation, 2014. http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation.Google ScholarGoogle Scholar
  13. Corbet, J. Fun with NULL pointers, part 1, July 2009. http://lwn.net/Articles/342330/.Google ScholarGoogle Scholar
  14. Cuoq, P., Flatt, M., Regehr, J. Proposal for a friendly dialect of C, Aug. 2014. http://blog.regehr.org/archives/1180.Google ScholarGoogle Scholar
  15. Dietz, W., Li, P., Regehr, J., Adve, V. Understanding integer overflow in C/C++. In Proceedings of the 34th International Conference on Software Engineering (ICSE) (Zurich, Switzerland, Jun. 2012), 760--770. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Dillig, I., Dillig, T., Aiken, A. Static error detection using semantic inconsistency inference. In Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (San Diego, CA, Jun. 2007), 435--445. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Dougherty, C.R., Seacord, R.C. C compilers may silently discard some wraparound checks. Vulnerability note VU#162289, US-CERT, 2008. http://www.kb.cert.org/vuls/id/162289, original version: http://www.isspcs.org/render.html?it=9100, also known as CVE-2008-1685.Google ScholarGoogle Scholar
  18. Ellison, C., Roşu, G. Defining the Undefinedness of C. Technical report, University of Illinois, Apr. 2012. http://hdl.handle.net/2142/30780.Google ScholarGoogle Scholar
  19. Ellison, C., Roşu, G. An executable formal semantics of C with applications. In Proceedings of the 39th ACM Symposium on Principles of Programming Languages (POPL) (Philadelphia, PA, Jan. 2012), 533--544. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Engler, D., Chen, D.Y., Hallem, S., Chou, A., Chelf, B. Bugs as deviant behavior: A general approach to inferring errors in systems code. In Proceedings of the 18th ACM Symposium on Operating Systems Principles (SOSP) (Chateau Lake Louise, Banff, Canada, Oct. 2001), 57--72. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Hoenicke, J., Leino, K.R.M., Podelski, A., Schäf, M., Wies, T. It's doomed; we can prove it. In Proceedings of the 16th International Symposium on Formal Methods (FM) (Eindhoven, the Netherlands, Nov. 2009), 338--353. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2: Instruction Set Reference, A--Z, Jan. 2013.Google ScholarGoogle Scholar
  23. ISO/IEC 9899:2011, Programming languages -- C, Dec. 2011.Google ScholarGoogle Scholar
  24. Jack, B. Vector rewrite attack: Exploitable NULL pointer vulnerabilities on ARM and XScale architectures. White paper, Juniper Networks, May 2007.Google ScholarGoogle Scholar
  25. Krebbers, R., Wiedijk, F. Subtleties of the ANSI/ISO C standard. Document N1639, ISO/IEC, Sept. 2012.Google ScholarGoogle Scholar
  26. Lane, T. Anyone for adding <code>--fwrapv</code> to our standard CFLAGS? Dec. 2005. http://www.postgresql.org/message-id/[email protected].Google ScholarGoogle Scholar
  27. Lattner, C. What every C programmer should know about undefined behavior, May 2011. http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html.Google ScholarGoogle Scholar
  28. Lattner, C., Adve, V. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO) (Palo Alto, CA, Mar. 2004), 75--86. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Miller, W.M. C++ standard core language defect reports and accepted issues, issue 1457: Undefined behavior in left-shift, Feb. 2012. http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1457.Google ScholarGoogle Scholar
  30. Power ISA Version 2.06 Revision B, Book I: Power ISA User Instruction Set Architecture, Jul. 2010.Google ScholarGoogle Scholar
  31. Ranise, S., Tinelli, C., Barrett, C. QF_BV logic, Jun. 2013. http://smtlib.cs.uiowa.edu/logics/QF_BV.smt2.Google ScholarGoogle Scholar
  32. Rationale for International Standard -- Programming Languages -- C, Apr. 2003.Google ScholarGoogle Scholar
  33. Regehr, J. A guide to undefined behavior in C and C++, Jul. 2010. http://blog.regehr.org/archives/213.Google ScholarGoogle Scholar
  34. Regehr, J. Undefined behavior consequences contest winners, Jul. 2012. http://blog.regehr.org/archives/767.Google ScholarGoogle Scholar
  35. Seacord, R.C. Dangerous optimizations and the loss of causality, Feb. 2010. https://www.securecoding.cert.org/confluence/download/attachments/40402999/Dangerous+Optimizations.pdf.Google ScholarGoogle Scholar
  36. Stallman, R.M., the GCC Developer Community. Using the GNU Compiler Collection for GCC 4.8.0. GNU Press, Free Software Foundation, Boston, MA, 2013.Google ScholarGoogle Scholar
  37. Teo, E. {PATCH} add <code>-fno-delete-null-pointer-checks</code> to gcc <code>CFLAGS</code>, Jul. 2009. https://lists.ubuntu.com/archives/kernel-team/2009-July/006609.html.Google ScholarGoogle Scholar
  38. Tinnes, J. Bypassing Linux NULL pointer dereference exploit prevention (<code>mmap_min_addr</code>), Jun. 2009. http://blog.cr0.org/2009/06/bypassing-linux-null-pointer.html.Google ScholarGoogle Scholar
  39. Tomb, A., Flanagan, C. Detecting inconsistencies via universal reachability analysis. In Proceedings of the 2012 International Symposium on Software Testing and Analysis (Minneapolis, MN, Jul. 2012), 287--297. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Torvalds, L. Re: {patch} CFS scheduler, -v8, May 2007. https://lkml.org/lkml/2007/5/7/213.Google ScholarGoogle Scholar
  41. Tourrilhes, J. Invalid compilation without <code>-fno-strict-aliasing</code>, Feb. 2003. https://lkml.org/lkml/2003/2/25/270.Google ScholarGoogle Scholar
  42. Wang, X., Chen, H., Cheung, A., Jia, Z., Zeldovich, N., Kaashoek, M.F. Undefined behavior: What happened to my code? In Proceedings of the 3rd Asia-Pacific Workshop on Systems (Seoul, South Korea, Jul. 2012). Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Wang, X., Chen, H., Jia, Z., Zeldovich, N., Kaashoek, M.F. Improving integer security for systems with KINT. In Proceedings of the 10th Symposium on Operating Systems Design and Implementation (OSDI) (Hollywood, CA, Oct. 2012), 163--177. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Wang, X., Zeldovich, N., Kaashoek, M.F., Solar-Lezama, A. Towards optimization-safe systems: Analyzing the impact of undefined behavior. In Proceedings of the 24th ACM Symposium on Operating Systems Principles (SOSP) (Farmington, PA, Nov. 2013), 260--275. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Woods, J.F. Re: Why is this legal? Feb. 1992. http://groups.google.com/group/comp.std.c/msg/dfe1ef367547684b.Google ScholarGoogle Scholar

Index Terms

  1. A differential approach to undefined behavior detection

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Communications of the ACM
      Communications of the ACM  Volume 59, Issue 3
      March 2016
      109 pages
      ISSN:0001-0782
      EISSN:1557-7317
      DOI:10.1145/2897191
      • Editor:
      • Moshe Y. Vardi
      Issue’s Table of Contents

      Copyright © 2016 Owner/Author

      Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 25 February 2016

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format .

    View HTML Format