Ticket #457 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

wave_serverV segfaults calling logit()

Reported by: baker Owned by: somebody
Priority: minor Milestone: All Platforms
Component: wave_serverV Version: 7.7
Keywords: logit Cc:

Description

At line 2319 in src/archiving/wave_serverV/wave_serverV.c, wave_serverV_config() segfaults:

Program received signal SIGSEGV, Segmentation fault.
0x400a9b84 in strlen () from /lib/arm-linux-gnueabi/libc.so.6
(gdb) bt
#0  0x400a9b84 in strlen () from /lib/arm-linux-gnueabi/libc.so.6
#1  0x40085ba6 in vfprintf () from /lib/arm-linux-gnueabi/libc.so.6
#2  0x4009c65a in vsnprintf () from /lib/arm-linux-gnueabi/libc.so.6
#3  0x0006085c in logit_core (flag=0x6ac10 "et", 
    format=0x6bfe0 "wave_serverV: ERROR:  Tanksize for (%s:%s:%s:%s) is too large: %d bytes.\nTanks must be <=  %d bytes.  EXITING!\n", ap=...) at logit.c:337
#4  0x00060f2a in logit (flag=0x6ac10 "et", 
    format=0x6bfe0 "wave_serverV: ERROR:  Tanksize for (%s:%s:%s:%s) is too large: %d bytes.\nTanks must be <=  %d bytes.  EXITING!\n") at logit.c:714
#5  0x0000e7cc in wave_serverV_config (configfile=0xbefff7ee "wsv_acc.d") at wave_serverV.c:2319
#6  0x0000a4f2 in main (argc=2, argv=0xbefff694) at wave_serverV.c:745

The reason is the argument list does not match the format items in the call to logit():

            logit("et", "wave_serverV: ERROR:  Tanksize for (%s:%s:%s:%s) is too large: %d bytes.\n"
                       "Tanks must be <=  %d bytes.  EXITING!\n",
                  Tanks[nTanks].tankSize,
                  Tanks[nTanks].sta, Tanks[nTanks].chan, Tanks[nTanks].net, Tanks[nTanks].loc,
                  MAX_TANK_SIZE);

Change History

comment:1 Changed 7 years ago by paulf

  • Status changed from new to closed
  • Resolution set to fixed

Thanks Larry. Fixed in r6072. There were actually 2 of these badly written calls to logit().

Note: See TracTickets for help on using tickets.