Locating access violation in a link map - VMS

This is a discussion on Locating access violation in a link map - VMS ; I had an access violation in some code put into production. We can't reproduce it. I can make a link map of the executable. But I was wondering if it is possible to relate the virtual address or the program ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Locating access violation in a link map

  1. Locating access violation in a link map

    I had an access violation in some code put into production. We can't
    reproduce it.

    I can make a link map of the executable. But I was wondering if it is
    possible to relate
    the virtual address or the program counter identified in the access
    violation to the link map in order to learn more about the location of
    the access violation.

  2. Re: Locating access violation in a link map

    On Dec 5, 1:30 pm, tadamsmar wrote:
    > I had an access violation in some code put into production. We can't
    > reproduce it.
    >
    > I can make a link map of the executable. But I was wondering if it is
    > possible to relate
    > the virtual address or the program counter identified in the access
    > violation to the link map in order to learn more about the location of
    > the access violation.


    tadamsmar,

    In a word, yes. I have done this many times for clients, and a couple
    of times for myself when an error seemed, at first glance, to be
    inexplicable..

    You will need the LINK map, and you will also need the /MACHINE_CODE
    listings of the relevant module(s) to identify the precise point of
    failure. A note of caution, tracking these can be a challenge if the
    code has been compiled with optimization.

    - Bob Gezelter, http://www.rlgsc.com

  3. Re: Locating access violation in a link map

    On Dec 5, 1:36 pm, Bob Gezelter wrote:
    > On Dec 5, 1:30 pm, tadamsmar wrote:
    >
    > > I had an access violation in some code put into production. We can't
    > > reproduce it.

    >
    > > I can make a link map of the executable. But I was wondering if it is
    > > possible to relate
    > > the virtual address or the program counter identified in the access
    > > violation to the link map in order to learn more about the location of
    > > the access violation.

    >
    > tadamsmar,
    >
    > In a word, yes. I have done this many times for clients, and a couple
    > of times for myself when an error seemed, at first glance, to be
    > inexplicable..
    >
    > You will need the LINK map, and you will also need the /MACHINE_CODE
    > listings of the relevant module(s) to identify the precise point of
    > failure. A note of caution, tracking these can be a challenge if the
    > code has been compiled with optimization.
    >
    > - Bob Gezelter,http://www.rlgsc.com


    Thanks. Turned out to be easier than that. Had me stumped at first
    because the virtual address seemed to be too big. Then I noticed that
    it corresponded to a error message symbol.

    Forgot to put %loc on the message which was declared as a external in
    Fortran.

  4. Re: Locating access violation in a link map

    In article <0424d335-4a64-4264-b665-92e647984c87@i29g2000prf.googlegroups.com>, tadamsmar writes:
    >
    >
    >I had an access violation in some code put into production. We can't
    >reproduce it.
    >
    >I can make a link map of the executable. But I was wondering if it is
    >possible to relate
    >the virtual address or the program counter identified in the access
    >violation to the link map in order to learn more about the location of
    >the access violation.


    Yes.


    --
    VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM

    "Well my son, life is like a beanstalk, isn't it?"

    http://tmesis.com/drat.html

  5. Re: Locating access violation in a link map

    In article <0424d335-4a64-4264-b665-92e647984c87@i29g2000prf.googlegroups.com>, tadamsmar writes:
    > I had an access violation in some code put into production. We can't
    > reproduce it.
    >
    > I can make a link map of the executable. But I was wondering if it is
    > possible to relate
    > the virtual address or the program counter identified in the access
    > violation to the link map in order to learn more about the location of
    > the access violation.


    Yep. The link map will tell you where the code for each routine
    starts (look for $CODE PSECT). The offset into the code corresponds
    to the instruction you'll see when you add /list/machine_code or
    something like that when you compile. And comments in the
    instruction listing will help you find the line of code in a higher
    level language.


  6. Re: Locating access violation in a link map

    tadamsmar wrote:
    > I had an access violation in some code put into production. We can't
    > reproduce it.
    >
    > I can make a link map of the executable. But I was wondering if it is
    > possible to relate
    > the virtual address or the program counter identified in the access
    > violation to the link map in order to learn more about the location of
    > the access violation.


    That's the usual approach. Frequently the ACCVIO triggers an exception
    handler that will output a traceback showing not only the location of
    the ACCVIO but also how the program got to the particular subroutine in
    which the exception occurred.


+ Reply to Thread