Skip to content

Track cglobal load offsets in relocations - #905

Open
simeonschaub wants to merge 1 commit into
JuliaGPU:mainfrom
simeonschaub:sds/cglobal_relocations
Open

Track cglobal load offsets in relocations#905
simeonschaub wants to merge 1 commit into
JuliaGPU:mainfrom
simeonschaub:sds/cglobal_relocations

Conversation

@simeonschaub

@simeonschaub simeonschaub commented Aug 21, 2026

Copy link
Copy Markdown
Member

Julia codegen references small-tagged datatypes through constant offsets into jl_small_typeof. Relocation collection followed these expressions but discarded the offset, causing nonzero entries to resolve as the table’s null first word.

Carry constant byte offsets in CGlobalRef, create one slot per symbol and offset, and reject nonconstant offsets rather than relocating the wrong word.

@simeonschaub
simeonschaub requested a review from maleadt August 21, 2026 17:58
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.02326% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.60%. Comparing base (805b0c1) to head (5ad6225).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/relocation.jl 93.02% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #905      +/-   ##
==========================================
- Coverage   84.00%   83.60%   -0.41%     
==========================================
  Files          28       28              
  Lines        5382     5421      +39     
==========================================
+ Hits         4521     4532      +11     
- Misses        861      889      +28     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Julia codegen references small-tagged DataTypes through constant offsets into
jl_small_typeof. rewrite_word_loads! followed these expressions but discarded
the offset, so nonzero entries resolved as the table's null first word.

Carry byte offsets in CGlobalRef and use one relocation slot per symbol and
offset. Reject nonconstant offsets instead of silently relocating the wrong
word.
@maleadt
maleadt force-pushed the sds/cglobal_relocations branch from 261d307 to 5ad6225 Compare August 22, 2026 06:54
@maleadt maleadt changed the title track byte offset of cglobal loads in relocations Track cglobal load offsets in relocations Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant