Skip to content

Code audit: 12 critical + 14 medium issues found #75

@eprifti

Description

@eprifti

Critical (crash or corrupt results)

  1. sa.rs/ils.rs:155,128 — Panic when k_min > 10 and k_max == 0 (usize underflow)
  2. bayesian_mcmc.rs:142 — random_normal produces -infinity when u=0.0
  3. bayesian_mcmc.rs:636-637 — Exponential overflow in posterior accumulation
  4. gpu.rs:767 — Over-copying from staging buffer reads stale data
  5. gpu.rs:687 — Panic on empty models vector
  6. beam.rs:79,126 — HashSet non-deterministic iteration breaks reproducibility
  7. lasso.rs:36,224 — Panic on empty features or n_alphas=0
  8. individual.rs:292-330 — unwrap() on test metrics without checking Some
  9. population.rs:1006,1362 — Panic/div-by-zero on empty population
  10. data.rs:999,1013 — Division by zero in Bayesian Fisher
  11. lib.rs:131 — Silent error discards data load Result
  12. param.rs:833 — Missing n_chains in valid MCMC keys

Medium (correctness, performance, maintenance)

  1. individual.rs:2582-84 — Unnecessary unsafe impl Send/Sync
  2. individual.rs:1244 — Inconsistent threshold comparison (> vs >=)
  3. individual.rs:1931 — Full data.X clone per permutation in MDA
  4. data.rs:1175 — O(n²) in select_features
  5. voting.rs:1680 — O(experts × samples²) in display
  6. experiment.rs:235 — partial_cmp().unwrap() panics on NaN
  7. experiment.rs:523 — assert_eq! in display crashes instead of warning
  8. bayesian_mcmc.rs:919-981 — Duplicated LASSO pre-screen
  9. lib.rs:125-617 — ~200 lines triplicated experiment-building

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions