nalgebra icon indicating copy to clipboard operation
nalgebra copied to clipboard

unhandled integer overflow in matrix view construction

Open Lishen1 opened this issue 1 year ago • 1 comments

a.fixed_view_mut::<3, 3>(0, 18446744073709551613).add_assign(b); lead to error: munmap_chunk(): invalid pointer in release build mode or thread 'main' panicked at nalgebra-0.32.5/src/base/matrix_view.rs:283:13: attempt to add with overflow in debug build mode

Lishen1 avatar Jun 24 '24 13:06 Lishen1

This appears to be a failure of assert_view_index to take into account usize overflow, here: https://github.com/dimforge/nalgebra/blob/48c8f6a5053fac48e305f5e5e0004a332811d092/src/base/matrix_view.rs#L280

Andlon avatar Jun 24 '24 14:06 Andlon