Skip to content

Instantly share code, notes, and snippets.

@kyessenov
Created January 23, 2020 01:58
Show Gist options
  • Save kyessenov/151ef169d595ce4440290ffae5913ac5 to your computer and use it in GitHub Desktop.
Save kyessenov/151ef169d595ce4440290ffae5913ac5 to your computer and use it in GitHub Desktop.
[ RUN ] RouterUpstreamLogTest.LogTimestampsAndDurations
=================================================================
==16==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6250000ca678 at pc 0x00002701ebd4 bp 0x7ffc2507feb0 sp 0x7ffc2507fea8
WRITE of size 1 at 0x6250000ca678 thread T0
#0 0x2701ebd3 in Envoy::Router::TestFilter::TestFilter(Envoy::Router::FilterConfig&) /proc/self/cwd/test/common/router/router_test.cc:86:8
#1 0x271d226b in Envoy::Router::RouterUpstreamLogTest::init(absl::optional<envoy::config::accesslog::v3::AccessLog>) /proc/self/cwd/test/common/router/router_upstream_log_test.cc:96:23
#2 0x271cc529 in Envoy::Router::RouterUpstreamLogTest_LogTimestampsAndDurations_Test::TestBody() /proc/self/cwd/test/common/router/router_upstream_log_test.cc:294:3
#3 0x40237ce4 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2447:10
#4 0x401f8935 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2483:14
#5 0x401b0ea9 in testing::Test::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2522:5
#6 0x401b3614 in testing::TestInfo::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2698:11
#7 0x401b514e in testing::TestSuite::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2828:28
#8 0x401de40e in testing::internal::UnitTestImpl::RunAllTests() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5285:44
#9 0x40246c84 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2447:10
#10 0x40202235 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2483:14
#11 0x401dcf84 in testing::UnitTest::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:4873:10
#12 0x3c15753e in RUN_ALL_TESTS() /proc/self/cwd/external/com_google_googletest/googletest/include/gtest/gtest.h:2453:46
#13 0x3c154f39 in Envoy::TestRunner::RunTests(int, char**) /proc/self/cwd/test/test_runner.cc:121:10
#14 0x3c14eeb5 in main /proc/self/cwd/test/main.cc:46:10
#15 0x7fb7d36a7b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
#16 0x2371d029 in _start (/home/kuat/.cache/bazel/_bazel_kuat/3ad3ede902565b8b2e4b14330072a21a/execroot/envoy/bazel-out/k8-dbg/bin/test/coverage/coverage_tests+0x2371d029)
0x6250000ca678 is located 0 bytes to the right of 9592-byte region [0x6250000c8100,0x6250000ca678)
allocated by thread T0 here:
#0 0x237c89d3 in __interceptor_malloc (/home/kuat/.cache/bazel/_bazel_kuat/3ad3ede902565b8b2e4b14330072a21a/execroot/envoy/bazel-out/k8-dbg/bin/test/coverage/coverage_tests+0x237c89d3)
#1 0x7fb7d3f41257 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x93257)
#2 0x271cc529 in Envoy::Router::RouterUpstreamLogTest_LogTimestampsAndDurations_Test::TestBody() /proc/self/cwd/test/common/router/router_upstream_log_test.cc:294:3
#3 0x40237ce4 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2447:10
#4 0x401f8935 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2483:14
#5 0x401b0ea9 in testing::Test::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2522:5
#6 0x401b3614 in testing::TestInfo::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2698:11
#7 0x401b514e in testing::TestSuite::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2828:28
#8 0x401de40e in testing::internal::UnitTestImpl::RunAllTests() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5285:44
#9 0x40246c84 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2447:10
#10 0x40202235 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2483:14
#11 0x401dcf84 in testing::UnitTest::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:4873:10
#12 0x3c15753e in RUN_ALL_TESTS() /proc/self/cwd/external/com_google_googletest/googletest/include/gtest/gtest.h:2453:46
#13 0x3c154f39 in Envoy::TestRunner::RunTests(int, char**) /proc/self/cwd/test/test_runner.cc:121:10
#14 0x3c14eeb5 in main /proc/self/cwd/test/main.cc:46:10
#15 0x7fb7d36a7b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
SUMMARY: AddressSanitizer: heap-buffer-overflow /proc/self/cwd/test/common/router/router_test.cc:86:8 in Envoy::Router::TestFilter::TestFilter(Envoy::Router::FilterConfig&)
Shadow bytes around the buggy address:
0x0c4a80011470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a80011480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a80011490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a800114a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a800114b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c4a800114c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00[fa]
0x0c4a800114d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a800114e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a800114f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a80011500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a80011510: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==16==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment