Re: Illegal instruction (core dumped)

From: James Van Buskirk (not_valid_at_comcast.net)
Date: 05/11/04

  • Next message: TimC: "Re: Illegal instruction (core dumped)"
    Date: Tue, 11 May 2004 06:39:52 GMT
    
    

    "Gerry Thomas" <gfthomas@sympatico.ca> wrote in message
    news:RoZnc.9842$dr1.375825@news20.bellglobal.com...

    > "Ali" <hgolshani@hotmail.com> wrote in message news:s31uzaap7yv1@legacy...
    > > Hello, Anyone who know what is "Illegal instruction (core dumped)" ??
    > > When I compiled and Run a fortran files in UNIX, this error comes out.

    > It's a common problem in Unix, Windows, etc., and is most often caused by
    > programmer error, usually by exceeding the bounds of an array via an
    > invalid access. I've cross posted to comp.lang.fortran, a more appropriate
    > ng for Fortran-specific problems.

    It means that a machine-level instruction mnemonic was issued
    that didn't correspond to any machine-level mnemonic known to
    the current processor. One way this could happen is that code
    was compiled for a different processor than it was actually
    run on, but most frequently some instructions would be placed
    in the executable prolog that would result in a more user-
    friendly diagnostic in this case.

    More commonly an instruction was issued to the processor that
    wasn't part of the compiled code either by:
    1) overwriting the compiled code by writing to an invalid array
       index (although in many environments this would be trapped
       and you would get a segmentation fault or a bus error rather
       than surviving to issue an invalid instruction)
    2) jumping to an unanticipated address by either
    2a) associating a data actual argument with a procedure dummy
        argument or
    2b) messing up the stack (kind of requires a compiler that
        has a callee cleans up the stack calling convention, in
        which case invoking a procedure with the wrong number of
        arguments or the wrong number of character arguments
        could do the trick.)

    I would start off by trying to catch out of bounds array
    accesses with a compiler switch. If fixing these little
    nightmares doesn't make your problems go away, I would
    then try to pin down as near as possible where the error
    happens by inserting some write statements. Does it happen
    right at some procedure call or return? Compare actual
    arguments with dummy arguments for the offending procedure.

    -- 
    write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
    6.0134700243160014d-154/),(/'x'/)); end
    

  • Next message: TimC: "Re: Illegal instruction (core dumped)"

    Relevant Pages

    • Re: new crop of quantitative measurements?
      ... orthogonal architectures from which to ... I'm obviously not the only one to have noticed this combination, since even x86 cpus contain a parallel approximate reciprocal square root lookup instruction in the SSE instruction set, giving about 12 bits. ... In a cpu company, software people are second-rate citizens, which tends to cause the hw guys to look down on them, which tends to cause the really good compiler people to seem alternate employment. ... is the modest fraction of the time that register pressure makes ...
      (comp.arch)
    • Re: RosAsm - right click
      ... writing an instruction that uses a variable ... variable...the immediate compiler should, of course, accept the ... want to see mostly mnemonics so put it back over to the left... ...
      (alt.lang.asm)
    • Re: Bad performance on alpha? (make buildworld)
      ... It's been a few years since I'd written a compiler, ... it is 4-way superscalar but the different execution ... instruction decode stages rather than just the integer pipeline), ... > architecture and relying on the L1 cache to handle the register spills ...
      (freebsd-performance)
    • Re: To Richard Heathfield: enoughs enough
      ... >> But if it is translated instead by an optimizing compiler to a single ... >> instruction the function becomes in practice O. ... practice of calling strlen in a loop is "on the order of quadratic n". ... law actually REDUCES the effective cycle time, ...
      (comp.programming)
    • Re: Java outperforms C++?
      ... > overlapped it is stopping some other instruction from overlapping. ... > Which C++ compiler uses GC? ... optimization is difficult and expensive. ... Decoupling the optimization from execution allows the optimization to ...
      (microsoft.public.vc.language)