[llvm-commits] Remove calls to library strtol/atoll from ASan RTL (issue 5656075)

samsonov at google.com samsonov at google.com
Fri Feb 17 01:08:47 PST 2012


http://codereview.appspot.com/5656075/diff/1/asan_interceptors.cc
File asan_interceptors.cc (right):

http://codereview.appspot.com/5656075/diff/1/asan_interceptors.cc#newcode107
asan_interceptors.cc:107: while (isspace(*nptr)) nptr++;
On 2012/02/16 14:43:18, Evgeniy Stepanov wrote:
> Shall we avoid isspace, isdigit, etc as well?
> They are locale dependent and might (I'm not sure about this) try to
open locale
> database.

Hm, ok. Removed ctype.h

http://codereview.appspot.com/5656075/diff/1/asan_interceptors.cc#newcode118
asan_interceptors.cc:118: res = (res * 10) + ((*nptr) - '0');
On 2012/02/16 14:43:18, Evgeniy Stepanov wrote:
> Check for overflow. It's undefined behaviour for signed types.

Done.

http://codereview.appspot.com/5656075/



More information about the llvm-commits mailing list