Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2024 10:22:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 279875] sockstat: segmentation fault
Message-ID:  <bug-279875-7501-Znkqrjz4Wz@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-279875-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-279875-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279875

--- Comment #4 from John Marshall <john@jmarshall.id.au> ---
(In reply to Konstantin Belousov from comment #2)

Sorry.  That re-compile still had -O2.  I found that I was able to get it to
compile with -O0 by adding 'CFLAGS=3D-O0' to /etc/make.conf.  Is there a wa=
y to
tell make(1) to use -O0 just for 'this' Makefile?

Here is a more useful backtrace I hope.

rwsrv08#=20
rwsrv08# gdb sockstat
GNU gdb (GDB) 14.1 [GDB v14.1 for FreeBSD]
...
Reading symbols from sockstat...
Reading symbols from /build/usr/lib/debug//usr/bin/sockstat.debug...
(gdb) r
Starting program: /usr/bin/sockstat=20
[Detaching after fork from child process 88560]
USER     COMMAND    PID   FD  PROTO  LOCAL ADDRESS         FOREIGN ADDRESS=
=20=20=20=20=20=20
root     sockstat   88565 6   stream -> [88559 8]
root     sockstat   88564 6   stream -> [88559 7]
...
root     syslogd     2948 9   dgram  /var/run/logpriv
root     gssd        2810 3   stream /var/run/gssd.sock

Program received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x0000000001029669 in displaysock (s=3D0x80184b200, pos=3D59) at
/kits/src/usr.bin/sockstat/sockstat.c:1169
1169                                                (u_long)f->xf_pid,
f->xf_fd);
(gdb) bt
#0  0x0000000001029669 in displaysock (s=3D0x80184b200, pos=3D59) at
/kits/src/usr.bin/sockstat/sockstat.c:1169
#1  0x000000000102776b in display () at
/kits/src/usr.bin/sockstat/sockstat.c:1345
#2  0x0000000001024eab in main (argc=3D0, argv=3D0x7fffffffeb60) at
/kits/src/usr.bin/sockstat/sockstat.c:1577
(gdb)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279875-7501-Znkqrjz4Wz>