<p>I fixed it.</p><p><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/MemRegion.cpp?r1=59014&r2=59015&view=diff&pathrev=59015">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/MemRegion.cpp?r1=59014&r2=59015&view=diff&pathrev=59015</a><br>
</p><div class="gmail_quote"></div><div class="gmail_quote">On Mon, Nov 10, 2008 at 9:12 PM, Zhongxing Xu <span dir="ltr"><<a href="mailto:xuzhongxing@gmail.com">xuzhongxing@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p>When running clang with the following command:</p><p>clang -checker-simple -analyzer-store-region -analyzer-viz-egraph-graphviz example.c<br></p><p>on the following code:</p><p>#include <sys/types.h><br>#include <sys/stat.h><br>

#include <fcntl.h><br><br>void write_file(int append) {<br>  char* tempname = 0;<br>  if (append == 1)<br>    tempname = "a";<br><br><br>  if (append == 1)<br>    open(tempname, O_RDONLY);<br>}<br></p><p>
I got the following error:</p>
<p>ANALYZE: int.c write_file<br>Writing '/tmp/llvm_n297pA/GRExprEngine.dot'...  done.<br>Running 'dot' program... Error: Invalid 2-byte UTF8 found in input. Perhaps "-Gcharset=latin1" is needed?<br>

Error viewing graph: '</p><p>It seems that "a" is too short for 'dot'. When the string is "aa", "aap" is printed in the generated PS graph. When the string is "aaa" or longer, 'dot' works fine.<br>

</p><p><br></p>
</blockquote></div><br>