New issue
Advanced search Search tips

Issue 841840 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Build-Toolchain

Blocking:
issue 840995



Sign in to add a comment

talloc does not build with sanitizer flags

Project Member Reported by manojgupta@chromium.org, May 10 2018

Issue description

talloc is used by samba for memory allocator

[14/17] Linking default/libtalloc.so
10:19:14 runner x86_64-cros-linux-gnu-clang default/talloc_5.o default/lib/replace/replace_2.o default/lib/replace/cwrap_2.o -o /build/amd64-generic/tmp/portage/sys-libs/talloc-2.1.8/work/talloc-2.1.8-abi_x86_64.amd64/bin/default/libtalloc.so -fsanitize=address -fsanitize=fuzzer-no-link -Wl,-O2 -Wl,--as-needed -fsanitize=address -fsanitize=fuzzer-no-link -Wl,-O2 -Wl,--as-needed -fstack-protector -Wl,-no-undefined -shared -Wl,--version-script=/build/amd64-generic/tmp/portage/sys-libs/talloc-2.1.8/work/talloc-2.1.8-abi_x86_64.amd64/bin/default/talloc.vscript -Wl,-h,libtalloc.so.2 -Wl,-rpath,/build/amd64-generic/tmp/portage/sys-libs/talloc-2.1.8/work/talloc-2.1.8-abi_x86_64.amd64/bin/shared -Wl,-rpath,/build/amd64-generic/tmp/portage/sys-libs/talloc-2.1.8/work/talloc-2.1.8-abi_x86_64.amd64/bin/shared/private -L/usr/local/lib -Wl,-Bdynamic -lbsd -lcrypt -lattr
../talloc.c:322: error: undefined reference to '__sancov_lowest_stack'
../talloc.c:331: error: undefined reference to '__sanitizer_cov_trace_const_cmp8'
../../../../../../../usr/include/bits/string3.h:65: error: undefined reference to '__asan_report_load_n'
../../../../../../../usr/include/bits/string3.h:65: error: undefined reference to '__asan_report_load_n'
../talloc.c:382: error: undefined reference to '__sancov_lowest_stack'
../talloc.c:383: error: undefined reference to '__asan_report_load8'
../talloc.c:493: error: undefined reference to '__sancov_lowest_stack'
../talloc.c:429: error: undefined reference to '__sanitizer_cov_trace_cmp4'
../talloc.c:430: error: undefined reference to '__sanitizer_cov_trace_cmp4'
../talloc.c:406: error: undefined reference to '__sanitizer_cov_trace_pc_indir'
../talloc.c:435: error: undefined reference to '__sanitizer_cov_trace_const_cmp4'
../talloc.c:406: error: undefined reference to '__sanitizer_cov_trace_pc_indir'
../talloc.c:406: error: undefined reference to '__sanitizer_cov_trace_pc_indir'
../talloc.c:429: error: undefined reference to '__asan_report_load4'
../talloc.c:487: error: undefined reference to '__asan_report_load8'
../talloc.c:489: error: undefined reference to '__asan_report_load8'
../talloc.c:403: error: undefined reference to '__asan_handle_no_return'
../talloc.c:436: error: undefined reference to '__asan_report_load8'
../talloc.c:502: error: undefined reference to '__sancov_lowest_stack'
../talloc.c:429: error: undefined reference to '__sanitizer_cov_trace_cmp4'
../talloc.c:430: error: undefined reference to '__sanitizer_cov_trace_cmp4'
../talloc.c:406: error: undefined reference to '__sanitizer_cov_trace_pc_indir'
 
The issue arise from the fact the talloc build tries to build and run a binary that fails because of ASan checks.
 * ASAN error detected:
 * 
 * =================================================================
 * ==36736==ERROR: LeakSanitizer: detected memory leaks
 * 
 * Direct leak of 4096 byte(s) in 1 object(s) allocated from:
 *     #0 0x5616dc447113 in malloc (/build/amd64-generic/tmp/portage/sys-libs/talloc-2.1.8/work/talloc-2.1.8-abi_x86_64.amd64/bin/.conf_check_0/testbuild/default/testprog+0xc1113)
 *     #1 0x5616dc474a6d in main /build/amd64-generic/tmp/portage/sys-libs/tdb-1.3.12/work/tdb-1.3.12-abi_x86_64.amd64/bin/.conf_check_0/testbuild/../../../lib/replace/test/incoherent_mmap.c:59:10
 *     #2 0x7f757838a72f in __libc_start_main (/lib64/libc.so.6+0x2072f)
 * 
 * SUMMARY: AddressSanitizer: 4096 byte(s) leaked in 1 allocation(s).

Cc: manojgupta@chromium.org
 Issue 841855  has been merged into this issue.
 Issue 841852  has been merged into this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/15df59c1b23e3e68d0c6345d2f8e8c30291c88e9

commit 15df59c1b23e3e68d0c6345d2f8e8c30291c88e9
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri May 11 02:40:29 2018

talloc: Filter sanitizer flags.

talloc does not build with sanitizers. Filter it for now.

BUG= chromium:841840 
TEST=talloc builds.

CQ-DEPEND=CL:1052678

Change-Id: If008815fbb9a11765b3ae5f0fbaac0606b72f6d6
Reviewed-on: https://chromium-review.googlesource.com/1054180
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>

[add] https://crrev.com/15df59c1b23e3e68d0c6345d2f8e8c30291c88e9/chromeos/config/env/sys-libs/talloc

Status: Verified (was: Untriaged)

Sign in to add a comment