Following Bad Apples: Reporting the Origin of Null Undefined Value Errors .


67 views
Uploaded on:
Description
Following Rotten ones: Reporting the Root of Invalid and Vague Worth Mistakes. Sample Code. Client code :. float[][] information = {{1.0f, 2.0f}, {3.0f, 4.0f}}; ScatterPlot plot = new ScatterPlot(data, invalid); . plot.draw(...);. NullPointerException at ScatterPlot.draw():315
Transcripts
Slide 1

Following Bad Apples: Reporting the Origin of Null & Undefined Value Errors

Slide 2

Example Code User code : float[][] information = {{1.0f, 2.0f}, {3.0f, 4.0f}}; ScatterPlot plot = new ScatterPlot(data, invalid); ... plot.draw(...);

Slide 3

NullPointerException at ScatterPlot.draw():315 at Test.doStuff():124 Example Code User code : float[][] information = {{1.0f, 2.0f}, {3.0f, 4.0f}}; ScatterPlot plot = new ScatterPlot(data, invalid); ... plot.draw(...);

Slide 4

NullPointerException at ScatterPlot.draw():315 at Test.doStuff():124 Example Code User code : Library code : float[][] information = {{1.0f, 2.0f}, {3.0f, 4.0f}}; ScatterPlot plot = new ScatterPlot(data, invalid); ... ScatterPlot { draw(...) { ... xaxis.draw(); ... } plot.draw(...);

Slide 5

NullPointerException at ScatterPlot.draw():315 at Test.doStuff():124 Unusable Value Null is unusable esteem Use causes mistake How/why did it get to be distinctly invalid? Invalid\'s inception ? ScatterPlot { draw(...) { ... xaxis.draw(); ... } plot.draw(...);

Slide 6

Origin of Unusable Value float[][] information = {{1.0f, 2.0f}, {3.0f, 4.0f}}; ScatterPlot plot = new ScatterPlot(data, invalid); ... ScatterPlot { draw(...) { ... xaxis.draw(); ... } Origin: Test.init():37 plot.draw(...);

Slide 7

Origin of Unusable Value ScatterPlot { ScatterPlot(data, xaxis) { this.data = information; this.xaxis = xaxis; } ... draw(...) { ... xaxis.draw(); ... } float[][] information = {{1.0f, 2.0f}, {3.0f, 4.0f}}; ScatterPlot plot = new ScatterPlot(data, invalid); ... Cause: Test.init():37 plot.draw(...); Origin: Test.init():37

Slide 8

Origin Tracking ScatterPlot { ScatterPlot(data, xaxis) { this.data = information; this.xaxis = xaxis; } ... draw(...) { ... xaxis.draw(); ... } float[][] information = {{1.0f, 2.0f}, {3.0f, 4.0f}}; ScatterPlot plot = new ScatterPlot(data, invalid); ... Birthplace: Test.init():37 Track each unusable esteem\'s starting point for 4% overhead Key: store source set up of unusable esteem plot.draw(...); Origin: Test.init():37

Slide 9

Outline Introduction Unusable qualities Instances of root following Null pointer special cases (Java) Undefined esteem mistakes (C/C++) Redefining program operations Evaluation Performance Usefulness Related Work

Slide 10

Unusable Values Using esteem causes blunder Examples: Null qualities Undefined qualities Tough bugs: no information Why is esteem unusable? Where did unusable esteem begin?

Slide 11

Unusable Values Using esteem causes blunder Examples: Null qualities Undefined qualities Tough bugs: no information Why is esteem unusable? Where did unusable esteem start? Opportunity: Store data set up of esteem

Slide 12

Origin Tracking Implementations Null pointers (Java) Jikes RVM Undefined qualities (local code) Valgrind\'s MemCheck

Slide 13

Origin Tracking Implementations Null pointers (Java) Jikes RVM Undefined qualities (local code) Valgrind\'s MemCheck Jikes RVM Research Archive Valgrind Source Code Repository

Slide 14

Origin Tracking Implementations Null pointers (Java) Jikes RVM Undefined qualities (local code) Valgrind\'s MemCheck Identifies beginning for 32-bit values 47 of 147 are 32-bit For 32-bit: 34 of 47 recognized Adds insignificant overhead (28X  28X) Jikes RVM Research Archive Valgrind Source Code Repository

Slide 15

Storing Origins in Null Values Requirements Need bits in invalid qualities  different invalid qualities Program operations bolster invalid qualities Recover birthplace at exemption

Slide 16

Storing Origins in Null Values Requirements Need bits in invalid qualities  various invalid qualities Program operations bolster invalid qualities Recover cause at special case Null  high 5 bits are zero (27 bits accessible) Reserve & secure address go: 0x00000000–0x07ffffff 00000 2 Method ID Bytecode file 5 bits 14 bits 13 bits

Slide 17

Implementing Java Operations

Slide 18

Implementing Java Operations

Slide 19

Implementing Java Operations

Slide 20

Implementing Java Operations

Slide 21

Implementing Java Operations

Slide 22

Implementing Java Operations

Slide 23

Outline Introduction Unusable qualities Instances of inception following Null pointer exemptions (Java) Undefined esteem blunders (C/C++) Redefining program operations Evaluation Performance Usefulness Related Work

Slide 24

Methodology Adaptive system Mix of utilization & gathering time Single cycle; 25 trials DaCapo, SPEC JBB2000, SPEC JVM98 3.6 GHz Pentium 4 w/Linux

Slide 25

Performance of Java Implementation

Slide 26

Finding and Fixing Bugs 12 genuine NPEs from SourceForge Origin: distinguished by root following? Technicality: starting point clear by assessment? Helpfulness: starting point valuable for settling bug?

Slide 27

Null Pointer Exceptions

Slide 28

Null Pointer Exceptions

Slide 29

Null Pointer Exceptions

Slide 30

Null Pointer Exceptions

Slide 31

Null Pointer Exceptions

Slide 32

Debugging Timeline Language plan Static investigation Deployment Testing Late Early

Slide 33

Debugging Timeline Prevent bugs Memory bugs [Java & C#] Null pointer special cases [Chalin & James \'06] Add "never invalid" sorts to Java Programmer exertion Exceptions still conceivable Functional dialects Language outline Static examination Deployment Testing Late Early

Slide 34

Debugging Timeline Detect mistakes in any execution [FindBugs] [PMD] [ESC/Java] [JLint] [Metal] Dataflow investigation & design coordinating Program many-sided quality  moderate (false positives) Some deliberately unsound (false negatives) Language outline Static investigation Deployment Testing Late Early

Slide 35

Debugging Timeline Catch blunders in genuine executions Assertions Checking instruments [Valgrind] [Purify] Dynamic cutting [Agrawal & Horgan \'90] [Zhang et al. \'07 ] Powerful however high overhead Language plan Static investigation Deployment Testing Late Early

Slide 36

Debugging Timeline Ideal condition for troubleshooting? Stack/dump announcing Invariant-based bug discovery [Liblit et al. \'05] Many executions Limited element cutting [TaintCheck] [Chilimbi & Hauswirth \'04] [Origin tracking] Single execution Narrow concentration Language plan Static investigation Deployment Testing Late Early

Slide 37

Summary Unusable qualities: intense bugs Error stack follow insufficient Opportunity: store cause set up of unusable esteem Managed and local usage Java invalid inceptions: quick, valuable, quiet Add it to your VM today!

Slide 38

Summary Unusable qualities: intense bugs Error stack follow insufficient Opportunity: store starting point set up of unusable esteem Managed and local executions Java invalid beginnings: quick, valuable, quiet Add it to your VM today! Much obliged to you!

Slide 39

Extra slides

Slide 40

Runtime Overhead (root following)

Recommended
View more...