|
From: Donner H. <do...@mi...> - 2005-03-02 21:36:54
|
Hi, guys! I'm a rather new user to Valgrind (only been using it for a
few weeks now), and I'm getting a strange error that I don't
understand. It's complaining about an invalid write to a variable
that was just defined above it.
Here's the code:
MIDT echoStackedData[echoMosaicWidth * echoMosaicHeight];
cout << "Address of echoStackedData: " << &echoStackedData << endl;
ToolsIP::stackMEchoData(echoesData,
oriWidth,
oriHeight,
oriNumSlices,
ewPack.numEchoes,
echoStackedData,
echoMosaicHeight,
echoMosaicNumSlices);
And here's the error:
Address of echoStackedData: 0x529f5480
==26365==
==26365== Invalid write of size 4
==26365== at 0x1BE379E7: memset (in /lib/tls/libc-2.3.2.so)
==26365== by 0x8072B80: Calculator::processMultiEchoes(int*, bool)
(calculator.cc:8375)
==26365== by 0x806CF4F: Calculator::DoFirstImage() (calculator.cc:6458)
==26365== by 0x805B072: Calculator::DoGUIEvent(stEvent&)
(calculator.cc:1055)
==26365== Address 0x529F5480 is on thread 1's stack
==26365==
Any clue what could cause this? I've been wracking my brain on this for
a while now. Any help would be awesome. Thanks!
- Donner
"Love God with all thy heart, mind, and soul, and thy neighbor as
thyself." All other laws derive from these
|