Question: In this assignment, we have to create a directory with several C + + programs that demonstrate certain features, as well as a makefile that
In this assignment, we have to create a directory with several C programs that demonstrate certain features, as well as a makefile that shows how they can be diagnosed.
Part : Create a program that uses a dividebyzero behavior that would be caught at runtime by the ubsan module. Add two Makefile targets, one that forces the behavior to be reported at runtime, and one that allows the behavior to go unchecked.
Part : Create a program that uses an outofbounds behavior that would be caught at runtime by the memsan or asan module. Add two Makefile targets for the same program, one that forces the behavior to be reported at runtime, and one that allows the behavior to go unchecked.
Part : Create a program that uses a behavior that could be statically detected and cause an error in the compiler. Add two Makefile targets, one that rejects the program ie will not compile it and one that will compile the program without complaint.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
