Hello Benoit,
even if it would be a "forbidden action", Kamailio should not crash. Please open
an issue for this problem.
Thanks,
Henning
-----Original Message-----
From: Benoit Panizzon via sr-users <sr-users(a)lists.kamailio.org>
Sent: Tuesday, December 10, 2024 3:58 PM
To: sr-users(a)lists.kamailio.org
Cc: Benoit Panizzon <benoit.panizzon(a)imp.ch>
Subject: [SR-Users] segmentation fault when assigning xavp to another xavp (trying to
stack them)
Hi
version: kamailio 5.7.6 (x86_64/linux)
on Ubuntu from the:
http://deb.kamailio.org/kamailio57 repository
AOR alice has 4 contacts with q=0.5
AOR bob has 1 contact with q=0.5
I can reproduce a crash with this code snipplet:
xavp_rm("contact_stack");
# Make sure XAVP does not exist.
lookup("location", "sip:alice@example.com");
t_load_contacts(0);
# after this, $xavp(tm_contacts) has four elements
$xavp(contact_stack) = $xavp(tm_contacts);
# Store the four elements on my stack
# Verify, $xavp(contact_stack) now has four elements, copy successfull.
lookup("location", "sip:bob@example.com");
# after this, $xavp(tm_contacts) has one element
$xavp(tm_contacts) = $xavp(contact_stack);
# Append the four previously saved contact with the one in $xavp(tm_contacts)
if (!t_next_contacts()) {
xlog("L_INFO", "$cfg(route): ERROR NO CONTACTS LOADED
\n");
sl_send_reply("500", "Server Internal Error - Cannot get
contacts");
}
# Load contacts into destination set to parallel fork to five contacts.
=> segmentation fault!
Shall I open an issue on github or am I performing a forbidden action?
I'm doing some more test to find out where exactly the crash occurs.
I'm not sure if it happens when adding to tm_contacts of when calling
t_next_contacts.
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web
http://www.imp.ch
______________________________________________________
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users(a)lists.kamailio.org
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!