Skip to main content
seecure
Associate II
April 17, 2004
Question

overlap local variables with stack area

  • April 17, 2004
  • 12 replies
  • 2328 views
Posted on April 17, 2004 at 18:08

overlap local variables with stack area

This topic has been closed for replies.

12 replies

luca239955_st
Associate II
April 16, 2004
Posted on April 16, 2004 at 11:52

Datz,

a colleague suggested the problem is probably in the declaration in your first post

int *tx_buff=(UINT16 *)&dest;

that should probably be

int *tx_buff=(UINT16 *)dest;

With the extra ''&'' in your decalaration you take the address of dest instead of its value and then tx_buff points in the middle of the stack which leads to crashes.

Let me know if it works.

Regards,

Luca

[ This message was edited by: _luca on 16-04-2004 15:23 ]
seecure
seecureAuthor
Associate II
April 17, 2004
Posted on April 17, 2004 at 18:08

Hi luca,

if you see the attached document you will see an anather example and the problem still exist.

my conclusions are:

since I have about 40K code,using about 2K RAM the only model witch is now work successfully is the (+modml) memory long as jatin recomended.

+mods is faild because the RAM size.

+modsl is faild in run-time bacuse the overlap.(cannot be used for any application).

atz