llvm / llvm/llvm-project

clang serializes host pointer value into module binary (.pcm)

Open
#206,362 9 comments 0 reactions 0 assignees View on GitHub
clang:modules incomplete
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Two builds of the seastar C++20 module give me slightly different .pcms (attached).

llvm-bcanalyzer (and Claude) tell me that a host pointer value was serialized, so the build is not reproducible. This in turn reduces sccache effectiveness.

See UnknownCode171 with the funky op7; it's hex value is clearly a pointer:

```diff
--- /tmp/old.txt 2026-06-28 22:22:49.216109863 +0300
+++ /tmp/new.txt 2026-06-28 22:22:44.866024173 +0300
@@ -3550,10 +3550,10 @@

blob data = unprintable, 14112 bytes.

-
+

blob data = ''
-
+



@@ -2600477,7 +2600477,7 @@



-
+



@@ -2600498,7 +2600498,7 @@


blob data = unprintable, 20 bytes.
-
+
```

The pcms are available in https://scratch.scylladb.com/pcms.tar.gz.

Contributor guide

Open the contributing guide

Research direction

Start by downloading pcms.tar.gz and comparing the two seastar C++20 module .pcms with llvm-bcanalyzer. Investigate the UnknownCode171 op7 value and the surrounding AST records to identify where the host pointer is serialized. Done means repeated builds produce identical module binaries without host pointer values.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.