Allow FreeBSD environment lookup to grow beyond its initial source buffer

Đang mở
#1,008 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
operating-systems

Hướng nghiên cứu

Start with std/env/environ.wave around line 40 and trace the portable environment providers and their sizing behavior. Coordinate with @LunaStev to agree on the bounded FreeBSD retry contract before implementation. Validate on native FreeBSD with an environment larger than 32 KiB, confirming that only genuine capacity errors are retried and that allocation, retry-limit, not-found, and destination-too-small outcomes remain distinct.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

discussion enhancement help wanted

Motivation

The portable environment reader starts at 32 KiB, but its FreeBSD needs-space predicate always returns false. The provider returns a short-buffer sysctl error without exposing the required length, so this target cannot use the growth path available to other providers.

Starting point: std/env/environ.wave:40.

Validation

Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Inspected portable/provider source and official sysctl sizing semantics; native large-environment reproduction remains required. Executed compiler probes use the matching checkout-built compiler and std on Linux amd64 (Rust 1.89.0 / LLVM 21.1.8). Source/header or mocked checks are not native execution on another OS.

FreeBSD sysctl documentation describes oldlenp sizing and short-buffer ENOMEM. The proposal does not claim current silent truncation.

Scope

Define a bounded FreeBSD sizing/retry contract for KERN_PROC_ENV. Distinguish insufficient capacity from unrelated ENOMEM failures and changing environment data.

Related: #938, #427. These links do not claim those broader or completed scopes are unfinished.

Design discussion required

This issue records a proposal or an unresolved contract; it is not approval to choose new semantics. Please mention @LunaStev to discuss the design before starting implementation.

Completion criteria

  • A controlled/native environment larger than the initial buffer can be queried within the agreed bound.
  • Ordinary provider errors are not retried as capacity failures.
  • Allocation, retry limits and not-found/destination-too-small results remain distinct.
Ngôn ngữ chính
Rust
Star
56
Fork
21
Merge trung bình
23 giờ 20 phút
Pull request đã merge (30 ngày)
45

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wavefnd/Wave

Tất cả issue của wavefnd/Wave

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.