News:

So the widespread use of emojis these days kinda makes forum smileys pointless, yeah?

Main Menu

Another problem!!

Started by AntiVirus, October 16, 2006, 04:56:19 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Sidoh

Quote from: Warriorx86] link=topic=7608.msg94924#msg94924 date=1161040684]
If you're infinitely looping you're bound to access some restricted memory sooner or later.

Not if you're continuously re-examining the same memory!

while(true);

I doubt the above presents much threat of accessing dangerous memory.

Warrior

Quote from: Sidoh on October 16, 2006, 08:59:30 PM
Quote from: Warriorx86] link=topic=7608.msg94924#msg94924 date=1161040684]
If you're infinitely looping you're bound to access some restricted memory sooner or later.

Not if you're continuously re-examining the same memory!

while(true);

I doubt the above presents much threat of accessing dangerous memory.

That's true but how often is it that you do an infinite loop withought having any code in the middle? You're going to currupt the stack sooner or later.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Sidoh

Quote from: Warriorx86] link=topic=7608.msg96330#msg96330 date=1161888208]
That's true but how often is it that you do an infinite loop withought having any code in the middle? You're going to currupt the stack sooner or later.

That's still a terrible generalization...

Warrior

Yea I guess, I assumed he knew what I meant. :P
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

iago

Quote from: Warriorx86] link=topic=7608.msg96330#msg96330 date=1161888208]
That's true but how often is it that you do an infinite loop withought having any code in the middle? You're going to currupt the stack sooner or later.

Take a look at all the programs in this folder -- they're programs for my microcontroller.  Notice what they all have in common?  They all take place in an infinite loop.  And none of them corrupt the memory. 

Generally, they're a finite-state-machine, waiting for events, but there's no way to sleep on that uC, since my code is the only code running (no library, no kernel, etc). 

Warrior

One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

MyndFyre

Quote from: Warriorx86] link=topic=7608.msg96330#msg96330 date=1161888208]
That's true but how often is it that you do an infinite loop withought having any code in the middle? You're going to currupt the stack sooner or later.

while (true)
{
i++;
j++;
k++;
l++;
m++;
n++;
o++;
}

No stack corruption.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Warrior

One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Sidoh

Quote from: Warriorx86] link=topic=7608.msg96540#msg96540 date=1162053377]
Ugh screw you guys :/

Because you're wrong? :P

Warrior

One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

MyndFyre

Quote from: Warriorx86] link=topic=7608.msg96556#msg96556 date=1162061997]
http://en.wikipedia.org/wiki/Stack_overflow

"The most common cause of stack overflows is infinite recursion."

http://en.wikipedia.org/wiki/Infinite_recursion
Okay, first of all, stack overflows != stack corruption.  Second of all, infinite looping != infinite recursion.

Infinite looping:

while (true) ;

Infinite recursion:

void doStuff(int a)
{
doStuff(++a);
}

Jackass.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

iago

Quote from: MyndFyrex86] link=topic=7608.msg96557#msg96557 date=1162063604]
Quote from: Warriorx86] link=topic=7608.msg96556#msg96556 date=1162061997]
http://en.wikipedia.org/wiki/Stack_overflow

"The most common cause of stack overflows is infinite recursion."

http://en.wikipedia.org/wiki/Infinite_recursion
Okay, first of all, stack overflows != stack corruption.  Second of all, infinite looping != infinite recursion.

Infinite looping:

while (true) ;

Infinite recursion:

void doStuff(int a)
{
doStuff(++a);
}

Jackass.
Exactly! 

Warrior

Quote from: MyndFyrex86] link=topic=7608.msg96557#msg96557 date=1162063604]
Second of all, infinite looping != infinite recursion.

Quote
Infinite recursion, a special case of an infinite loop, is an infinite loop caused by recursion.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Sidoh

Quote from: Warriorx86] link=topic=7608.msg96574#msg96574 date=1162074606]
Quote from: MyndFyrex86] link=topic=7608.msg96557#msg96557 date=1162063604]
Second of all, infinite looping != infinite recursion.

Quote
Infinite recursion, a special case of an infinite loop, is an infinite loop caused by recursion.

And Rolle's Theorem is a special case of the Mean Value Theorem.  That doesn't make them the same thing.  Just because two things are related doesn't mean they're completely synonymous.

Warrior

Quote from: Sidoh on October 28, 2006, 07:06:37 PM
Quote from: Warriorx86] link=topic=7608.msg96574#msg96574 date=1162074606]
Quote from: MyndFyrex86] link=topic=7608.msg96557#msg96557 date=1162063604]
Second of all, infinite looping != infinite recursion.

Quote
Infinite recursion, a special case of an infinite loop, is an infinite loop caused by recursion.

And Rolle's Theorem is a special case of the Mean Value Theorem.  That doesn't make them the same thing.  Just because two things are related doesn't mean they're completely synonymous.

And? They're still related so I can call infinite recursion and infinite loop if I damn well feel like it and I will still be right.

Which makes me right.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling