commit | 0764f65a7fb06703610b33a86ca79025fa4050a4 | [log] [tgz] |
---|---|---|
author | Maksim Ivanov <emaxx@google.com> | Mon May 05 17:10:32 2025 +0200 |
committer | GitHub <noreply@github.com> | Mon May 05 17:10:32 2025 +0200 |
tree | dbd412e6337c7354c3e1931ab88b7a2c84839289 | |
parent | c3773f7ca8615bca2b121de9326437ebe497fca5 [diff] |
[clang] Fix nondeterminism in MemberPointerType (#137910) This commit fixes the nondeterminism issue in C++ header module enabled builds which were observed after https://github.com/llvm/llvm-project/pull/132401. The issue was related to the fact that the hash set operation in MemberPointerType::Profile() was triggering getMostRecentDecl(). As the latter may trigger the loading of new entities from the external AST source, this was presumably causing reentrant modification of data structure or some other issue that affects compiler's output in a nondeterministic way (likely depending on specific values hashes/pointers have). The change should otherwise be a no-op, because whether we take a "most recent" or "any" Decl shouldn't matter since `getCanonicalDecl()` is called on it anyway inside `MemberPointerType::Profile()`. We haven't been able to come up with a deterministic regression test for this fix.
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.