how to find the stack memory violation??? Urgent

Discussion in 'Windows 64bit' started by shahul, Mar 29, 2006.

  1. shahul

    shahul Guest

    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.
     
    shahul, Mar 29, 2006
    #1
    1. Advertising

  2. 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.
    >
     
    Scherbina Vladimir, Mar 29, 2006
    #2
    1. Advertising

  3. shahul

    shahul Guest

    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.
    >>

    >
    >
     
    shahul, Mar 29, 2006
    #3
  4. 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/
     
    Scherbina Vladimir, Mar 29, 2006
    #4
  5. shahul

    Tom Serface Guest

    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.
    >
     
    Tom Serface, Mar 29, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lee

    memory access violation?

    Lee, Sep 19, 2003, in forum: Computer Support
    Replies:
    1
    Views:
    545
    Bareill
    Sep 19, 2003
  2. Beemer@wendoveruk

    Memory Access Violation XP

    Beemer@wendoveruk, Nov 2, 2003, in forum: Computer Support
    Replies:
    5
    Views:
    1,047
    Ron Martell
    Nov 3, 2003
  3. eugene

    Memory access violation?

    eugene, Nov 10, 2004, in forum: Computer Support
    Replies:
    2
    Views:
    565
    eugene
    Nov 10, 2004
  4. Security Advisory

    !!URGENT!! Tor Vulnerability Discovered !!URGENT!!

    Security Advisory, Aug 6, 2007, in forum: Computer Security
    Replies:
    1
    Views:
    990
    http://tinyurl.com/23k3dt@$NIFF-deeply.ahh
    Aug 11, 2007
  5. pooja
    Replies:
    0
    Views:
    1,214
    pooja
    Mar 3, 2009
Loading...

Share This Page