From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3450c0d8.9596288@bny18.bloomberg.com> Date: Fri, 24 Oct 1997 15:51:53 GMT From: Ming Chu Subject: program that crash alpha machine Hi, we have a simple program that crashes our alpha linux boxes (Redhat 4.2) when run. The program is a Fortran program translated by f2c and statically linked. Bellow is the program and its translated c code. Any help, suggestions or ideas would be greatly appreciated. translate and link: f2c testf1.f gcc -o testf1 testf1.c -lf2c -static When run testf1, it will crash our alpha machines. If you need the binary file or additional information, I will email it to you. Thanks. Ming Fortran program testf1.f: ============================================================ program test c----------------------------------------------------------------------- integer i integer*2 i2 real*4 r4 real*8 r8 c----------------------------------------------------------------------- do i = 1, 10 i2 = i r4 = i r8 = i write(6,*) i,i2,r4,r8 enddo end f2c translation testf1.c: ============================================================ /* testf1.f -- translated by f2c (version 19970805). You must link the resulting object file with the libraries: -lf2c -lm (in that order) */ #include "f2c.h" /* Table of constant values */ static integer c__3 = 3; static integer c__1 = 1; static integer c__2 = 2; static integer c__4 = 4; static integer c__5 = 5; /* Main program */ MAIN__() { /* Builtin functions */ integer s_wsle(), do_lio(), e_wsle(); /* Local variables */ static integer i__; static shortint i2; static real r4; static doublereal r8; /* Fortran I/O blocks */ static cilist io___5 = { 0, 6, 0, 0, 0 }; /* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */ for (i__ = 1; i__ <= 10; ++i__) { i2 = (shortint) i__; r4 = (real) i__; r8 = (doublereal) i__; s_wsle(&io___5); do_lio(&c__3, &c__1, (char *)&i__, (ftnlen)sizeof(integer)); do_lio(&c__2, &c__1, (char *)&i2, (ftnlen)sizeof(shortint)); do_lio(&c__4, &c__1, (char *)&r4, (ftnlen)sizeof(real)); do_lio(&c__5, &c__1, (char *)&r8, (ftnlen)sizeof(doublereal)); e_wsle(); } } /* MAIN__ */ /* Main program alias */ int test_ () { MAIN__ (); } -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com