Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1085)

Issue 5668047: [ASan] Define an internal implementation of strchr to make stack OOB tests pass (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by timurrrr_at_google_com
Modified:
12 years, 2 months ago
Reviewers:
kcc1, ramosian.glider, scanon, kcc, mclow.lists
CC:
llvm-commits_cs.uiuc.edu
Visibility:
Public.

Description

Define an internal implementation of strchr to make stack OOB tests pass Committed as http://llvm.org/viewvc/llvm-project?view=rev&revision=150499

Patch Set 1 #

Patch Set 2 : . #

Total comments: 3

Patch Set 3 : . #

Patch Set 4 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -1 line) Patch
M lib/asan/asan_interceptors.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M lib/asan/asan_interceptors.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M lib/asan/asan_rtl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15
timurrrr_at_google_com
Hi Kostya, Can you please review this small patch? Thanks!
12 years, 2 months ago (2012-02-14 17:47:15 UTC) #1
mclow.lists_gmail.com
On Feb 14, 2012, at 9:47 AM, timurrrr@google.com wrote: > Reviewers: kcc1, > > Message: ...
12 years, 2 months ago (2012-02-14 18:12:41 UTC) #2
ramosian.glider
+1 to what Marshall said http://codereview.appspot.com/5668047/diff/4/lib/asan/asan_interceptors.cc File lib/asan/asan_interceptors.cc (right): http://codereview.appspot.com/5668047/diff/4/lib/asan/asan_interceptors.cc#newcode112 lib/asan/asan_interceptors.cc:112: char* internal_strchr(const char *s, ...
12 years, 2 months ago (2012-02-14 18:18:27 UTC) #3
timurrrr_at_google_com
On Tue, Feb 14, 2012 at 10:12 PM, Marshall Clow <mclow.lists@gmail.com> wrote: > Isn't strchr ...
12 years, 2 months ago (2012-02-14 18:26:39 UTC) #4
timurrrr_at_google_com
http://codereview.appspot.com/5668047/diff/4/lib/asan/asan_interceptors.cc File lib/asan/asan_interceptors.cc (right): http://codereview.appspot.com/5668047/diff/4/lib/asan/asan_interceptors.cc#newcode112 lib/asan/asan_interceptors.cc:112: char* internal_strchr(const char *s, int c) { On 2012/02/14 ...
12 years, 2 months ago (2012-02-14 18:26:49 UTC) #5
timurrrr_at_google_com
On Tue, Feb 14, 2012 at 10:26 PM, Timur Iskhodzhanov <timurrrr@google.com> wrote: > On Tue, ...
12 years, 2 months ago (2012-02-14 18:30:57 UTC) #6
timurrrr_at_google_com
Got rid of the indices, PTAL
12 years, 2 months ago (2012-02-14 18:33:48 UTC) #7
scanon_apple.com
On Feb 14, 2012, at 1:30 PM, Timur Iskhodzhanov <timurrrr@google.com> wrote: > On Tue, Feb ...
12 years, 2 months ago (2012-02-14 18:46:18 UTC) #8
mclow.lists_gmail.com
On Feb 14, 2012, at 10:30 AM, Timur Iskhodzhanov wrote: > On Tue, Feb 14, ...
12 years, 2 months ago (2012-02-14 18:47:05 UTC) #9
kcc
There is only one place where REAL(strchr) is used and that place is not performance ...
12 years, 2 months ago (2012-02-14 18:49:15 UTC) #10
kcc
> Also, please check what does usual strchr return with c=0. Ignore this bit, looks ...
12 years, 2 months ago (2012-02-14 18:57:40 UTC) #11
ramosian.glider
http://codereview.appspot.com/5668047/diff/4/lib/asan/asan_interceptors.cc File lib/asan/asan_interceptors.cc (right): http://codereview.appspot.com/5668047/diff/4/lib/asan/asan_interceptors.cc#newcode112 lib/asan/asan_interceptors.cc:112: char* internal_strchr(const char *s, int c) { In fact ...
12 years, 2 months ago (2012-02-14 19:04:08 UTC) #12
timurrrr_at_google_com
Kostya, PTAL Alexander, I think the value of these CHECKs is debatable and if we ...
12 years, 2 months ago (2012-02-14 19:30:18 UTC) #13
kcc
LGTM! You may want to declare internal_strchr as returning "const char *" -- it does ...
12 years, 2 months ago (2012-02-14 19:33:36 UTC) #14
timurrrr_at_google_com
12 years, 2 months ago (2012-02-14 19:38:16 UTC) #15
On Tue, Feb 14, 2012 at 11:33 PM,  <konstantin.s.serebryany@gmail.com> wrote:
> LGTM!
Thanks!
r150499

> You may want to declare internal_strchr as returning "const char *" --
> it does not have to obey the C standard bug.
I want to keep its prototype compatible with REAL(strchr) just in case.
Otherwise, one might have to crack his head a few more times :)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b