• This crashes sbbs horribly

    From elm@VERT/ECHTOBBS to Digital Man on Thu Nov 3 06:25:29 2011
    I am building off the example code for the MAIL_SEND function that is located at http://www.synchro.net/docs/baja.html#Logic/Control%20Flow%20Functions.

    What I want to do is abort the mail send request if enter is pressed at the "Send mail to who? " prompt. By default, using the example code, if you press enter you will start to cycle through all the users.

    So I thought I would check for a string length of zero and then if false, continue on to the MAIL_SEND function and if true, abort. ...but this does not work. What I have added crashes sbbs when the mail_send function is called. I do enter a correct username at the "Send mail to who? " prompt.

    cmdkey S
    cls
    print "Send mail to who? "
    str name
    int namelength
    getname name 25
    strlen namelength name
    compare namelength 0
    if_false
    mail_send
    else
    print "Send aborted.\n"
    pause
    end_if
    end_cmd

    echto
    bbs.echto.net

    ---
    ■ Synchronet ■ -=-= echto bbs =-=-
  • From Digital Man@VERT to elm on Thu Nov 3 19:32:42 2011
    Re: This crashes sbbs horribly
    By: elm to Digital Man on Thu Nov 03 2011 06:25 am

    So I thought I would check for a string length of zero and then if false, continue on to the MAIL_SEND function and if true, abort. ...but this does not work. What I have added crashes sbbs when the mail_send function is called.


    Thanks, I'll have to try that out and see if I can repro and fix it. What version are you running?

    digital man

    Synchronet "Real Fact" #42:
    Synchronet added Baja/PCMS support with v2.00a (1994).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From elm@VERT/ECHTOBBS to Digital Man on Fri Nov 4 06:26:19 2011
    Re: This crashes sbbs horribly
    By: Digital Man to elm on Thu Nov 03 2011 19:32:42

    So I thought I would check for a string length of zero and then if false, continue on to the MAIL_SEND function and if true, abort. ...but this do not work. What I have added crashes sbbs when the mail_send function is called.


    Thanks, I'll have to try that out and see if I can repro and fix it. What version are you running?

    I am running 3.15b (64) for linux.

    echto
    bbs.echto.net

    ---
    ■ Synchronet ■ -=-= echto bbs =-=-
  • From Echto@VERT/ECHTOBBS to Digital Man on Fri Nov 4 09:55:53 2011
    Re: This crashes sbbs horribly
    By: elm to Digital Man on Thu Nov 03 2011 06:25:29

    So I thought I would check for a string length of zero and then if false, continue on to the MAIL_SEND function and if true, abort. ...but this does work. What I have added crashes sbbs when the mail_send function is called. do enter a correct username at the "Send mail to who? " prompt.

    I am using 3.15b (64) for linux.

    echto

    ---
    ■ Synchronet ■ -=-= echto bbs =-=-
  • From Echto@VERT to Digital Man on Sat Nov 5 12:10:20 2011
    Re: This crashes sbbs horribly
    By: Echto to Digital Man on Fri Nov 04 2011 09:55 am

    So I thought I would check for a string length of zero and then if false, continue on to the MAIL_SEND function and if true, abort. ...but this do
    es
    work. What I have added crashes sbbs when the mail_send function is call
    ed.
    do enter a correct username at the "Send mail to who? " prompt.

    I am using 3.15b (64) for linux.

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a
    fulladdr=0x7fffeb7d2a10 "VERT/THRWHITE/") at qwk.cpp:162
    #7 0x00007ffff720de7c in sbbs_t::qnetmail (this=0x74d4f0, into=0x7fffeb7d2f70
    subj=0x7ffff72a911b "", mode=4) at netmail.cpp:338
    #8 0x00007ffff719755c in sbbs_t::netmail (this=0x74d4f0, into=0x765c00 "@GOTOX
    mode=0) at fido.cpp:131
    #9 0x00007ffff718926c in sbbs_t::exec_function (this=0x74d4f0, csi=0x7fffeb7d6 #10 0x00007ffff7181012 in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7d6fa0) at e #11 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x7fffeb7d76
    startup_dir=0x0) at exec.cpp:779
    #12 0x00007ffff7181dee in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7dade0) at e #13 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x75a44e "ma
    startup_dir=0x7ffff72a911b "") at exec.cpp:779
    #14 0x00007ffff7282640 in sbbs_t::external (this=0x74d4f0, cmdline=0x75a44d "*m
    startup_dir=0x7ffff72a911b "") at xtrn.cpp:1327
    #15 0x00007ffff71f0adb in sbbs_t::logon (this=0x74d4f0) at logon.cpp:434
    #16 0x00007ffff7184478 in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7f57f0) at e ---Type <return> to continue, or q <return> to quit---
    #17 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x7fffeb7f5e
    startup_dir=0x0) at exec.cpp:779
    #18 0x00007ffff7181dee in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7f9630) at e #19 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x752c61 "lo
    at exec.cpp:779
    #20 0x00007ffff7158c95 in sbbs_t::answer (this=0x74d4f0) at answer.cpp:418
    #21 0x00007ffff7203758 in node_thread (arg=0x74d4f0) at main.cpp:3899
    #22 0x00007ffff6681c1a in start_thread () from /lib64/libpthread.so.0
    #23 0x00007ffff5c462cd in clone () from /lib64/libc.so.6


    echto

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Echto@VERT to Digital Man on Sat Nov 5 12:14:00 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sat Nov 05 2011 12:10 pm

    Re: This crashes sbbs horribly
    By: Echto to Digital Man on Fri Nov 04 2011 09:55 am

    So I thought I would check for a string length of zero and then if fal
    se,
    continue on to the MAIL_SEND function and if true, abort. ...but this
    do
    es
    work. What I have added crashes sbbs when the mail_send function is c
    all
    ed.
    do enter a correct username at the "Send mail to who? " prompt.

    I am using 3.15b (64) for linux.

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a9e "",
    fulladdr=0x7fffeb7d2a10 "VERT/THRWHITE/") at qwk.cpp:162
    #7 0x00007ffff720de7c in sbbs_t::qnetmail (this=0x74d4f0, into=0x7fffeb7d2f70 "@GOTOXY:51,13@",
    subj=0x7ffff72a911b "", mode=4) at netmail.cpp:338
    #8 0x00007ffff719755c in sbbs_t::netmail (this=0x74d4f0, into=0x765c00 "@GOTOXY:51,13@", title=0x7ffff72a911b "",
    mode=0) at fido.cpp:131
    #9 0x00007ffff718926c in sbbs_t::exec_function (this=0x74d4f0, csi=0x7fffeb7d6fa0) at execfunc.cpp:184
    #10 0x00007ffff7181012 in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7d6fa0) at exec.cpp:1134
    #11 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x7fffeb7d7600 "mailmenu", csi=0x7fffeb7dade0,
    startup_dir=0x0) at exec.cpp:779
    #12 0x00007ffff7181dee in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7dade0) at exec.cpp:1287
    #13 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x75a44e "mainmenu", csi=0x759d08,
    startup_dir=0x7ffff72a911b "") at exec.cpp:779
    #14 0x00007ffff7282640 in sbbs_t::external (this=0x74d4f0, cmdline=0x75a44d "*mainmenu", mode=2,
    startup_dir=0x7ffff72a911b "") at xtrn.cpp:1327
    #15 0x00007ffff71f0adb in sbbs_t::logon (this=0x74d4f0) at logon.cpp:434
    #16 0x00007ffff7184478 in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7f57f0) at exec.cpp:1711
    ---Type <return> to continue, or q <return> to quit---
    #17 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x7fffeb7f5e50 "echtologin", csi=0x7fffeb7f9630,
    startup_dir=0x0) at exec.cpp:779
    #18 0x00007ffff7181dee in sbbs_t::exec (this=0x74d4f0, csi=0x7fffeb7f9630) at exec.cpp:1287
    #19 0x00007ffff71800b4 in sbbs_t::exec_bin (this=0x74d4f0, cmdline=0x752c61 "login", csi=0x759d08, startup_dir=0x0)
    at exec.cpp:779
    #20 0x00007ffff7158c95 in sbbs_t::answer (this=0x74d4f0) at answer.cpp:418
    #21 0x00007ffff7203758 in node_thread (arg=0x74d4f0) at main.cpp:3899
    #22 0x00007ffff6681c1a in start_thread () from /lib64/libpthread.so.0
    #23 0x00007ffff5c462cd in clone () from /lib64/libc.so.6

    echto

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Digital Man@VERT to Echto on Sat Nov 5 21:01:34 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sat Nov 05 2011 12:10 pm

    Re: This crashes sbbs horribly
    By: Echto to Digital Man on Fri Nov 04 2011 09:55 am

    So I thought I would check for a string length of zero and then if
    false,
    continue on to the MAIL_SEND function and if true, abort. ...but
    this do es
    work. What I have added crashes sbbs when the mail_send function is
    call ed.
    do enter a correct username at the "Send mail to who? " prompt.

    I am using 3.15b (64) for linux.

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a

    Thanks, that back-trace made it a quick and simple fix. Do you think you can provide a bt for your other crash with MAIL_SEND too? :-)

    Thanks,


    digital man



    Synchronet "Real Fact" #75:

    Michael Swindell still has the "Synchronet Blimp" in his possession.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Echto@VERT/ECHTOBBS to Digital Man on Sun Nov 6 05:08:04 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Digital Man to Echto on Sat Nov 05 2011 21:01:34

    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sat Nov 05 2011 12:10 pm

    Re: This crashes sbbs horribly
    By: Echto to Digital Man on Fri Nov 04 2011 09:55 am

    So I thought I would check for a string length of zero and then if
    false,
    continue on to the MAIL_SEND function and if true, abort. ...but
    this do es
    work. What I have added crashes sbbs when the mail_send function i
    call ed.
    do enter a correct username at the "Send mail to who? " prompt.

    I am using 3.15b (64) for linux.

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a

    Thanks, that back-trace made it a quick and simple fix. Do you think you can provide a bt for your other crash with MAIL_SEND too? :-)

    Uhm... that was the back-trace from the MAIL_SEND crash. :) If I comment out the MAIL_SEND command in the code sbbs does not crash.

    echto

    ---
    ■ Synchronet ■ -=-= echto bbs =-=-
  • From Echto@VERT/ECHTOBBS to Digital Man on Sun Nov 6 05:10:03 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sun Nov 06 2011 05:08:04

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a

    Thanks, that back-trace made it a quick and simple fix. Do you think you provide a bt for your other crash with MAIL_SEND too? :-)

    Is the fix available? Possibly a diff file? :)

    echto


    ---
    ■ Synchronet ■ -=-= echto bbs =-=-
  • From Echto@VERT/ECHTOBBS to Digital Man on Sun Nov 6 05:14:47 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sun Nov 06 2011 05:10:03

    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sun Nov 06 2011 05:08:04

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a

    Thanks, that back-trace made it a quick and simple fix. Do you think y provide a bt for your other crash with MAIL_SEND too? :-)

    Is the fix available? Possibly a diff file? :)

    echto


    Nevermind. :) No coffee yet today. I grabbing the diff from cvs. thanks!
    I guess it is time to go raid the kitchen for some caffeine.

    echto

    ---
    ■ Synchronet ■ -=-= echto bbs =-=-
  • From Echto@VERT/ECHTOBBS to Digital Man on Sun Nov 6 05:25:34 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sun Nov 06 2011 05:08:04

    Thanks, that back-trace made it a quick and simple fix. Do you think you provide a bt for your other crash with MAIL_SEND too? :-)

    Uhm... that was the back-trace from the MAIL_SEND crash. :) If I comment o the MAIL_SEND command in the code sbbs does not crash.

    The fix resolved the MAIL_SEND crash. :) Thank you!

    echto

    ---
    ■ Synchronet ■ -=-= echto bbs =-=-
  • From Digital Man@VERT to Echto on Sun Nov 6 15:21:02 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sun Nov 06 2011 05:08 am

    Re: gdb back-trace - This crashes sbbs horribly
    By: Digital Man to Echto on Sat Nov 05 2011 21:01:34

    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sat Nov 05 2011 12:10 pm

    Re: This crashes sbbs horribly
    By: Echto to Digital Man on Fri Nov 04 2011 09:55 am

    So I thought I would check for a string length of zero and then
    if
    false,
    continue on to the MAIL_SEND function and if true, abort.
    ...but
    this do es
    work. What I have added crashes sbbs when the mail_send
    function i
    call ed.
    do enter a correct username at the "Send mail to who? " prompt.

    I am using 3.15b (64) for linux.

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a

    Thanks, that back-trace made it a quick and simple fix. Do you think you
    can
    provide a bt for your other crash with MAIL_SEND too? :-)

    Uhm... that was the back-trace from the MAIL_SEND crash. :) If I comment out the MAIL_SEND command in the code sbbs does not crash.

    Oh, okay. That's been fixed then. It's actually not a crash, but an assertion (not the same thing). If you run the release build instead of a debug build, do
    you have the same problem (you shouldn't)?

    digital man

    Synchronet "Real Fact" #50:
    Rob Swindell was introduced to BBSing in 1982 by his older brother, Dr. Seuss.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Digital Man@VERT to Echto on Sun Nov 6 15:22:12 2011
    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sun Nov 06 2011 05:10 am

    Re: gdb back-trace - This crashes sbbs horribly
    By: Echto to Digital Man on Sun Nov 06 2011 05:08:04

    (gdb) bt
    #0 0x00007ffff5ba6455 in raise () from /lib64/libc.so.6
    #1 0x00007ffff5ba7870 in abort () from /lib64/libc.so.6
    #2 0x00007ffff5be199b in ?? () from /lib64/libc.so.6
    #3 0x00007ffff5be6f66 in ?? () from /lib64/libc.so.6
    #4 0x00007ffff5bebcfc in free () from /lib64/libc.so.6
    #5 0x00007ffff5bd7465 in fclose () from /lib64/libc.so.6
    #6 0x00007ffff721d878 in sbbs_t::qwk_route (this=0x74d4f0, inaddr=0x7fffeb7d2a

    Thanks, that back-trace made it a quick and simple fix. Do you think
    you
    provide a bt for your other crash with MAIL_SEND too? :-)

    Is the fix available? Possibly a diff file? :)

    Here is the diff (removal of a single line):

    http://cvs.synchro.net/cgi-bin/viewcvs.cgi/src/sbbs3/qwk.cpp?r1=1.57&r2=1.58

    digital man

    Synchronet "Real Fact" #45:
    Synchronet External X/Y/ZMODEM protocol driver (SEXYZ) was introduced in 2005.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net