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

Issue 10831322: Fix the failed case ValueStoreTest.DotsInKeyNamesWithDicts for Android (Closed)

Created:
8 years, 4 months ago by yongsheng
Modified:
8 years, 4 months ago
Reviewers:
Robert Sesek, brettw, nilesh
CC:
chromium-reviews, peter+watch_chromium.org, erikwright+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Fix the failed case ValueStoreTest.DotsInKeyNamesWithDicts for Android Json parser uses a stack-based input copy string and the parsed result 'Value' references the internal pointer of the input copy string. To make the references valid, 'Value' has one member std::string to swap its content with the input copy string. On other platforms, the member std::string can get the internal pointer of the input copy string. However, on Android, std::string just swaps the content of two strings instead of swapping their internal pointers. This makes the pointer reference of value invalid. Fix this by forcing options |= JSON_DETACHABLE_CHILDREN for Android so disable this optimization. BUG=139434 TEST=run_tests.py -s unit_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152944

Patch Set 1 #

Patch Set 2 : Refine it according to rsesek's comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M base/json/json_parser.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M build/android/gtest_filter/unit_tests_disabled View 1 chunk +0 lines, -3 lines 2 comments Download

Messages

Total messages: 20 (0 generated)
yongsheng
This issue is very tricky. The main cause is the different behavior of std::string::swap on ...
8 years, 4 months ago (2012-08-15 09:48:57 UTC) #1
Robert Sesek
Thanks for investigating this -- it does look tricky. I wonder if, instead of doing ...
8 years, 4 months ago (2012-08-15 16:48:16 UTC) #2
yongsheng
On 2012/08/15 16:48:16, rsesek wrote: > Thanks for investigating this -- it does look tricky. ...
8 years, 4 months ago (2012-08-16 01:22:32 UTC) #3
yongsheng
The ValueStoreTest related tests are all passed. The 3 failures in android_test are not related ...
8 years, 4 months ago (2012-08-16 03:01:20 UTC) #4
yongsheng
@brettw, since you are the owner of 'base/', could you please help review it? thanks.
8 years, 4 months ago (2012-08-16 07:06:27 UTC) #5
brettw
This optimization seems scary and I wonder how necessary it is. LGTM for this patch, ...
8 years, 4 months ago (2012-08-19 22:40:17 UTC) #6
yongsheng
On 2012/08/19 22:40:17, brettw wrote: > This optimization seems scary and I wonder how necessary ...
8 years, 4 months ago (2012-08-20 01:22:25 UTC) #7
nilesh
LGTM
8 years, 4 months ago (2012-08-20 16:26:16 UTC) #8
yongsheng
On 2012/08/20 16:26:16, nileshagrawal1 wrote: > LGTM thanks. @rsesek, if you don't have comments, i'll ...
8 years, 4 months ago (2012-08-21 01:45:03 UTC) #9
Robert Sesek
LGTM On 2012/08/19 22:40:17, brettw wrote: > This optimization seems scary and I wonder how ...
8 years, 4 months ago (2012-08-21 13:30:35 UTC) #10
yongsheng
thank you all.
8 years, 4 months ago (2012-08-22 01:21:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yongsheng.zhu@intel.com/10831322/2002
8 years, 4 months ago (2012-08-22 01:21:48 UTC) #12
commit-bot: I haz the power
Try job failure for 10831322-2002 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-22 02:53:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yongsheng.zhu@intel.com/10831322/2002
8 years, 4 months ago (2012-08-22 05:28:55 UTC) #14
commit-bot: I haz the power
Try job failure for 10831322-2002 on win for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number=24092 Step "update" is always ...
8 years, 4 months ago (2012-08-22 05:47:30 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yongsheng.zhu@intel.com/10831322/2002
8 years, 4 months ago (2012-08-23 01:15:26 UTC) #16
commit-bot: I haz the power
Change committed as 152944
8 years, 4 months ago (2012-08-23 03:42:39 UTC) #17
nilesh
https://chromiumcodereview.appspot.com/10831322/diff/2002/build/android/gtest_filter/unit_tests_disabled File build/android/gtest_filter/unit_tests_disabled (left): https://chromiumcodereview.appspot.com/10831322/diff/2002/build/android/gtest_filter/unit_tests_disabled#oldcode47 build/android/gtest_filter/unit_tests_disabled:47: LeveldbValueStore/ValueStoreTest.DotsInKeyNamesWithDicts/0 Looks like the test is still failing on ...
8 years, 4 months ago (2012-08-23 17:33:41 UTC) #18
nilesh
https://chromiumcodereview.appspot.com/10831322/diff/2002/build/android/gtest_filter/unit_tests_disabled File build/android/gtest_filter/unit_tests_disabled (left): https://chromiumcodereview.appspot.com/10831322/diff/2002/build/android/gtest_filter/unit_tests_disabled#oldcode47 build/android/gtest_filter/unit_tests_disabled:47: LeveldbValueStore/ValueStoreTest.DotsInKeyNamesWithDicts/0 On 2012/08/23 17:33:42, nileshagrawal1 wrote: > Looks like ...
8 years, 4 months ago (2012-08-23 20:21:32 UTC) #19
yongsheng
8 years, 4 months ago (2012-08-24 01:04:38 UTC) #20
On 2012/08/23 20:21:32, nileshagrawal1 wrote:
>
https://chromiumcodereview.appspot.com/10831322/diff/2002/build/android/gtest...
> File build/android/gtest_filter/unit_tests_disabled (left):
> 
>
https://chromiumcodereview.appspot.com/10831322/diff/2002/build/android/gtest...
> build/android/gtest_filter/unit_tests_disabled:47:
> LeveldbValueStore/ValueStoreTest.DotsInKeyNamesWithDicts/0
> On 2012/08/23 17:33:42, nileshagrawal1 wrote:
> > Looks like the test is still failing on the bots. Can you please take a
look.
> >
>
http://build.chromium.org/p/chromium.fyi/builders/Chromium%252520Linux%252520...
> 
> Nevermind, this is an issue with the android tester bots.
ok, got it. thanks.

Powered by Google App Engine
This is Rietveld 408576698