[LLVMbugs] [Bug 22299] New: crash when trying to build with module.map

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 22 12:43:41 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22299

            Bug ID: 22299
           Summary: crash when trying to build with module.map
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mobi at mobiphil.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

cat t.cpp

int main() {
}

command:



/b/default/llvm/Release/bin/clang -v t.cpp -c   -fmodules
-fmodules-cache-path=$PWD/cache -fmodule-maps
-fmodule-map-file=/b/default/libcxx/include/c++/v1/module.modulemap
-fmodule-map-file=/b/default/sysinclude/module.map

Interesting, when running the command with only one of the module.map files,
there is no crash. After the crash report you will find the content of
/b/default/sysinclude/module.map


0  clang           0x00000000024c9e98 llvm::sys::PrintStackTrace(_IO_FILE*) +
40
1  clang           0x00000000024cb37b
2  libpthread.so.0 0x00007f8394ba8340
3  clang           0x000000000077599c
clang::DiagnosticRenderer::emitDiagnostic(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::StringRef,
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>,
clang::SourceManager const*, llvm::PointerUnion<clang::Diagnostic const*,
clang::StoredDiagnostic const*>) + 44
4  clang           0x000000000074abe9
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 1369
5  clang           0x000000000158557c
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 380
6  clang           0x0000000001580063
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 83
7  clang           0x0000000001537584 clang::ModuleMapParser::parseModuleDecl()
+ 4180
8  clang           0x000000000153d3fa
clang::ModuleMapParser::parseModuleMapFile() + 314
9  clang           0x00000000015342f1
clang::ModuleMap::parseModuleMapFile(clang::FileEntry const*, bool,
clang::DirectoryEntry const*) + 545
10 clang           0x0000000001514c8a
clang::HeaderSearch::loadModuleMapFileImpl(clang::FileEntry const*, bool,
clang::DirectoryEntry const*) + 106
11 clang           0x0000000001514beb
clang::HeaderSearch::loadModuleMapFile(clang::FileEntry const*, bool) + 187
12 clang           0x00000000006eaba2
clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind) + 3698
13 clang           0x0000000000719c3a
clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&,
clang::FrontendInputFile const&) + 1834
14 clang           0x00000000006edcc7
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 791
15 clang           0x00000000006d3f05
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3141
16 clang           0x00000000006cb770 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 672
17 clang           0x00000000006d2a8c main + 11708
18 libc.so.6       0x00007f8393961ec5 __libc_start_main + 245
19 clang           0x00000000006cb401
Stack dump:
0.      Program arguments: /b/default/llvm/Release/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name t.cpp -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.24 -dwarf-column-info -coverage-file
/g/p.git/clang/modules/t.cpp -resource-dir
/b/default/llvm/Release/bin/../lib/clang/3.7.0 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
-internal-isystem /usr/local/include -internal-isystem
/b/default/llvm/Release/bin/../lib/clang/3.7.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir /g/p.git/clang/modules -ferror-limit
19 -fmessage-length 166 -mstackrealign -fmodules -fmodule-maps
-fmodule-map-file=/b/default/libcxx/include/c++/v1/module.modulemap
-fmodule-map-file=/b/default/sysinclude/module.map
-fmodules-cache-path=/g/p.git/clang/modules/cache -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
t.o -x c++ t.cpp 

cat /b/default/sysinclude/module.map

module std [system] [extern_c] {
   module assert {
      textual header "assert.h"
         header "bits/assert-decls.h"
         export *
   }

   module complex {
      header "complex.h"
         export *
   }

   module ctype {
      header "ctype.h"
         export *
   }

   module errno {
      header "errno.h"
         header "sys/errno.h"
         export *
   }

   module fenv {
      header "fenv.h"
         export *
   }

}

-- 
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/20150122/7888bb32/attachment.html>


More information about the llvm-bugs mailing list