Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* More decc problems on alpha6.1
@ 1996-05-07  4:00 Cynthia Agard
  1996-05-08  4:00 ` Thomas Leitner
  1996-05-10  4:00 ` Stephen Hoffman
  0 siblings, 2 replies; 4+ messages in thread
From: Cynthia Agard @ 1996-05-07  4:00 UTC (permalink / raw)



This old fortran vax/vms programmer is having problems with decc alpha 6.1
environment.

Tell me what is wrong with this??
I'm skipping over stuff and showing you the meat of my problem.
Hopefully it is easy and you'll see it 1,2,3.

--------------------
The following is contained in a single module which blows up whenever
I run it.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <descrip.h>
#include <lib$routines.h>
#include "mfhdf.h"

long dump_meta_attribute (FILE *file_ptr, int32 sd_id, char *attrname) {
 size_t suffix_loc;
 .
 .
 .
 /* sure am skipping over a bunch of stuff */
 suffix_loc = strlen (attrname) - 1;
 attrname [suffix_loc]++;   /*=====THIS IS WHERE IT EXPLODES ACC VIO */ 

}

int display_meta_data (char *inhdf, char *outmeta, int mdspec_bmap) {
char  *sdattrname[4] ={"CoreGranuleMetadata.0",
                       "CoreCollectionMetadata.0",
                       "ProductGranuleMetadata.0",
                       "ProductCollectionMetadata.0"
                      };
int32 stat;
FILE  *meta_file_ptr;
int32 sd_id;
.
.
.
stat = dump_meta_attribute (meta_file_ptr, sd_id, sdattrname[0]);
}


Much appreciated.

   Cindy 





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

* Re: More decc problems on alpha6.1
  1996-05-07  4:00 More decc problems on alpha6.1 Cynthia Agard
@ 1996-05-08  4:00 ` Thomas Leitner
  1996-05-10  4:00   ` Steve Lionel
  1996-05-10  4:00 ` Stephen Hoffman
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Leitner @ 1996-05-08  4:00 UTC (permalink / raw)



Cindy,

Cynthia Agard (cagard@csc.com) wrote:
> This old fortran vax/vms programmer is having problems with decc alpha 6.1
> environment.
> 
> Tell me what is wrong with this??
> I'm skipping over stuff and showing you the meat of my problem.
> Hopefully it is easy and you'll see it 1,2,3.
> 
> --------------------
> The following is contained in a single module which blows up whenever
> I run it.

[...]

>  suffix_loc = strlen (attrname) - 1;
>  attrname [suffix_loc]++;   /*=====THIS IS WHERE IT EXPLODES ACC VIO */ 

[...]

Not being a dedicated VMS/DECC programmer but a multiplatform programmer,
I guess that the compiler puts static char constants in a read-only
segment and you can't modify that. Perhaps there's a compiler switch
to turn that off.

Hope that helps -- Tom

-- 
Tom Leitner, tom@finwds01.tu-graz.ac.at              |\      _,,,---,,_
Dept. of Communications                         zzz. /,`.-'`'    -.  ;-;;,_.
Graz University of Technology                       |,4-  ) )-,_. ,\ (  `'-'
Inffeldgasse 12                                    '---''(_/--'  `-'\_)
A-8010 Graz / Austria / Europe, Phone: +43-316-873-7455, Fax: +43-316-463-697
WWW home page: http://wiis.tu-graz.ac.at/people/tom.html



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

* Re: More decc problems on alpha6.1
  1996-05-07  4:00 More decc problems on alpha6.1 Cynthia Agard
  1996-05-08  4:00 ` Thomas Leitner
@ 1996-05-10  4:00 ` Stephen Hoffman
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hoffman @ 1996-05-10  4:00 UTC (permalink / raw)




In article <4mo0dp$6ic@explorer.csc.com>, cagard@csc.com (Cynthia Agard) writes:
:This old fortran vax/vms programmer is having problems with decc alpha 6.1
:environment.

   I'll assume OpenVMS Alpha V6.1 based on the version number.

   Are you familiar with the OpenVMS source code debugger? 

:Tell me what is wrong with this??
:I'm skipping over stuff and showing you the meat of my problem.

   It's not particularly obvious from the code that was posted.

:The following is contained in a single module which blows up whenever
:I run it.

   The contents of the access violation message typically point to
   some interesting information relevent to the fault -- you already
   appear to know the PC, but it also points to the address that was
   referenced when the access violation occured, and whether or not
   the access was a read or a write.  "$ HELP/MESSAGE ACCVIO" will
   get you some information on what I mean here...

   Use the source code debugger, and step through to the failing source
   line.  (SET BREAK/EXCEPTION; GO is one way to get to the failing line
   quickly.)  Then see what's wrong with the code near the area:

: /* sure am skipping over a bunch of stuff */
: suffix_loc = strlen (attrname) - 1;
: attrname [suffix_loc]++;   /*=====THIS IS WHERE IT EXPLODES ACC VIO */ 

   You'll want to see if suffix_loc is valid, and you'll want to see
   if attrname is valid.  Then you'll want to figure out how things
   got confused...

  ------------------------- pure personal opinion ---------------------------
   Stephen Hoffman      OpenVMS Engineering      hoffman@xdelta.enet.dec.com
  ---------------------------------------------------------------------------




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

* Re: More decc problems on alpha6.1
  1996-05-08  4:00 ` Thomas Leitner
@ 1996-05-10  4:00   ` Steve Lionel
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Lionel @ 1996-05-10  4:00 UTC (permalink / raw)




In article <4mq9cm$ffi@fstgal00.tu-graz.ac.at>, tom@finwds01.tu-graz.ac.at 
(Thomas Leitner) writes:

|>Not being a dedicated VMS/DECC programmer but a multiplatform programmer,
|>I guess that the compiler puts static char constants in a read-only
|>segment and you can't modify that. Perhaps there's a compiler switch
|>to turn that off.

There is - /ASSUME=WRITEABLE_STRING_LITERALS
-- 

Steve Lionel                      mailto:lionel@quark.zko.dec.com
Fortran Development               http://www.digital.com/info/slionel.html
Digital Equipment Corporation     
110 Spit Brook Road, ZKO2-3/N30    
Nashua, NH 03062-2698             "Free advice is worth every cent"

For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/



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

end of thread, other threads:[~1996-05-10  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-07  4:00 More decc problems on alpha6.1 Cynthia Agard
1996-05-08  4:00 ` Thomas Leitner
1996-05-10  4:00   ` Steve Lionel
1996-05-10  4:00 ` Stephen Hoffman

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