Commit 57aca28
fix(build): link vmStructs inline definitions in assertion-enabled builds
crashProtectionActive() and cast_to() are declared inline in vmStructs.h
(where the VMNMethod / cast accessors odr-use them inside assert(...)) but
defined only in vmStructs.inline.h. TUs that include the light vmStructs.h
without the .inline.h counterpart therefore odr-use those inline functions
with no visible definition. In NDEBUG builds the asserts compile out, so the
main release .so links; but the gtest targets keep assertions on, leaving
crashProtectionActive() unresolved at link time. It surfaced first on
hotspotStackFrame_aarch64.o (x86_64 optimizes the reference away, so CI stayed
green), breaking every aarch64 gtest link.
Include vmStructs.inline.h in the TUs that odr-use the accessors
(hotspotStackFrame_{aarch64,x64}.cpp, vmEntry.cpp), matching the codebase's
.h / .inline.h split. vmEntry.cpp's redundant direct vmStructs.h include is
dropped since the .inline.h pulls it in.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 23ca07d commit 57aca28
3 files changed
Lines changed: 11 additions & 1 deletion
File tree
- ddprof-lib/src/main/cpp
- hotspot
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
0 commit comments