I committed a tentative fix in r92318. Chris, could you please review it? Thanks.<br><br><div class="gmail_quote">2009/12/30 Andy Wick <span dir="ltr"><<a href="mailto:Andy.Wick@corp.aol.com">Andy.Wick@corp.aol.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">Thanks for all the hard work, I didn’t see this in bugzilla but maybe a known issue. The typedef seems to cause the issue, and unfortunately we use thru out our project. I’m using svn 92284<br>
<br>
The file:<br>
#include <string.h><br>
typedef unsigned char Byte;<br>
void doit (char *data, int len) {<br>
if (len) {<br>
Byte buf[len];<br>
memcpy(buf, data, len);<br>
}<br>
}<br>
<br>
<br>
Compiled with “clang --analyze t.c”<br>
<br>
Gives me:<br>
clang: ASTContext.cpp:2377: clang::QualType clang::ASTContext::getUnqualifiedArrayType(clang::QualType, clang::Qualifiers&): Assertion `T.isCanonical() && "Only operates on canonical types"' failed.<br>
0 clang 0x000000000141b61f<br>
1 clang 0x000000000141be21<br>
2 libpthread.so.0 0x0000002a9567f160<br>
3 libc.so.6 0x0000002a95d5f745 gsignal + 69<br>
4 libc.so.6 0x0000002a95d60eb3 abort + 467<br>
5 libc.so.6 0x0000002a95d58dc9<br>
6 clang 0x000000000084cb06<br>
7 clang 0x000000000084c9ea<br>
8 clang 0x00000000006bc472<br>
9 clang 0x000000000067d86f<br>
10 clang 0x0000000000677124<br>
11 clang 0x000000000067d99b<br>
12 clang 0x0000000000677124<br>
13 clang 0x000000000067608a<br>
14 clang 0x0000000000676fd4<br>
15 clang 0x000000000067dfe1<br>
16 clang 0x000000000066c068<br>
17 clang 0x000000000066c2d2<br>
18 clang 0x00000000004d8b97<br>
19 clang 0x00000000004d7530<br>
20 clang 0x00000000004d7a15<br>
21 clang 0x00000000006e0136<br>
22 clang 0x00000000004345e0<br>
23 clang 0x0000000000437661 main + 1585<br>
24 libc.so.6 0x0000002a95d4d1d7 __libc_start_main + 215<br>
25 clang 0x000000000043246a<br>
Stack dump:<br>
0. Program arguments: /usr/local/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -main-file-name t.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -warn-dead-stores -warn-security-syntactic -checker-cfref -analyzer-eagerly-assume -warn-objc-methodsigs -warn-objc-unused-ivars -analyzer-output plist -mrelocation-model static -mdisable-fp-elim -munwind-tables -target-cpu x86-64 -v -resource-dir /usr/local/lib/clang/1.1 -fmessage-length 138 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o t.plist -x c t.c <br>
1. <eof> parser at end of file<br>
2. t.c:6:9: Error evaluating statement<br>
3. t.c:6:9: Error evaluating statement<br>
4. t.c:6:16: Error evaluating statement<br>
5. t.c:6:16: Error evaluating statement<br>
clang: error: analyzer command failed due to signal 6 (use -v to see invocation)</span></font>
</div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br>