Skip to content

selfhost: port pure eBPF target checks to Flow - #705

Merged
godofecht merged 2 commits into
mainfrom
selfhost/port-bpf-target-core
Aug 22, 2026
Merged

godofecht merged 2 commits into
mainfrom
selfhost/port-bpf-target-core

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Ports the deterministic target-contract portion of src/flow/bpf_target.py into compiler/src/bpf_target.flow.

The Flow port covers the BPF pointer/stack constants, public target-name aliases, forbidden userspace/runtime symbol checks, forbidden exception/unwind IR operations, core IR validation classification, and BPF entry-symbol preference.

The host boundary stays intentional: Flow -> LLVM orchestration, clang invocation, temporary directories, filesystem handling, and object emission remain in Python. The regex-based dynamic-alloca scan is also left on the Python side for now rather than weakening it in the first port.

Adds tests/lang/test_bpf_target_port.flow for target aliases, constants, clean IR, malloc/C++ runtime rejection, invoke rejection, and entry-symbol selection.

This is another isolated self-hosting slice following #660.

@godofecht
godofecht marked this pull request as ready for review August 22, 2026 07:08
@godofecht
godofecht merged commit e061d56 into main Aug 22, 2026
23 checks passed
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