AtheMathmo / rulinalg

A linear algebra library written in Rust

Home Page:https://crates.io/crates/rulinalg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVD algorithm will segfault if matrix has 0 rows or 0 columns

cake4289 opened this issue · comments

extern crate rulinalg;
use rulinalg::matrix::Matrix;

#[test]
fn segfault() {
    let m = Matrix::<f64>::new(0, 0, &[][..]);
    m.svd();
}

will segfault in release mode, "attempt to subtract with overflow" in debug mode.