Den4t left a comment (kamailio/kamailio#4151)
> What was the reasoning by changing the string memory to static and also
> passing str by value instead of reference? Is this also related to the crash
> fix?
Hi !
I think you mean this in ki_dlg_get_var_helper:
static str val;
This is because of natute of function get_dlg_varval, whiсh i reuse it to clone
dlg var in private pv buffer, we can't use here stack variable (without
static), because no garanty the stack is changed after return from
ki_dlg_get_var_helper (if I understood the question correctly), using
get_dlg_varref as before is unsafe, because of data under the pointer can be
changed in concurrent process.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4151#issuecomment-2669080330
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4151/c2669080...@github.com>
_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the
sender!