🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
4 messages
4 total messages Started by Aaron W. Hsu Thu, 15 Nov 2007 05:48
Segfault Problem with latest version of NN
#10811
Author: Aaron W. Hsu
Date: Thu, 15 Nov 2007 05:48
22 lines
2103 bytes
Hey all,

I submitted this to nn-bugs@nndev.org, but I don't know if anyone can
help me here faster, so I am going to try. :-)

While I can post alright from within NN itself, when I run the nnpost
program, I get a segfault in tputc(). Recompiling with debugging
results in there being an error in term.c line 1158. The GDB output
says that tputc(c=10) is causing the issue.

I am running on OpenBSD 4.2 here, and I'm hoping to be able to make a
port of the system and get NN supported on the OpenBSD platform. To do
that, I had to create a custom s-openbsd.h file. I have the config.h
and s-openbsd.h files available to anyone who is interested in them.
If anyone could help me out with this error, I would really appreciate
it. 


-- 
((name "Aaron Hsu")
 (email/xmpp "aaron.hsu@sacrificumdeo.net")
 (site "http://www.aaronhsu.com"))
Re: Segfault Problem with latest version of NN
#10813
Author: Matthias Apitz
Date: Thu, 15 Nov 2007 13:16
31 lines
2426 bytes
Aaron W. Hsu <arcfide@net> writes:

>Hey all,

>I submitted this to nn-bugs@nndev.org, but I don't know if anyone can
>help me here faster, so I am going to try. :-)

>While I can post alright from within NN itself, when I run the nnpost
>program, I get a segfault in tputc(). Recompiling with debugging
>results in there being an error in term.c line 1158. The GDB output
>says that tputc(c=10) is causing the issue.

>I am running on OpenBSD 4.2 here, and I'm hoping to be able to make a
>port of the system and get NN supported on the OpenBSD platform. To do
>that, I had to create a custom s-openbsd.h file. I have the config.h
>and s-openbsd.h files available to anyone who is interested in them.
>If anyone could help me out with this error, I would really appreciate
>it. 

Hi Aaron,

I don't know if nn-bugs@nndev.org is still reading some
human beeing. I've send an e-mail as well to this, announcing
some stuff to be incorporated into the source, but there was
no reaction at all.

Concerning your problem, about which version of 'nn' you're talking.
I have nn-6.7.3 on FreeBSD 6.2 and there is no such code in
term.c line 1158. Can you show a 'bt' of the crash?

	matthias
Re: Segfault Problem with latest version of NN
#10814
Author: Aaron W. Hsu
Date: Fri, 16 Nov 2007 03:27
44 lines
3217 bytes
Matthias Apitz <guru@UnixArea.de> writes:

>Aaron W. Hsu <arcfide@net> writes:

>>While I can post alright from within NN itself, when I run the nnpost
>>program, I get a segfault in tputc(). Recompiling with debugging
>>results in there being an error in term.c line 1158. The GDB output
>>says that tputc(c=10) is causing the issue.

>>I am running on OpenBSD 4.2 here, and I'm hoping to be able to make a
>>port of the system and get NN supported on the OpenBSD platform. To do
>>that, I had to create a custom s-openbsd.h file. I have the config.h
>>and s-openbsd.h files available to anyone who is interested in them.
>>If anyone could help me out with this error, I would really appreciate
>>it. 

>Concerning your problem, about which version of 'nn' you're talking.
>I have nn-6.7.3 on FreeBSD 6.2 and there is no such code in
>term.c line 1158. Can you show a 'bt' of the crash?

I am using NN version 6.7.3. The following is a bt.

Program received signal SIGSEGV, Segmentation fault.
0x1c00eb25 in tputc (c=10) at term.c:1158
1158            if (auto_right_margin) {
(gdb) bt
#0  0x1c00eb25 in tputc (c=10) at term.c:1158
#1  0x1c00ea41 in tvprintf (fmt=0x3c005245 "%s\n", 
    ap=0xcfbc57d4 "@\2208\203$Z) at term.c:975
#2  0x1c00ea62 in tprintf (fmt=0x3c005245 "%s\n") at term.c:984
#3  0x1c01045c in vmsg (fmt=0x0, ap=0xa <Address 0xa out of bounds>)
    at term.c:2350
#4  0x1c01050e in msg (fmt=0x3c0022a0 "Connecting to NNTP server %s ...")
    at term.c:2370
#5  0x1c0089d6 in connect_server () at nntp.c:431
#6  0x1c0096e2 in nntp_fopen_list (cmd=0x3c001a49 "LIST") at nntp.c:1362
#7  0x1c0075be in readactfile () at db.c:1014
#8  0x1c0071ff in open_master (mode=0) at db.c:544
#9  0x1c00280c in main (argc=1, argv=0xcfbc5f78) at nn.c:921
(gdb) 
-- 
((name "Aaron Hsu")
 (email/xmpp "aaron.hsu@sacrificumdeo.net")
 (site "http://www.aaronhsu.com"))
[Solved] Re: Segfault Problem with latest version of NN
#10815
Author: Aaron W. Hsu
Date: Fri, 16 Nov 2007 06:45
20 lines
2150 bytes
Okay,

So, I had some issues with a strange segfault when using nnpost. I was
not sure what could be causing it, but I had some kind of intuitive
inkling today that I decided to try.

In the s-openbsd.h file that I created, I used termcap instead of
terminfo. Remarkably, this seems to have fixed everything. I am not
sure why this did, or if there is any benefit to using one method over
the other. That would be helpful to know. However, at the moment, I
guess, this works, so I'll stick with it. What is even more strange,
to me, is that the OpenBSD termcap database functions are just
wrappers around terminfo database entries, so there should not be such
a difference between the two, unless there is something inside nn that
I am missing.

-- 
((name "Aaron Hsu")
 (email/xmpp "aaron.hsu@sacrificumdeo.net")
 (site "http://www.aaronhsu.com"))
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads