This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Organization: Scripps Institute of Oceanography > Keywords: 199408230054.AA18398 netCDF SGI IRIX Hi Adam, > Hello. I have what might possibly be a bug in netcdf 2.3. > I am using the library under IRIX 4.0.5F > > I have had a consistent problem where at odd intervals certain nc > operations will crash during a call to malloc. This occurs most often > in ncopen. This problem crops up unexpectedly and seemingly at > random(except for when we have site reviews!). Neither I nor > my co-workers have been able to discover why this happens. > One typical instance where this can happen is when a driver program that > calls libraries which in turn use netcdf is modified. Although these > modifications do not use netcdf functions or seem to have any memory > corrupting properties, the malloc problem sometimes appears. > > I would very much appreciate it if you can shed any light on this > problem. Sorry, but we have never seen the symptoms you describe and have gotten no reports of similar problems from other users, either on SGI/IRIX or other platforms. It sounds like memory heap corruption due to either a program writing beyond its malloc'ed space, or due to freeing memory space that was never malloced. Since the malloc heap is shared by functions that call netCDF as well as the netCDF library, such a problem might well show up as a crash when malloc is called from within the netCDF library even though the actual problem occurs earlier outside of the netCDF library when the heap is first corrupted. One way to track down such problems is to use development tools such as ObjectCenter or Purify that check at run-time all malloc and free calls and all memory references. If you have no access to such tools, you may have to try using a freely-available debugging malloc package such as Brandon Allbery's malloc-debug, available from comp.sources.misc archives. We can't help diagnose this problem without a small test case that demonstrates the problem. We do have access to ObjectCenter and Purify (we use them in developing and testing netCDF), so if you can develop a small test case that reproduces the symptoms, we could use those tools to locate the problem. -- Russ Rew UCAR Unidata Program address@hidden P.O. Box 3000 http://www.unidata.ucar.edu/ Boulder, CO 80307-3000