[Info-vax] calloc fails with access violation

jbriggs444 jbriggs444 at gmail.com
Thu Aug 27 08:11:11 EDT 2009


On Aug 26, 4:38 pm, jls <notva... at yahoo.com> wrote:
[...]
> This sounds suspiciously like a FORTRAN problem I ran into in my
> programming days.  I would get strange ACCVIO errors and other data
> issues.  Running in the debugger, I found a variable being modified
> when it wasn't being used.
>
[...]
>
> One way to fix this was to compile with "/check=bounds" (IIRC), which
> would raise a more meaningful whenever a user would enter more data
> than would fit in my variable.  When the overflow occurred, the stack
> dump would tell me exactly which variable and which line of code.

Yes.  /check=bounds is very nice.  Of course, in order to make it
work, you need to ensure that the array bounds in the called
subroutine are accurate.  For me, that assurance comes from using
assumed size arrays and strings (the caller passes the size in and the
callee's array declaration uses that size).

Oh SWEET!  Somewhere along the line they fixed the problem with /
CHECK=BOUNDS tripping a false alarm on the array bounds for a zero
length substring.




More information about the Info-vax mailing list