Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT...
-
Upload
helena-oliver -
Category
Documents
-
view
235 -
download
0
description
Transcript of Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT...
![Page 1: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/1.jpg)
Tracking Bad Apples:Reporting the Origin of Null & Undefined Value Errors
Michael D. BondUT Austin
Nicholas NethercoteNational ICT Australia
Stephen W. KentUT Austin
Samuel Z. GuyerTufts University
Kathryn S. McKinleyUT Austin
![Page 2: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/2.jpg)
Example CodeUser code:
float[][] data =
{{1.0f, 2.0f}, {3.0f, 4.0f}};
ScatterPlot plot =
new ScatterPlot(data, null);
...
plot.draw(...);
![Page 3: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/3.jpg)
Example Codefloat[][] data =
{{1.0f, 2.0f}, {3.0f, 4.0f}};
ScatterPlot plot =
new ScatterPlot(data, null);
...
NullPointerException
at ScatterPlot.draw():315
at Test.doStuff():124
User code:
plot.draw(...);
![Page 4: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/4.jpg)
Example CodeUser code:
Library code:
NullPointerException
at ScatterPlot.draw():315
at Test.doStuff():124
ScatterPlot {
draw(...) {
...
xaxis.draw();
...
}
}plot.draw(...);
float[][] data =
{{1.0f, 2.0f}, {3.0f, 4.0f}};
ScatterPlot plot =
new ScatterPlot(data, null);
...
![Page 5: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/5.jpg)
Unusable Value
Null is unusable value Use causes error
How/why did it become null? Null’s origin?
ScatterPlot {
draw(...) {
...
xaxis.draw();
...
}
}plot.draw(...); NullPointerException
at ScatterPlot.draw():315
at Test.doStuff():124
![Page 6: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/6.jpg)
Origin of Unusable Value
ScatterPlot {
draw(...) {
...
xaxis.draw();
...
}
}plot.draw(...);
float[][] data =
{{1.0f, 2.0f}, {3.0f, 4.0f}};
ScatterPlot plot =
new ScatterPlot(data, null);
...Origin: Test.init():37
![Page 7: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/7.jpg)
Origin of Unusable ValueScatterPlot {
ScatterPlot(data, xaxis) {
this.data = data;
this.xaxis = xaxis;
}
...
draw(...) {
...
xaxis.draw();
...
}
}
Origin: Test.init():37
plot.draw(...);
float[][] data =
{{1.0f, 2.0f}, {3.0f, 4.0f}};
ScatterPlot plot =
new ScatterPlot(data, null);
...
Origin: Test.init():37
![Page 8: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/8.jpg)
Origin TrackingScatterPlot {
ScatterPlot(data, xaxis) {
this.data = data;
this.xaxis = xaxis;
}
...
draw(...) {
...
xaxis.draw();
...
}
}
Origin: Test.init():37
plot.draw(...);
float[][] data =
{{1.0f, 2.0f}, {3.0f, 4.0f}};
ScatterPlot plot =
new ScatterPlot(data, null);
...
Origin: Test.init():37
Track every unusable value’s origin for 4% overhead
Key: store origin in place of unusable value
![Page 9: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/9.jpg)
Outline
Introduction Unusable values Instances of origin tracking
Null pointer exceptions (Java) Undefined value errors (C/C++)
Redefining program operations Evaluation
Performance Usefulness
Related Work
![Page 10: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/10.jpg)
Unusable Values
Using value causes error Examples:
Null values Undefined values
Tough bugs: no info Why is value unusable?
Where did unusable value originate?
![Page 11: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/11.jpg)
Unusable Values
Using value causes error Examples:
Null values Undefined values
Tough bugs: no info Why is value unusable?
Where did unusable value originate?
Opportunity:Store info in place of value
![Page 12: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/12.jpg)
Origin Tracking Implementations Null pointers (Java)
Jikes RVM Undefined values (native code)
Valgrind’s MemCheck
![Page 13: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/13.jpg)
Origin Tracking Implementations Null pointers (Java)
Jikes RVM Undefined values (native code)
Valgrind’s MemCheck
Jikes RVM Research Archive
Valgrind Source Code Repository
![Page 14: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/14.jpg)
Origin Tracking Implementations Null pointers (Java)
Jikes RVM Undefined values (native code)
Valgrind’s MemCheck Identifies origin for 32-bit values
47 of 147 are 32-bit For 32-bit: 34 of 47 identified
Adds negligible overhead (28X 28X)
Jikes RVM Research Archive
Valgrind Source Code Repository
![Page 15: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/15.jpg)
Storing Origins in Null Values Requirements
Need bits in null values multiple null values Program operations support null values Recover origin at exception
![Page 16: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/16.jpg)
Storing Origins in Null Values Requirements
Need bits in null values multiple null values Program operations support null values Recover origin at exception
Null high 5 bits are zero (27 bits available)Reserve & protect address range: 0x00000000–0x07ffffff
Bytecode indexMethod ID000002
5 bits 14 bits 13 bits
![Page 17: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/17.jpg)
Implementing Java Operations Java semantics Standard VM Origin tracking
Assignment of null constant
obj = null; obj = 0; obj = this_location;
Object allocation
obj = new Object();
foreach ref slot i obj[i] = 0;
foreach ref slot i obj[i] = this_location;
Null reference comparison if (obj == null) { if (obj == 0) { if ((obj & 0xf8000000) == 0) {
General reference comparison
if (obj1 == obj2) { if (obj1 == obj2) { if (((obj1 & 0xf8000000) == 0) ?
((obj2 & 0xf8000000) == 0) : (obj1 == obj2)) {
![Page 18: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/18.jpg)
Implementing Java Operations Java semantics Standard VM Origin tracking
Assignment of null constant
obj = null; obj = 0; obj = this_location;
Object allocation
obj = new Object();
foreach ref slot i obj[i] = 0;
foreach ref slot i obj[i] = this_location;
Null reference comparison if (obj == null) { if (obj == 0) { if ((obj & 0xf8000000) == 0) {
General reference comparison
if (obj1 == obj2) { if (obj1 == obj2) { if (((obj1 & 0xf8000000) == 0) ?
((obj2 & 0xf8000000) == 0) : (obj1 == obj2)) {
![Page 19: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/19.jpg)
Implementing Java Operations Java semantics Standard VM Origin tracking
Assignment of null constant
obj = null; obj = 0; obj = this_location;
Object allocation
obj = new Object();
foreach ref slot i obj[i] = 0;
foreach ref slot i obj[i] = this_location;
Null reference comparison if (obj == null) { if (obj == 0) { if ((obj & 0xf8000000) == 0) {
General reference comparison
if (obj1 == obj2) { if (obj1 == obj2) { if (((obj1 & 0xf8000000) == 0) ?
((obj2 & 0xf8000000) == 0) : (obj1 == obj2)) {
![Page 20: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/20.jpg)
Implementing Java Operations Java semantics Standard VM Origin tracking
Assignment of null constant
obj = null; obj = 0; obj = this_location;
Object allocation
obj = new Object();
foreach ref slot i obj[i] = 0;
foreach ref slot i obj[i] = this_location;
Null reference comparison if (obj == null) { if (obj == 0) { if ((obj & 0xf8000000) == 0) {
General reference comparison
if (obj1 == obj2) { if (obj1 == obj2) { if (((obj1 & 0xf8000000) == 0) ?
((obj2 & 0xf8000000) == 0) : (obj1 == obj2)) {
![Page 21: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/21.jpg)
Implementing Java Operations Java semantics Standard VM Origin tracking
Assignment of null constant
obj = null; obj = 0; obj = this_location;
Object allocation
obj = new Object();
foreach ref slot i obj[i] = 0;
foreach ref slot i obj[i] = this_location;
Null reference comparison if (obj == null) { if (obj == 0) { if ((obj & 0xf8000000) == 0) {
General reference comparison
if (obj1 == obj2) { if (obj1 == obj2) { if (((obj1 & 0xf8000000) == 0) ?
((obj2 & 0xf8000000) == 0) : (obj1 == obj2)) {
![Page 22: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/22.jpg)
Implementing Java Operations Java semantics Standard VM Origin tracking
Assignment of null constant
obj = null; obj = 0; obj = this_location;
Object allocation
obj = new Object();
foreach ref slot i obj[i] = 0;
foreach ref slot i obj[i] = this_location;
Null reference comparison if (obj == null) { if (obj == 0) { if ((obj & 0xf8000000) == 0) {
General reference comparison
if (obj1 == obj2) { if (obj1 == obj2) { if (((obj1 & 0xf8000000) == 0) ?
((obj2 & 0xf8000000) == 0) : (obj1 == obj2)) {
General assignment
obj1 = obj2; obj1 = obj2; obj1 = obj2;
![Page 23: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/23.jpg)
Outline
Introduction Unusable values Instances of origin tracking
Null pointer exceptions (Java) Undefined value errors (C/C++)
Redefining program operations Evaluation
Performance Usefulness
Related Work
![Page 24: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/24.jpg)
Adaptive methodology Mix of application & compilation time Single iteration; 25 trials
DaCapo, SPEC JBB2000, SPEC JVM98 3.6 GHz Pentium 4 w/Linux
Methodology
![Page 25: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/25.jpg)
Performance of Java Implementation
0
5
10
15
20
antlr
bloat
chartecl
ipse fop
hsqldblui
ndex
lusear
ch pmd
xalan
DaCapoSP
EC All
Ove
rhea
d (%
)
![Page 26: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/26.jpg)
Finding and Fixing Bugs
12 real NPEs from SourceForge
Origin: identified by origin tracking?
Triviality: origin obvious by inspection?
Usefulness: origin useful for fixing bug?
![Page 27: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/27.jpg)
Null Pointer ExceptionsProgram Lines Exception description Origin? Trivial? Useful?
Mckoi SQL DB 94,681 Access closed connection
Yes Nontrivial Definitely useful
FreeMarker 64,442 JUnit test crashes unexpectedly Yes Nontrivial Definitely useful
JFreeChart 223,869 Plot without x-axis Yes Nontrivial Definitely useful
JRefactory 231,338 Invalid class name Yes Nontrivial Definitely useful
Eclipse 2,425,709 Malformed XML document Yes Nontrivial Most likely useful
Checkstyle 47,871 Empty default case Yes Nontrivial Most likely useful
JODE 44,937 Exception decompiling class Yes Nontrivial Most likely useful
Jython 144,739 Use built-in class as variable Yes Nontrivial Potentially useful
JFreeChart 223,869 Stacked XY plot with lines Yes Somewhat
nontrivial Marginally useful
Jython 144,739 Problem accessing __doc__ Yes Somewhat nontrivial Marginally useful
JRefactory 231,338 Package and import on same line Yes Trivial Not useful
Eclipse 2,425,709 Close Eclipse while deleting project Yes Trivial Not useful
![Page 28: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/28.jpg)
Null Pointer ExceptionsProgram Lines Exception description Origin? Trivial? Useful?
Mckoi SQL DB 94,681 Access closed connection
Yes Nontrivial Definitely useful
FreeMarker 64,442 JUnit test crashes unexpectedly Yes Nontrivial Definitely useful
JFreeChart 223,869 Plot without x-axis Yes Nontrivial Definitely useful
JRefactory 231,338 Invalid class name Yes Nontrivial Definitely useful
Eclipse 2,425,709 Malformed XML document Yes Nontrivial Most likely useful
Checkstyle 47,871 Empty default case Yes Nontrivial Most likely useful
JODE 44,937 Exception decompiling class Yes Nontrivial Most likely useful
Jython 144,739 Use built-in class as variable Yes Nontrivial Potentially useful
JFreeChart 223,869 Stacked XY plot with lines Yes Somewhat
nontrivial Marginally useful
Jython 144,739 Problem accessing __doc__ Yes Somewhat nontrivial Marginally useful
JRefactory 231,338 Package and import on same line Yes Trivial Not useful
Eclipse 2,425,709 Close Eclipse while deleting project Yes Trivial Not useful
![Page 29: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/29.jpg)
Null Pointer ExceptionsProgram Lines Exception description Origin? Trivial? Useful?
Mckoi SQL DB 94,681 Access closed connection
Yes Nontrivial Definitely useful
FreeMarker 64,442 JUnit test crashes unexpectedly Yes Nontrivial Definitely useful
JFreeChart 223,869 Plot without x-axis Yes Nontrivial Definitely useful
JRefactory 231,338 Invalid class name Yes Nontrivial Definitely useful
Eclipse 2,425,709 Malformed XML document Yes Nontrivial Most likely useful
Checkstyle 47,871 Empty default case Yes Nontrivial Most likely useful
JODE 44,937 Exception decompiling class Yes Nontrivial Most likely useful
Jython 144,739 Use built-in class as variable Yes Nontrivial Potentially useful
JFreeChart 223,869 Stacked XY plot with lines Yes Somewhat
nontrivial Marginally useful
Jython 144,739 Problem accessing __doc__ Yes Somewhat nontrivial Marginally useful
JRefactory 231,338 Package and import on same line Yes Trivial Not useful
Eclipse 2,425,709 Close Eclipse while deleting project Yes Trivial Not useful
![Page 30: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/30.jpg)
Null Pointer ExceptionsProgram Lines Exception description Origin? Trivial? Useful?
Mckoi SQL DB 94,681 Access closed connection
Yes Nontrivial Definitely useful
FreeMarker 64,442 JUnit test crashes unexpectedly Yes Nontrivial Definitely useful
JFreeChart 223,869 Plot without x-axis Yes Nontrivial Definitely useful
JRefactory 231,338 Invalid class name Yes Nontrivial Definitely useful
Eclipse 2,425,709 Malformed XML document Yes Nontrivial Most likely useful
Checkstyle 47,871 Empty default case Yes Nontrivial Most likely useful
JODE 44,937 Exception decompiling class Yes Nontrivial Most likely useful
Jython 144,739 Use built-in class as variable Yes Nontrivial Potentially useful
JFreeChart 223,869 Stacked XY plot with lines Yes Somewhat
nontrivial Marginally useful
Jython 144,739 Problem accessing __doc__ Yes Somewhat nontrivial Marginally useful
JRefactory 231,338 Package and import on same line Yes Trivial Not useful
Eclipse 2,425,709 Close Eclipse while deleting project Yes Trivial Not useful
![Page 31: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/31.jpg)
Null Pointer ExceptionsProgram Lines Exception description Origin? Trivial? Useful?
Mckoi SQL DB 94,681 Access closed connection
Yes Nontrivial Definitely useful
FreeMarker 64,442 JUnit test crashes unexpectedly Yes Nontrivial Definitely useful
JFreeChart 223,869 Plot without x-axis Yes Nontrivial Definitely useful
JRefactory 231,338 Invalid class name Yes Nontrivial Definitely useful
Eclipse 2,425,709 Malformed XML document Yes Nontrivial Most likely useful
Checkstyle 47,871 Empty default case Yes Nontrivial Most likely useful
JODE 44,937 Exception decompiling class Yes Nontrivial Most likely useful
Jython 144,739 Use built-in class as variable Yes Nontrivial Potentially useful
JFreeChart 223,869 Stacked XY plot with lines Yes Somewhat
nontrivial Marginally useful
Jython 144,739 Problem accessing __doc__ Yes Somewhat nontrivial Marginally useful
JRefactory 231,338 Package and import on same line Yes Trivial Not useful
Eclipse 2,425,709 Close Eclipse while deleting project Yes Trivial Not useful
![Page 32: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/32.jpg)
Debugging Timeline
Early LateLanguage design
Static analysis
TestingDeployment
![Page 33: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/33.jpg)
Debugging Timeline
Prevent bugs Memory bugs [Java & C#] Null pointer exceptions [Chalin & James ‘06]
Add “never null” types to Java Programmer effort Exceptions still possible
Functional languages
Early LateLanguage design
Static analysis
TestingDeployment
![Page 34: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/34.jpg)
Debugging Timeline
Detect errors in any execution[FindBugs] [PMD] [ESC/Java] [JLint] [Metal] Dataflow analysis & pattern matching Program complexity conservative (false positives) Some intentionally unsound (false negatives)
Language design
Static analysis
TestingDeployment
Early Late
![Page 35: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/35.jpg)
Debugging Timeline
Catch errors in real executions Assertions Checking tools [Valgrind] [Purify] Dynamic slicing [Agrawal & Horgan ’90] [Zhang et al. ‘07]
Powerful but high overhead
Language design
Static analysis
TestingDeployment
Early Late
![Page 36: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/36.jpg)
Debugging Timeline
Ideal environment for debugging? Stack/dump reporting Invariant-based bug detection [Liblit et al. ’05]
Many executions Limited dynamic slicing
[TaintCheck] [Chilimbi & Hauswirth ’04] [Origin tracking] Single execution Narrow focus
Language design
Static analysis
TestingDeployment
Early Late
![Page 37: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/37.jpg)
Summary
Unusable values: tough bugs Error stack trace not enough Opportunity: store origin in place of unusable value Managed and native implementations
Java null origins: fast, useful, silent Add it to your VM today!
![Page 38: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/38.jpg)
Summary
Unusable values: tough bugs Error stack trace not enough Opportunity: store origin in place of unusable value Managed and native implementations
Java null origins: fast, useful, silent Add it to your VM today!
Thank you!
![Page 39: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/39.jpg)
Extra slides
![Page 40: Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin…](https://reader035.fdocuments.in/reader035/viewer/2022081514/5a4d1bf37f8b9ab0599e6cbf/html5/thumbnails/40.jpg)
Runtime Overhead
0
1
2
3
4
5
6
Simple checks + ref compare + field initialization
Ove
rhea
d (%
)
DaCapo SPEC All
(origin tracking)