Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Memset corrupts memory?
From: Linus Nielsen Feltzing (linus_at_haxx.se)
Date: 2002-07-17


On Tue, 16 Jul 2002 22:49:12 -0700, Alex Gitelman wrote:
>After recent changes the following code crashes my recorder on file
>read operation.
>Reducing count in memset, say to 64 or removing memset altogether
>allows it to run.
>Crash consists of recorder showing some meaningless word (Stkov in
my
>case - always), HD ligh is on and it hangs.

Hehe. It's nice to see that my work on the stack check code paid off
sooner than i expected. The text you see is not at all meaningless.
It says: "Stkov", which means Stack Overflow. You have exceeded the
allocated stack space with the huge local char array.
As mentioned in the other replies, use malloc(), allocate it outside
the function or declare it "static".

/Linus



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa