Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault in group peer name change handler with latest toxcore master #1278

Open
zugz opened this issue Sep 5, 2018 · 0 comments
Open

segfault in group peer name change handler with latest toxcore master #1278

zugz opened this issue Sep 5, 2018 · 0 comments

Comments

@zugz
Copy link

zugz commented Sep 5, 2018

Overview

  1. uTox version: 951234f
  2. Operating system: Linux
  3. Desktop Environment/Window Manager (Linux/BSD only): dwm

Issue

Testing utox with latest c-toxcore master (1b232228), which includes some changes to groups, I encountered a segfault which I have not managed to reproduce.

It happened like this.

  • I made a friend request to my utox user from a toxic client running on the same machine;
  • I accepted the friend request in utox
  • in toxic, I invited the utox friend to a group
  • utox crashed, with the output pasted at the end of this report.

As far as I can see, this must be a matter of toxcore newly tickling a bug in utox, rather than a bug in toxcore. I may be wrong. I looked a little into the utox handler for name changes, and I could see nothing amiss.

I recognise that this isn't the most useful bug report! But maybe someone has a theory what might have caused this?

XLib Tray:    Incoming tray window event (28)
XLib tray:    Reached end of function, this is bad juju!
AL lib: (WW) alcCloseDevice: Releasing context 0xb200f040
FileTransfer: We know nothing of this file. This is probably an error. Friend(1) FileNum(65536)
NATIVE:       Unable to delete file!
                /home/zugz/.config/tox/avatars/2182[...].png
get_group:     index: 0 is out of bounds.
ASAN:SIGSEGV
=================================================================
==17631==ERROR: AddressSanitizer: SEGV on unknown address 0xb4100000 (pc 0xb6b80bfd sp 0xaddfadf0 bp 0xffffffff T3)
    #0 0xb6b80bfc in TT_RunIns (/usr/lib/i386-linux-gnu/libfreetype.so.6+0x22bfc)
    #1 0xb6b6695d (/usr/lib/i386-linux-gnu/libfreetype.so.6+0x895d)
    #2 0xb6b83b40 (/usr/lib/i386-linux-gnu/libfreetype.so.6+0x25b40)
    #3 0xb6b8445c (/usr/lib/i386-linux-gnu/libfreetype.so.6+0x2645c)
    #4 0xb6b70e56 in FT_Load_Glyph (/usr/lib/i386-linux-gnu/libfreetype.so.6+0x12e56)
    #5 0xb6b71504 in FT_Load_Char (/usr/lib/i386-linux-gnu/libfreetype.so.6+0x13504)
    #6 0x80a4f87 in font_getglyph (/home/zugz/tmp/uTox/utox+0x80a4f87)
    #7 0x80b7974 in textwidth (/home/zugz/tmp/uTox/utox+0x80b7974)
    #8 0x806de0b in text_height (/home/zugz/tmp/uTox/utox+0x806de0b)
    #9 0x82e2614 in msgheight_group (/home/zugz/tmp/uTox/utox+0x82e2614)
    #10 0x82e275d in message_setheight.lto_priv.360 (/home/zugz/tmp/uTox/utox+0x82e275d)
    #11 0x82e297e in message_updateheight.lto_priv.361 (/home/zugz/tmp/uTox/utox+0x82e297e)
    #12 0x82e3409 in message_add (/home/zugz/tmp/uTox/utox+0x82e3409)
    #13 0x82e3ba3 in message_add_group (/home/zugz/tmp/uTox/utox+0x82e3ba3)
    #14 0x82ed21d in group_add_message (/home/zugz/tmp/uTox/utox+0x82ed21d)
    #15 0x82ee279 in group_peer_name_change (/home/zugz/tmp/uTox/utox+0x82ee279)
    #16 0x8278f88 in callback_group_peer_name_change (/home/zugz/tmp/uTox/utox+0x8278f88)
    #17 0xb722813b in tox_conference_peer_name_handler (/usr/local/lib/libtoxcore.so.2+0x3b13b)
    #18 0xb7223642 in setnick (/usr/local/lib/libtoxcore.so.2+0x36642)
    #19 0xb7225c0e in handle_send_peers (/usr/local/lib/libtoxcore.so.2+0x38c0e)
    #20 0xb7225d49 in handle_direct_packet (/usr/local/lib/libtoxcore.so.2+0x38d49)
    #21 0xb7226d70 in g_handle_packet (/usr/local/lib/libtoxcore.so.2+0x39d70)
    #22 0xb721a22d in handle_packet (/usr/local/lib/libtoxcore.so.2+0x2d22d)
    #23 0xb720e819 in handle_data_packet_core (/usr/local/lib/libtoxcore.so.2+0x21819)
    #24 0xb720ec32 in handle_packet_connection (/usr/local/lib/libtoxcore.so.2+0x21c32)  
    #25 0xb72101b2 in udp_handle_packet (/usr/local/lib/libtoxcore.so.2+0x231b2)
    #26 0xb71fa47c in networking_poll (/usr/local/lib/libtoxcore.so.2+0xd47c)
    #27 0xb722070b in do_messenger (/usr/local/lib/libtoxcore.so.2+0x3370b)
    #28 0xb7228efb in tox_iterate (/usr/local/lib/libtoxcore.so.2+0x3befb)
    #29 0x82888d2 in toxcore_thread (/home/zugz/tmp/uTox/utox+0x82888d2)
    #30 0xb729f51f (/usr/lib/i386-linux-gnu/libasan.so.1+0x5651f)
    #31 0xb7267077 (/usr/lib/i386-linux-gnu/libasan.so.1+0x1e077)
    #32 0xb6f6feca in start_thread (/lib/i386-linux-gnu/i686/cmov/libpthread.so.0+0x6eca)
    #33 0xb6a27d0d in clone (/lib/i386-linux-gnu/i686/cmov/libc.so.6+0xebd0d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ??:0 TT_RunIns
Thread T3 created by T0 here:
    #0 0xb726701f in pthread_create (/usr/lib/i386-linux-gnu/libasan.so.1+0x1e01f)
    #1 0x80ad05b in thread (/home/zugz/tmp/uTox/utox+0x80ad05b)
    #2 0x809330c in main (/home/zugz/tmp/uTox/utox+0x809330c)
    #3 0xb6955a62 in __libc_start_main (/lib/i386-linux-gnu/i686/cmov/libc.so.6+0x19a62)

==17631==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant