jrb@petro.UUCP (Jon Boede) (11/16/87)
I sent some code over to an AT running Microport XENIX 1.3 ... when using the
-Ml (large) model the following crashed and burned...
main()
{
char *a_pointer;
a_pointer = "some static data";
puts(a_pointer);
}
However, when I change a_pointer to "static char *a_pointer" it works. Why?
Thanks,
Jon
--
Jon Boede ...!{gatech,ihnp4,ssbn,swrinde,tness1,utanes}!petro!jrb
512/599-1847 2555 N.E. Loop 410, #1403, 78217
"People who are incapable of making decisions are
the ones who hit those barrels at freeway exits."
root@uwspan.UUCP (11/18/87)
+---- jrb@petro.UUCP (Jon Boede) writes in <471@petro.UUCP> ---- | I sent some code over to an AT running Microport XENIX 1.3 ... when using the | -Ml (large) model the following crashed and burned... | main() { | char *a_pointer; | a_pointer = "some static data"; | puts(a_pointer); | } | However, when I change a_pointer to "static char *a_pointer" it works. Why? +---- First of all, the Microport System5r2 port is *not* XENIX :-), Secondly it does NOT crash and burn on my system. (Configuration: Prog dev 1.3 and DosMerge 2.3 kernel, 4 users on at the time, 3Mb RAM, 140Mb disk space...) Saved this file as x.c, edited off the message text, Compiled with: "cc -o x -Ml x.c" (no warning or error messages) run as: "./x" output: "some static data" (quotes are mine) -- Email to unix-at-request@uwspan with questions about the newsgroup unix-at, otherwise mail to unix-at@uwspan with a Subject containing one of: 386 286 Bug Source Merge or "Send Buglist" (Bangpath: rutgers!uwvax!uwspan!unix-at & rutgers!uwvax!uwspan!unix-at-request)
daveb@laidbak.UUCP (Dave Burton) (11/18/87)
In article <471@petro.UUCP> jrb@petro.UUCP (Jon Boede) writes: >I sent some code over to an AT running Microport XENIX 1.3 ... when using the >-Ml (large) model the following crashed and burned... > >main() >{ > char *a_pointer; > a_pointer = "some static data"; > puts(a_pointer); >} > >However, when I change a_pointer to "static char *a_pointer" it works. Why? I would also like to know the answer to this. (Take that, included text line counter!) -- --------------------"Well, it looked good when I wrote it"--------------------- Verbal: Dave Burton Net: ...!ihnp4!laidbak!daveb V-MAIL: (312) 505-9100 x325 USSnail: 1901 N. Naper Blvd. #include <disclaimer.h> Naperville, IL 60540
janm@runx.ips.oz (Jan Mikkelsen) (11/22/87)
I suggest you contact Microport about upgrading to 2.3! (How old is 1.3 anyway?) Jan. ACSnet: janm@runx.ips.oz JANET: runx.ips.oz!janm@ukc ARPA: janm%runx.ips.oz@seismo.css.gov CSNET: janm@runx.ips.oz UUCP: {enea,hplabs,mcvax,prlb2,seismo,ubc-vision,ukc}!munnari!runx.ips.oz!janm "He's dead, icici5
jmsully@admin.UUCP (John M. Sully) (12/01/87)
In article <1253@laidbak.UUCP| daveb@laidbak.UUCP (Dave Burton) writes: |In article <471@petro.UUCP| jrb@petro.UUCP (Jon Boede) writes: ||I sent some code over to an AT running Microport XENIX 1.3 ... when using the ||-Ml (large) model the following crashed and burned... || ||main() ||{ || char *a_pointer; || a_pointer = "some static data"; || puts(a_pointer); ||} || ||However, when I change a_pointer to "static char *a_pointer" it works. Why? Well, I compiled this here at Microport (we're still shipping the 1.3 cc) and it worked fine in both large and small model. The command line I used was: cc -Ml bug.c when I typed a.out, it ran! :-)