[nos-bbs] Corrected: JNOS 2.0k memory issue?
Michael Fox - N6MEF
n6mef at mefox.org
Sat Aug 13 22:15:26 EDT 2016
Valgrind installed. The suggested test of “valgrind –-leak-check=yes ls -l” works fine. And the docs say the test will either work or not. So, I presume valgrind is installed properly.
I ran it with jnos:
sudo valgrind --test=memtest --leak-check=yes --log-file=valgrind.log ./jnos.exe -d /opt/jnos
It produces over 1000 errors, at which point it stops reporting. It’s all gibberish to me, but probably a C-programmer's delight!
Maiko: I can send you the output log, if you desire.
I did go back and capture the error output when compiling JNOS. There are a few warnings. I don’t know if that’s related or not. See below.
Michael
N6MEF
-------------------------- make.stderr -------------------------------------------
pop3cli.c: In function ‘pop3_job’:
pop3cli.c:211:9: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(wfp,Hdrs[RECEIVED]);
^
smtpserv.c: In function ‘getmsgtxt’:
smtpserv.c:749:5: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(mp->data,Hdrs[RECEIVED]);
^
mailbox.c: In function ‘mbx_incom’:
mailbox.c:820:8: warning: unused variable ‘cp’ [-Wunused-variable]
char *cp, *gpasswd;
^
mboxmail.c: In function ‘mbx_data’:
mboxmail.c:795:5: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(m->tfile,Hdrs[MSGID]);
^
mboxmail.c:813:5: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(m->tfile,Hdrs[FROM]);
^
mboxmail.c:1067:9: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(m->tfile,extra);
^
wpages.c: In function ‘dombwpages’:
wpages.c:249:5: warning: format not a string literal and no format arguments [-Wformat-security]
sprintf (buf, &argv[2][1]);
^
wpages.c: In function ‘rdaemon’:
wpages.c:874:2: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(tfile,Hdrs[RECEIVED]);
^
iproute.c: In function ‘ip_route’:
iproute.c:112:11: warning: variable ‘srcport’ set but not used [-Wunused-but-set-variable]
int16 srcport, dstport; /* for use in access checking */
^
at.c: In function ‘do_error’:
at.c:52:2: warning: format not a string literal and no format arguments [-Wformat-security]
tprintf(AtErrmsg);
^
jnosinstaller.c: In function ‘dothisone’:
jnosinstaller.c:25:3: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (entry);
^
jnosinstaller.c: In function ‘prompt_4_group’:
jnosinstaller.c:76:4: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (entry);
^
jnosinstaller.c:121:3: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (entry);
^
jnosinstaller.c:132:3: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (entry);
^
jnosinstaller.c:156:3: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (entry);
^
jnosinstaller.c:173:3: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (entry);
^
jnosinstaller.c: In function ‘main’:
jnosinstaller.c:238:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (buffer_ca);
^
jnosinstaller.c:244:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (buffer_ca);
^
jnosinstaller.c:336:3: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (buffer_ca);
^
jnosinstaller.c:385:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets (buffer_ca);
^
/tmp/ccRWkBBM.o: In function `dothisone':
/opt/jnos/source/2.0k.3.i7/jnosinstaller.c:25: warning: the `gets' function is dangerous and should not be used.
More information about the nos-bbs
mailing list