New issue
Advanced search Search tips

Issue 636132 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Use-of-uninitialized-value in PrinterPrefManagerTest.RemovePrinter

Project Member Reported by reillyg@chromium.org, Aug 9 2016

Issue description

PrinterPrefManagerTest.RemovePrinter (run #1):
[ RUN      ] PrinterPrefManagerTest.RemovePrinter
==10324==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x12e5028b in Equals base/values.cc:849:9
    #1 0x12e4fe95 in Equals base/values.cc:850:25
    #2 0x12e53e70 in Remove base/values.cc:1030:16
    #3 0xe5681c2 in RemovePrinter chrome/browser/chromeos/printing/printer_pref_manager.cc:114:35
    #4 0x7633987 in TestBody chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc:73:12
    #5 0xfe60696 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2458:12
    #6 0xfe60696 in Run testing/gtest/src/gtest.cc:2474:0
    #7 0xfe63967 in Run testing/gtest/src/gtest.cc:2656:11
    #8 0xfe6517b in Run testing/gtest/src/gtest.cc:2774:28
    #9 0xfe82371 in RunAllTests testing/gtest/src/gtest.cc:4647:43
    #10 0xfe8137a in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12
    #11 0xfe8137a in Run testing/gtest/src/gtest.cc:4255:0
    #12 0xef94480 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46
    #13 0xef94480 in Run base/test/test_suite.cc:251:0
    #14 0xef9a0d3 in Run base/callback.h:389:12
    #15 0xef9a0d3 in LaunchUnitTestsInternal base/test/launcher/unit_test_launcher.cc:206:0
    #16 0xef99967 in LaunchUnitTests base/test/launcher/unit_test_launcher.cc:445:10
    #17 0xef7a883 in main chrome/test/base/run_all_unittests.cc:21:10
    #18 0x7fafab26f7ec in __libc_start_main /build/eglibc-oqps9y/eglibc-2.15/csu/libc-start.c:226:0
    #19 0x881078 in _start ??:0

  Uninitialized value was stored to memory at
    #0 0x12e4383f in GetAsBoolean base/values.cc:194:16
    #1 0x12e44279 in Equals base/values.cc:236:43
    #2 0x12e4fe95 in Equals base/values.cc:850:25
    #3 0x12e4fe95 in Equals base/values.cc:850:25
    #4 0x12e53e70 in Remove base/values.cc:1030:16
    #5 0xe5681c2 in RemovePrinter chrome/browser/chromeos/printing/printer_pref_manager.cc:114:35
    #6 0x7633987 in TestBody chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc:73:12
    #7 0xfe60696 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2458:12
    #8 0xfe60696 in Run testing/gtest/src/gtest.cc:2474:0
    #9 0xfe63967 in Run testing/gtest/src/gtest.cc:2656:11
    #10 0xfe6517b in Run testing/gtest/src/gtest.cc:2774:28
    #11 0xfe82371 in RunAllTests testing/gtest/src/gtest.cc:4647:43
    #12 0xfe8137a in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12
    #13 0xfe8137a in Run testing/gtest/src/gtest.cc:4255:0
    #14 0xef94480 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46
    #15 0xef94480 in Run base/test/test_suite.cc:251:0
    #16 0xef9a0d3 in Run base/callback.h:389:12
    #17 0xef9a0d3 in LaunchUnitTestsInternal base/test/launcher/unit_test_launcher.cc:206:0
    #18 0xef99967 in LaunchUnitTests base/test/launcher/unit_test_launcher.cc:445:10
    #19 0xef7a883 in main chrome/test/base/run_all_unittests.cc:21:10
    #20 0x7fafab26f7ec in __libc_start_main /build/eglibc-oqps9y/eglibc-2.15/csu/libc-start.c:226:0

  Uninitialized value was stored to memory at
    #0 0x12e47abf in FundamentalValue base/values.cc:173:28
    #1 0x12e47abf in SetBoolean base/values.cc:421:0
    #2 0x14232d13 in PPDFileToDictionary chromeos/printing/printer_translator.cc:66:15
    #3 0x14232d13 in PrinterToPref chromeos/printing/printer_translator.cc:128:0
    #4 0xe567903 in RegisterPrinter chrome/browser/chromeos/printing/printer_pref_manager.cc:103:7
    #5 0x76337b0 in TestBody chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc:70:12
    #6 0xfe60696 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2458:12
    #7 0xfe60696 in Run testing/gtest/src/gtest.cc:2474:0
    #8 0xfe63967 in Run testing/gtest/src/gtest.cc:2656:11
    #9 0xfe6517b in Run testing/gtest/src/gtest.cc:2774:28
    #10 0xfe82371 in RunAllTests testing/gtest/src/gtest.cc:4647:43
    #11 0xfe8137a in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12
    #12 0xfe8137a in Run testing/gtest/src/gtest.cc:4255:0
    #13 0xef94480 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46
    #14 0xef94480 in Run base/test/test_suite.cc:251:0
    #15 0xef9a0d3 in Run base/callback.h:389:12
    #16 0xef9a0d3 in LaunchUnitTestsInternal base/test/launcher/unit_test_launcher.cc:206:0
    #17 0xef99967 in LaunchUnitTests base/test/launcher/unit_test_launcher.cc:445:10
    #18 0xef7a883 in main chrome/test/base/run_all_unittests.cc:21:10
    #19 0x7fafab26f7ec in __libc_start_main /build/eglibc-oqps9y/eglibc-2.15/csu/libc-start.c:226:0

  Uninitialized value was created by a heap allocation
    #0 0x8eb122 in operator new(unsigned long) ??:0
    #1 0x76336ee in MakeUnique\u003Cchromeos::Printer, char const (&)[23]> base/memory/ptr_util.h:56:29
    #2 0x76336ee in TestBody chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc:70:0
    #3 0xfe60696 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2458:12
    #4 0xfe60696 in Run testing/gtest/src/gtest.cc:2474:0
    #5 0xfe63967 in Run testing/gtest/src/gtest.cc:2656:11
    #6 0xfe6517b in Run testing/gtest/src/gtest.cc:2774:28
    #7 0xfe82371 in RunAllTests testing/gtest/src/gtest.cc:4647:43
    #8 0xfe8137a in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12
    #9 0xfe8137a in Run testing/gtest/src/gtest.cc:4255:0
    #10 0xef94480 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46
    #11 0xef94480 in Run base/test/test_suite.cc:251:0
    #12 0xef9a0d3 in Run base/callback.h:389:12
    #13 0xef9a0d3 in LaunchUnitTestsInternal base/test/launcher/unit_test_launcher.cc:206:0
    #14 0xef99967 in LaunchUnitTests base/test/launcher/unit_test_launcher.cc:445:10
    #15 0xef7a883 in main chrome/test/base/run_all_unittests.cc:21:10
    #16 0x7fafab26f7ec in __libc_start_main /build/eglibc-oqps9y/eglibc-2.15/csu/libc-start.c:226:0

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/b/swarming/w/irXxWSKv/out/Release/unit_tests+0x12e5028b)
Exiting
 

Comment 1 by skau@chromium.org, Aug 9 2016

Sorry about this, I'm looking into it.
Sorry, already sent out a patch: https://codereview.chromium.org/2232573002
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/605697bfa9ac888b1cac3a0cc703cc037b71a5bf

commit 605697bfa9ac888b1cac3a0cc703cc037b71a5bf
Author: reillyg <reillyg@chromium.org>
Date: Wed Aug 10 00:15:56 2016

Fix uninitialized fields in Printer::PPDFile.

These fields may be left uninitialized. This patch applies the default
values as documented.

BUG= 636132 

Review-Url: https://codereview.chromium.org/2232573002
Cr-Commit-Position: refs/heads/master@{#410890}

[modify] https://crrev.com/605697bfa9ac888b1cac3a0cc703cc037b71a5bf/chromeos/printing/printer_configuration.h
[modify] https://crrev.com/605697bfa9ac888b1cac3a0cc703cc037b71a5bf/chromeos/printing/printer_translator.cc

Status: Fixed (was: Started)
Labels: VerifyIn-54

Comment 6 by dchan@chromium.org, Oct 7 2016

Labels: VerifyIn-55

Comment 7 by dchan@google.com, Nov 19 2016

Labels: VerifyIn-56

Comment 8 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 9 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 10 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 11 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 13 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment