I recently tried to track down some errors in a program that I am working on using valgrind, and one of the errors I received:
==6866== Invalid write of size 4 ==6866== at 0x40C9E2: superneuron::read(_IO_FILE*) (superneuron.cc:414)
breaking line # 414 reads
amplitudes__[points_read] = 0x0;
and amplitudes__ are previously defined as
uint32_t * amplitudes__ = (uint32_t* ) amplitudes;
Now itβs obvious that uint32_t is 4 bytes long, so this is the size of the record, but can anyone tell me why it is not valid?
source share