[llvm-commits] [ASan] The first version of the RTL for Windows (issue 5647052)

glider at google.com glider at google.com
Wed Feb 8 07:30:09 PST 2012


http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_internal.h
File lib/asan/asan_internal.h (right):

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_internal.h#newcode230
lib/asan/asan_internal.h:230: #  define ASAN_USE_EXTERNAL_SYMBOLIZER
__asan::WinSymbolize
On 2012/02/08 14:49:13, timurrrr_at_google_com wrote:
> Alternative suggestions are welcome if you believe this is too hacky.

LG

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_win.cc
File lib/asan/asan_win.cc (right):

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_win.cc#newcode59
lib/asan/asan_win.cc:59: CHECK(fd == 2);  // Looks like we only use
stderr for AsanWrite?
I think we may want to use other fds someday (I'm considering output
redirection as one of the possible ways to integrate with Breakpad)

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_win.cc#newcode62
lib/asan/asan_win.cc:62: return fwrite(buf, 1, count, stderr);
The point of AsanWrite is to avoid memory allocations during writes,
that's why we're using syscalls on Linux and Mac.

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_win.cc#newcode142
lib/asan/asan_win.cc:142: IMAGEHLP_LINE64 info;
Shouldn't this be arch-dependent?

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_win.cc#newcode155
lib/asan/asan_win.cc:155: " %s+0x%lx", symbol->Name, offset);
Again, http://mail.python.org/pipermail/patches/2000-June/000871.html

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_win.cc#newcode201
lib/asan/asan_win.cc:201: // FIXME: is __declspec enough?
You may want to take a look at the TLS implementation in Chrome (I've no
idea :))

http://codereview.appspot.com/5647052/diff/4001/lib/asan/asan_win.cc#newcode231
lib/asan/asan_win.cc:231: return getenv(name);
Does getenv() allocate memory? If so, you may run into a trouble.

http://codereview.appspot.com/5647052/



More information about the llvm-commits mailing list