THRIFT-4138: Remove undefined behavior imported from Boost
Client: C++
There is undefined behavior in boost::lexical_cast that was fixed in
https://github.com/boostorg/lexical_cast/issues/21, but that fix is
only available in recent Boost releases. This patch removes all uses
of lexical_cast instead.
That removes the last undefined behavior, so this patch also makes
ubsan.sh unconditionally fail on undefined behavior.
This closes #1232
diff --git a/build/docker/scripts/ubsan.sh b/build/docker/scripts/ubsan.sh
index 6db10f3..d39cc83 100755
--- a/build/docker/scripts/ubsan.sh
+++ b/build/docker/scripts/ubsan.sh
@@ -15,7 +15,7 @@
# undefined casting, aka "vptr".
#
# TODO: fix undefined vptr behavior and turn this option back on.
-export CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined -fno-sanitize=vptr"
+export CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined"
# Builds without optimization and with debugging symbols for making crash reports more
# readable.
export CFLAGS="${CFLAGS} -O0 -ggdb3"