• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vbpf / prevail / 24885662803

24 Apr 2026 10:49AM UTC coverage: 89.245% (+0.03%) from 89.214%
24885662803

push

github

web-flow
Split PlatformSpec from ProgramEnvironment (#1080) (#1096)

Fixes #1080.

Splits the immutable platform specification from the per-program environment, then follows the chain of subsequent simplifications that fall out naturally. After this PR, `ebpf_platform_t` is a pure PlatformSpec (already was, but no longer reaches into `ProgramInfo`); `ProgramInfo` holds only loader output; `Program` carries its own analysis-prep facts; `AnalysisContext` owns the `Program` so analyses never need a paired-parameter convention.

## Summary of changes

- **Platform ABI no longer touches `ProgramInfo`.** `resolve_kfunc_call` now takes `const EbpfProgramType&` (instead of `const ProgramInfo*`); `get_map_descriptor` takes the descriptor vector. After these changes `platform.hpp` contains zero references to `ProgramInfo`. Dead `find_map_descriptor` helper removed.
- **Callback metadata moves off `ProgramInfo` onto `Program`.** `callback_target_labels` and `callback_targets_with_exit` are CFG-derived, populated by `Program::from_sequence`, and meaningless on a bare `ProgramInfo` — they belong on `Program`. Writes go through a new `CfgBuilder::set_callback_metadata` (CfgBuilder is the friend authorised to mutate Program's private state). Removes the `ProgramInfo mutable_info = info; … std::move(mutable_info)` dance in `from_sequence` and the latent drift it hid.
- **`AnalysisContext` owns `Program` and options.** Previously four references bundled by convention — now a single owning struct. `program_info()` and `platform()` are accessor methods derived from `program.info()`, so `context.program_info` can no longer disagree with `context.program.info()`. `platform()` asserts non-null. Two helpers (`map_descriptor(fd)`, `is_helper_usable(id)`) hide common reach-through patterns from call sites. `Program::from_sequence` now populates `m_info` up front so any future pass that reads `builder.prog.info()` sees real data.
- **Analysis entry points drop the redundant `Program` p... (continued)

182 of 190 new or added lines in 17 files covered. (95.79%)

13683 of 15332 relevant lines covered (89.24%)

4404281.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.46
/src/test/ebpf_yaml.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc