"nan" <> wrote in message
news: ups.com...
> Hi,
>
> We are in the process of migrating our old HP-UX 11.00, PA-RISC
> architecture to a new HP-UX 11.23i, Itanium architecture. We have
> compiled the codes and now we are testing the executables. While
> running the executable, we get the following error.
>
> SEGV_ACCERR - Invalid Permissions for object
> #0 0x60000000c0340160:1 in _wrtchk+0x341 () from /usr/lib/hpux32/
> libc.so.1
>
> I am not sure why we are getting this error. Am pretty new to C and it
> would great if someone can help me in this.
>
It is the evils of undefined behaviour.
The original code must have accessed memory in some illegal way.
Unfortunately, and this really is the worst scenario for UB, it appeared in
testing as if the program was working correctly. When you move it to another
platform, the error becomes obvious.
The problem is probably deep in the logic somewhere. Compile and run with a
debug boundschecker, and then try to work out why it is, probably, either
exceeding an array or writing to a garbage pointer.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm