mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
0ad20bdbfe
avoiding duplicate rebuilds of the same image, and also allow personal docker hub repositories for private fork builds to be optimized. Move ubsan build to artful image because it catches more stuff and fix what was found. THRIFT-4345: solidify docker build strategy for maximum coverage: trusty, xenial, artful as stock as they can be THRIFT-4344: add top level language summary markdown and update readme with a new image on the layered architecture THRIFT-3847: remove VERSION macro from config.h which was causing a conflict on artful builds. THRIFT-4359: fix haxe map/set decode when key is binary, as a missing break statement caused it to use an int during decode This closes #1389
31 lines
1000 B
Bash
Executable File
31 lines
1000 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Wraps autotools.sh, but each binary crashes if it exhibits undefined behavior.
|
|
# Set the undefined behavior flags. This crashes on all undefined behavior except for
|
|
# undefined casting, aka "vptr".
|
|
# TODO: fix undefined vptr behavior and turn this option back on.
|
|
|
|
export CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined -O0 -ggdb3 -fno-omit-frame-pointer"
|
|
export CXXFLAGS="${CFLAGS}"
|
|
export LDFLAGS="-lubsan"
|
|
export UBSAN_OPTIONS=print_stacktrace=1
|
|
|
|
#
|
|
# work around https://svn.boost.org/trac10/ticket/11632 if present
|
|
#
|
|
|
|
sed -i 's/, stream_t(rdbuf()) /, stream_t(pbase_type::member.get())/g' /usr/include/boost/format/alt_sstream.hpp
|
|
|
|
# llvm-symbolizer must be on PATH to get a stack trace on error
|
|
|
|
CLANG_PATH="$(mktemp -d)"
|
|
trap "rm -rf ${CLANG_PATH}" EXIT
|
|
ln -s "$(whereis llvm-symbolizer-4.0 | rev | cut -d ' ' -f 1 | rev)" \
|
|
"${CLANG_PATH}/llvm-symbolizer"
|
|
export PATH="${CLANG_PATH}:${PATH}"
|
|
llvm-symbolizer -version
|
|
|
|
build/docker/scripts/autotools.sh $*
|