dimforge / dimforge/nalgebra

Infinite loop on pooly defined matrix in UnitQuaternion::from_matrix.

Open
#1,529 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

This snippet manages to get the execution stuck when running. I know that the values are bad, but also an infinite loop might not be the most desirable outcome of this.

```rust #[test]
fn infitite_loop() {
let mut rot = na::SMatrix::::zeros();
rot.fill(f64::NAN);
let _q = UnitQuaternion::from_matrix(&rot);
}
```

If the behavior is intended, apologies then.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the provided test with a NaN-filled 3×3 matrix and tracing UnitQuaternion::from_matrix to identify the loop that fails to terminate. Inspect the invalid-input behavior around that entry point, then add regression coverage showing that non-finite input completes without hanging and matches the project’s expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.