New issue
Advanced search Search tips

Issue 766252 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 724628



Sign in to add a comment

adhd UnitTests fail with libc++

Project Member Reported by manojgupta@chromium.org, Sep 18 2017

Issue description

audio_thread_unittest fails with libc++. Fail seems to be limited to caroline and squawks boards ( and possibly the families).

https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/llvm_toolchain/builds/305
https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/llvm_toolchain/builds/308
 
Interestingly,  audio_thread_unittest passes when built locally with -O0/O1 or address sanitizer. Therefore, it might be actually a clang/llvm bug.
Cc: dgreid@chromium.org
There is something funky happening here. If I do cros_workon on adhd, all UnitTests pass on caroline. Only way to repro fail is to to use the regular ebuild.

With regular ebuild, there is an crash pointing to free() but the test passes when ran under gdb.


I verified that the passing (cros_workon) and failing binary (regular ebuild) are identical. It is a mystery why the test fails using the regular ebuild
(Maybe there is some host/target libraries mixup when running but not sure yet)
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/adhd/+/f8351ee190c830ac2e15ed5ceb800ace8437a904

commit f8351ee190c830ac2e15ed5ceb800ace8437a904
Author: Manoj Gupta <manojgupta@google.com>
Date: Wed Sep 20 04:46:25 2017

adhd: Fix audio_thread_unittest fail.

audio_thread_unittest is under allocating the memory in a calloc
call. Calloc call is using sizeof(ptr) instead of sizeof(type) which
results in memory corruption at run time.

Also fix some memory leaks that were found during debugging.

BUG= chromium:766252 
TEST=adhd unit tests pass on caroline.

Change-Id: Id450009b4862982d6da07617aa93ecb8f27687fa
Reviewed-on: https://chromium-review.googlesource.com/673823
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/f8351ee190c830ac2e15ed5ceb800ace8437a904/cras/src/tests/audio_thread_unittest.cc

Status: Verified (was: Untriaged)

Sign in to add a comment