New issue
Advanced search Search tips

Issue 846817 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

UBSan from generate_v8_context_snapshot on libmedia.so because ~IMkvReader() not defined.

Project Member Reported by bunge...@chromium.org, May 25 2018

Issue description

Chrome Version: f85585b37189469ba6c9b53dfea57d88f1a9fe0f
OS: linux

What steps will reproduce the problem?
(1) out/ubsan/args.gn
enable_nacl = false
ffmpeg_branding = "ChromeOS"
is_debug = true
is_ubsan_security = true
optimize_for_fuzzing = true
pdf_enable_xfa = true
proprietary_codecs = true
use_libfuzzer = true
sanitizer_keep_symbols = true


(2) ninja -C out/ubsan //tools/v8_context_snapshot:generate_v8_context_snapshot
(3) 


What is the expected result?
Build to succeed.

What happens instead?
FAILED: v8_context_snapshot.bin 
python ../../build/gn_run_binary.py ./v8_context_snapshot_generator --output_file=v8_context_snapshot.bin
././v8_context_snapshot_generator: symbol lookup error: chromium/src/out/ubsan/./libmedia.so: undefined symbol: _ZTIN9mkvparser10IMkvReaderE
./v8_context_snapshot_generator failed with exit code 127


Please use labels and text to provide additional information.
$ c++filt _ZTIN9mkvparser10IMkvReaderE
typeinfo for mkvparser::IMkvReader
$ cd out/ubsan
$ ninja -d keeprsp libmedia.so
$ rm libmedia.so
$ sh -c "$(ninja -t commands libmedia.so | tail -1) -Wl,--no-undefined -Wl,--error-limit=0 2>&1" | grep IMkvReader
../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: typeinfo for mkvparser::IMkvReader

This rather poorly worded linker error results from mkvparser::IMkvReader::~IMkvReader() not being defined even though it may be needed. The issue is that third_party/libwebm/BUILD.gn does not list "source/mkvparser/mkvparser.cc" where this destructor is defined. Adding "source/mkvparser/mkvparser.cc" to third_party/libwebm/BUILD.gn fixes this, as does defining the destructor inline (just {}).


 
Components: -Blink>MediaRecording Blink>Media>Video

Sign in to add a comment