Segmentation Fault

Discussion in 'C Programming' started by nan, May 28, 2007.

  1. nan

    nan Guest

    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.


    Thanks,
    nan
     
    nan, May 28, 2007
    #1
    1. Advertising

  2. nan <> writes:
    > 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.


    Try comp.sys.hp.hpux -- and give the folks over there some clue about
    what you're trying to do.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, May 28, 2007
    #2
    1. Advertising

  3. "nan" <> wrote in message
    news:...
    > 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
     
    Malcolm McLean, May 28, 2007
    #3
  4. nan

    jacob navia Guest

    nan wrote:
    > 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.
    >
    >
    > Thanks,
    > nan
    >


    If you do not know what a segmentation fault is,
    you should get someone qualified to do this job.

    If you are pretty new to C, you should not attempt
    to do what you are doing. It is a bad idea to start
    by porting complex applications from one system to
    another.

    Again, the only real solution is to get someone
    qualified for this work.

    jacob
     
    jacob navia, May 28, 2007
    #4
  5. In article <>,
    nan <> wrote:

    >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


    Start by running the program under a debugger, so that you can see
    where the error is occurring. The error message you have only
    indicates where in some system library code the error is detected.
    You need to find out where in *your* code it is failing.

    -- Richard

    --
    "Consideration shall be given to the need for as many as 32 characters
    in some alphabets" - X3.4, 1963.
     
    Richard Tobin, May 28, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley
    Replies:
    17
    Views:
    894
  2. Pud
    Replies:
    0
    Views:
    606
  3. Replies:
    0
    Views:
    570
  4. Ivan Vecerina
    Replies:
    0
    Views:
    506
    Ivan Vecerina
    Jun 29, 2003
  5. Vasileios Zografos

    Re: segmentation fault exception handling

    Vasileios Zografos, Jun 30, 2003, in forum: C++
    Replies:
    5
    Views:
    15,744
    Pete Becker
    Jul 1, 2003
Loading...

Share This Page