stack overflow

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • swesoc

    #1

    stack overflow

    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

  • Alf P. Steinbach

    #2
    Re: stack overflow

    * swesoc:[color=blue]
    >
    > Assume, If i write a recerive function that goes in an infinite loop &
    > exceeds the limit of stack[/color]

    Presumably you mean an infinite recursion.

    [color=blue]
    > I know it gives 'stack overflow' but other then what happens internally[/color]

    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?

    Comment

    • Someonekicked

      #3
      Re: stack overflow

      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" <aapgaikwad@gma il.com> wrote in message
      news:1133934176 .531906.108820@ f14g2000cwb.goo glegroups.com.. .[color=blue]
      > 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
      >[/color]


      Comment

      • Niels Dybdahl

        #4
        Re: stack overflow

        > Assume, If i write a recerive function that goes in an infinite loop &[color=blue]
        > exceeds the limit of stack
        >
        > I know it gives 'stack overflow' but other then what happens internally[/color]

        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


        Comment

        • red floyd

          #5
          Re: stack overflow

          Someonekicked wrote:[color=blue]
          > the hardrive starts shouting too loud, the processor might get out of
          > control and shoot all requests.
          > someone might get hurt...
          >[/color]
          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!

          Comment

          • Csaba

            #6
            Re: stack overflow

            red floyd <no.spam@here.d ude> wrote in news:ufxlf.2696 3$dO2.19855
            @newssvr29.news .prodigy.net:
            [color=blue]
            > Someonekicked wrote:[color=green]
            >> the hardrive starts shouting too loud, the processor might get out of
            >> control and shoot all requests.
            >> someone might get hurt...
            >>[/color]
            > 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![/color]

            You forgot :

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

            --
            Life is complex, with real and imaginary parts.

            Comment

            • swesoc

              #7
              Re: stack overflow

              does anybody know how to do error handling in such case

              thanks in advance

              Comment

              Working...