stack overflow

Discussion in 'C++' started by swesoc, Dec 7, 2005.

  1. swesoc

    swesoc Guest

    Hello Friends,

    Assume, If i write a recerive function that goes in an infinite loop &
    exceeds the limit of stack

    I know it gives 'stack overflow' but other then what happens internally
    swesoc, Dec 7, 2005
    #1
    1. Advertising

  2. the hardrive starts shouting too loud, the processor might get out of
    control and shoot all requests.
    someone might get hurt...

    --
    Quotes from The Weather Man:
    Robert Spritz: Do you know that the harder thing to do, and the right thing
    to do, are usually the same thing? "Easy" doesn't enter into grown-up
    life... to get anything of value, you have to sacrifice.
    "swesoc" <> wrote in message
    news:...
    > Hello Friends,
    >
    > Assume, If i write a recerive function that goes in an infinite loop &
    > exceeds the limit of stack
    >
    > I know it gives 'stack overflow' but other then what happens internally
    >
    Someonekicked, Dec 7, 2005
    #2
    1. Advertising

  3. * swesoc:
    >
    > Assume, If i write a recerive function that goes in an infinite loop &
    > exceeds the limit of stack


    Presumably you mean an infinite recursion.


    > I know it gives 'stack overflow' but other then what happens internally


    How many tails has a dog? That depends on the dog. Post code.

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
    Alf P. Steinbach, Dec 7, 2005
    #3
  4. > Assume, If i write a recerive function that goes in an infinite loop &
    > exceeds the limit of stack
    >
    > I know it gives 'stack overflow' but other then what happens internally


    Some compilers might create code that throws an exception, which can be
    caught. Other compilers just create code that crashes the whole application.
    It is a very tricky error to handle, because there is no more stack space
    for the error handling code.

    Niels Dybdahl
    Niels Dybdahl, Dec 7, 2005
    #4
  5. swesoc

    red floyd Guest

    Someonekicked wrote:
    > the hardrive starts shouting too loud, the processor might get out of
    > control and shoot all requests.
    > someone might get hurt...
    >

    Don't forget:

    Fire and brimstone coming down from the skies. Rivers and seas boiling.
    Forty years of darkness. Earthquakes, volcanoes...
    The dead rising from the grave.
    Human sacrifice, dogs and cats living together - mass hysteria!
    red floyd, Dec 7, 2005
    #5
  6. swesoc

    Csaba Guest

    red floyd <> wrote in news:ufxlf.26963$dO2.19855
    @newssvr29.news.prodigy.net:

    > Someonekicked wrote:
    >> the hardrive starts shouting too loud, the processor might get out of
    >> control and shoot all requests.
    >> someone might get hurt...
    >>

    > Don't forget:
    >
    > Fire and brimstone coming down from the skies. Rivers and seas boiling.
    > Forty years of darkness. Earthquakes, volcanoes...
    > The dead rising from the grave.
    > Human sacrifice, dogs and cats living together - mass hysteria!


    You forgot :

    Demons coming out of your nose (if stack overflow counts as Undefined
    Behaviour).

    --
    Life is complex, with real and imaginary parts.
    Csaba, Dec 13, 2005
    #6
  7. swesoc

    swesoc Guest

    does anybody know how to do error handling in such case

    thanks in advance
    swesoc, Dec 14, 2005
    #7
    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. =?Utf-8?B?amJpeEBuZXdzZ3JvdXBzLm5vc3BhbQ==?=

    Stack overflow exception

    =?Utf-8?B?amJpeEBuZXdzZ3JvdXBzLm5vc3BhbQ==?=, Apr 20, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    7,228
    Rick Spiewak
    Apr 22, 2004
  2. Mr m?ll
    Replies:
    2
    Views:
    1,394
    Mr m?ll
    Oct 16, 2004
  3. Replies:
    0
    Views:
    482
  4. Replies:
    0
    Views:
    396
  5. Kenneth McDonald

    Why stack overflow with such a small stack?

    Kenneth McDonald, Aug 30, 2007, in forum: Ruby
    Replies:
    7
    Views:
    242
    Kenneth McDonald
    Sep 1, 2007
Loading...

Share This Page