Thread View: vmsnet.internals
2 messages
2 total messages
Started by Arne Vajhxj
Sat, 12 Dec 1992 08:43
Re: Why does this code crash with ACCVIO?
Author: Arne Vajhxj
Date: Sat, 12 Dec 1992 08:43
Date: Sat, 12 Dec 1992 08:43
81 lines
3008 bytes
3008 bytes
> I apologize if the question is trivial/stupid; my VAX architecture knowledge
> is rusty. I also had trouble deciding which vmsnet newsgroup should I post it
to:
> I selected .internals because all other newsgroups seemed less appropriate.
To use that logic, then you must know for a fact, that there is an appropriate
vmsnet group for your question :-)
> I have the following C code in my program:
>
> for (i = 0; (i<SYMBOL_NAME_SIZE - 1) && (*source != '\0'); i++)
> *dest++ = *source++;
>
> which, when compiled (using gcc 1.39) results in :
>
> %SYSTEM-F-ACCVIO, access violation, reason mask=04,
> virtual address=175C4, PC=25C8A,PSL=03C00000
>
> The machine code that generates the error is
>
> 025C8A: movb (r1), (r0)
>
> with r0=95684(=0x175c4), r1=94591.
> TFM says that reason mask 04 (4(dec) = 0100(bin), so that bit 2 is
> on ?) means that I attempted a read-modify operation---am I right
> here? But the source and destination addresses do not seem to
> overlap, so why exactly does my computer complain?
As several other answers has pointed out, then this error is a ordinary
write access-violation, which means that *dest is not valid for writing.
Why it is not valid for writing depends a lot on the rest of the code !!!!
> I can manually deposit values at
> location pointed to by dest/r0 (using debugger 'deposit *dest=...'),
> so it is not a invalid address.
But now for the interesting !
The above test do NOT test what you think it tests at all !
The debugger is capable of depositing values in NOWRT psects !
Small example:
$ fortran/obj=z sys$input
PROGRAM Z
CALL DUMMY(1)
END
*
SUBROUTINE DUMMY(I)
WRITE(*,*) I
RETURN
END
$
$ link z
$ define/nolog/user dbg$process NONE
$ run/debug z
set mode noscreen
dep 512=2
go
exit
$ exit
(And for the less FORTRAN knowledgable: constants are passed by reference and
the $PDATA psect is NOWRT !)
This little feature has been around for all the VMS versions I have
used and can be quite usefull.
I once got the explanation that it is due to the fact, that the NOWRT
psect actually means user-mode:readonly and the debugger runs in
supervisor-mode !
Does anyone know if this stuff is documented anywhere ?
Arne
Arne Vajhxj local DECNET: KO::ARNE
Computer Department PSI: PSI%23831001304030::ARNE
Business School of Southern Denmark Internet: ARNE@KO.HHS.DK
Re: Why does this code crash with ACCVIO?
Author: don
Date: Sun, 13 Dec 1992 08:13
Date: Sun, 13 Dec 1992 08:13
17 lines
1127 bytes
1127 bytes
In article <01GS824V1BIA8WW79H@kopc.hhs.dk>, Arne Vajhxj <ARNE@ko.hhs.dk> writes: > I once got the explanation that it is due to the fact, that the NOWRT > psect actually means user-mode:readonly and the debugger runs in > supervisor-mode ! The debugger runs at any darn mode it feels like, including kernel. Have a squiz in the 'fiche at the bit that fools around with the system service vectors.... > Does anyone know if this stuff is documented anywhere ? Yeah, the 'fiche (or CDROM listings these days). Don Stokes, ZL2TNM (DS555) don@zl2tnm.gen.nz (home) Network Manager, Computing Services Centre don@vuw.ac.nz (work) Victoria University of Wellington, New Zealand +64-4-495-5052
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads