Re: 64-bit c++ application crashing on solaris



On Sun, 30 Mar 2008 23:11:53 -0700 (PDT), Sumir <sumirmehta@xxxxxxxxx> wrote:

I ran a truss on the application to have a trace. It resulted into
this ...

lwp_sema_post(0xFFFFFFFF7D003D60) = 0
lwp_mutex_lock(0xFFFFFFFF7E72B068) = 0
read(39, " 3 e c 0 a 8 f 1 c 7 d 0".., 512) = 512
lwp_mutex_wakeup(0xFFFFFFFF7E72B068) = 0
time() = 1205757131
lwp_mutex_lock(0xFFFFFFFF7E72B068) = 0
Incurred fault #6, FLTBOUNDS %pc = 0xFFFFFFFF7E449BBC
siginfo: SIGSEGV SEGV_MAPERR addr=0x0FAE0350
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x0FAE0350
*** process killed ***

Seems there is some memory access violation. But the thing is, this
same application compiled in 32-bit mode, run on the same environment
(same machine) fares well. So if it were something to do within the
code, in way of accessing memory wrongly, it should have surfaced in
the 32-bit version as well.

Not necessarily. There are many programs which implicitly assume that
`int' is large enough to hold a memory address. They tend to work find
in 32-bit mode (because their assumption happens to be true), but fail
randomly in 64-bit mode.

.



Relevant Pages

  • [PATCH] Always send siginfo for synchronous signals
    ... Valgrind is critically dependent on getting siginfo with its synchronous ... (caused by an instruction fault) ... signals; if it gets, say, a SIGSEGV ... can't make any more progress without knowing what caused the SIGSEGV. ...
    (Linux-Kernel)
  • Whats the process doing?
    ... The Solaris server has four 900 MHz CPU. ... siginfo: SIGSEGV SEGV_MAPERR addr=0xC05E840000 ... Received signal #11, SIGSEGV ...
    (comp.unix.solaris)
  • Re: help to explain the truss output
    ... truss output shows it is looping. ... siginfo: SIGSEGV SEGV_MAPERR addr=0x0000000C ... Received signal #11, SIGSEGV ... It might be trying to write to write protected memory or to read from memory it has no access to. ...
    (comp.unix.solaris)
  • Re: problem with blastwaves gvim
    ... ls: .vimrc: No such file or directory ... ls: .gvimrc: No such file or directory ... siginfo: SIGSEGV SEGV_MAPERR addr=0x00580003 ... Received signal #11, SIGSEGV ...
    (comp.unix.solaris)
  • Re: 64-bit c++ application crashing on solaris
    ... siginfo: SIGSEGV SEGV_MAPERR addr=0x0FAE0350 ... Received signal #11, SIGSEGV ... Seems there is some memory access violation. ... You have to inspect the code for constants like 0xFFFF, 0xFFFF0000 and make then unsigned long if needed, search for things like shift operations with longs, longs that ought to be unsigned longs, stuff like that. ...
    (comp.unix.programmer)