🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2160

Re: Serious bug in OS/2 2.0

#2160
From: gthome
Date: Fri, 25 Sep 1992 17:39
48 lines
2606 bytes
In  <1992Sep25.073705.18715@mynet.no>  ivarh@mynet.no (Ivar E. Hosteng) writes:
> I have found a nasty bug in the OS/2 kernal. If you use alloca to
> allocate large amounts of stack space the hole system crashes. I know
> the stack spaec for the first thread is fixed, but a stack overrun
> should not crash the whole system system. The strange thing is that
> this is only happening on ISA machines and not every thime there
> either. But in every case the error screen that pops up is serverly
> disorted. At the bottom where you are given the choice to aboty the
> program or to get help only horizontal lines are displayed. This
> happens if the system doesent crash completly with an internal error.
>
> Try compiling the following program with gcc: (bevare, executing this
> program migth crash your system.)
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
>         void *foo;
>
>         foo= alloca(10240000);
>
>         printf("foo is now 0x%x\n",foo);
>         return 0;
> }
>
> BTW: Do not increase the stac size when compiling this program.
> Atleast not if you want it to chrash the system.
>
>
> --
> Name:    Ivar E. Hosteng. Phone:   +47 2 68 11 50 ext 278
> Address: Mynet A/S. Ensjoveien 20 PBox 6199 Etterstad, 0602 OSLO 6 Norway
> email:   ivarh@mynet.no
> My opinions are my own and not necessarily shared by my employer.

When I do this with IBM C Set/2 compiler, I get an error stating that I'm
out of stack, and my machine stays running.  I guess C Set/2 has an
exception handler that catches this...

--
=============================================================================
| Gerry Thome              | t/l  678-2256   fax : t/l  678-8597 | Internal |
| IBM-Austin               | (512)838-2256         (512)838-8597 | Zip 9132 |
| OS/2 DCE RPC Development | 11400 Burnet Rd, Austin, TX 78758   |          |
| I do not speak for IBM.  | These are my opinions...            |          |
=============================================================================
Technical Details
Message-ID: <1992Sep25.173912.27117@awdprime.austin.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime.austin.ibm.com!news
References: <1992Sep25.073705.18715@mynet.no>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime.austin.ibm.com!news
From: gthome@bulldogs.austin.ibm.com
Newsgroups: comp.os.os2.programmer
Subject: Re: Serious bug in OS/2 2.0
Message-ID: <1992Sep25.173912.27117@awdprime.austin.ibm.com>
Date: 25 Sep 92 17:39:12 GMT
References: <1992Sep25.073705.18715@mynet.no>
Sender: news@awdprime.austin.ibm.com (USENET News)
Reply-To: gthome@dss1.austin.ibm.com
Organization: IBM, Austin
Lines: 48
News-Software: IBM OS/2 PM RN (NR/2) v0.13 by O. Vishnepolsky and R. Rogers