Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
[parent not found: <199710271659.SAA00792@blinky.bfr.co.il>]
[parent not found: <19971026223849.05810@dot.cygnus.com>]
* Re: program that crash alpha machine
@ 1997-10-24 17:46 Tom Browder
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Browder @ 1997-10-24 17:46 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 8+ messages in thread
* program that crash alpha machine
@ 1997-10-24 15:51 Ming Chu
  1997-10-24 17:46 ` Tom Browder
  0 siblings, 1 reply; 8+ messages in thread
From: Ming Chu @ 1997-10-24 15:51 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1997-10-27 20:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.3.95.971024124553.4089A-100000@tomtom.asi-fwb.com>
1997-10-24 21:06 ` program that crash alpha machine Ming Chu
1997-10-25 21:35 ` Harvey J. Stein
1997-10-27  6:38   ` Richard Henderson
     [not found] <199710271659.SAA00792@blinky.bfr.co.il>
1997-10-27 20:32 ` Richard Henderson
     [not found] <19971026223849.05810@dot.cygnus.com>
1997-10-27 16:59 ` Harvey J. Stein
1997-10-24 17:46 Tom Browder
  -- strict thread matches above, loose matches on Subject: below --
1997-10-24 15:51 Ming Chu
1997-10-24 17:46 ` Tom Browder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox