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 when receiving a MUC PM #1312

Closed
mdosch opened this issue Apr 13, 2020 · 1 comment
Closed

Segfault when receiving a MUC PM #1312

mdosch opened this issue Apr 13, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@mdosch
Copy link
Contributor

mdosch commented Apr 13, 2020

Profanity crashes with a segfault when receiving a MUC PM

Thread 1 "profanity" received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
65	../sysdeps/x86_64/multiarch/strlen-avx2.S: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1  0x00007ffff6c206df in __GI___strdup (s=0x0) at strdup.c:41
#2  0x00005555555b0c9d in win_print_history (window=0x55555cda8f20, message=0x55555cdd3180) at src/ui/window.c:1229
#3  0x00005555555ca294 in _chatwin_history (chatwin=0x55555cda8f20, 
    contact_barejid=0x5555556d7b50 "profanity@rooms.dismail.de") at src/ui/chatwin.c:504
#4  0x00005555555c9b23 in chatwin_incoming_msg (chatwin=0x55555cda8f20, message=0x55555ca86580, win_created=1)
    at src/ui/chatwin.c:296
#5  0x00005555555ab380 in _sv_ev_incoming_plain (chatwin=0x55555cda8f20, new_win=1, message=0x55555ca86580, logit=0)
    at src/event/server_events.c:612
#6  0x00005555555ab62a in sv_ev_incoming_carbon (message=0x55555ca86580) at src/event/server_events.c:816
#7  0x000055555559cac9 in _handle_carbons (stanza=0x55555cdbd400) at src/xmpp/message.c:1147
#8  0x000055555559cb6c in _handle_chat (stanza=0x55555cdbd400, is_mam=0) at src/xmpp/message.c:1173
#9  0x000055555559a7e7 in _message_handler (conn=0x555555d02200, stanza=0x55555cdbd400, userdata=0x555555fa34c0)
    at src/xmpp/message.c:169
#10 0x00007ffff6d64ebf in handler_fire_stanza (conn=conn@entry=0x555555d02200, stanza=stanza@entry=0x55555cdbd400)
    at src/handler.c:124
#11 0x00007ffff6d61a6b in _handle_stream_stanza (stanza=0x55555cdbd400, userdata=0x555555d02200) at src/conn.c:1181
#12 0x00007ffff6d6db0f in _end_element (userdata=0x555555fa53f0, name=<optimized out>) at src/parser_expat.c:190
#13 0x00007ffff5bbb8aa in doContent (parser=parser@entry=0x555555f22450, startTagLevel=startTagLevel@entry=0, 
    enc=<optimized out>, s=<optimized out>, end=<optimized out>, nextPtr=0x555555f22480, haveMore=1 '\001')
    at ../../src/lib/xmlparse.c:2845
#14 0x00007ffff5bbc57c in contentProcessor (parser=0x555555f22450, start=<optimized out>, end=<optimized out>, 
    endPtr=<optimized out>) at ../../src/lib/xmlparse.c:2444
#15 0x00007ffff5bbeb1c in XML_ParseBuffer (isFinal=0, len=<optimized out>, parser=0x555555f22450)
    at ../../src/lib/xmlparse.c:1893
#16 XML_ParseBuffer (parser=0x555555f22450, len=<optimized out>, isFinal=0) at ../../src/lib/xmlparse.c:1863
#17 0x00007ffff6d64794 in xmpp_run_once (ctx=0x555555fa34c0, timeout=10) at src/event.c:263
#18 0x00005555555935be in connection_check_events () at src/xmpp/connection.c:119
#19 0x0000555555592ac8 in session_process_events () at src/xmpp/session.c:256
#20 0x000055555558c294 in prof_run (log_level=0x555555647992 "INFO", account_name=0x0, config_file=0x0, log_file=0x0, theme_name=0x0) at src/profanity.c:129
#21 0x000055555561de73 in main (argc=1, argv=0x7fffffffe238) at src/main.c:180

Expected Behavior

No segfault.

Current Behavior

Segfault

Steps to Reproduce (for bugs)

  1. Receive a MUC PM

Context

Debian Bullseye (Testing)

Profanity, version 0.8.1dev.master.a800bfcb
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 - 2020 Michael Vetter <jubalh@iodoru.org>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.13.1-unknown)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (2.7.18rc1)
GTK icons: Enabled
@pasis
Copy link
Member

pasis commented Apr 13, 2020

Backtrace is similar to #1308. Maybe sql query again?

@jubalh jubalh self-assigned this Apr 13, 2020
@jubalh jubalh added the bug label Apr 13, 2020
@jubalh jubalh added this to the 0.9.0 milestone Apr 13, 2020
@jubalh jubalh closed this as completed in a42c2a1 Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants