commit | ac42b083f104442e12393ff09929a1add881010d | [log] [tgz] |
---|---|---|
author | Naveen Seth Hanig <naveen.hanig@outlook.com> | Tue Apr 08 05:02:57 2025 +0200 |
committer | GitHub <noreply@github.com> | Tue Apr 08 11:02:57 2025 +0800 |
tree | e8292c6b9d57362244b8714713bb803c91d12329 | |
parent | f1bb2fe3562d2fe9a43c79ec8af908fdff23a33a [diff] |
[clang][modules] Guard against bad -fmodule-file mappings (#132059) (#133462) Fix https://github.com/llvm/llvm-project/issues/132059. Providing incorrect mappings via `-fmodule-file=<name>=<path/to/bmi>` can crash the compiler when loading a module that imports an incorrectly mapped module. The crash occurs during AST body deserialization, when the compiler attempts to resolve remappings using the `ModuleFile` from the incorrectly mapped module's BMI file. The cause is an invalid access into an incorrectly loaded `ModuleFile`. This commit fixes the issue by verifying the identity of the imported module.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.