Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Windows 64bit > how to find the stack memory violation??? Urgent

Reply
Thread Tools

how to find the stack memory violation??? Urgent

 
 
shahul
Guest
Posts: n/a
 
      03-29-2006
hi pals,

While running my win 32 console application, Global variable becomes NULL at
some times, which was already allocated. My application got affected by some
memory violation it seems or any other reason for getting such violation..
How to find the stack memory violation? I need your help.

Forgive me if this is not a relevant group, please give me appropriate news
group for this query.


@ Shahul.


 
Reply With Quote
 
 
 
 
Scherbina Vladimir
Guest
Posts: n/a
 
      03-29-2006
If the variable is global, then there is no stack involved to store it's
content. If you have multiple threads that're accessing your variable then
you should pay attention to syncronizing access to it. Another advice is to
set breakpoint to variable.

--
Vladimir
http://spaces.msn.com/vladimir-scherbina/

"shahul" <> wrote in message
news:%...
> hi pals,
>
> While running my win 32 console application, Global variable becomes NULL
> at some times, which was already allocated. My application got affected by
> some memory violation it seems or any other reason for getting such
> violation..
> How to find the stack memory violation? I need your help.
>
> Forgive me if this is not a relevant group, please give me appropriate
> news group for this query.
>
>
> @ Shahul.
>



 
Reply With Quote
 
 
 
 
shahul
Guest
Posts: n/a
 
      03-29-2006
dear Vladmir,

Actually my application is not multithreaded.
I have verfied the heap memory violation using _heapchk(), it says that
there is no heap violation.
Inadvertently, that Global variable becomes NULL, which was dynamically
allocated earlier.
I have doubt abt the frame allocated variables , in which the some data may
be asssigned out of bound.

@ Shahul.


"Scherbina Vladimir" <> wrote in message
news:...
> If the variable is global, then there is no stack involved to store it's
> content. If you have multiple threads that're accessing your variable then
> you should pay attention to syncronizing access to it. Another advice is
> to set breakpoint to variable.
>
> --
> Vladimir
> http://spaces.msn.com/vladimir-scherbina/
>
> "shahul" <> wrote in message
> news:%...
>> hi pals,
>>
>> While running my win 32 console application, Global variable becomes NULL
>> at some times, which was already allocated. My application got affected
>> by some memory violation it seems or any other reason for getting such
>> violation..
>> How to find the stack memory violation? I need your help.
>>
>> Forgive me if this is not a relevant group, please give me appropriate
>> news group for this query.
>>
>>
>> @ Shahul.
>>

>
>



 
Reply With Quote
 
Scherbina Vladimir
Guest
Posts: n/a
 
      03-29-2006
Hm, let's check that on the "lower" layer - set a "data" breakpoint - when
you debug application choose "Debug->New Breakpoint->New Data Breakpoint..."
and type address of your variable and check who is rewriting that address
....

--
Vladimir
http://spaces.msn.com/vladimir-scherbina/


 
Reply With Quote
 
Tom Serface
Guest
Posts: n/a
 
      03-29-2006
In addition to what Scherbina recommened, I'd take a look at variables that
are declared around the one in question and see if you have any arrays going
out of bounds or data that is too small for its contents.

Tom

"shahul" <> wrote in message
news:%...
> hi pals,
>
> While running my win 32 console application, Global variable becomes NULL
> at some times, which was already allocated. My application got affected by
> some memory violation it seems or any other reason for getting such
> violation..
> How to find the stack memory violation? I need your help.
>
> Forgive me if this is not a relevant group, please give me appropriate
> news group for this query.
>
>
> @ Shahul.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Why does std::stack::pop() not throw an exception if the stack is empty? Debajit Adhikary C++ 36 02-10-2011 08:54 PM
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
stack frame size on linux/solaris of a running application stack Surinder Singh C Programming 1 12-20-2007 01:16 PM
"stack level too deep"... because Threads keep their "starting" stack Sam Roberts Ruby 1 02-11-2005 04:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57