












































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













































Michael Howard’s 19 Deadly Sins of Software
Two Types of Static Analysis
Static Analysis Basics
Example: Where is the bug? int read_packet(int fd) { char header[50]; //model (header, 50) char body[100]; //model (body, 100) size_t bound_a = 50; size_t bound_b = 100; read(fd, header, 100); read(fd, body, 100); return 0; }
Example: Where is the bug? int read_packet(int fd) { char header[50]; //model (header, 50) char body[100]; //model (body, 100) size_t bound_a = 50; size_t bound_b = 100; read(fd, header, 100); //constant propagation read(fd, body, 100); //constant propagation return 0; }
Example: Where is the bug? int read_packet(int fd) { char header[50]; //model (header, 50) char body[100]; //model (body, 100) size_t bound_a = 50; size_t bound_b = 100; //check read(fd, 50 >= 100) => SIZE MISMATCH!! read(fd, header, 100); //constant propagation read(fd, body, 100); //constant propagation return 0; }
Rarely are Things This Clean
Care and Feeding of Static Analysis Tools
Normal Dynamic Analysis