- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am porting a very old numerical library from Solaris to the PC. My test code correctly runs under Solaris.
The authors of this code seem to make liberal use of access violations. Arrays that start with index 1 are often accessed with a negative index. I am not sure why, since the code comments are in Russian. It may seem strange that I would deal with this code, but it has unique capabilities that I can not seem to get elsewhere.
Under IVF10 I get access violations, so the code wont run. Is there any way to turn off this error for the library code?
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
stephen.painchaud@bakerhughes.com:
I now see that I have no problems with the release version of the code.
I wouldn't bet on it.
The debug version gives the error:
forrtl: severe (408): fort: (3): Subscript #2 of the array AL has value 0 which is less than the lower bound of 1
and then crashes.
You did not get an access violation. Rather, IVF knows that your proggy caused the OS to throw an EXCEPTION_ARRAY_BOUNDS_EXCEEDED with which the compiler determines which errant index is < LBOUND and/or >UBOUND, reports, and stops compiling because it hit an error. It does not crash. This is done so that the broken code can be fixed.
An out-of-bounds array element doesn't throw an EXCEPTION_ACCESS_VIOLATION if you haven't left your namespace.
I am OK as long as I don't need to use the debugger. I originally thought I would need to, but I seem to have gotton past that point for now.
Hm! I suggest that you keep /checkbounds 'on' whatever the configuration until the program is valid. Presumably your application doesn't impact on the safety of others.
Gerry

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »