- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Access Violation in C programming in Open VMS
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2009 10:22 PM
тАО06-29-2009 10:22 PM
Access Violation in C programming in Open VMS
I am working in FORTRAN in Open VMS, but my situtaion now is to debug the C program to find out the stack dump(SD) as follows:
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=0000000000000BB8, PC=FFFFFFFF8050E990, PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
I have identified the place where the error is thrown. but wanna know in what case this ACCESS VIOLATION will be thrown.
Thanks
Ragav.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2009 11:56 PM
тАО06-29-2009 11:56 PM
Re: Access Violation in C programming in Open VMS
You seem to have a write operation failing on address %x0BB8 (pretty/too low in P0 space).
Without any further info it's hard to tell what went wrong.
Please have a look at:
http://labs.hoffmanlabs.com/node/800
for further info on debugging ACCVIOs.
Regards,
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 12:06 AM
тАО06-30-2009 12:06 AM
Re: Access Violation in C programming in Open VMS
This would be the interesting part: which statement is causing the access violation ?
It can be anything accessing an invalid memory location: a virtual address not mapped in the processes address space or writing to a location which is read-only.
Show us the C statement where it occurs.
Most common reasons are: calling a routine with the wrong kind of arguments: passing a value instead of a reference or vice versa.
Writing to a read-only variable (e.g. a literal string).
Accessing an argument missing from the call.
Array index over-/under-flow: accessing an array element outside its dimension.
...
Since You are mentioning Fortran and C: be aware of the different argument passing defaults: Fortran always pass by reference, C passes single variables by value.
On VMS in particular: Fortran passes strings by descriptor, C expects the address of the string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 02:06 AM
тАО06-30-2009 02:06 AM
Re: Access Violation in C programming in Open VMS
Stricter prototypes may help you catch this kind of error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 06:19 PM
тАО06-30-2009 06:19 PM
Re: Access Violation in C programming in Open VMS
small correction on Kris' answer. Your program has attempted a READ on memory location 0BB8, which has failed. This is indicated by the reason mask. That address is on the first page of virtual memory, which is always protected noread/nowrite in order to catch references to nil pointers.
Most likely an argument mismatch of some sort. use DEBUG to work it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 06:38 PM
тАО06-30-2009 06:38 PM
Re: Access Violation in C programming in Open VMS
> situtaion now is to debug the C program
> [...]
So, are you working on Fortran code, C code,
or both?
> [...] use DEBUG to work it out.
Or post some actual code, so that a
non-psychic might be able to see what's
happening.
Or: help /mess /faci = system accvio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 12:43 AM
тАО07-01-2009 12:43 AM
Re: Access Violation in C programming in Open VMS
Your program has attempted a READ on memory location 0BB8, which has failed. ... That address is on the first page of virtual memory, which is always protected noread/nowrite in order to catch references to nil pointers.
<<<
Just some nits, which do not help with the base problem, but there is some misunderstanding.
This is Alpha or I64, right? On VAX this would not be the first page. Anyway, the first page is NOT "always protected noread/nowrite". It is just a "normal" page which usually is not mapped. The linker does this for you when it assigns virtual addresses for a main image.
As said before, the intention is to catch coding errors like uninitialized pointers. But there is nothing in VMS which stops you from mapping that page. There are various techniques to get to that page.
Also, consider a translated VAX image which has writable data on the second VAX page, at hex 200. Then the first Alpha page IS mapped, readable and writable in user mode.