From: cummings@hammer.Prime.COM (Kevin Cummings)
Subject: Re: static segment limits and F77
Keywords: Fortran, F77, static segments
Organization: Prime Computer R&D
Distribution: na
Date: Tue, 18 Aug 1992 21:56:44 GMT

In article <1992Aug18.200932.12432@u.washington.edu>, djo7613@hardy.u.washington.edu (Dick O'Connor) writes:
> I took so long to get my latest Fortran port to *compile* properly on our
> Prime 9750 (?) running Primos 23.0.0, that I was really hoping for first-
> time execution! (Me, the optimist.)  What I got was ILLEGAL SEGNO raised in
> a segment containing the editor used by most users on our system (I think
> it's PMED).  Sysadmin says he's raised my static segment limit to the roof
> and it still bombs after opening two files and trying to call the first sub.
> 
> I use BIND instead of SEG, by the way.  Would it make a difference if I
> tried SEG?  Usually my programs compile and run with the usual syntax and
> logic fixes needed, but this system-related stuff is way over my head.

If you are using BIND instead of SEG, you should be changing your DYNAMIC segment
limits.  Your STATIC segment limits are for STATIC segments (those you
would use with SEG).  

The question I would ask at this point is what was the program doing when it got
the ILLEGAL_SEGNO$ condition?  This is usually indicative of an uninitialized
pointer (in FORTRAN?), a trashed IP, or a stack that got walked on.

> This is a larger program than usual for me, and there's a lot in COMMON. Does

COMMON is allocated in DATA segments, and referenced through IPs in link frames
(also in DATA segments).  So it's possible to walk off the end of an array and
trash an IP.

> that have a bad effect on the static segment space required?  Can this have 

Your FORTRAN STATIC data is allocated in DYNAMIC DATA segments as far as the
system is concerned.  The segments are allocated on a "per program invocation"
basis, and are "static" as far as your program is concerned, but they come
from the system DYNAMIC segment pool.  STATIC segments are different beasts
altogether, and are your for the usage (all you have to do is reference them).
Unless your program is using a SHARED STATIC segement and you are managaing it,
odds are that the EPF runfile is using system DYNAMIC segments for your
program.

> anything to do with (what's the book call it?) 'misdeclared stack frame 
> size?'  Any rags, any bottles, any bones?  Any and all ideas welcome from
> veterans of the segment wars.  Thanks!

Using BIND, the system will allocated stack space as necessary (so you won't
get a STACK OVERFLOW until you run out of DYNAMIC segments).  However, it's
possible that you are walking off of the end of an array reference and trashing
random memory in your address space.  Try compiling with -RANGE.  If you are,
you should see a SUBSCRIPTRANGE condition instead of an ILLEGAL_SEGNO$ one.

> -- 
> "Moby" Dick O'Connor                         djo7613@u.washington.edu 
> Washington Department of Fisheries           *I brake for salmonids* 

-- 
=================================================================
Kevin J. Cummings                       PrimeService
20 Briarwood Road                       A Computervision Company
Framingham, Mass.                       500 Old Connecticut Path
					Framingham, Mass.
Work:  cummings@primerd.Prime.COM
Home:  cummings@kjc386.framingham.ma.us

Std. Disclaimer: "Mr. McKittrick, after careful consideration,
		  I've come to the conclusion that your new
		  defense system SUCKS..."   --  War Games
=================================================================