Re: segmentation fault in drposix_putlong

Dear Magnus Weis,

>Date: Thu, 9 May 1996 11:31:05 +0200 
>From: Magnus Weis <weis@xxxxxxxxxxxxxxxxxxxxxxxx>
>Organization: . 
>To: netcdfgroup@xxxxxxxxxxxxxxxx
>Subject: segmentation fault in drposix_putlong 
>Keywords: 199605091033.AA23012 

In the above message you wrote:

> I am trying to use netCDF for my work on numerical modelling of the
> Greenland ice sheet.
> 
> So far, netCDF works very well. But it gives me segmentation faults
> when I trie to write more than three or four data sets into one single
> file (arrays have one unlimited dimension). It tried it under LINUX
> and also on an IBM RS6000 with AIX3.2. In both cases I get the same
> error, but at different times for both systems (but reproducable).
> 
> While debugging netCDF I found the location where the error occurs in
> xdrposix.c:
> 
> static bool_t
> xdrposix_putlong(xdrs, lp)
>       XDR *xdrs;
>       internal_netlong *lp;
> {
> #if SWAP
> #   if SIZEOF_NETLONG != 4
> #     include Unhandled condition: line=__LINE__, file=__FILE__
> #   else
> ==>   netlong nl = htonl((netlong)*lp); <=== !!! HERE IT IS !!!
> 

Odd.  I wouldn't think the statement indicated above could result in a
segmentation violation.  Also, SWAP should be undefined on an IBM
RS/6000 system, so the above section of code shouldn't even be executing.

Would you please do to the following:

    1.  Go to your top-level, netCDF source directory.

    2.  Send me the output from the following commands:
    
            uname -a
            grep netlong config.status
            grep NETLONG config.status
            grep SWAP config.status

--------
Steve Emmerson   <steve@xxxxxxxxxxxxxxxx>

  • 1996 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: