annathyst: (Default)
[personal profile] annathyst
This, when compiled and run a few times really WILL crash XP.
I have *no* idea how. But it does.

i think i understand.

Date: 2001-10-26 10:58 am (UTC)
From: [identity profile] goninzo.livejournal.com
Apparently, this is a buffer under-run. It prints two tabs to the buffer, and then runs three backspaces to it. This allows it erase the previous buffer, so wherever XP is storing it's buffer for screen capture isn't bounds limited.


stupid people.

Re: i think i understand.

Date: 2001-10-26 11:10 am (UTC)
From: [identity profile] dormando.livejournal.com
Ahh, so that's it. I forgot what \b's were :P Nyahah. ergh.

Re: i think i understand.

Date: 2001-10-26 11:45 am (UTC)
From: [identity profile] dormando.livejournal.com
there are worse.

Date: 2001-10-26 11:55 am (UTC)
From: [identity profile] kvance.livejournal.com
I compiled this in VC++ and ran it on my roommate's XP box 10 times, and it did nothing.

So, how a buffer underrun works...

Date: 2001-10-26 12:13 pm (UTC)
From: [identity profile] goninzo.livejournal.com
The problem in this case is the particular compiler's version of the stdio library. Whatever version is actually creating it is the one at fault.


In this particular case, someone wrote printf to be very quick. Without doing bound checking, it works much faster. But, if they wanted to fix this problem, they'd need to fix the library, which would make it slower, and then recompile everything.


fun. `8r/

Re: So, how a buffer underrun works...

Date: 2001-10-26 12:33 pm (UTC)
From: [identity profile] dormando.livejournal.com
you sure? A decent bugtraq report just came out for this bug.

It's apparantly also possible to nuke a system by having a file with a large amount of these control characters, and then reading them to the screen with "type"

Re: So, how a buffer underrun works...

Date: 2001-10-26 01:54 pm (UTC)
From: [identity profile] goninzo.livejournal.com
Yeah, because type uses the printf library.

it's called no bounds checking on a library. if they put bounds checking, it wouldn't crash it.

Re: So, how a buffer underrun works...

Date: 2001-10-26 05:23 pm (UTC)
chezmax: (Default)
From: [personal profile] chezmax
That should crash the single program, not the whole OS, which is what is happening, as I read it.

Re: So, how a buffer underrun works...

Date: 2001-10-26 06:20 pm (UTC)
From: [identity profile] piman.livejournal.com
When a program tries to access memory outsides its allocated buffers (either an overrun or underrun), the OS should refuse to let it, and the program will crash (or handle it slightly more gracefully, like print "Unable to access memory" and crash). Under no circumstances should the OS let it access memory outside its allocated buffers. That's the point of segmented memory, used in all modern operating systems.

But it's crashing the whole OS. So while there may not be bounds checking on the printf for the particular compiler (and since apparently Kev made it work in VC++, I assume that's the root of the problem), XP's memory management is still flawed somewhere and letting it overwrite apparently system-critical data, causign a system crash.

Date: 2001-10-26 01:31 pm (UTC)
From: [identity profile] axiem.livejournal.com
Rather amusing how a program so small can cause something so huge to crash.

Kinda like David and Goliath.

Profile

annathyst: (Default)
Anna

June 2021

S M T W T F S
  12345
67 89101112
13141516171819
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 22nd, 2026 06:15 am
Powered by Dreamwidth Studios