pogs
pogs copied to clipboard
use of unitialised data in src/cpu/include/gsl/gsl_vector.h
The "data" member is not initialised (src/cpu/include/gls/gsl_vector.h, line 27). This causes a lot of "Conditional jump or move depends on uninitialised value(s)" with valgrind.
Although I did not notice any strange behaviour, a std::fill or - according to stackoverflow - new T[n]()
may be safer.
Hi tosttost, I've followed the API of the gnu scientific library, where vector_alloc
returns a vector with uninitialized elements (https://www.gnu.org/software/gsl/manual/html_node/Vector-allocation.html#Vector-allocation).
I looked through were vector_alloc
is used and as far as I can tell there are no uses where the returned vector isn't initialized before use. I don't know where a conditional jump might depend on uninitialized variables. If you find a place that I missed let me know.