Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 405153002: Provide consistent behaviour for memchr(_,_,0) (Closed)

Created:
6 years, 5 months ago by simonb (inactive)
Modified:
6 years, 5 months ago
Reviewers:
rmcilroy
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Provide consistent behaviour for memchr(_,_,0) A memchr() search of a zero-byte range returns an undefined value. On arm32 it always returns NULL, but on arm64 it does not. This causes random crashes while reading /proc/self/maps when loading the 64-bit libchrome. Fix by setting the value to which memchr() assigns to NULL if the search range is zero bytes. There are three calls to memchr(). Two of them could encounter this; the third is safe. BUG=394306 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284693

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -6 lines) Patch
M third_party/android_crazy_linker/README.chromium View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/android_crazy_linker/src/src/crazy_linker_line_reader.cpp View 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/android_crazy_linker/src/src/crazy_linker_proc_maps.cpp View 1 chunk +8 lines, -3 lines 1 comment Download

Messages

Total messages: 5 (0 generated)
simonb (inactive)
6 years, 5 months ago (2014-07-21 17:16:13 UTC) #1
rmcilroy
lgtm with optional suggestion. https://codereview.chromium.org/405153002/diff/1/third_party/android_crazy_linker/src/src/crazy_linker_proc_maps.cpp File third_party/android_crazy_linker/src/src/crazy_linker_proc_maps.cpp (right): https://codereview.chromium.org/405153002/diff/1/third_party/android_crazy_linker/src/src/crazy_linker_proc_maps.cpp#newcode67 third_party/android_crazy_linker/src/src/crazy_linker_proc_maps.cpp:67: tok_end = NULL; Optional suggestion ...
6 years, 5 months ago (2014-07-22 09:16:36 UTC) #2
simonb (inactive)
The CQ bit was checked by simonb@chromium.org
6 years, 5 months ago (2014-07-22 12:06:38 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonb@chromium.org/405153002/1
6 years, 5 months ago (2014-07-22 12:07:01 UTC) #4
commit-bot: I haz the power
6 years, 5 months ago (2014-07-22 16:12:44 UTC) #5
Message was sent while issue was closed.
Change committed as 284693

Powered by Google App Engine
This is Rietveld 408576698