Skip to content

analyze audit:all reports two pre-existing violations on any program that uses std.box (with_free marshalling fact, sig receiver requirement) #1300

Closed

Description

@ehartford

Found while fixing #1280 (branch fix-1280-1281). On the seed pinned at 478b264 and on the fixed stage1, with analyze repro.w audit:all fails for the issue's first program (and every program that uses std.box.Box), while a hello-world passes:

violation: sig 194: receiver requirement is not the finalized param[0] effect
violation: call with_free body=870 bb=0 args=0 param=0: no Codegen marshalling fact
compiler-analysis-audit: facts=9289 violations=2 FAILED

audit:codegen alone reports only the with_free one. Both are unrelated to the .ptr field read (they are present with b.as_ptr() too) and predate the branch. The with_free call is the extern inside Box.drop/into_inner; the audit expects a marshalling fact for it that codegen never records for that call shape. Repro:

use std.box.Box
fn main:
    let b = Box.new(7)
    print(f"{unsafe { *b.as_ptr() }}")

with analyze repro.w audit:all should be ok. Filed so the audit's own silence/noise on std.box is not mistaken for the #1280 signal; CLAUDE.md says a tool that is wrong while a bug exists is fixed in the same batch, but this one is a false positive on correct code, not a silence, and lives in the audit's call-fact coverage rather than in the #1280 lowering.

Activity

  1. ehartford commented on Sep 22, 2026

    @ehartford
    ContributorAuthor

    Same class for use std.channel: on main (bbb9c5b) with-stage2 analyze test/behavior/behav_channel_basic.w audit:all reports 4 violations — two receiver requirement is not the finalized param[0] effect sigs and no Codegen marshalling fact for the with_channel_release_sender / with_channel_release_receiver calls in the Sender/Receiver Drop impls. Identical before and after the #1293 fix, so it is the std.* Drop-impl extern-call class, not the channel change.

  2. ehartford commented on Sep 26, 2026

    @ehartford
    ContributorAuthor

    Same two audit reds as #1600/#1613 (std.box's Box.drop specialization and inline drop glue); fixed on main by #1706 (112b2f3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions