PolicyServiceTest.SeparateProxyPoliciesMerging failing under msan |
||||
Issue descriptionhttps://build.chromium.org/p/chromium.memory.full/builders/Linux%20MSan%20Tests/builds/6001/steps/components_unittests%20on%20Ubuntu-14.04/logs/PolicyServiceTest.SeparateProxyPoliciesMerging ==27325==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x85b40d9 in RemapProxyPolicies components/policy/core/common/policy_service_impl.cc:50:11 #1 0x85b40d9 in MergeAndTriggerUpdates components/policy/core/common/policy_service_impl.cc:194:0 #2 0xdf67634 in Run base/callback.h:68:12 #3 0xdf67634 in RunTask base/debug/task_annotator.cc:59:0 #4 0xdd46031 in RunTask base/message_loop/message_loop.cc:423:19 #5 0xdd47a51 in DeferOrRunPendingTask base/message_loop/message_loop.cc:434:5 #6 0xdd49615 in DoWork base/message_loop/message_loop.cc:527:13 #7 0xdd56ca0 in Run base/message_loop/message_pump_default.cc:33:31 #8 0xdd45099 in RunHandler base/message_loop/message_loop.cc:387:10 #9 0xdde18cc in Run base/run_loop.cc:37:10 #10 0x768a3a3 in RunUntilIdle components/policy/core/common/policy_service_impl_unittest.cc:145:10 #11 0x768a3a3 in TestBody components/policy/core/common/policy_service_impl_unittest.cc:709:0 #12 0x133270fc in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2458:12 #13 0x133270fc in Run testing/gtest/src/gtest.cc:2474:0 #14 0x13329a81 in Run testing/gtest/src/gtest.cc:2656:11 #15 0x1332afe9 in Run testing/gtest/src/gtest.cc:2774:28 #16 0x1334b4fd in RunAllTests testing/gtest/src/gtest.cc:4647:43 #17 0x1334a36e in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 #18 0x1334a36e in Run testing/gtest/src/gtest.cc:4255:0 #19 0x13263f70 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46 #20 0x13263f70 in Run base/test/test_suite.cc:271:0 #21 0x1326dd8a in Run base/callback.h:85:12 #22 0x1326dd8a in LaunchUnitTestsInternal base/test/launcher/unit_test_launcher.cc:211:0 #23 0x1326d5ad in LaunchUnitTests base/test/launcher/unit_test_launcher.cc:453:10 #24 0x96a5d3 in ?? components/test/run_all_unittests.cc:8:10 #25 0x7f72ada3bf44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287:0 #26 0x8fa148 in _start ??:? Uninitialized value was created by an allocation of 'current_priority.i' in the stack frame of function '_ZN6policy17PolicyServiceImpl22MergeAndTriggerUpdatesEv' #0 0x85b2200 in MergeAndTriggerUpdates components/policy/core/common/policy_service_impl.cc:187:0
,
Feb 28 2017
I think this is due to https://codereview.chromium.org/2641343002/diff/60001/components/policy/core/common/policy_map.cc adding a read of source, but https://codereview.chromium.org/1304843004 added source as a field of PolicyMap::Entry but didn't change its ctor to initialize it. So `PolicyMap::Entry entry;` creates an entry with uinit entry.source field, but entry.has_higher_priority_than() reads it. hunyadym, I'm guessing the right fix is to make the Entry() ctor initialize source to something? To what? Can you send a fix?
,
Feb 28 2017
Yes, I think we can initialize it to POLICY_SOURCE_ENTERPRISE_DEFAULT (lowest priority per https://cs.chromium.org/chromium/src/components/policy/core/common/policy_service_impl.cc?l=43). (Or maybe we can get rid of the default constructor and set the values explicitly everywhere?) I'll fix this tomorrow.
,
Mar 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e1ac111de29d1ca2f661c5ff46a6897495f389d5 commit e1ac111de29d1ca2f661c5ff46a6897495f389d5 Author: hunyadym <hunyadym@chromium.org> Date: Wed Mar 01 15:55:59 2017 Initialize source field of PolicyMap::Entry Defaults to lowest priority source (POLICY_SOURCE_ENTERPRISE_DEFAULT). BUG= 697174 Review-Url: https://codereview.chromium.org/2724763002 Cr-Commit-Position: refs/heads/master@{#453940} [modify] https://crrev.com/e1ac111de29d1ca2f661c5ff46a6897495f389d5/components/policy/core/common/policy_map.cc [modify] https://crrev.com/e1ac111de29d1ca2f661c5ff46a6897495f389d5/components/policy/core/common/policy_map.h
,
Mar 1 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by thestig@chromium.org
, Feb 28 2017