Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Stephanie Stroka
Yes, of course :) I've been blind not to see that. Thanks to all of you! Stephanie On 17.06.2011 18:02, Dave Goodell wrote: > On Jun 17, 2011, at 10:52 AM CDT, Stephanie Stroka wrote: > >> Am 17.06.2011 17:49, schrieb Tom Hughes: >>> On 17/06/11 16:45, Stephanie Stroka wrote: >>> My code

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Tom Hughes
On 17/06/11 16:52, Stephanie Stroka wrote: > Am 17.06.2011 17:49, schrieb Tom Hughes: >> On 17/06/11 16:45, Stephanie Stroka wrote: >> >>> My code at that position looks like this: >>> >>> 284 static uint* sort(uint** matrix, uint width, uint height) { >>> 285 uint* data = (uint*) malloc(width

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Dave Goodell
On Jun 17, 2011, at 10:52 AM CDT, Stephanie Stroka wrote: > Am 17.06.2011 17:49, schrieb Tom Hughes: >> On 17/06/11 16:45, Stephanie Stroka wrote: >> >>> My code at that position looks like this: >>> >>> 284 static uint* sort(uint** matrix, uint width, uint height) { >>> 285 uint* data = (ui

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Bart Van Assche
On Fri, Jun 17, 2011 at 5:45 PM, Stephanie Stroka wrote: > > My code at that position looks like this: > > 284 static uint* sort(uint** matrix, uint width, uint height) { > 285     uint* data = (uint*) malloc(width * height * sizeof(uint)); > 286     uint i,j=0; > 287     for(i=0; i 288         fo

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Stephanie Stroka
Am 17.06.2011 17:49, schrieb Tom Hughes: > On 17/06/11 16:45, Stephanie Stroka wrote: > >> I actually ignored three warnings. It's still a bit cryptic for me. For >> example, I get the following msg: >> >> Invalid write of size 4 >> ==4427==at 0x405930: sort(unsigned int**, unsigned int, unsig

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Tom Hughes
On 17/06/11 16:45, Stephanie Stroka wrote: > I actually ignored three warnings. It's still a bit cryptic for me. For > example, I get the following msg: > > Invalid write of size 4 > ==4427==at 0x405930: sort(unsigned int**, unsigned int, unsigned > int) (facedetect.cpp:293) > ==4427==by 0

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Stephanie Stroka
Thanks for the fast replies :) Am 17.06.2011 15:17, schrieb WAROQUIERS Philippe: > >> My program calls malloc(x) several times, where x is never negative nor >> 0. But on one particular malloc() it always crashes. >> >> running my program with valgrind gives me the following hints: >> >> >> - --

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread WAROQUIERS Philippe
>My program calls malloc(x) several times, where x is never negative nor >0. But on one particular malloc() it always crashes. > >running my program with valgrind gives me the following hints: > > >- --15446-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 >(SIGSEGV) - exiting >- --15446-

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Tom Hughes
On 17/06/11 13:44, Stephanie Stroka wrote: > running my program with valgrind gives me the following hints: > > > - --15446-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 > (SIGSEGV) - exiting > - --15446-- si_code=1; Faulting address: 0x2D11153860; sp: 0x40317bdd0 > > valgrind: the 'i

[Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread Stephanie Stroka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey guys, I have a problem with a seg fault inside of glibc's malloc and I don't have any clue how to solve it. My program calls malloc(x) several times, where x is never negative nor 0. But on one particular malloc() it always crashes. running my p