🐛 bug: Fix usage of runtime RO data for ppc64 and s390x platforms#3772
Conversation
WalkthroughIntroduces architecture-specific build constraints for read-only checks. Excludes readonly.go on s390x/ppc64/ppc64le and adds readonly_strict.go for those architectures with isReadOnly always returning false. No exported API changes; behavior on other architectures remains unchanged. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Build System
participant App as Application
participant RO as isReadOnly
rect rgb(240,245,255)
note over Dev: Compile-time selection
Dev->>Dev: Check GOARCH
alt GOARCH in {s390x, ppc64, ppc64le}
Dev->>App: Include readonly_strict.go
note over App: isReadOnly always false
else Other architectures
Dev->>App: Include readonly.go
note over App: isReadOnly performs .rodata check
end
end
rect rgb(245,255,245)
note over App,RO: Runtime call
App->>RO: isReadOnly(ptr)
alt Strict-arch build
RO-->>App: false
else Other archs
RO-->>App: result of .rodata check
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3772 +/- ##
==========================================
- Coverage 91.70% 91.64% -0.06%
==========================================
Files 113 113
Lines 11940 11940
==========================================
- Hits 10949 10943 -6
- Misses 728 733 +5
- Partials 263 264 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Fixes #3771