Valgrind Handout Downloading the activity:
wget https://www.cs.cmu.edu/~213/activities/rec7.tar
tar -xvf rec7.tar
Activity 1: Using Valgrind to find errors What can Valgrind be used for?
Copyright By PowCoder代写 加微信 powcoder
Run ¡°213_exam_answers.c¡± using 1. make
2. ./213_exam_answers
What is the output you see? Are there any errors?
Look at the code and think about whether there are any sneaky errors.
Now run it with ¡°valgrind –leak-check=full ./213_exam_answers¡±
What is the output you see now? What is it telling you?
Take some time to look through the code and using what Valgrind is telling you, hypothesize what part of the code is bad
*discuss this*
Fix the code with your suggested edits and run it with Valgrind to see if you have fixed all the errors.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com