Skip to content

Generated simulation step, heat map and animation stats index past arrays for out-of-range counts #412

Open

Description

@dmitrii-f-t27

Three more generated functions index past their array for an out-of-range count. Same class as #410, found while fixing it; they were not listed there, so #411 leaves them alone.

Reproduced on fix/bounds-410 (da49268, PR #411) with Rust 1.96.0, by calling the generated gen/rust modules directly:

Function Input Result
network_simulator::run_simulation_step event_count = 129 index out of bounds (MAX_EVENTS = 128)
traffic_animator::generate_traffic_heat_map packet_count = 65 index out of bounds (MAX_PACKETS = 64)
traffic_animator::calculate_animation_stats frame_count = 1201 index out of bounds (MAX_FRAMES = 1200)

generate_traffic_animation passes its count to generate_traffic_heat_map, so it inherits the hazard.

Boundary:

Scenarios:

Requirements:

Success criteria:

  • Every input in the table returns a defined value in Rust, C and Zig.
  • The drift, Zig, C, Icarus, typecheck-warning-ratchet and gen_rust_corpus_compiles gates stay green.

Refs #410

Dmitrii Fedorov (@dmitrii-f-t27)

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions