[llvm-bugs] [Bug 38617] New: undeclared identifier _LIBCPP_UNREACHABLE/FALLTHROUGH when build w/monorepo + sanitizer

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 17 13:07:36 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38617

            Bug ID: 38617
           Summary: undeclared identifier _LIBCPP_UNREACHABLE/FALLTHROUGH
                    when build w/monorepo + sanitizer
           Product: libc++abi
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: brian.cain at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

With g++ 4.8.4 + llvm monorepo + LLVM_USE_SANITIZER:STRING=Address +
LLVM_USE_SANITIZE_COVERAGE:BOOL=On, build fails with errors below.

cxa_demangle.cpp doesn't directly include __config AFAICT and it wasn't obvious
to me how it would get it indirectly.  Does it make sense to just add an ifndef
_LIBCPP_{UNREACHABLE,FALLTHROUGH} and provide defaults?  If so I can make a
patch.

~~~~~
g++   -D_DEBUG -D_GNU_SOURCE -D_LIBCPP_DISABLE_EXTERN_TEMPLATE
-D_LIBCPP_ENABLE_CXX17_REMOVED_UN
EXPECTED_FUNCTIONS -D_LIBCXXABI_BUILDING_LIBRARY -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS
 -D__STDC_LIMIT_MACROS -Iprojects/libcxxabi/fuzz
-I/local/mnt/workspace/bcain-ubuntu_bcain_6589_
36JEP/llvm-project/libcxxabi/fuzz -Iinclude
-I/local/mnt/workspace/bcain-ubuntu_bcain_6589_36JEP
/llvm-project/llvm/include
-I/local/mnt/workspace/bcain-ubuntu_bcain_6589_36JEP/llvm-project/lib
cxxabi/include -fPIC -fvisibility-inlines-hidden -Werror=date-time
-Werror=unguarded-availabilit
y-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wmissing-field
-initializers -pedantic -Wno-long-long -Wcovered-switch-default
-Wnon-virtual-dtor -Wdelete-non-
virtual-dtor -Wstring-conversion -fno-omit-frame-pointer -gline-tables-only
-fsanitize=address -
fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -fdiagnostics-color
-ffunction-secti
ons -fdata-sections  -O3    -UNDEBUG -MMD -MT
projects/libcxxabi/fuzz/CMakeFiles/cxa_demangle_fu
zzer.dir/__/src/cxa_demangle.cpp.o -MF
projects/libcxxabi/fuzz/CMakeFiles/cxa_demangle_fuzzer.dir/__/src/cxa_demangle.cpp.o.d
-o
projects/libcxxabi/fuzz/CMakeFiles/cxa_demangle_fuzzer.dir/__/src/cxa_demangle.cpp.o
-c
/local/mnt/workspace/bcain-ubuntu_bcain_6589_36JEP/llvm-project/libcxxabi/src/cxa_demangle.cpp
/local/mnt/workspace/bcain-ubuntu_bcain_6589_36JEP/llvm-project/libcxxabi/src/cxa_demangle.cpp:1158:5:
error: use of undeclared identifier '_LIBCPP_UNREACHABLE'
    _LIBCPP_UNREACHABLE();
    ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180817/80d6a5c1/attachment.html>


More information about the llvm-bugs mailing list