Re: [gembud] Segfaults with oabsnd

Ben,

Looking at the 5.11.1 oabsnd.f file, I see that the SN_MAND call is used 
before the data files are open with the SN_OPNF call much further down,
so there is an uninitialized garbage value being sent as the number of 
files (greater than MMFILE)  to initialize the array causing a segment 
fault.

I haven't compared with the 5.11.4 distribution to see if this has changed 
since, but it existed at least in the 5.11.1 distribution.

Attached is the oabsnd.f file I patched in 5.11.1 which you might want to 
check out.

Chiz










"Cotton, Benjamin J" <bcotton@xxxxxxxxxx> 
Sent by: gembud-bounces@xxxxxxxxxxxxxxxx
08/26/2009 09:16 AM

To
<gembud@xxxxxxxxxxxxxxxx>, <support-gempak@xxxxxxxxxxxxxxxx>
cc

Subject
[gembud] Segfaults with oabsnd






Good morning gembuddies,

We're encountering a problem with oabsnd on Gempak 5.11.4 (Linux).  Any 
time
we try to run it, it segfaults.  oabsfc reads the grid file, so it doesn't
appear to be file related.  System specs and strace output below.  Any
suggestions?

Thanks,
BC

# system specs
[557 bcotton@devo /tmp ]$ uname -a
Linux devo.eas.purdue.edu 2.6.18-128.1.10.el5 #1 SMP Wed Apr 29 13:55:17 
EDT
2009 i686 i686 i386 GNU/Linux
[558 bcotton@devo /tmp ]$ rpm -q gcc
gcc-4.1.2-44.el5

#strace output
stat64("LAST.NTS", 0xbf88bd14)          = -1 ENOENT (No such file or
directory)
stat64("LAST.NTS", 0xbf88bd78)          = -1 ENOENT (No such file or
directory)
stat64("last.nts", {st_mode=S_IFREG|0644, st_size=2055, ...}) = 0
fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
stat64("last.nts", {st_mode=S_IFREG|0644, st_size=2055, ...}) = 0
stat64("last.nts", {st_mode=S_IFREG|0644, st_size=2055, ...}) = 0
fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
open("last.nts", O_RDWR|O_CREAT|O_LARGEFILE, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2055, ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf88bdf8) = -1 ENOTTY
(Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_SET)            = 0
ftruncate64(3, 0)                       = 0
write(3, "SNFILE  $GEMDATA/HRCBOB.SND     "..., 137) = 137
_llseek(3, 137, [137], SEEK_SET)        = 0
ftruncate64(3, 137)                     = 0
write(3, "GDFILE  $GEMDATA/HRCBOB.GRD     "..., 1918) = 1918
close(3)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
-- 
Ben Cotton
Unix Systems Administrator
Department of Earth and
  Atmospheric Sciences
Purdue University
http://www.purdue.edu/eas/resources/it/

CIVL 4212
O: 765-49-61546
C: 765-404-7986
_______________________________________________
gembud mailing list
gembud@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/ 

Attachment: smime.p7s
Description: Binary data

Attachment: oabsnd.f
Description: Binary data

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