Article View: comp.os.os2.programmer
Article #237Re: Strange trap in IBM C Set/2
From: Ian Ameline
Date: Tue, 04 Aug 1992 18:36
Date: Tue, 04 Aug 1992 18:36
29 lines
1515 bytes
1515 bytes
In article <1992Aug3.140521.14803@vela.acs.oakland.edu>,
bcmatusz@vela.acs.oakland.edu (Brian Matusz) writes:
>
>In article <1992Aug3.111930.19189@ifi.unizh.ch> erzberg@ifi.unizh.ch (Martin Erzberger) writes:
>
>>Can anybody see what's wrong with the following piece of code? I cut it
>>down from a large utility which compiles and runs fine on a SUN.
>>With the IBM C Set/2 compiles, it generates a TRAP. Looking with the
>>debugger, the TRAP gets generated in the initialisation phase (I think
>>at the moment the library gets called to initialize).
>>When I remove any of the two declarations, the program will "run" (of
>>course it does nothing).
>>Now here the code:
>>
>>#include <stdlib.h>
>>
>>main(int argc, char *argv[])
>>{
>> char *test1 = NULL;
>> int test2[32768];
>>}
>
Almost certainly insufficient stack space. Local variables reside on
the stack, and the default is quite a bit smaller than 32K. Use
/St:42000 on the link command line, and the program should work.
Regards,
Ian.
Technical Details
Message-ID:
<19920804.113915.320@almaden.ibm.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.comReferences:
<1992Aug3.111930.19189@ifi.unizh.ch> <1992Aug3.140521.14803@vela.acs.oakland.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com From: ameline@vnet.ibm.com (Ian Ameline) Message-ID: <19920804.113915.320@almaden.ibm.com> Date: Tue, 4 Aug 92 14:36:50 EDT Subject: Re: Strange trap in IBM C Set/2 Newsgroups: comp.os.os2.programmer References: <1992Aug3.111930.19189@ifi.unizh.ch> <1992Aug3.140521.14803@vela.acs.oakland.edu> Organization: C-Set/2 Development, IBM Canada Lab. Disclaimer: This posting represents the poster's views, not those of IBM Lines: 30