Your message dated Tue, 18 Nov 2008 19:02:06 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#498676: fixed in nec2c 0.6-2
has caused the Debian Bug report #498676,
regarding [nec2c] Segmentation in netwk at network.c:146
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
498676: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498676
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: nec2c
Version: 0.6-1
Severity: normal
Tags: patch

--- Please enter the report below this line. ---
I'm getting the following segmentation fault:
Program received signal SIGSEGV, Segmentation fault.
0x000000000045e280 in netwk (cm=0x7f24d1a4f010, cmb=0x7f24d1a4f010, cmc=0x7f24d1a4f010, cmd=0x7f24d1a4f010, ip=0x21b9a50, einc=0x21c7cf0) at network.c:146
146                 ipnt[irow1]= nseg1;

It is because ipnt has not been allocated. There's conditional code that allocates this (and other structures) conditionally. If I make it unconditional then all seems to work. However this patch, while it works and works correctly is clearly not what the original author intended. But I just don't understand why these variables would be allocated conditionally.

Here's a patch that works (I'm sure the white space is murdered, sorry):

diff -r -c necpp-1.2.6+cvs20070816-orig/c_src/network.c necpp-1.2.6+cvs20070816/c_src/network.c *** necpp-1.2.6+cvs20070816-orig/c_src/network.c 2005-09-08 23:39:10.000000000 -0500 --- necpp-1.2.6+cvs20070816/c_src/network.c 2008-09-12 02:01:33.736109315 -0500
***************
*** 80,86 ****
   ndimn = j = (2*nonet + nsant);

   /* Allocate network buffers */
!   if( nonet > 0 )
   {
     mem_alloc( (void *)&rhs, np3m * sizeof(complex long double) );

--- 80,86 ----
   ndimn = j = (2*nonet + nsant);

   /* Allocate network buffers */
!   if(1)
   {
     mem_alloc( (void *)&rhs, np3m * sizeof(complex long double) );

Here's the NEC input:

CM NEC Input File of a 3 element Yagi
CM http://www.clarc.org/Articles/uhf.htm
CE
GW  1 30 0 -20.5 0 0 20.5 0 0.125
GW  2 30 8.5 -19.25 0 8.5 0 0 0.125
GW  3 30 8.5 0 0 8.5 19.25 0 0.125
GW  4 30 8.5 0 -1 8.5 19.25 -1 0.125
GW  5 10 8.5 19.25 0 8.5 19.25 -1 0.125
GW  6 30 20 -18.5 0 20 18.5 0 0.125
GW  7 10 8.5 0 0 8.5 0 -1 0.125
GS  0    0    0.0254
GE  0
FR  0 8    0    0  144.0     5.0E-01  0.00E+00  0.00E+00  0.00E+00  0.00E+00
EX  0 7 5 11 1 0
RP 0 31 73 1001 0.00E+00 0.00E+00 3.00E+00 5.00E+00 1.00E+04 0.00E+00
EN



--- System information. ---
Architecture: amd64
Kernel: Linux 2.6.26-1-amd64

Debian Release: lenny/sid
500 unstable mirrors.kernel.org.
500 unstable linux.uchicago.edu.
500 unstable http.us.debian.org.
500 unstable ftp.debian.org.
500 unstable debian-mirror.mirror.umn.edu.

--- Package information. ---
Depends (Version) | Installed
=========================-+-=============
libc6 (>= 2.3.5-1) | 2.7-13


diff -r -c necpp-1.2.6+cvs20070816-orig/c_src/network.c necpp-1.2.6+cvs20070816/c_src/network.c
*** necpp-1.2.6+cvs20070816-orig/c_src/network.c	2005-09-08 23:39:10.000000000 -0500
--- necpp-1.2.6+cvs20070816/c_src/network.c	2008-09-12 02:01:33.736109315 -0500
***************
*** 80,86 ****
    ndimn = j = (2*nonet + nsant);
  
    /* Allocate network buffers */
!   if( nonet > 0 )
    {
      mem_alloc( (void *)&rhs, np3m * sizeof(complex long double) );
  
--- 80,86 ----
    ndimn = j = (2*nonet + nsant);
  
    /* Allocate network buffers */
!   if(1)
    {
      mem_alloc( (void *)&rhs, np3m * sizeof(complex long double) );
  
CM NEC Input File of a 3 element Yagi
CM http://www.clarc.org/Articles/uhf.htm
CE
GW  1 30 0 -20.5 0 0 20.5 0 0.125
GW  2 30 8.5 -19.25 0 8.5 0 0 0.125
GW  3 30 8.5 0 0 8.5 19.25 0 0.125
GW  4 30 8.5 0 -1 8.5 19.25 -1 0.125
GW  5 10 8.5 19.25 0 8.5 19.25 -1 0.125
GW  6 30 20 -18.5 0 20 18.5 0 0.125
GW  7 10 8.5 0 0 8.5 0 -1 0.125
GS  0    0    0.0254
GE  0
FR  0 8    0    0  144.0     5.0E-01  0.00E+00  0.00E+00  0.00E+00  0.00E+00
EX  0 7 5 11 1 0
RP  0 31   73 1001  0.00E+00  0.00E+00  3.00E+00  5.00E+00  1.00E+04  0.00E+00
EN

--- End Message ---
--- Begin Message ---
Source: nec2c
Source-Version: 0.6-2

We believe that the bug you reported is fixed in the latest version of
nec2c, which is due to be installed in the Debian FTP archive:

nec2c_0.6-2.diff.gz
  to pool/main/n/nec2c/nec2c_0.6-2.diff.gz
nec2c_0.6-2.dsc
  to pool/main/n/nec2c/nec2c_0.6-2.dsc
nec2c_0.6-2_i386.deb
  to pool/main/n/nec2c/nec2c_0.6-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joop Stakenborg <[EMAIL PROTECTED]> (supplier of updated nec2c package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 18 Nov 2008 19:53:30 +0100
Source: nec2c
Binary: nec2c
Architecture: source i386
Version: 0.6-2
Distribution: unstable
Urgency: low
Maintainer: Joop Stakenborg <[EMAIL PROTECTED]>
Changed-By: Joop Stakenborg <[EMAIL PROTECTED]>
Description: 
 nec2c      - translation of the NEC2 FORTRAN source code to the C language
Closes: 498676
Changes: 
 nec2c (0.6-2) unstable; urgency=low
 .
   * Fixed a segfault, thanks Jeffrey Hundstad. Closes: #498676.
     Upstream notified.
Checksums-Sha1: 
 f9856dfbf2e4b0169938d84acb2359b56e173956 910 nec2c_0.6-2.dsc
 9ea768a9e1fb9a6a9593a2bd03759cd1dd5b57fe 2575 nec2c_0.6-2.diff.gz
 dcb42a8d5a6065a5d4dde0ef0621cdb22480a568 104440 nec2c_0.6-2_i386.deb
Checksums-Sha256: 
 f3f5eacf73a00506f62843e828dbc5615aecdb61e9a94a775754f27a72dd61d4 910 
nec2c_0.6-2.dsc
 3d71512b70f9833a870a7b18bf1f1db1ed77d21d8b579de32a3fc1200b943ee2 2575 
nec2c_0.6-2.diff.gz
 a08b5553fd6054230470f5f7ddfa71137d7b275966f353fafbfd45a2acfc539f 104440 
nec2c_0.6-2_i386.deb
Files: 
 f9f5ac4b85d894704f1ab2fcc9292ba7 910 hamradio extra nec2c_0.6-2.dsc
 33b853049901ebaefdebc1988ca5f823 2575 hamradio extra nec2c_0.6-2.diff.gz
 3b773a38766f5a3865dcdf3401583057 104440 hamradio extra nec2c_0.6-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkkjEFQACgkQ/CqtjGLxpX/1GgCg0+OXSSHA4vbOtfMH/KX4I3h0
8gQAoK2xOJKnHtXMCzMotonyLoKn5c59
=3E2R
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to