[llvm-commits] [ASan] Define an internal implementation of strchr to make stack OOB tests pass (issue 5668047)
Marshall Clow
mclow.lists at gmail.com
Tue Feb 14 10:47:01 PST 2012
On Feb 14, 2012, at 10:30 AM, Timur Iskhodzhanov wrote:
> On Tue, Feb 14, 2012 at 10:26 PM, Timur Iskhodzhanov
> <timurrrr at google.com> wrote:
>> On Tue, Feb 14, 2012 at 10:12 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
>>> Isn't strchr defined to return a const char *?
>> Not in asan_interceptors.cc :369, :380
> I'm surprised but "man strchr" actually shows "char *" return type on
> both Linux and Mac!
yeah, that's a C bug - but it's in the standard, (AFAIK), so it's an official bug.
In C++, there are two ;-)
> const char* strchr(const char* s, int c);
> char* strchr( char* s, int c);
-- Marshall
Marshall Clow Idio Software <mailto:mclow.lists at gmail.com>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
-- Yu Suzuki
More information about the llvm-commits
mailing list