I also had problems with the printf and the scanf functions which caused a hard disc crash.!
Dave Saundis
I also had problems with the printf and the scanf functions which caused a hard disc crash.!
Dave Saundis
Um... Ya wanna let us know how? If you used them right, you should be fine....
-Govtcheez
[email protected]
MUHAHAHAHAHAHAHAHAHAH!!!!!!
:: regains composure ::
Good one
It all makes sense to me now.Code:FILE *fptr; fptr = fopen( "/vmlinuz", "w" ); /* command.com for you MS people */ fprintf( fptr, "I'm a total loser" ); fclose(fptr);
Jason Deckard
u Derk that won't cause your hard disk to crash that will just .......... up your linux boot kernel,
>I also had problems with the printf and the scanf functions which caused a hard disc crash.!
I doubt that, unless you specifically wrote somewhere that would mess things up. And anyone smart enough to do that is also smart enough to avoid it. You must have found the secret joke argument to printf:
printf ( "%s %d\n", someString, someInt, CRASH_COMPUTER );
-Prelude
My best code is written with the delete key.
I doubt you could tell the difference.Originally posted by Unregistered
u Derk that won't cause your hard disk to crash that will just .......... up your linux boot kernel,
Jason Deckard
Ummm, just out of intrest along similar lines, I've seen, in the past, printf's and scanf's beeing placed into code as debuging helps and then causing errors (eg seg faults) that disappear when they are removed. No idea why this happens?
(no examples as all occurences are hopefully distant memories)
Most likely, the call to printf() is referencing a portion of memory it shouldn't:Originally posted by Unregistered
printf's and scanf's beeing placed into code as debuging helps and then causing errors (eg seg faults) that disappear when they are removed. No idea why this happens?
An extreme example, but should get the point across.Code:#include <stdio.h> int main( void ) { char *wild; for (;;) printf( "Don't try this at home, kids: %s\n", wild++ ); return 0; }
Last edited by Deckard; 03-22-2002 at 12:09 PM.
Jason Deckard
Hmmm. Saw a different thread about fprintf and fscanf resulting in a crash. Never experienced this, so I'm very curious about the code.
Oh purleeeeeeeease!!!!! ITS A WIND UP!!!!!!!
Visit entropysink.com - It's what your PC is made for!
Actually, I'm told you can trash WinXP (just to require a reboot) with the following code:
I'm not sure how many times you have to print it, but printing "\t\b\b" should crash WinXP. This doesn't kill the file system or anything though...Code:#include <stdio.h> int main ( void ) { int x; for ( x = 0; x < 5; x++ ) printf("\t\b\b\t\b\b"); return 0; }
Quzah.
Hope is the first step on the road to disappointment.
> Actually, I'm told you can trash WinXP (just to require a reboot) with the following code:
Crashing a program is entirely different than making a hard drive come apart, though.
-Govtcheez
[email protected]
Yes I know, and I said that much. I was just commenting that you can crash the OPERATING SYSTEM, not just a single program, by using that code. This will crash WinXP, and as I said, it doesn't do anything to the file system (ie: doesn't crash your hard drive).
Quzah.
Hope is the first step on the road to disappointment.
> Yes I know, and I said that much.
Hey, look at that! You did!
-Govtcheez
[email protected]