https://linen.dev logo
I learned today that the "normal" optimized versio...
# programming
t
I learned today that the "normal" optimized version of OF (
WM_COMPILE_OPTION=Opt
) allows access beyond end of
UList
, but the debug version (
WM_COMPILE_OPTION=Debug
) does not and raises error like the one below. Does anyone know why the optimized UList behaves differently than the debug version? This means that one should always try to compile and and run on both Opt and Debug versions to reveal hidden bugs.
Copy code
--> FOAM FATAL ERROR: 
index 78000 out of range 0 ... 76799

    From function void Foam::UList<T>::checkIndex(Foam::label) const [with T = Foam::Vector<double>; Foam::label = int]