I have compiled Kamailio with google ASAN module and faced issue where the string PV with NULL value cannot be copied.
Using GDB I found this function call triggers error when Google ASAN is used, value->s.s = NULL
, value->s.len = 0
memcpy(var->v.value.s.s, value->s.s, value->s.len);
Link
This happens only when ASAN is used.
Without ASAN same function call with the same values does not trigger an error.
In my test case this function called from lost/functions.c:1285
To compile with asan used extra flags
-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment
0(913407) INFO: {1 1 INVITE 1-455779@172.21.0.84} lost [functions.c:891]: lost_function(): ### LOST urn [urn:sip:911@3.236.25.254:5060]
0(913407) INFO: {1 1 INVITE 1-455779@172.21.0.84} lost [functions.c:983]: lost_function(): ### LOST loc [<112233445566@jim.com>]
0(913407) ERROR: {1 1 INVITE 1-455779@172.21.0.84} lost [utilities.c:336]: lost_get_content(): could not get XML node content
pv_svar.c:137:3: runtime error: null pointer passed as argument 2, which is declared to never be null
kamailio -v
current master, test 375f86b
Centos 8
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.