ADSM-L

Re: compatibility

2000-08-14 16:26:08
Subject: Re: compatibility
From: Richard Sims <rbs AT BU DOT EDU>
Date: Mon, 14 Aug 2000 16:25:29 -0400
>Isn't Signal 11 typically a symtom of bad memory, i/o timing, or other
>hardware flakiness?

It's typically a software engineering boo-boo, as in:

Segmentation Fault (Segmentation Violation (SEGV) - Signal 11)
        The program attempts to write to a region of memory to which it does not
        have access.  Is typically a pointer usage problem, as in the following:
        - Writing past the end of an array (table): "subscript out of range".
        - Attempting to store into a string literal, as in:
           string = "abcde";   *(string + 1) = 'B';
          Note that string literals are contained in the Application Program
          Text area of the address space, which is read-only.
        - Using an uninitialized pointer.
        - Using no indirection where indirection (&something) is required, or
          single indirection where double indirection is required.  A common
          error is passing a struct_name instead of &struct_name.
        - The destination of sscanf being specified as the object itself (such
          as an int) rather than the address of it.
        - In "printf(%s)" for an int value, which instead wants "printf(%d)".
        - In "printf(%s)", no variable supplied for the value, or too few
          variables coded.
        - In computing a position within a table, using just the offset value
          rather than table base address plus offset.
        - Your code attempts to modify a read-only string literal.
        This problem can sometimes be caused by defective libraries, as in
        needing to upgrade to the latest libc.
        In occasional instances, giving a program more memory *might* help.
        Note that dereferencing a zeroed pointer will not result in a
        Segmentation Fault in AIX: IBM carried on the mainframe tradition of
        having low virtual memory map to the nucleus (kernel).  See "Address
        Space".

Richard Sims, BU
<Prev in Thread] Current Thread [Next in Thread>