Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces

Size: px
Start display at page:

Download "Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces"

Transcription

1 Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces Byeongcheol Lee Ben Wiedermann Mar>n Hirzel Robert Grimm Kathryn S. McKinley B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 1

2 Mul>lingual programs are ubiquitous Python Java Python C/C++ C Standard libraries Java Python Ruby C/C++ Multilingual bindings Java C/C++ Plug-in extensions B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 2

3 All mul>lingual programs use foreign func>on interfaces (FFIs) B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 3

4 FFIs have many dangerous pikalls. B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 4

5 FFIs are complex and hard to program FFI bugs are rampant 716 [Li & Tan 09] 86 [Kondoh & Onodera 08] 155 [Furr & Foster 06]. B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 5

6 Mul>lingual programmers need dynamic bug detectors Sta>c compile >me verifica>on is hard A rule of no more than 16 local references in JNI False alarms in sta>c bug finders Dynamic FFI checking is complementary No false alarms Bugs in a single program run B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 6

7 FFI specifica>ons are not friendly to dynamic checking 303 pages B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 7

8 FFI specifica>ons are not friendly to dynamic checking Constraint 1 Constraint 2 Constraint pages 1,500+ constraints on 229+ JNI function B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 8

9 FFI specifica>ons are not friendly to dynamic checking Constraint 1 Constraint 2 Constraint 3.. JNI Java C 303 pages 1,500+ constraints on 229+ JNI function Every language transition requires bookkeeping & checking 1,500+ constraints 9 Time-consuming and error-prone B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 9

10 Our insight: FFI constraints have hierarchy New Language difference Constraint 1 Constraint 2 Constraint 3.. Thread Type Resource 1,500+ constraints B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 10

11 Our insight: FFI constraints have hierarchy New Language difference Constraint 1 Constraint 2 Constraint 3.. Thread Type Resource 1,500+ constraints 11 state machines represent 1,500+ constraints B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 11

12 Our insight: state machines change states at language transi>ons New JNI Java C JNI JNI Java C Bookkeeping and checking at language boundary B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 12

13 Our insight: state machines change states at language transi>ons New Run S0 Java JNI S1 JNI C Error B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 13

14 Synthesizing dynamic bug detectors State machine description Synthesizer Java JNI JNI bug detector (Jinn) JNI C Jinn Our synthesis approach applies to other FFIs including Python/C B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 14

15 Outline I. Classifica>on of language seman>c mismatch in FFIs II. Synthesis of FFI bug detectors with state machines III. State machines A. An example JNI bug B. Mapping state machines to en>>es C. Mapping state transi>ons to language transi>ons IV. Jinn: a dynamic JNI bug detector A. Finds more bugs than sta>c checkers & other dynamic checkers B. Adds modest execu>on >me overhead C. Finds lots of real world bugs B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 15

16 The GNOME bug uses an invalid JNI reference Call:Java C void Bug_producer( JNIEnv *env, jobject lref){ global = lref; } B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley

17 The GNOME bug uses an invalid JNI reference Call:Java C Return:C Java void Bug_producer( JNIEnv *env, jobject lref){ global = lref; } B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley

18 The GNOME bug uses an invalid JNI reference JVM crashes Call:Java C Return:C Java Call: Java C Call: C Java void Bug_producer( JNIEnv *env, jobject lref){ global = lref; } void Bug_consumer( JNIEnv *env){ env->callj(global); B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley

19 Outline I. Classifica>on of language seman>c mismatch in FFIs II. Synthesis of FFI bug detectors with state machines III. State machines A. An example JNI bug B. Mapping state machines to en>>es C. Mapping state transi>ons to language transi>ons IV. Jinn: a dynamic JNI bug detector A. Finds more bugs than sta>c checkers & other dynamic checkers B. Adds modest execu>on >me overhead C. Finds lots of real world bugs B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 19

20 Map a state machine to an en>ty Before Acquire acquire Acquired Call:Java C void Bug_producer( JNIEnv *env, jobject lref){ global = lref; } B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 20

21 Map a state machine to an en>ty Before Acquire acquire Acquired release Released Call:Java C Return:C Java void Bug_producer( JNIEnv *env, jobject lref){ global = lref; } B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 21

22 Map a state machine to an en>ty Before Acquire acquire Acquired release Released use Error: Dangling Call:Java C Return:C Java Call: Java C Call: C Java void Bug_producer( JNIEnv *env, jobject lref){ global = lref; } void Bug_consumer( JNIEnv *env){ env->callj(global); B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 22

23 Outline I. Classifica>on of language seman>c mismatch in FFIs II. Synthesis of FFI bug detectors with state machines III. State machines A. An example JNI bug B. Mapping state machines to en>>es C. Mapping state transi>ons to language transi>ons IV. Jinn: a dynamic JNI bug detector A. Finds more bugs than sta>c checkers & other dynamic checkers B. Adds modest execu>on >me overhead C. Finds lots of real world bugs B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 23

24 Map state transi>ons to language transi>ons Before Acquire Acquired acquire State transi*on Language transi*on Examples Acquire Call:Java C Na>ve methods taking references Return:Java C GetObjectField release Release Return: C Java Any na>ve method Released use Error: Dangling Return: Java C DeleteLocalRef Use Call: C Java CallVoidMethod Return: C Java Na>ve methods returning reference B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 24

25 Outline I. Classifica>on of language seman>c mismatch in FFIs II. Synthesis of FFI bug detectors with state machines III. State machines A. An example JNI bug B. Mapping state machines to en>>es C. Mapping state transi>ons to language transi>ons IV. Jinn: a dynamic JNI bug detector A. Finds more bugs than sta>c checkers & other dynamic checkers B. Adds modest execu>on >me overhead C. Finds lots of real world bugs B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 25

26 Jinn covers more bugs than JVM internal checkers JNI PiKall JVM checking Jinn Hotspot J9 Error checking Warning Error Excep*on Invalid Arguments to JNI func>ons Running Crash Excep*on Confusing jclass with jobject Error Error Excep*on Confusing IDs with references Error Error Excep*on Viola>ng access control rules NPE NPE Excep*on Retaining virtual machine resources Crash Error Excep*on Excessive local reference crea>on Running Error Excep*on Using invalid local references Error Error Excep*on Using the JNIEnv across threads Error Crash Excep*on B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 26

27 Jinn adds modest >me overhead % antlr bloat chart eclipse fop hsqldb jython lunidex luserach pmd xalan compress jess raytrace db javac mpegaudio mtrt jack GeoMean B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 27

28 Jinn finds JNI bugs in real world applica>ons Programs bug reports Community response 1 Confirmed: bug To be reported 5 2 Fixed: r949842, r946181, r944525, r947006, r Fixed: r676 Confirmed: bug B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 28

29 Related work How about legacy JNI programs? Hirzel & Grimm 07 Tan et al. 06 Safe interface languages B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 29

30 Related work How about false alarms? Li & Tan 09 Hirzel & Grimm 07 Tan et al. 06 Safe interface languages Kondoh & Onodera 08 Furr & Foster 06 Static bug finders B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 30

31 Related work Hirzel & Grimm 07 Tan et al. 06 Safe interface languages Li & Tan 09 Kondoh & Onodera 08 Furr & Foster 06 Static bug finders How about low coverage? J9 Hotspot Dynamic checking in JVMs B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 31

32 Summary FFI has many programming constraints and bugs. Synthesis of dynamic FFI bug detectors Classifica>on system for characterizing language seman>c mismatches State machine transi>ons in terms of language transi>ons. Jinn: An effec>ve dynamic bug detector for JNI High coverage Modest overhead Finds bugs in real world JNI programs B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K. S. McKinley 32

Jinn: Synthesizing a Dynamic Bug Detector for Foreign Language Interfaces

Jinn: Synthesizing a Dynamic Bug Detector for Foreign Language Interfaces UT Austin Computer Science Technical Report TR-09-39. Under double-blind submission to PLDI 2010. Jinn: Synthesizing a Dynamic Bug Detector for Foreign Language Interfaces Byeongcheol Lee University of

More information

Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces

Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces Byeongcheol Lee Ben Wiedermann Martin Hirzel Robert Grimm Kathryn S. McKinley University of Texas at Austin IBM Watson Research

More information

Towards Parallel, Scalable VM Services

Towards Parallel, Scalable VM Services Towards Parallel, Scalable VM Services Kathryn S McKinley The University of Texas at Austin Kathryn McKinley Towards Parallel, Scalable VM Services 1 20 th Century Simplistic Hardware View Faster Processors

More information

Phase-based Adaptive Recompilation in a JVM

Phase-based Adaptive Recompilation in a JVM Phase-based Adaptive Recompilation in a JVM Dayong Gu Clark Verbrugge Sable Research Group, School of Computer Science McGill University, Montréal, Canada {dgu1, clump}@cs.mcgill.ca April 7, 2008 Sable

More information

Probabilistic Calling Context

Probabilistic Calling Context Probabilistic Calling Context Michael D. Bond Kathryn S. McKinley University of Texas at Austin Why Context Sensitivity? Static program location not enough at com.mckoi.db.jdbcserver.jdbcinterface.execquery():213

More information

Free-Me: A Static Analysis for Automatic Individual Object Reclamation

Free-Me: A Static Analysis for Automatic Individual Object Reclamation Free-Me: A Static Analysis for Automatic Individual Object Reclamation Samuel Z. Guyer, Kathryn McKinley, Daniel Frampton Presented by: Jason VanFickell Thanks to Dimitris Prountzos for slides adapted

More information

How s the Parallel Computing Revolution Going? Towards Parallel, Scalable VM Services

How s the Parallel Computing Revolution Going? Towards Parallel, Scalable VM Services How s the Parallel Computing Revolution Going? Towards Parallel, Scalable VM Services Kathryn S McKinley The University of Texas at Austin Kathryn McKinley Towards Parallel, Scalable VM Services 1 20 th

More information

Averroes: Letting go of the library!

Averroes: Letting go of the library! Workshop on WALA - PLDI 15 June 13th, 2015 public class HelloWorld { public static void main(string[] args) { System.out.println("Hello, World!"); 2 public class HelloWorld { public static void main(string[]

More information

A Quantitative Evaluation of the Contribution of Native Code to Java Workloads

A Quantitative Evaluation of the Contribution of Native Code to Java Workloads A Quantitative Evaluation of the Contribution of Native Code to Java Workloads Walter Binder University of Lugano Switzerland walter.binder@unisi.ch Jarle Hulaas, Philippe Moret EPFL Switzerland {jarle.hulaas,philippe.moret}@epfl.ch

More information

RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining

RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining Patrick Meredith Grigore Rosu University of Illinois at Urbana Champaign (UIUC) Run'me Verifica'on, Inc. (joint work with Dongyun

More information

The Segregated Binary Trees: Decoupling Memory Manager

The Segregated Binary Trees: Decoupling Memory Manager The Segregated Binary Trees: Decoupling Memory Manager Mehran Rezaei Dept. of Electrical and Computer Engineering University of Alabama in Huntsville Ron K. Cytron Department of Computer Science Washington

More information

JOVE. An Optimizing Compiler for Java. Allen Wirfs-Brock Instantiations Inc.

JOVE. An Optimizing Compiler for Java. Allen Wirfs-Brock Instantiations Inc. An Optimizing Compiler for Java Allen Wirfs-Brock Instantiations Inc. Object-Orient Languages Provide a Breakthrough in Programmer Productivity Reusable software components Higher level abstractions Yield

More information

Understanding Parallelism-Inhibiting Dependences in Sequential Java

Understanding Parallelism-Inhibiting Dependences in Sequential Java Understanding Parallelism-Inhibiting Dependences in Sequential Java Programs Atanas(Nasko) Rountev Kevin Van Valkenburgh Dacong Yan P. Sadayappan Ohio State University Overview and Motivation Multi-core

More information

MicroPhase: An Approach to Proactively Invoking Garbage Collection for Improved Performance

MicroPhase: An Approach to Proactively Invoking Garbage Collection for Improved Performance MicroPhase: An Approach to Proactively Invoking Garbage Collection for Improved Performance Feng Xian, Witawas Srisa-an, and Hong Jiang Department of Computer Science & Engineering University of Nebraska-Lincoln

More information

Efficient Runtime Tracking of Allocation Sites in Java

Efficient Runtime Tracking of Allocation Sites in Java Efficient Runtime Tracking of Allocation Sites in Java Rei Odaira, Kazunori Ogata, Kiyokuni Kawachiya, Tamiya Onodera, Toshio Nakatani IBM Research - Tokyo Why Do You Need Allocation Site Information?

More information

The DaCapo Benchmarks: Java Benchmarking Development and Analysis

The DaCapo Benchmarks: Java Benchmarking Development and Analysis The DaCapo Benchmarks: Java Benchmarking Development and Analysis Stephen M Blackburn αβ, Robin Garner β, Chris Hoffmann γ, Asjad M Khan γ, Kathryn S McKinley δ, Rotem Bentzur ε, Amer Diwan ζ, Daniel Feinberg

More information

Inlining Java Native Calls at Runtime

Inlining Java Native Calls at Runtime Inlining Java Native Calls at Runtime (CASCON 2005 4 th Workshop on Compiler Driven Performance) Levon Stepanian, Angela Demke Brown Computer Systems Group Department of Computer Science, University of

More information

MUSEUM: Debugging Real-World Multilingual Programs Using Mutation Analysis

MUSEUM: Debugging Real-World Multilingual Programs Using Mutation Analysis MUSEUM: Debugging Real-World Multilingual Programs Using Mutation Analysis Shin Hong 1, Taehoon Kwak 2, Byeongcheol Lee 3,, Yiru Jeon 2, Bongseok Ko 3, Yunho Kim 2, Moonzoo Kim 2 Abstract Context: The

More information

Adaptive Optimization using Hardware Performance Monitors. Master Thesis by Mathias Payer

Adaptive Optimization using Hardware Performance Monitors. Master Thesis by Mathias Payer Adaptive Optimization using Hardware Performance Monitors Master Thesis by Mathias Payer Supervising Professor: Thomas Gross Supervising Assistant: Florian Schneider Adaptive Optimization using HPM 1/21

More information

Lu Fang, University of California, Irvine Liang Dou, East China Normal University Harry Xu, University of California, Irvine

Lu Fang, University of California, Irvine Liang Dou, East China Normal University Harry Xu, University of California, Irvine Lu Fang, University of California, Irvine Liang Dou, East China Normal University Harry Xu, University of California, Irvine 2015-07-09 Inefficient code regions [G. Jin et al. PLDI 2012] Inefficient code

More information

History of Java. Java was originally developed by Sun Microsystems star:ng in This language was ini:ally called Oak Renamed Java in 1995

History of Java. Java was originally developed by Sun Microsystems star:ng in This language was ini:ally called Oak Renamed Java in 1995 Java Introduc)on History of Java Java was originally developed by Sun Microsystems star:ng in 1991 James Gosling Patrick Naughton Chris Warth Ed Frank Mike Sheridan This language was ini:ally called Oak

More information

Tolerating Memory Leaks

Tolerating Memory Leaks Tolerating Memory Leaks UT Austin Technical Report TR-07-64 December 7, 2007 Michael D. Bond Kathryn S. McKinley Department of Computer Sciences The University of Texas at Austin {mikebond,mckinley}@cs.utexas.edu

More information

Program Calling Context. Motivation

Program Calling Context. Motivation Program alling ontext Motivation alling context enhances program understanding and dynamic analyses by providing a rich representation of program location ollecting calling context can be expensive The

More information

GC Assertions: Using the Garbage Collector to Check Heap Properties

GC Assertions: Using the Garbage Collector to Check Heap Properties GC Assertions: Using the Garbage Collector to Check Heap Properties Edward E. Aftandilian Samuel Z. Guyer Department of Computer Science Tufts University {eaftan,sguyer}@cs.tufts.edu Abstract This paper

More information

Elfen Scheduling. Fine-Grain Principled Borrowing from Latency-Critical Workloads using Simultaneous Multithreading (SMT) Xi Yang

Elfen Scheduling. Fine-Grain Principled Borrowing from Latency-Critical Workloads using Simultaneous Multithreading (SMT) Xi Yang Elfen Scheduling Fine-Grain Principled Borrowing from Latency-Critical Workloads using Simultaneous Multithreading (SMT) Xi Yang Australian National University Stephen M Blackburn Australian National University

More information

Limits of Parallel Marking Garbage Collection....how parallel can a GC become?

Limits of Parallel Marking Garbage Collection....how parallel can a GC become? Limits of Parallel Marking Garbage Collection...how parallel can a GC become? Dr. Fridtjof Siebert CTO, aicas ISMM 2008, Tucson, 7. June 2008 Introduction Parallel Hardware is becoming the norm even for

More information

Trace-based JIT Compilation

Trace-based JIT Compilation Trace-based JIT Compilation Hiroshi Inoue, IBM Research - Tokyo 1 Trace JIT vs. Method JIT https://twitter.com/yukihiro_matz/status/533775624486133762 2 Background: Trace-based Compilation Using a Trace,

More information

An Efficient Memory Management Technique That Improves Localities

An Efficient Memory Management Technique That Improves Localities An Efficient Memory Management Technique That Improves Localities Krishna Kavi Mehran Rezaei Dept. of Electrical and Computer Engineering University of Alabama in Huntsville Ron K. Cytron Department of

More information

Adaptive Multi-Level Compilation in a Trace-based Java JIT Compiler

Adaptive Multi-Level Compilation in a Trace-based Java JIT Compiler Adaptive Multi-Level Compilation in a Trace-based Java JIT Compiler Hiroshi Inoue, Hiroshige Hayashizaki, Peng Wu and Toshio Nakatani IBM Research Tokyo IBM Research T.J. Watson Research Center October

More information

RaceMob: Crowdsourced Data Race Detec,on

RaceMob: Crowdsourced Data Race Detec,on RaceMob: Crowdsourced Data Race Detec,on Baris Kasikci, Cris,an Zamfir, and George Candea School of Computer & Communica3on Sciences Data Races to shared memory loca,on By mul3ple threads At least one

More information

Automa'c Test Genera'on

Automa'c Test Genera'on Automa'c Test Genera'on First, about Purify Paper about Purify (and PurifyPlus) posted How do you monitor reads and writes: insert statements before and a?er reads, writes in code can s'll be done with

More information

02/03/15. Compile, execute, debugging THE ECLIPSE PLATFORM. Blanks'distribu.on' Ques+ons'with'no'answer' 10" 9" 8" No."of"students"vs."no.

02/03/15. Compile, execute, debugging THE ECLIPSE PLATFORM. Blanks'distribu.on' Ques+ons'with'no'answer' 10 9 8 No.ofstudentsvs.no. Compile, execute, debugging THE ECLIPSE PLATFORM 30" Ques+ons'with'no'answer' What"is"the"goal"of"compila5on?" 25" What"is"the"java"command"for" compiling"a"piece"of"code?" What"is"the"output"of"compila5on?"

More information

Java Performance Evaluation through Rigorous Replay Compilation

Java Performance Evaluation through Rigorous Replay Compilation Java Performance Evaluation through Rigorous Replay Compilation Andy Georges Lieven Eeckhout Dries Buytaert Department Electronics and Information Systems, Ghent University, Belgium {ageorges,leeckhou}@elis.ugent.be,

More information

A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler

A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler Hiroshi Inoue, Hiroshige Hayashizaki, Peng Wu and Toshio Nakatani IBM Research Tokyo IBM Research T.J. Watson Research Center April

More information

Method-Level Phase Behavior in Java Workloads

Method-Level Phase Behavior in Java Workloads Method-Level Phase Behavior in Java Workloads Andy Georges, Dries Buytaert, Lieven Eeckhout and Koen De Bosschere Ghent University Presented by Bruno Dufour dufour@cs.rutgers.edu Rutgers University DCS

More information

Chronicler: Lightweight Recording to Reproduce Field Failures

Chronicler: Lightweight Recording to Reproduce Field Failures Chronicler: Lightweight Recording to Reproduce Field Failures Jonathan Bell, Nikhil Sarda and Gail Kaiser Columbia University, New York, NY USA What happens when software crashes? Stack Traces Aren

More information

Z-Rays: Divide Arrays and Conquer Speed and Flexibility

Z-Rays: Divide Arrays and Conquer Speed and Flexibility Z-Rays: Divide Arrays and Conquer Speed and Flexibility Jennifer B. Sartor Stephen M. Blackburn Daniel Frampton Martin Hirzel Kathryn S. McKinley University of Texas at Austin Australian National University

More information

Alterna(ve Architectures

Alterna(ve Architectures Alterna(ve Architectures COMS W4118 Prof. Kaustubh R. Joshi krj@cs.columbia.edu hep://www.cs.columbia.edu/~krj/os References: Opera(ng Systems Concepts (9e), Linux Kernel Development, previous W4118s Copyright

More information

Experiences with Multi-threading and Dynamic Class Loading in a Java Just-In-Time Compiler

Experiences with Multi-threading and Dynamic Class Loading in a Java Just-In-Time Compiler , Compilation Technology Experiences with Multi-threading and Dynamic Class Loading in a Java Just-In-Time Compiler Daryl Maier, Pramod Ramarao, Mark Stoodley, Vijay Sundaresan TestaRossa JIT compiler

More information

Genericity. Philippe Collet. Master 1 IFI Interna3onal h9p://dep3nfo.unice.fr/twiki/bin/view/minfo/sofeng1314. P.

Genericity. Philippe Collet. Master 1 IFI Interna3onal h9p://dep3nfo.unice.fr/twiki/bin/view/minfo/sofeng1314. P. Genericity Philippe Collet Master 1 IFI Interna3onal 2013-2014 h9p://dep3nfo.unice.fr/twiki/bin/view/minfo/sofeng1314 P. Collet 1 Agenda Introduc3on Principles of parameteriza3on Principles of genericity

More information

Gang Tan, Boston College Lehigh University

Gang Tan, Boston College Lehigh University An Empirical Security Study of the Native Code in the JDK Gang Tan, Boston College Lehigh University Jason Croft, Boston College Java Security Various holes identified d and fixed [Dean, Felten, Wallach

More information

Context Threading: A flexible and efficient dispatch technique for virtual machine interpreters

Context Threading: A flexible and efficient dispatch technique for virtual machine interpreters : A flexible and efficient dispatch technique for virtual machine interpreters Marc Berndl Benjamin Vitale Mathew Zaleski Angela Demke Brown Research supported by IBM CAS, NSERC, CITO 1 Interpreter performance

More information

FastTrack: Efficient and Precise Dynamic Race Detection (+ identifying destructive races)

FastTrack: Efficient and Precise Dynamic Race Detection (+ identifying destructive races) FastTrack: Efficient and Precise Dynamic Race Detection (+ identifying destructive races) Cormac Flanagan UC Santa Cruz Stephen Freund Williams College Multithreading and Multicore! Multithreaded programming

More information

Objec+ves. Review. Basics of Java Syntax Java fundamentals. What are quali+es of good sooware? What is Java? How do you compile a Java program?

Objec+ves. Review. Basics of Java Syntax Java fundamentals. What are quali+es of good sooware? What is Java? How do you compile a Java program? Objec+ves Basics of Java Syntax Java fundamentals Ø Primi+ve data types Ø Sta+c typing Ø Arithme+c operators Ø Rela+onal operators 1 Review What are quali+es of good sooware? What is Java? Ø Benefits to

More information

Enhanced Stuart Marks aka Dr Deprecator JDK Core Libraries Java PlaJorm Group, Oracle

Enhanced Stuart Marks aka Dr Deprecator JDK Core Libraries Java PlaJorm Group, Oracle Enhanced Depreca@on Stuart Marks aka Dr Deprecator JDK Core Libraries Java PlaJorm Group, Oracle Copyright 2016, Oracle and/or its affiliates. All rights reserved. Enhanced Depreca@on Concepts & History

More information

Detecting and Fixing Memory-Related Performance Problems in Managed Languages

Detecting and Fixing Memory-Related Performance Problems in Managed Languages Detecting and Fixing -Related Performance Problems in Managed Languages Lu Fang Committee: Prof. Guoqing Xu (Chair), Prof. Alex Nicolau, Prof. Brian Demsky University of California, Irvine May 26, 2017,

More information

Chip-Multithreading Systems Need A New Operating Systems Scheduler

Chip-Multithreading Systems Need A New Operating Systems Scheduler Chip-Multithreading Systems Need A New Operating Systems Scheduler Alexandra Fedorova Christopher Small Daniel Nussbaum Margo Seltzer Harvard University, Sun Microsystems Sun Microsystems Sun Microsystems

More information

We can also throw Java exceptions in the native code.

We can also throw Java exceptions in the native code. 4. 5. 6. 7. Java arrays are handled by JNI as reference types. We have two types of arrays: primitive and object arrays. They are treated differently by JNI. Primitive arrays contain primitive data types

More information

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1 SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine David Bélanger dbelan2@cs.mcgill.ca Sable Research Group McGill University Montreal, QC January 28, 2004 SABLEJIT: A Retargetable

More information

JAVA Native Interface

JAVA Native Interface CSC 308 2.0 System Development with Java JAVA Native Interface Department of Statistics and Computer Science Java Native Interface Is a programming framework JNI functions written in a language other than

More information

The RV System Tutorial

The RV System Tutorial The RV System Tutorial Patrick Meredith and Grigore Rosu joint work with Feng Chen, Dongyun Jin, Dennis Griffith, Michael Ilseman Runtime Verification, Inc. University of Illinois The RV System!"#$%&'(%)!"#*)+,'-(!9&('/+

More information

Leveraging Test Generation and Specification Mining for Automated Bug Detection without False Positives

Leveraging Test Generation and Specification Mining for Automated Bug Detection without False Positives Leveraging Test Generation and Specification Mining for Automated Bug Detection without False Positives Michael Pradel and Thomas R. Gross Department of Computer Science ETH Zurich 1 Motivation API usage

More information

Analysis and Tes,ng of PLEXIL Plans

Analysis and Tes,ng of PLEXIL Plans Analysis and Tes,ng of PLEXIL Plans Jason Biatek, Michael W. Whalen, Sanjai Rayadurgam, Mats P.E. Heimdahl, Michael Lowry 04-06- 14 FormaliSE - Mike Whalen 1 Autonomy at NASA 04-06- 14 FormaliSE - Mike

More information

CSE Opera,ng System Principles

CSE Opera,ng System Principles CSE 30341 Opera,ng System Principles Lecture 5 Processes / Threads Recap Processes What is a process? What is in a process control bloc? Contrast stac, heap, data, text. What are process states? Which

More information

Points-to Analysis for Java Using Annotated Constraints*

Points-to Analysis for Java Using Annotated Constraints* Points-to Analysis for Java Using Annotated Constraints* Dr. Barbara G. Ryder Rutgers University http://www.cs.rutgers.edu/~ryder http://prolangs.rutgers.edu/ *Joint research with Atanas Rountev and Ana

More information

Automated System Analysis using Executable SysML Modeling Pa8erns

Automated System Analysis using Executable SysML Modeling Pa8erns Automated System Analysis using Executable SysML Modeling Pa8erns Maged Elaasar* Modelware Solu

More information

JIT Compilation Policy for Modern Machines

JIT Compilation Policy for Modern Machines JIT Compilation Policy for Modern Machines Prasad A. Kulkarni Department of Electrical Engineering and Computer Science, University of Kansas prasadk@ku.edu Abstract Dynamic or Just-in-Time (JIT) compilation

More information

How to sleep *ght and keep your applica*ons running on IPv6 transi*on. The importance of IPv6 Applica*on Tes*ng

How to sleep *ght and keep your applica*ons running on IPv6 transi*on. The importance of IPv6 Applica*on Tes*ng How to sleep *ght and keep your applica*ons running on IPv6 transi*on The importance of IPv6 Applica*on Tes*ng About this presenta*on It presents a generic methodology to test the IPv6 func*onality of

More information

New Algorithms for Static Analysis via Dyck Reachability

New Algorithms for Static Analysis via Dyck Reachability New Algorithms for Static Analysis via Dyck Reachability Andreas Pavlogiannis 4th Inria/EPFL Workshop February 15, 2018 A. Pavlogiannis New Algorithms for Static Analysis via Dyck Reachability 2 A. Pavlogiannis

More information

Java without the Coffee Breaks: A Nonintrusive Multiprocessor Garbage Collector

Java without the Coffee Breaks: A Nonintrusive Multiprocessor Garbage Collector Java without the Coffee Breaks: A Nonintrusive Multiprocessor Garbage Collector David F. Bacon IBM T.J. Watson Research Center Joint work with C.R. Attanasio, Han Lee, V.T. Rajan, and Steve Smith ACM Conference

More information

IBM Research - Tokyo 数理 計算科学特論 C プログラミング言語処理系の最先端実装技術. Trace Compilation IBM Corporation

IBM Research - Tokyo 数理 計算科学特論 C プログラミング言語処理系の最先端実装技術. Trace Compilation IBM Corporation 数理 計算科学特論 C プログラミング言語処理系の最先端実装技術 Trace Compilation Trace JIT vs. Method JIT https://twitter.com/yukihiro_matz/status/533775624486133762 2 Background: Trace-based Compilation Using a Trace, a hot path identified

More information

Identifying the Sources of Cache Misses in Java Programs Without Relying on Hardware Counters. Hiroshi Inoue and Toshio Nakatani IBM Research - Tokyo

Identifying the Sources of Cache Misses in Java Programs Without Relying on Hardware Counters. Hiroshi Inoue and Toshio Nakatani IBM Research - Tokyo Identifying the Sources of Cache Misses in Java Programs Without Relying on Hardware Counters Hiroshi Inoue and Toshio Nakatani IBM Research - Tokyo June 15, 2012 ISMM 2012 at Beijing, China Motivation

More information

Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance

Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance Stephen M. Blackburn Australian National University Steve.Blackburn@anu.edu.au Kathryn S. McKinley

More information

Study on Programming by Combining Java with C++ Based on JNI

Study on Programming by Combining Java with C++ Based on JNI doi: 10.14355/spr.2016.05.003 Study on Programming by Combining Java with C++ Based on JNI Tan Qingquan 1, Luo Huachun* 2, Jiang Lianyan 3, Bo Tao 4, Liu Qun 5, Liu Bo 6 Earthquake Administration of Beijing

More information

Principles of Programming Languages

Principles of Programming Languages Principles of Programming Languages h"p://www.di.unipi.it/~andrea/dida2ca/plp- 14/ Prof. Andrea Corradini Department of Computer Science, Pisa Lesson 18! Bootstrapping Names in programming languages Binding

More information

Announcements. Working on requirements this week Work on design, implementation. Types. Lecture 17 CS 169. Outline. Java Types

Announcements. Working on requirements this week Work on design, implementation. Types. Lecture 17 CS 169. Outline. Java Types Announcements Types Working on requirements this week Work on design, implementation Lecture 17 CS 169 Prof. Brewer CS 169 Lecture 16 1 Prof. Brewer CS 169 Lecture 16 2 Outline Type concepts Where do types

More information

Intelligent Compilation

Intelligent Compilation Intelligent Compilation John Cavazos Department of Computer and Information Sciences University of Delaware Autotuning and Compilers Proposition: Autotuning is a component of an Intelligent Compiler. Code

More information

Mixed Mode Execution with Context Threading

Mixed Mode Execution with Context Threading Mixed Mode Execution with Context Threading Mathew Zaleski, Marc Berndl, Angela Demke Brown University of Toronto {matz,berndl,demke}@cs.toronto.edu (CASCON 2005, Oct 19/2005.) Overview Introduction Background:

More information

Debunking Dynamic Optimization Myths

Debunking Dynamic Optimization Myths Debunking Dynamic Optimization Myths Michael Hind (Material borrowed from 3 hr PLDI 04 Tutorial by Stephen Fink, David Grove, and Michael Hind. See those slides for more details.) September 15, 2004 Future

More information

The Potentials and Challenges of Trace Compilation:

The Potentials and Challenges of Trace Compilation: Peng Wu IBM Research January 26, 2011 The Potentials and Challenges of Trace Compilation: Lessons learned from building a trace-jit on top of J9 JVM (Joint work with Hiroshige Hayashizaki and Hiroshi Inoue,

More information

Approximation of the Worst-Case Execution Time Using Structural Analysis. Matteo Corti and Thomas Gross Zürich

Approximation of the Worst-Case Execution Time Using Structural Analysis. Matteo Corti and Thomas Gross Zürich Approximation of the Worst-Case Execution Time Using Structural Analysis Matteo Corti and Thomas Gross Zürich Goal Worst-case execution time estimation of softreal time Java applications. We focus on semantic

More information

Lightweight Data Race Detection for Production Runs

Lightweight Data Race Detection for Production Runs Lightweight Data Race Detection for Production Runs Swarnendu Biswas, UT Austin Man Cao, Ohio State University Minjia Zhang, Microsoft Research Michael D. Bond, Ohio State University Benjamin P. Wood,

More information

Large-Scale API Protocol Mining for Automated Bug Detection

Large-Scale API Protocol Mining for Automated Bug Detection Large-Scale API Protocol Mining for Automated Bug Detection Michael Pradel Department of Computer Science ETH Zurich 1 Motivation LinkedList pinconnections =...; Iterator i = pinconnections.iterator();

More information

CGO:U:Auto-tuning the HotSpot JVM

CGO:U:Auto-tuning the HotSpot JVM CGO:U:Auto-tuning the HotSpot JVM Milinda Fernando, Tharindu Rusira, Chalitha Perera, Chamara Philips Department of Computer Science and Engineering University of Moratuwa Sri Lanka {milinda.10, tharindurusira.10,

More information

CSCI 135 Programming Exam #1 Fundamentals of Computer Science I Fall 2014

CSCI 135 Programming Exam #1 Fundamentals of Computer Science I Fall 2014 CSCI 135 Programming Exam #1 Fundamentals of Computer Science I Fall 2014 This part of the exam is like a mini- programming assignment. You will create a program, compile it, and debug it as necessary.

More information

Efficient Runtime Tracking of Allocation Sites in Java

Efficient Runtime Tracking of Allocation Sites in Java Efficient Runtime Tracking of Allocation Sites in Java Rei Odaira, Kazunori Ogata, Kiyokuni Kawachiya, Tamiya Onodera, Toshio Nakatani IBM Research Tokyo 623-4, Shimotsuruma, Yamato-shi, Kanagawa-ken,

More information

Pointer Analysis in the Presence of Dynamic Class Loading

Pointer Analysis in the Presence of Dynamic Class Loading Pointer Analysis in the Presence of Dynamic Class Loading Martin Hirzel, Amer Diwan University of Colorado at Boulder Michael Hind IBM T.J. Watson Research Center 1 Pointer analysis motivation Code a =

More information

Bugs in Deployed Software

Bugs in Deployed Software Bell: Bit-Encoding Online Memory Leak Detection Michael D. Bond Kathryn S. McKinley University of Texas at Austin Bugs in Deployed Software Humans rely on software for critical tasks Bugs are costly &

More information

What were his cri+cisms? Classical Methodologies:

What were his cri+cisms? Classical Methodologies: 1 2 Classifica+on In this scheme there are several methodologies, such as Process- oriented, Blended, Object Oriented, Rapid development, People oriented and Organisa+onal oriented. According to David

More information

Uncovering Performance Problems in Java Applications with Reference Propagation Profiling

Uncovering Performance Problems in Java Applications with Reference Propagation Profiling Uncovering Performance Problems in Java Applications with Reference Propagation Profiling Dacong Yan 1 Guoqing Xu 2 Atanas Rountev 1 1 Department of Computer Science and Engineering, Ohio State University

More information

CS 267: Automated Verification. Lecture 18, Part 2: Data Model Analysis for Web Applications. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 18, Part 2: Data Model Analysis for Web Applications. Instructor: Tevfik Bultan CS 267: Automated Verification Lecture 18, Part 2: Data Model Analysis for Web Applications Instructor: Tevfik Bultan Web Application Depability 2 Web Application Depability 3 Web Application Depability

More information

Truffle A language implementation framework

Truffle A language implementation framework Truffle A language implementation framework Boris Spasojević Senior Researcher VM Research Group, Oracle Labs Slides based on previous talks given by Christian Wimmer, Christian Humer and Matthias Grimmer.

More information

Lecture 6 - NDK Integration (JNI)

Lecture 6 - NDK Integration (JNI) Lecture 6 - NDK Integration (JNI) This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/

More information

Finding Bugs in Exceptional Situations of JNI Programs

Finding Bugs in Exceptional Situations of JNI Programs Finding Bugs in Exceptional Situations of JNI Programs Siliang Li Department of Computer Science and Engineering Lehigh University sil206@cse.lehigh.edu Gang Tan Department of Computer Science and Engineering

More information

Improving Quality of Software with Foreign Function Interfaces using Static Analysis

Improving Quality of Software with Foreign Function Interfaces using Static Analysis Lehigh University Lehigh Preserve Theses and Dissertations 2014 Improving Quality of Software with Foreign Function Interfaces using Static Analysis Siliang Li Lehigh University Follow this and additional

More information

Sound Thread Local Analysis for Lockset-Based Dynamic Data Race Detection

Sound Thread Local Analysis for Lockset-Based Dynamic Data Race Detection Wellesley College Wellesley College Digital Scholarship and Archive Honors Thesis Collection 2017 Sound Thread Local Analysis for Lockset-Based Dynamic Data Race Detection Samuila Mincheva sminchev@wellesley.edu

More information

Practical Lessons in Memory Analysis

Practical Lessons in Memory Analysis Practical Lessons in Memory Analysis Krum Tsvetkov SAP AG Andrew Johnson IBM United Kingdom Limited GOAL > Learn practical tips and tricks for the analysis of common memory-related problems 2 Agenda >

More information

Jazz: A Tool for Demand-Driven Structural Testing

Jazz: A Tool for Demand-Driven Structural Testing Jazz: A Tool for Demand-Driven Structural Testing J. Misurda, J. A. Clause, J. L. Reed, P. Gandra, B. R. Childers, and M. L. Soffa Department of Computer Science University of Pittsburgh Pittsburgh, Pennsylvania

More information

Static program checking and verification

Static program checking and verification Chair of Software Engineering Software Engineering Prof. Dr. Bertrand Meyer March 2007 June 2007 Slides: Based on KSE06 With kind permission of Peter Müller Static program checking and verification Correctness

More information

Lockout: Efficient Tes0ng for Deadlock Bugs. Ali Kheradmand, Baris Kasikci, George Candea

Lockout: Efficient Tes0ng for Deadlock Bugs. Ali Kheradmand, Baris Kasikci, George Candea Lockout: Efficient Tes0ng for Deadlock Bugs Ali Kheradmand, Baris Kasikci, George Candea 1 Deadlock Set of threads Each holding a lock needed by another thread Wai?ng for another lock to be released by

More information

The VMKit project: Java (and.net) on top of LLVM

The VMKit project: Java (and.net) on top of LLVM The VMKit project: Java (and.net) on top of LLVM Nicolas Geoffray Université Pierre et Marie Curie, France nicolas.geoffray@lip6.fr What is VMKit? Glue between existing VM components LLVM, GNU Classpath,

More information

C02: Overview of Software Development and Java

C02: Overview of Software Development and Java CISC 3120 C02: Overview of Software Development and Java Hui Chen Department of Computer & Information Science CUNY Brooklyn College 08/31/2017 CUNY Brooklyn College 1 Outline Recap and issues Brief introduction

More information

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context Types 1 / 15 Outline Introduction Concepts and terminology The case for static typing Implementing a static type system Basic typing relations Adding context 2 / 15 Types and type errors Type: a set of

More information

Getting Started with Java. Atul Prakash

Getting Started with Java. Atul Prakash Getting Started with Java Atul Prakash Running Programs C++, Fortran, Pascal Python, PHP, Ruby, Perl Java is compiled into device-independent code and then interpreted Source code (.java) is compiled into

More information

PERFBLOWER: Quickly Detecting Memory-Related Performance Problems via Amplification

PERFBLOWER: Quickly Detecting Memory-Related Performance Problems via Amplification PERFBLOWER: Quickly Detecting Memory-Related Performance Problems via Amplification Lu Fang 1, Liang Dou 2, and Guoqing Xu 1 1 University of California, Irvine, USA {lfang3, guoqingx}@ics.uci.edu 2 East

More information

Documen(ng code, Javadoc, Defensive Programming, Asserts, Excep(ons & Try/Catch

Documen(ng code, Javadoc, Defensive Programming, Asserts, Excep(ons & Try/Catch Documen(ng code, Javadoc, Defensive Programming, Asserts, Excep(ons & Try/Catch 1 Most important reason to comment A) To summarize the code B) To explain how the code works C) To mark loca(ons that need

More information

Leak Pruning. 1. Introduction. Abstract. Department of Computer Sciences The University of Texas at Austin

Leak Pruning. 1. Introduction. Abstract. Department of Computer Sciences The University of Texas at Austin Leak Pruning Michael D. Bond Kathryn S. McKinley Department of Computer Sciences The University of Texas at Austin {mikebond,mckinley}@cs.utexas.edu Abstract Managed languages improve programmer productivity

More information

Eclipse. JVM, main method and using Eclipse. Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics

Eclipse. JVM, main method and using Eclipse. Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics Eclipse JVM, main method and using Eclipse Produced by: Dr. Siobhán Drohan Department of Computing and Mathematics http://www.wit.ie/ Topics list Files in Java. Java Virtual Machine. main method. Eclipse

More information

Bugs in software. Using Static Analysis to Find Bugs. David Hovemeyer

Bugs in software. Using Static Analysis to Find Bugs. David Hovemeyer Bugs in software Programmers are smart people We have good techniques for finding bugs early: Unit testing, pair programming, code inspections So, most bugs should be subtle, and require sophisticated

More information

Kazunori Ogata, Dai Mikurube, Kiyokuni Kawachiya and Tamiya Onodera

Kazunori Ogata, Dai Mikurube, Kiyokuni Kawachiya and Tamiya Onodera RT0854 Computer Science 13 pages Research Report April 27, 2009 A Study of Java s non-java Memory Kazunori Ogata, Dai Mikurube, Kiyokuni Kawachiya and Tamiya Onodera IBM Research, Tokyo Research Laboratory

More information