X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=sigcse2009%2Fracedt.tex;h=37cc78cfa52133654400744c18ef078205051dab;hb=3f3135e756103a273fd9d1c6cc317e39848da023;hp=5200655b6cf4d2cacd48d91a3162e6fc6de2038d;hpb=02d9affcb344f1ebc4253c59230fea7119469a89;p=pintos-anon diff --git a/sigcse2009/racedt.tex b/sigcse2009/racedt.tex index 5200655..37cc78c 100644 --- a/sigcse2009/racedt.tex +++ b/sigcse2009/racedt.tex @@ -1,10 +1,11 @@ \section{Dynamic Analysis Tools} +\label{sec:dynamicanalysis} Data races and invalid memory accesses are some of the most common and difficult to debug errors that may occur in concurrent C code. We developed dynamic analysis tools that run on top of the QEMU system emulator~\cite{Bellard2005QEMU} to help detect these mistakes. -Since these tools do not require additional support from the Pintos kernel; +Since these tools do not require additional support from the Pintos kernel, students can use them without complicating their code. Data races are found by using a semaphore-aware modification of the RaceTrack algorithm~\cite{Yu2005RaceTrack}. @@ -17,7 +18,10 @@ call stacks for the racing threads is generated. Invalid memory accesses, such as a read from newly allocated but uninitialized data, are detected by tracking all memory accesses. Heap allocation calls are instrumented to map a range of addresses as uninitialized. When data is written to a memory address, it is marked as initialized. If an address -marked as uninitialized is read from, the error is reported and the address is marked as -uninitialized to mask spurious reports. +marked as uninitialized is read from, an error is reported. +%cfl: and the address is marked as uninitialized to mask spurious reports. % More sophisticated analysis may be implemented in the future. +Each of our tools presents students with one or more concrete backtraces that +show where the error occurred, which not only helps students debug their code, +but makes the concept of race conditions more concrete.