kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
March 2020
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
27 participants
474 discussions
Start a n
N
ew thread
git:5.2:1a142067: corex: check not in SHM before PKG free for path
by Henning Westerholt
05 Mar '20
05 Mar '20
Module: kamailio Branch: 5.2 Commit: 1a142067b04e41b98ce2f8d7f0946c2dcbd7914f URL:
https://github.com/kamailio/kamailio/commit/1a142067b04e41b98ce2f8d7f0946c2…
Author: Stefan Mititelu <stefan.mititelu92(a)gmail.com> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2020-03-05T12:45:41+01:00 corex: check not in SHM before PKG free for path Do the same for reset_path_vector() in core msg parser. (cherry picked from commit 395303dbb3572e57bd8d16bcbbfb29d6d54a60fe) ---
…
[View More]
Modified: src/core/parser/msg_parser.c Modified: src/modules/corex/corex_lib.c --- Diff:
https://github.com/kamailio/kamailio/commit/1a142067b04e41b98ce2f8d7f0946c2…
Patch:
https://github.com/kamailio/kamailio/commit/1a142067b04e41b98ce2f8d7f0946c2…
--- diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c index c220a5bb5c..0a8506e5a3 100644 --- a/src/core/parser/msg_parser.c +++ b/src/core/parser/msg_parser.c @@ -806,11 +806,14 @@ int set_path_vector(struct sip_msg* msg, str* path) void reset_path_vector(struct sip_msg* const msg) { - if (msg->path_vec.s) { - pkg_free(msg->path_vec.s); + if (!shm_address_in(msg->path_vec.s)) { + if (msg->path_vec.s) + pkg_free(msg->path_vec.s); + msg->path_vec.s = 0; + msg->path_vec.len = 0; + } else { + LM_WARN("Found path_vec that is not in pkg mem!\n"); } - msg->path_vec.s = 0; - msg->path_vec.len = 0; } diff --git a/src/modules/corex/corex_lib.c b/src/modules/corex/corex_lib.c index ec5334cb2e..3d3f73c0bd 100644 --- a/src/modules/corex/corex_lib.c +++ b/src/modules/corex/corex_lib.c @@ -63,11 +63,13 @@ int corex_append_branch(sip_msg_t *msg, str *uri, str *qv) msg->dst_uri.len = 0; /* if this is a cloned message, don't free the path vector as it was copied into shm memory and will be freed as contiguous block*/ - if (!(msg->msg_flags&FL_SHM_CLONE)) { - if(msg->path_vec.s!=0) + if (!shm_address_in(msg->path_vec.s)) { + if (msg->path_vec.s) pkg_free(msg->path_vec.s); msg->path_vec.s = 0; msg->path_vec.len = 0; + } else { + LM_WARN("Found path_vec that is not in pkg mem!\n"); } }
[View Less]
1
0
0
0
git:5.2:16b0801b: core: fix a crash in cfg parser related to invalid syntax cases
by Henning Westerholt
05 Mar '20
05 Mar '20
Module: kamailio Branch: 5.2 Commit: 16b0801ba6b25a5660f2ba30fef35e9cc81fe9c0 URL:
https://github.com/kamailio/kamailio/commit/16b0801ba6b25a5660f2ba30fef35e9…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2020-03-05T11:23:40+01:00 core: fix a crash in cfg parser related to invalid syntax cases (cherry picked from commit 54a0aeee9d30ee85045150d8ad5b75f7a4b71d15) --- Modified: src/core/cfg.y --- Diff:
https://github.com/
…
[View More]
kamailio/kamailio/commit/16b0801ba6b25a5660f2ba30fef35e9…
Patch:
https://github.com/kamailio/kamailio/commit/16b0801ba6b25a5660f2ba30fef35e9…
--- diff --git a/src/core/cfg.y b/src/core/cfg.y index 502ca92e0c..b26af8b4a3 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -2861,7 +2861,7 @@ rval_expr: rval { $$=$1; | rval_expr rve_cmpop rval_expr %prec GT { $$=mk_rve2( $2, $1, $3);} | rval_expr rve_equalop rval_expr %prec EQUAL_T { /* comparing with $null => treat as defined or !defined */ - if($3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR + if($3 != NULL && $3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR && $3->left.rval.v.pvs.type==PVT_NULL) { if($2==RVE_DIFF_OP || $2==RVE_IDIFF_OP || $2==RVE_STRDIFF_OP) {
[View Less]
1
0
0
0
git:5.3:15ff3bbb: core: fix a crash in cfg parser related to invalid syntax cases
by Henning Westerholt
05 Mar '20
05 Mar '20
Module: kamailio Branch: 5.3 Commit: 15ff3bbb0fb79c49f1913fa604680a4904251a50 URL:
https://github.com/kamailio/kamailio/commit/15ff3bbb0fb79c49f1913fa604680a4…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2020-03-05T11:23:16+01:00 core: fix a crash in cfg parser related to invalid syntax cases (cherry picked from commit 54a0aeee9d30ee85045150d8ad5b75f7a4b71d15) --- Modified: src/core/cfg.y --- Diff:
https://github.com/
…
[View More]
kamailio/kamailio/commit/15ff3bbb0fb79c49f1913fa604680a4…
Patch:
https://github.com/kamailio/kamailio/commit/15ff3bbb0fb79c49f1913fa604680a4…
--- diff --git a/src/core/cfg.y b/src/core/cfg.y index 3a0f0286a7..602d2f3330 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -2890,7 +2890,7 @@ rval_expr: rval { $$=$1; | rval_expr rve_cmpop rval_expr %prec GT { $$=mk_rve2( $2, $1, $3);} | rval_expr rve_equalop rval_expr %prec EQUAL_T { /* comparing with $null => treat as defined or !defined */ - if($3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR + if($3 != NULL && $3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR && $3->left.rval.v.pvs.type==PVT_NULL) { if($2==RVE_DIFF_OP || $2==RVE_IDIFF_OP || $2==RVE_STRDIFF_OP) {
[View Less]
1
0
0
0
git:master:1bbab692: ims_usrloc_scscf: extern declaration for duplicated global vars
by Daniel-Constantin Mierla
05 Mar '20
05 Mar '20
Module: kamailio Branch: master Commit: 1bbab692b749feee7f23a6c5c3fbee1ac890fffa URL:
https://github.com/kamailio/kamailio/commit/1bbab692b749feee7f23a6c5c3fbee1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-03-05T11:22:45+01:00 ims_usrloc_scscf: extern declaration for duplicated global vars --- Modified: src/modules/ims_usrloc_scscf/udomain.c --- Diff:
https://github.com/kamailio/kamailio/commit/
…
[View More]
1bbab692b749feee7f23a6c5c3fbee1…
Patch:
https://github.com/kamailio/kamailio/commit/1bbab692b749feee7f23a6c5c3fbee1…
--- diff --git a/src/modules/ims_usrloc_scscf/udomain.c b/src/modules/ims_usrloc_scscf/udomain.c index 080b790f34..361d5ba425 100644 --- a/src/modules/ims_usrloc_scscf/udomain.c +++ b/src/modules/ims_usrloc_scscf/udomain.c @@ -73,8 +73,8 @@ extern int unreg_validity; extern int db_mode; -struct contact_list* contact_list; -struct ims_subscription_list* ims_subscription_list; +extern struct contact_list* contact_list; +extern struct ims_subscription_list* ims_subscription_list; extern int subs_hash_size; extern int contact_delete_delay;
[View Less]
1
0
0
0
git:master:54a0aeee: core: fix a crash in cfg parser related to invalid syntax cases
by Henning Westerholt
05 Mar '20
05 Mar '20
Module: kamailio Branch: master Commit: 54a0aeee9d30ee85045150d8ad5b75f7a4b71d15 URL:
https://github.com/kamailio/kamailio/commit/54a0aeee9d30ee85045150d8ad5b75f…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2020-03-05T11:22:21+01:00 core: fix a crash in cfg parser related to invalid syntax cases --- Modified: src/core/cfg.y --- Diff:
https://github.com/kamailio/kamailio/commit/54a0aeee9d30ee85045150d8ad5b75f…
Patch:
…
[View More]
https://github.com/kamailio/kamailio/commit/54a0aeee9d30ee85045150d8ad5b75f…
--- diff --git a/src/core/cfg.y b/src/core/cfg.y index 23ab69ee08..6319f8b5b4 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -2893,7 +2893,7 @@ rval_expr: rval { $$=$1; | rval_expr rve_cmpop rval_expr %prec GT { $$=mk_rve2( $2, $1, $3);} | rval_expr rve_equalop rval_expr %prec EQUAL_T { /* comparing with $null => treat as defined or !defined */ - if($3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR + if($3 != NULL && $3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR && $3->left.rval.v.pvs.type==PVT_NULL) { if($2==RVE_DIFF_OP || $2==RVE_IDIFF_OP || $2==RVE_STRDIFF_OP) {
[View Less]
1
0
0
0
git:5.2:7916cb92: core: cfg.y - detect use of function call as parameter of another function
by Henning Westerholt
05 Mar '20
05 Mar '20
Module: kamailio Branch: 5.2 Commit: 7916cb92fdd12fce74dd6295890ea0bdb5ba36fd URL:
https://github.com/kamailio/kamailio/commit/7916cb92fdd12fce74dd6295890ea0b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2020-03-05T11:01:02+01:00 core: cfg.y - detect use of function call as parameter of another function - GH #2227 (cherry picked from commit 047fdebff732c847fcde5b066ce1acd5f6c2219a) --- Modified: src/core/cfg.y -
…
[View More]
-- Diff:
https://github.com/kamailio/kamailio/commit/7916cb92fdd12fce74dd6295890ea0b…
Patch:
https://github.com/kamailio/kamailio/commit/7916cb92fdd12fce74dd6295890ea0b…
--- diff --git a/src/core/cfg.y b/src/core/cfg.y index 3e4bafad97..502ca92e0c 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -3358,8 +3358,14 @@ cmd: } | CFG_RESET error { $$=0; yyerror("missing '(' or ')' ?"); } | CFG_RESET LPAREN error RPAREN { $$=0; yyerror("bad arguments, string expected"); } - | ID {mod_func_action = mk_action(MODULE0_T, 2, MODEXP_ST, NULL, NUMBER_ST, - 0); } LPAREN func_params RPAREN { + | ID { + if (mod_func_action != NULL) { + LM_ERR("function used inside params of another function: %s\n", $1); + yyerror("use of function execution inside params not allowed\n"); + exit(-1); + } + mod_func_action = mk_action(MODULE0_T, 2, MODEXP_ST, NULL, NUMBER_ST, 0); + } LPAREN func_params RPAREN { mod_func_action->val[0].u.data = find_export_record($1, mod_func_action->val[1].u.number, rt); if (mod_func_action->val[0].u.data == 0) { @@ -3383,6 +3389,7 @@ cmd: } $$ = mod_func_action; set_cfg_pos($$); + mod_func_action = NULL; } | ID error { yyerror("'('')' expected (function call)");} ;
[View Less]
1
0
0
0
git:5.2:46d156c1: core: cfg.y - init static global variables
by Henning Westerholt
05 Mar '20
05 Mar '20
Module: kamailio Branch: 5.2 Commit: 46d156c1da3fa466abebb8bf036807163ff7c90a URL:
https://github.com/kamailio/kamailio/commit/46d156c1da3fa466abebb8bf0368071…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2020-03-05T11:00:54+01:00 core: cfg.y - init static global variables (cherry picked from commit 8c5b92ee638a33e612e68cf85a1d37ab5e5d2c22) --- Modified: src/core/cfg.y --- Diff:
https://github.com/kamailio/
…
[View More]
kamailio/commit/46d156c1da3fa466abebb8bf0368071…
Patch:
https://github.com/kamailio/kamailio/commit/46d156c1da3fa466abebb8bf0368071…
--- diff --git a/src/core/cfg.y b/src/core/cfg.y index 9279171f20..3e4bafad97 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -136,21 +136,21 @@ extern char* yy_number_str; static void yyerror(char* s, ...); static void yyerror_at(struct cfg_pos* pos, char* s, ...); -static char* tmp; -static int i_tmp; -static struct socket_id* lst_tmp; -static struct name_lst* nl_tmp; -static int rt; /* Type of route block for find_export */ -static str* str_tmp; -static str s_tmp; -static struct ip_addr* ip_tmp; -static struct avp_spec* s_attr; +static char* tmp = NULL; +static int i_tmp = 0; +static struct socket_id* lst_tmp = NULL; +static struct name_lst* nl_tmp = NULL; +static int rt = 0; /* Type of route block for find_export */ +static str* str_tmp = NULL; +static str s_tmp = STR_NULL; +static struct ip_addr* ip_tmp = NULL; +static struct avp_spec* s_attr = NULL; static select_t sel; -static select_t* sel_ptr; -static pv_spec_t* pv_spec; -static struct action *mod_func_action; -static struct lvalue* lval_tmp; -static struct rvalue* rval_tmp; +static select_t* sel_ptr = NULL; +static pv_spec_t* pv_spec = NULL; +static struct action *mod_func_action = NULL; +static struct lvalue* lval_tmp = NULL; +static struct rvalue* rval_tmp = NULL; static void warn(char* s, ...); static void warn_at(struct cfg_pos* pos, char* s, ...); @@ -167,7 +167,7 @@ static struct socket_id* mk_listen_id2(struct name_lst*, int, int); static void free_name_lst(struct name_lst* lst); static void free_socket_id_lst(struct socket_id* i); -static struct case_stms* mk_case_stm(struct rval_expr* ct, int is_re, +static struct case_stms* mk_case_stm(struct rval_expr* ct, int is_re, struct action* a, int* err); static int case_check_type(struct case_stms* stms); static int case_check_default(struct case_stms* stms);
[View Less]
1
0
0
0
[kamailio/kamailio] Kamailio crash with invalid statement in configuration (#2227)
by Henning Westerholt
05 Mar '20
05 Mar '20
Kamailio crash with invalid statement in configuration. I already investigated several probable causes to some extend, but did not managed to find a fix yet. ``` $ cat ../etc/crash.cfg (note the capital "I" at the if-case, memdbg was just added for debugging) #!KAMAILIO
…
[View More]
memdbg=3 loadmodule "textops.so" request_route { Iif (is_method("CANCEL")) { exit; } } ``` henning@static:~/repositories/kamailio/src$ ./kamailio -L modules -Y /tmp -T -S -n 1 -D -m 16 -M 4 -f ../etc/crash.cfg -E 0(24666) ERROR: <core> [core/cfg.y:3403]: yyparse(): cfg. parser: failed to find command Iif (params 2) 0(24666) CRITICAL: <core> [core/cfg.y:3544]: yyerror_at(): parse error in config file /home/henning/repositories/kamailio/src/../etc/crash.cfg, line 7, column 26: unknown command, missing loadmodule? 0(24666) ERROR: <core> [core/cfg.y:3407]: yyparse(): free function 0x7fa138bc1d60 Segmentation fault ``` output from GDB, current git master: Program received signal SIGSEGV, Segmentation fault. 0x0000555555843e4e in rve_destroy (rve=0xc0c0c0c0) at core/rvalue.c:147 147 if (rve->op==RVE_RVAL_OP){ (gdb) bt #0 0x0000555555843e4e in rve_destroy (rve=0xc0c0c0c0) at core/rvalue.c:147 #1 0x00005555558447e1 in rve_destroy (rve=0x7ffff6c98738) at core/rvalue.c:168 #2 0x000055555599b031 in free_mod_func_action (a=0x7ffff6c97d60) at core/cfg.y:3997 #3 0x000055555599665b in yyparse () at core/cfg.y:3408 #4 0x000055555558fbd1 in main (argc=18, argv=0x7fffffffe378) at main.c:2309 (gdb) p rve->op Cannot access memory at address 0xc0c0c0c0 (gdb) p rve $1 = (struct rval_expr *) 0xc0c0c0c0 (gdb) f 1 #1 0x00005555558447e1 in rve_destroy (rve=0x7ffff6c98738) at core/rvalue.c:168 168 rve_destroy(rve->left.rve); (gdb) p rve->left $2 = {rve = 0xc0c0c0c0, rval = {type = 3233857728, refcnt = 0, v = {p = 0xabcdefed, l = 2882400237, s = {s = 0xabcdefed <error: Cannot access memory at address 0xabcdefed>, len = 0}, avps = {type = 2882400237, name = {n = 0, s = {s = 0x0, len = 0}, re = 0x0}, index = 8}, sel = {f = {0xabcdefed, 0x0, 0x0, 0x8}, param_offset = {0, 0, 3598392, 0, -154930224}, params = {{type = 1436524721, v = {i = 1436573777, s = {s = 0x555555a06051 "fragm. from qm_malloc", len = 1436524587}, p = 0x555555a06051}}, {type = 1260, v = { i = -252645136, s = {s = 0xf0f0f0f0 <error: Cannot access memory at address 0xf0f0f0f0>, len = 0}, p = 0xf0f0f0f0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}} <repeats 30 times>}, n = 0}, pvs = {type = 2882400237, getf = 0x0, setf = 0x0, pvp = {pvn = {type = 8, nfree = 0x0, u = {isname = {type = 3598392, name = {n = -154930224, s = {s = 0x7ffff6c3f3d0 "", len = 1436524721}, re = 0x7ffff6c3f3d0}}, dname = 0x36e838}}, pvi = {type = 1436573777, u = {ival = 1436524587, dval = 0x5555559fa02b}}}, trans = 0x4ec}, action = 0xabcdefed, bexpr = 0xabcdefed, re = {s = {s = 0xabcdefed <error: Cannot access memory at address 0xabcdefed>, len = 0}, regex = 0x0}}, bsize = 0, flags = 0, buf = ""}} (gdb) p rve $3 = (struct rval_expr *) 0x7ffff6c98738 (gdb) p *rve $4 = {op = 1129201987, left = {rve = 0xc0c0c0c0, rval = {type = 3233857728, refcnt = 0, v = {p = 0xabcdefed, l = 2882400237, s = {s = 0xabcdefed <error: Cannot access memory at address 0xabcdefed>, len = 0}, avps = {type = 2882400237, name = {n = 0, s = {s = 0x0, len = 0}, re = 0x0}, index = 8}, sel = {f = {0xabcdefed, 0x0, 0x0, 0x8}, param_offset = {0, 0, 3598392, 0, -154930224}, params = {{type = 1436524721, v = {i = 1436573777, s = {s = 0x555555a06051 "fragm. from qm_malloc", len = 1436524587}, p = 0x555555a06051}}, {type = 1260, v = {i = -252645136, s = {s = 0xf0f0f0f0 <error: Cannot access memory at address 0xf0f0f0f0>, len = 0}, p = 0xf0f0f0f0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}} <repeats 30 times>}, n = 0}, pvs = {type = 2882400237, getf = 0x0, setf = 0x0, pvp = {pvn = {type = 8, nfree = 0x0, u = {isname = {type = 3598392, name = {n = -154930224, s = {s = 0x7ffff6c3f3d0 "", len = 1436524721}, re = 0x7ffff6c3f3d0}}, dname = 0x36e838}}, pvi = { type = 1436573777, u = {ival = 1436524587, dval = 0x5555559fa02b}}}, trans = 0x4ec}, action = 0xabcdefed, bexpr = 0xabcdefed, re = {s = {s = 0xabcdefed <error: Cannot access memory at address 0xabcdefed>, len = 0}, regex = 0x0}}, bsize = 0, flags = 0, buf = ""}}, right = {rve = 0x0, rval = {type = RV_NONE, refcnt = 0, v = {p = 0x0, l = 0, s = {s = 0x0, len = 0}, avps = {type = 0, name = {n = 0, s = {s = 0x0, len = 0}, re = 0x0}, index = 0}, sel = {f = {0x0, 0x0, 0x0, 0x0}, param_offset = {0, 0, 0, 0, 0}, params = {{type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}} <repeats 32 times>}, n = 0}, pvs = {type = PVT_NONE, getf = 0x0, setf = 0x0, pvp = {pvn = {type = 0, nfree = 0x0, u = {isname = {type = 0, name = {n = 0, s = {s = 0x0, len = 0}, re = 0x0}}, dname = 0x0}}, pvi = {type = 0, u = {ival = 0, dval = 0x0}}}, trans = 0x0}, action = 0x0, bexpr = 0x0, re = {s = {s = 0x0, len = 0}, regex = 0x0}}, bsize = 0, flags = 0, buf = ""}}, fpos = {s_line = 0, e_line = 0, s_col = 0, e_col = 0, fname = 0x0, rname = 0x0}} (gdb) ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2227
[View Less]
2
6
0
0
git:5.3:c887e563: corex: check not in SHM before PKG free for path
by Stefan Mititelu
05 Mar '20
05 Mar '20
Module: kamailio Branch: 5.3 Commit: c887e56311ea77c2d0ded051e93e6b7729edbe24 URL:
https://github.com/kamailio/kamailio/commit/c887e56311ea77c2d0ded051e93e6b7…
Author: Stefan Mititelu <stefan.mititelu92(a)gmail.com> Committer: Stefan Mititelu <stefan.mititelu92(a)gmail.com> Date: 2020-03-05T10:26:38+02:00 corex: check not in SHM before PKG free for path Do the same for reset_path_vector() in core msg parser. (cherry picked from commit 3bdfec4a357b9d33787108bcf1b5840de343cbe9) --
…
[View More]
- Modified: src/core/parser/msg_parser.c Modified: src/modules/corex/corex_lib.c --- Diff:
https://github.com/kamailio/kamailio/commit/c887e56311ea77c2d0ded051e93e6b7…
Patch:
https://github.com/kamailio/kamailio/commit/c887e56311ea77c2d0ded051e93e6b7…
--- diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c index 91095bf574..ca0bf789c5 100644 --- a/src/core/parser/msg_parser.c +++ b/src/core/parser/msg_parser.c @@ -806,11 +806,14 @@ int set_path_vector(struct sip_msg* msg, str* path) void reset_path_vector(struct sip_msg* const msg) { - if (msg->path_vec.s) { - pkg_free(msg->path_vec.s); + if (!shm_address_in(msg->path_vec.s)) { + if (msg->path_vec.s) + pkg_free(msg->path_vec.s); + msg->path_vec.s = 0; + msg->path_vec.len = 0; + } else { + LM_WARN("Found path_vec that is not in pkg mem!\n"); } - msg->path_vec.s = 0; - msg->path_vec.len = 0; } diff --git a/src/modules/corex/corex_lib.c b/src/modules/corex/corex_lib.c index ec5334cb2e..3d3f73c0bd 100644 --- a/src/modules/corex/corex_lib.c +++ b/src/modules/corex/corex_lib.c @@ -63,11 +63,13 @@ int corex_append_branch(sip_msg_t *msg, str *uri, str *qv) msg->dst_uri.len = 0; /* if this is a cloned message, don't free the path vector as it was copied into shm memory and will be freed as contiguous block*/ - if (!(msg->msg_flags&FL_SHM_CLONE)) { - if(msg->path_vec.s!=0) + if (!shm_address_in(msg->path_vec.s)) { + if (msg->path_vec.s) pkg_free(msg->path_vec.s); msg->path_vec.s = 0; msg->path_vec.len = 0; + } else { + LM_WARN("Found path_vec that is not in pkg mem!\n"); } }
[View Less]
1
0
0
0
git:master:395303db: corex: check not in SHM before PKG free for path
by Stefan Mititelu
05 Mar '20
05 Mar '20
Module: kamailio Branch: master Commit: 395303dbb3572e57bd8d16bcbbfb29d6d54a60fe URL:
https://github.com/kamailio/kamailio/commit/395303dbb3572e57bd8d16bcbbfb29d…
Author: Stefan Mititelu <stefan.mititelu92(a)gmail.com> Committer: Stefan Mititelu <stefan.mititelu(a)enea.com> Date: 2020-03-05T10:25:18+02:00 corex: check not in SHM before PKG free for path Do the same for reset_path_vector() in core msg parser. --- Modified: src/core/parser/msg_parser.c Modified: src/modules/corex/
…
[View More]
corex_lib.c --- Diff:
https://github.com/kamailio/kamailio/commit/395303dbb3572e57bd8d16bcbbfb29d…
Patch:
https://github.com/kamailio/kamailio/commit/395303dbb3572e57bd8d16bcbbfb29d…
--- diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c index 91095bf574..ca0bf789c5 100644 --- a/src/core/parser/msg_parser.c +++ b/src/core/parser/msg_parser.c @@ -806,11 +806,14 @@ int set_path_vector(struct sip_msg* msg, str* path) void reset_path_vector(struct sip_msg* const msg) { - if (msg->path_vec.s) { - pkg_free(msg->path_vec.s); + if (!shm_address_in(msg->path_vec.s)) { + if (msg->path_vec.s) + pkg_free(msg->path_vec.s); + msg->path_vec.s = 0; + msg->path_vec.len = 0; + } else { + LM_WARN("Found path_vec that is not in pkg mem!\n"); } - msg->path_vec.s = 0; - msg->path_vec.len = 0; } diff --git a/src/modules/corex/corex_lib.c b/src/modules/corex/corex_lib.c index ec5334cb2e..3d3f73c0bd 100644 --- a/src/modules/corex/corex_lib.c +++ b/src/modules/corex/corex_lib.c @@ -63,11 +63,13 @@ int corex_append_branch(sip_msg_t *msg, str *uri, str *qv) msg->dst_uri.len = 0; /* if this is a cloned message, don't free the path vector as it was copied into shm memory and will be freed as contiguous block*/ - if (!(msg->msg_flags&FL_SHM_CLONE)) { - if(msg->path_vec.s!=0) + if (!shm_address_in(msg->path_vec.s)) { + if (msg->path_vec.s) pkg_free(msg->path_vec.s); msg->path_vec.s = 0; msg->path_vec.len = 0; + } else { + LM_WARN("Found path_vec that is not in pkg mem!\n"); } }
[View Less]
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
48
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Results per page:
10
25
50
100
200