diff options
author | Naveen Seth Hanig <naveen.hanig@outlook.com> | 2025-04-08 05:02:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-08 11:02:57 +0800 |
commit | ac42b083f104442e12393ff09929a1add881010d (patch) | |
tree | e8292c6b9d57362244b8714713bb803c91d12329 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | f1bb2fe3562d2fe9a43c79ec8af908fdff23a33a (diff) | |
download | llvm-ac42b083f104442e12393ff09929a1add881010d.zip llvm-ac42b083f104442e12393ff09929a1add881010d.tar.gz llvm-ac42b083f104442e12393ff09929a1add881010d.tar.bz2 |
[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.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions