First failing build:
https://uberchromegw.corp.google.com/i/chromiumos.chromium/builders/amd64-generic-tot-asan-informational/builds/11546
Log snippet
metrics-0.0.1-r1857: * ASAN error detected:
metrics-0.0.1-r1857: * =================================================================
metrics-0.0.1-r1857: * ==17==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffba979b6e at pc 0x7f08fad39bb7 bp 0x7fffba979b30 sp 0x7fffba979b28
metrics-0.0.1-r1857: * READ of size 1 at 0x7fffba979b6e thread T0
metrics-0.0.1-r1857: * #0 0x7f08fad39bb6 in MetricsLibrary::ConsentId(std::string*) /build/amd64-generic/var/cache/portage/chromeos-base/metrics/out/Default/../../../../../../../tmp/portage/chromeos-base/metrics-0.0.1-r1857/work/metrics-0.0.1/platform2/metrics/metrics_library.cc:148:7
metrics-0.0.1-r1857: * #1 0x7f08faeaf436 in MetricsLibraryTest_ConsentIdInvalidDirPath_Test::TestBody() /build/amd64-generic/var/cache/portage/chromeos-base/metrics/out/Default/../../../../../../../tmp/portage/chromeos-base/metrics-0.0.1-r1857/work/metrics-0.0.1/platform2/metrics/metrics_library_test.cc:141:3
metrics-0.0.1-r1857: * #2 0x7f08fad0784f in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:2078:10
metrics-0.0.1-r1857: * #3 0x7f08fad0784f in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:2114
metrics-0.0.1-r1857: * #4 0x7f08face8ab1 in testing::Test::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:2150:5
metrics-0.0.1-r1857: * #5 0x7f08face9f50 in testing::TestInfo::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:2326:5
metrics-0.0.1-r1857: * #6 0x7f08facea782 in testing::TestCase::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:2444:5
metrics-0.0.1-r1857: * #7 0x7f08facf4018 in testing::internal::UnitTestImpl::RunAllTests() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:4315:11
metrics-0.0.1-r1857: * #8 0x7f08fad084af in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:2078:10
metrics-0.0.1-r1857: * #9 0x7f08fad084af in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:2114
metrics-0.0.1-r1857: * #10 0x7f08facf3c79 in testing::UnitTest::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.7.0/work/gtest-1.7.0-abi_x86_64.amd64/./src/gtest.cc:3926:10
metrics-0.0.1-r1857: * #11 0x7f08faeb404b in RUN_ALL_TESTS() /build/amd64-generic/var/cache/portage/chromeos-base/metrics/out/Default/../../../../../../../usr/include/gtest/gtest.h:2288:10
metrics-0.0.1-r1857: * #12 0x7f08faeb404b in main /build/amd64-generic/var/cache/portage/chromeos-base/metrics/out/Default/../../../../../../../tmp/portage/chromeos-base/metrics-0.0.1-r1857/work/metrics-0.0.1/platform2/metrics/metrics_library_test.cc:289
metrics-0.0.1-r1857: * #13 0x7f08f9260795 in __libc_start_main /var/tmp/portage/cross-x86_64-cros-linux-gnu/glibc-2.23-r3/work/glibc-2.23/csu/../csu/libc-start.c:289
metrics-0.0.1-r1857: * #14 0x7f08fadcf168 in _start (/var/cache/portage/chromeos-base/metrics/out/Default/metrics_library_test+0x70168)
metrics-0.0.1-r1857: *
metrics-0.0.1-r1857: * Address 0x7fffba979b6e is located in stack of thread T0 at offset 46 in frame
metrics-0.0.1-r1857: * #0 0x7f08fad3983f in MetricsLibrary::ConsentId(std::string*) /build/amd64-generic/var/cache/portage/chromeos-base/metrics/out/Default/../../../../../../../tmp/portage/chromeos-base/metrics-0.0.1-r1857/work/metrics-0.0.1/platform2/metrics/metrics_library.cc:136
metrics-0.0.1-r1857: *
metrics-0.0.1-r1857: * This frame has 2 object(s):
metrics-0.0.1-r1857: * [32, 36) 'fd'
metrics-0.0.1-r1857: * [48, 88) 'buf' <== Memory access at offset 46 underflows this variable
metrics-0.0.1-r1857: * HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
metrics-0.0.1-r1857: * (longjmp and C++ exceptions *are* supported)
metrics-0.0.1-r1857: * SUMMARY: AddressSanitizer: stack-buffer-overflow /build/amd64-generic/var/cache/portage/chromeos-base/metrics/out/Default/../../../../../../../tmp/portage/chromeos-base/metrics-0.0.1-r1857/work/metrics-0.0.1/platform2/metrics/metrics_library.cc:148:7 in MetricsLibrary::ConsentId(std::string*)
metrics-0.0.1-r1857: * Shadow bytes around the buggy address:
metrics-0.0.1-r1857: * 0x100077527310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
metrics-0.0.1-r1857: * 0x100077527320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
metrics-0.0.1-r1857: * 0x100077527330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
metrics-0.0.1-r1857: * 0x100077527340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
metrics-0.0.1-r1857: * 0x100077527350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
metrics-0.0.1-r1857: * =>0x100077527360: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04[f2]00 00
metrics-0.0.1-r1857: * 0x100077527370: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
metrics-0.0.1-r1857: * 0x100077527380: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
metrics-0.0.1-r1857: * 0x100077527390: 00 f2 f2 f2 00 00 f2 f2 04 f2 04 f2 00 f2 f2 f2
metrics-0.0.1-r1857: * 0x1000775273a0: 00 f2 f2 f2 00 00 f2 f2 00 f2 f2 f2 00 f2 f2 f2
metrics-0.0.1-r1857: * 0x1000775273b0: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
metrics-0.0.1-r1857: * Shadow byte legend (one shadow byte represents 8 application bytes):
metrics-0.0.1-r1857: * Addressable: 00
metrics-0.0.1-r1857: * Partially addressable: 01 02 03 04 05 06 07
metrics-0.0.1-r1857: * Heap left redzone: fa
metrics-0.0.1-r1857: * Heap right redzone: fb
metrics-0.0.1-r1857: * Freed heap region: fd
metrics-0.0.1-r1857: * Stack left redzone: f1
metrics-0.0.1-r1857: * Stack mid redzone: f2
metrics-0.0.1-r1857: * Stack right redzone: f3
metrics-0.0.1-r1857: * Stack partial redzone: f4
metrics-0.0.1-r1857: * Stack after return: f5
metrics-0.0.1-r1857: * Stack use after scope: f8
metrics-0.0.1-r1857: * Global redzone: f9
metrics-0.0.1-r1857: * Global init order: f6
metrics-0.0.1-r1857: * Poisoned by user: f7
metrics-0.0.1-r1857: * Container overflow: fc
metrics-0.0.1-r1857: * Array cookie: ac
metrics-0.0.1-r1857: * Intra object redzone: bb
metrics-0.0.1-r1857: * ASan internal: fe
metrics-0.0.1-r1857: * Left alloca redzone: ca
metrics-0.0.1-r1857: * Right alloca redzone: cb
metrics-0.0.1-r1857: * ==17==ABORTING
Comment 1 by achuith@chromium.org
, Jan 18 2017Owner: vapier@chromium.org