Find the answer to your Linux question:
Results 1 to 2 of 2
I am trying to compile vnc reflector, SourceForge.net: VNC Reflector , from source on Ubuntu 8.10. Everything compiles successfully, but after someone connects I get the following output: Starting program: ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    1

    Arrow Debugging C Program

    I am trying to compile vnc reflector, SourceForge.net: VNC Reflector, from source on Ubuntu 8.10. Everything compiles successfully, but after someone connects I get the following output:

    Starting program: /usr/local/vnc_reflector/vncreflector -q -p pass -T 9 -f 3 -l 5900 hosts
    /usr/local/vnc_reflector/vncreflector: error opening log file (ignoring this error)
    29/03/09 22:22:44 + Starting VNC Reflector 1.2.4
    29/03/09 22:22:44 + Listening for host connections on port 5580
    29/03/09 22:22:59 + Accepted host connection from 192.168.1.25
    29/03/09 22:22:59 * Protocol sub-version does not match (ignoring)
    *** buffer overflow detected ***: /usr/local/vnc_reflector/vncreflector terminated
    ======= Backtrace: =========
    /lib/libc.so.6(__fortify_fail+0x37)[0x7f220efa5887]
    /lib/libc.so.6[0x7f220efa3750]
    /lib/libc.so.6[0x7f220efa2af9]
    /lib/libc.so.6(_IO_default_xsputn+0x96)[0x7f220ef1e236]
    /lib/libc.so.6(_IO_vfprintf+0x63b)[0x7f220eeedceb]
    /lib/libc.so.6(__vsprintf_chk+0x99)[0x7f220efa2b99]
    /lib/libc.so.6(__sprintf_chk+0x80)[0x7f220efa2ae0]
    /usr/local/vnc_reflector/vncreflector[0x403dc2]
    /usr/local/vnc_reflector/vncreflector[0x405457]
    /usr/local/vnc_reflector/vncreflector[0x402992]
    /lib/libc.so.6(__libc_start_main+0xe6)[0x7f220eec4466]
    /usr/local/vnc_reflector/vncreflector[0x401e29]
    ======= Memory map: ========
    [snip]
    7fff1785e000-7fff17873000 rw-p 7ffffffea000 00:00 0 [stack]
    7fff179ff000-7fff17a00000 r-xp 7fff179ff000 00:00 0 [vdso]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

    This happens ONLY when it is compiled with the -O2 flag. Otherwise, it appears to work fine. What is the best practice for debugging this? I have compiled the source with the -g flag and started it up in gdb, but I am not sure where to proceed from there. I was hoping to see some line numbers or something.

    Thanks in advance,
    -Gordon

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Try this GDB tutorial:

    gdb Tutorial

    Gerard4143
    Make mine Arch Linux

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...