报错的现象LOG:
CPU: 0 PID: 2121 Comm: httpd Tainted: P 4.1.52 #47
Hardware name: Broadcom-v8A (DT)
task: ffffffc01d9d2a40 ti: ffffffc01787c000 task.ti: ffffffc01787c000
PC is at 0x2172c
LR is at 0x21718
pc : [<000000000002172c>] lr : [<0000000000021718>] pstate: 60010010
sp : 00000000fffa7fd8
x12: 0000000000000000
x11: 0000000000000000 x10: 0000000000000a98
x9 : 00000000fffb375a x8 : 0000000000000000
x7 : 0000000000000000 x6 : 000000000006374f
x5 : 00000000fffb3764 x4 : 0000000000089000
x3 : 000000000000000c x2 : 0000000000000a0e
x1 : 000000000006374f x0 : 0000000000000007
问题所在
cmsLog_debug("enter cgisetvar varTable:%s type:%d",varTable,varTable[i].type);
varTable指针在定义赋了空指针,后面的判断中未继续赋值,log打印时就只用了空指针导致报错