counters: threadvar init func

Add initializion.

Also fixes DetectDsizeIcmpv6Test01 using two different ThreadVar
structs.
pull/14398/head
Victor Julien 11 months ago
parent 6c77c8f371
commit 70096873ce

@ -278,9 +278,9 @@ static int AlertFastLogTest01(void)
uint16_t buflen = strlen((char *)buf);
Packet *p = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -296,6 +296,7 @@ static int AlertFastLogTest01(void)
"Classtype:unknown; sid:1;)");
SigGroupBuild(de_ctx);
DetectEngineThreadCtx *det_ctx;
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
@ -316,9 +317,9 @@ static int AlertFastLogTest02(void)
uint16_t buflen = strlen((char *)buf);
Packet *p = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
@ -335,6 +336,7 @@ static int AlertFastLogTest02(void)
"Classtype:unknown; sid:1;)");
SigGroupBuild(de_ctx);
DetectEngineThreadCtx *det_ctx;
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);

@ -3164,6 +3164,7 @@ static int AppLayerProtoDetectTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacket(NULL, 0, IPPROTO_TCP);
@ -3260,6 +3261,7 @@ static int AppLayerProtoDetectTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacketSrcDstPorts(http_buf1, http_buf1_len, IPPROTO_TCP, 12345, 88);
@ -3350,6 +3352,7 @@ static int AppLayerProtoDetectTest18(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacket(http_buf1, http_buf1_len, IPPROTO_TCP);
@ -3436,6 +3439,7 @@ static int AppLayerProtoDetectTest19(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacketSrcDstPorts(http_buf1, http_buf1_len, IPPROTO_TCP, 12345, 88);

@ -5536,6 +5536,7 @@ libhtp:\n\
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -379,6 +379,7 @@ static int ModbusParserTest03(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -512,6 +513,7 @@ static int ModbusParserTest05(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -581,6 +583,7 @@ static int ModbusParserTest06(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -650,6 +653,7 @@ static int ModbusParserTest07(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -720,6 +724,7 @@ static int ModbusParserTest08(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -931,6 +936,7 @@ static int ModbusParserTest11(void)
FAIL_IF(alp_tctx == NULL);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -999,6 +1005,7 @@ static int ModbusParserTest12(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -1159,6 +1166,7 @@ static int ModbusParserTest15(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1241,6 +1249,7 @@ static int ModbusParserTest16(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1420,6 +1429,7 @@ static int ModbusParserTest19(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -3552,6 +3552,7 @@ static int SMTPParserTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3686,6 +3687,7 @@ static int SMTPParserTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -1389,6 +1389,7 @@ void AppLayerDeSetupCounters(void)
memset(&pq, 0, sizeof(PacketQueueNoLock)); \
memset(&f, 0, sizeof(Flow)); \
memset(&tv, 0, sizeof(ThreadVars)); \
StatsThreadInit(&tv); \
memset(&tcph, 0, sizeof(TCPHdr)); \
\
FLOW_INITIALIZE(&f); \

@ -1108,6 +1108,24 @@ static void CountersIdHashFreeFunc(void *data)
SCFree(data);
}
static int StatsThreadSetupPublic(StatsPublicThreadContext *pctx)
{
size_t array_size = pctx->curr_id + 1;
pctx->pc_array = SCCalloc(array_size, sizeof(StatsCounter *));
if (pctx->pc_array == NULL) {
return -1;
}
for (StatsCounter *pc = pctx->head; pc != NULL; pc = pc->next) {
BUG_ON(pctx->pc_array[pc->id] != NULL);
pctx->pc_array[pc->id] = pc;
}
pctx->copy_of_private = SCCalloc(array_size, sizeof(StatsLocalCounter));
if (pctx->copy_of_private == NULL) {
return -1;
}
return 0;
}
/** \internal
* \brief Adds a TM to the clubbed TM table. Multiple instances of the same TM
@ -1156,19 +1174,7 @@ static int StatsThreadRegister(const char *thread_name, StatsPublicThreadContext
pc = pc->next;
}
size_t array_size = pctx->curr_id + 1;
pctx->pc_array = SCCalloc(array_size, sizeof(StatsCounter *));
if (pctx->pc_array == NULL) {
SCMutexUnlock(&stats_ctx->sts_lock);
return 0;
}
for (pc = pctx->head; pc != NULL; pc = pc->next) {
BUG_ON(pctx->pc_array[pc->id] != NULL);
pctx->pc_array[pc->id] = pc;
}
pctx->copy_of_private = SCCalloc(array_size, sizeof(StatsLocalCounter));
if (pctx->copy_of_private == NULL) {
if (StatsThreadSetupPublic(pctx) != 0) {
SCMutexUnlock(&stats_ctx->sts_lock);
return 0;
}
@ -1268,6 +1274,17 @@ int StatsSetupPrivate(ThreadVars *tv)
return 0;
}
static void StatsThreadInitPublic(StatsPublicThreadContext *pctx)
{
memset(pctx, 0x00, sizeof(*pctx));
SCSpinInit(&pctx->lock, 0);
}
void StatsThreadInit(ThreadVars *tv)
{
StatsThreadInitPublic(&tv->perf_public_ctx);
}
/**
* \brief the private stats store with the public stats store
*
@ -1393,7 +1410,7 @@ static StatsCounterId RegisterCounter(
static int StatsTestCounterReg02(void)
{
StatsPublicThreadContext pctx;
memset(&pctx, 0, sizeof(StatsPublicThreadContext));
StatsThreadInitPublic(&pctx);
StatsCounterId id = RegisterCounter(NULL, NULL, &pctx);
FAIL_IF_NOT(id.id == 0);
@ -1403,7 +1420,7 @@ static int StatsTestCounterReg02(void)
static int StatsTestCounterReg03(void)
{
StatsPublicThreadContext pctx;
memset(&pctx, 0, sizeof(StatsPublicThreadContext));
StatsThreadInitPublic(&pctx);
StatsCounterId id = RegisterCounter("t1", "c1", &pctx);
FAIL_IF_NOT(id.id == 1);
@ -1415,7 +1432,7 @@ static int StatsTestCounterReg03(void)
static int StatsTestCounterReg04(void)
{
StatsPublicThreadContext pctx;
memset(&pctx, 0, sizeof(StatsPublicThreadContext));
StatsThreadInitPublic(&pctx);
StatsCounterId c1 = RegisterCounter("t1", "c1", &pctx);
FAIL_IF_NOT(c1.id == 1);
@ -1434,12 +1451,12 @@ static int StatsTestGetCntArray05(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
FAIL_IF(c1.id != 1);
int r = StatsGetAllCountersArray(NULL, &tv.perf_private_ctx);
FAIL_IF_NOT(r == -1);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(&tv.perf_private_ctx);
StatsThreadCleanup(&tv);
PASS;
}
@ -1447,12 +1464,13 @@ static int StatsTestGetCntArray06(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
FAIL_IF(c1.id != 1);
StatsThreadSetupPublic(&tv.perf_public_ctx);
int r = StatsGetAllCountersArray(&tv.perf_public_ctx, &tv.perf_private_ctx);
FAIL_IF_NOT(r == 0);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(&tv.perf_private_ctx);
StatsThreadCleanup(&tv);
PASS;
}
@ -1460,11 +1478,13 @@ static int StatsTestCntArraySize07(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsPrivateThreadContext *pca = NULL;
StatsCounterId id1 = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
StatsCounterId id2 = RegisterCounter("t2", "c2", &tv.perf_public_ctx);
StatsThreadSetupPublic(&tv.perf_public_ctx);
StatsGetAllCountersArray(&tv.perf_public_ctx, &tv.perf_private_ctx);
pca = &tv.perf_private_ctx;
@ -1473,9 +1493,7 @@ static int StatsTestCntArraySize07(void)
FAIL_IF_NOT(pca->size == 2);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(pca);
StatsThreadCleanup(&tv);
PASS;
}
@ -1483,7 +1501,9 @@ static int StatsTestUpdateCounter08(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
StatsThreadSetupPublic(&tv.perf_public_ctx);
StatsGetAllCountersArray(&tv.perf_public_ctx, &tv.perf_private_ctx);
StatsPrivateThreadContext *pca = &tv.perf_private_ctx;
@ -1491,8 +1511,7 @@ static int StatsTestUpdateCounter08(void)
StatsAddUI64(&tv, c1, 100);
FAIL_IF_NOT(pca->head[c1.id].value == 101);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(pca);
StatsThreadCleanup(&tv);
PASS;
}
@ -1500,6 +1519,7 @@ static int StatsTestUpdateCounter09(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
RegisterCounter("t2", "c2", &tv.perf_public_ctx);
@ -1507,6 +1527,7 @@ static int StatsTestUpdateCounter09(void)
RegisterCounter("t4", "c4", &tv.perf_public_ctx);
StatsCounterId c5 = RegisterCounter("t5", "c5", &tv.perf_public_ctx);
StatsThreadSetupPublic(&tv.perf_public_ctx);
StatsGetAllCountersArray(&tv.perf_public_ctx, &tv.perf_private_ctx);
StatsPrivateThreadContext *pca = &tv.perf_private_ctx;
@ -1516,9 +1537,7 @@ static int StatsTestUpdateCounter09(void)
FAIL_IF_NOT(pca->head[c1.id].value == 0);
FAIL_IF_NOT(pca->head[c5.id].value == 101);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(pca);
StatsThreadCleanup(&tv);
PASS;
}
@ -1526,11 +1545,13 @@ static int StatsTestUpdateGlobalCounter10(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
StatsCounterId c2 = RegisterCounter("t2", "c2", &tv.perf_public_ctx);
StatsCounterId c3 = RegisterCounter("t3", "c3", &tv.perf_public_ctx);
StatsThreadSetupPublic(&tv.perf_public_ctx);
StatsGetAllCountersArray(&tv.perf_public_ctx, &tv.perf_private_ctx);
StatsPrivateThreadContext *pca = &tv.perf_private_ctx;
@ -1545,9 +1566,7 @@ static int StatsTestUpdateGlobalCounter10(void)
FAIL_IF_NOT(100 == tv.perf_public_ctx.copy_of_private[c2.id].value);
FAIL_IF_NOT(101 == tv.perf_public_ctx.copy_of_private[c3.id].value);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(pca);
StatsThreadCleanup(&tv);
PASS;
}
@ -1555,12 +1574,14 @@ static int StatsTestCounterValues11(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
StatsCounterId c2 = RegisterCounter("t2", "c2", &tv.perf_public_ctx);
StatsCounterId c3 = RegisterCounter("t3", "c3", &tv.perf_public_ctx);
StatsCounterId c4 = RegisterCounter("t4", "c4", &tv.perf_public_ctx);
StatsThreadSetupPublic(&tv.perf_public_ctx);
StatsGetAllCountersArray(&tv.perf_public_ctx, &tv.perf_private_ctx);
StatsPrivateThreadContext *pca = &tv.perf_private_ctx;
@ -1576,8 +1597,7 @@ static int StatsTestCounterValues11(void)
FAIL_IF_NOT(257 == tv.perf_public_ctx.copy_of_private[c3.id].value);
FAIL_IF_NOT(16843024 == tv.perf_public_ctx.copy_of_private[c4.id].value);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(pca);
StatsThreadCleanup(&tv);
PASS;
}

@ -147,6 +147,7 @@ void StatsCounterAvgAddI64(struct ThreadVars_ *tv, StatsCounterAvgId id, int64_t
/* utility functions */
uint64_t StatsGetLocalCounterValue(struct ThreadVars_ *, StatsCounterId);
void StatsThreadInit(struct ThreadVars_ *);
int StatsSetupPrivate(struct ThreadVars_ *);
void StatsThreadCleanup(struct ThreadVars_ *);

@ -373,6 +373,7 @@ static int DetectBase64DecodeTestDecode(void)
};
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;
@ -429,6 +430,7 @@ static int DetectBase64DecodeTestDecodeWithOffset(void)
char decoded[] = "Hello World";
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;
@ -488,6 +490,7 @@ static int DetectBase64DecodeTestDecodeLargeOffset(void)
};
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;
@ -545,6 +548,7 @@ static int DetectBase64DecodeTestDecodeRelative(void)
char decoded[] = "Hello World";
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;

@ -812,6 +812,7 @@ static int DetectByteMathPacket01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP,
@ -913,6 +914,7 @@ static int DetectByteMathPacket02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP, "192.168.1.5", "192.168.1.1", 41424, 53);

@ -1094,6 +1094,7 @@ static int DetectContentLongPatternMatchTest(uint8_t *raw_eth_pkt, uint16_t pkts
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth_pkt, pktsize);
@ -1904,6 +1905,7 @@ static int SigTestPositiveTestContent(const char *rule, uint8_t *buf)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
@ -2092,6 +2094,7 @@ static int SigTestNegativeTestContent(const char *rule, uint8_t *buf)
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);

@ -935,6 +935,7 @@ static int DetectCsumICMPV6Test01(void)
PacketCopyData(p, pkt, sizeof(pkt));
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
memset(&dtv, 0, sizeof(dtv));
StreamTcpInitConfig(true);

@ -638,6 +638,7 @@ static int DetectDceStubDataTestParse02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1187,6 +1188,7 @@ static int DetectDceStubDataTestParse03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1370,6 +1372,7 @@ static int DetectDceStubDataTestParse04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1655,6 +1658,7 @@ static int DetectDceStubDataTestParse05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -381,6 +381,7 @@ static int DetectDetectionFilterTestSig1(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacketReal(NULL, 0, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -438,6 +439,7 @@ static int DetectDetectionFilterTestSig2(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacketReal(NULL, 0, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -496,6 +498,7 @@ static int DetectDetectionFilterTestSig3(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacketReal(NULL, 0, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);

@ -588,20 +588,19 @@ static int DetectDsizeIcmpv6Test01(void)
Packet *p = PacketGetFromAlloc();
FAIL_IF_NULL(p);
ThreadVars tv;
DecodeThreadVars dtv;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&tv, 0, sizeof(ThreadVars));
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);
p->src.family = AF_INET6;
p->dst.family = AF_INET6;
DecodeIPV6(&tv, &dtv, p, raw_icmpv6, sizeof(raw_icmpv6));
DecodeIPV6(&th_v, &dtv, p, raw_icmpv6, sizeof(raw_icmpv6));
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);

@ -95,6 +95,7 @@ static int DcePayloadTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -178,6 +179,7 @@ static int DcePayloadTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -261,6 +263,7 @@ static int DcePayloadTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -343,6 +346,7 @@ static int DcePayloadTest18(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -425,6 +429,7 @@ static int DcePayloadTest19(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -507,6 +512,7 @@ static int DcePayloadTest20(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -645,6 +645,7 @@ static int PayloadTestSig13(void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);

@ -951,6 +951,7 @@ static int SigGroupHeadTest06(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacketSrcDst(NULL, 0, IPPROTO_ICMP, "192.168.1.1", "1.2.3.4");
FAIL_IF_NULL(p);

@ -467,6 +467,7 @@ static int DeStateSigTest01(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -554,6 +555,7 @@ static int DeStateSigTest02(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -666,6 +668,7 @@ static int DeStateSigTest03(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -750,6 +753,7 @@ static int DeStateSigTest04(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -831,6 +835,7 @@ static int DeStateSigTest05(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -915,6 +920,7 @@ static int DeStateSigTest06(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1000,6 +1006,7 @@ static int DeStateSigTest07(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1100,6 +1107,7 @@ static int DeStateSigTest08(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1230,6 +1238,7 @@ static int DeStateSigTest09(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1358,6 +1367,7 @@ static int DeStateSigTest10(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;

@ -714,6 +714,7 @@ static int DetectTagTestPacket02 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StorageCleanup();
StorageInit();
@ -818,6 +819,7 @@ static int DetectTagTestPacket03 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StorageCleanup();
StorageInit();
@ -937,6 +939,7 @@ static int DetectTagTestPacket04 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1057,6 +1060,7 @@ static int DetectTagTestPacket05 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1182,6 +1186,7 @@ static int DetectTagTestPacket06 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1303,6 +1308,7 @@ static int DetectTagTestPacket07 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);

@ -1040,6 +1040,7 @@ static int DetectFastPatternTest14(void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);

@ -1001,6 +1001,7 @@ static int DetectFlowSigTest01(void)
DecodeThreadVars dtv;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);

@ -1592,6 +1592,7 @@ static int FlowBitsTestSig06(void)
uint32_t idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(Flow));
memset(&flowvar, 0, sizeof(GenericVar));
@ -1666,6 +1667,7 @@ static int FlowBitsTestSig07(void)
uint32_t idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(Flow));
memset(&flowvar, 0, sizeof(GenericVar));
@ -1742,6 +1744,7 @@ static int FlowBitsTestSig08(void)
uint32_t idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(Flow));
memset(&flowvar, 0, sizeof(GenericVar));

@ -1115,6 +1115,7 @@ static int DetectFlowintTestPacket01Real(void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF(de_ctx == NULL);
@ -1188,6 +1189,7 @@ static int DetectFlowintTestPacket02Real(void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF(de_ctx == NULL);
@ -1264,6 +1266,7 @@ static int DetectFlowintTestPacket03Real(void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF(de_ctx == NULL);

@ -265,6 +265,7 @@ static int DetectFragOffsetMatchTest01 (void)
memset(&ip4h, 0, sizeof(IPV4Hdr));
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);

@ -574,6 +574,7 @@ static int HostBitsTestSig01(void)
DetectEngineCtx *de_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -676,6 +677,7 @@ static int HostBitsTestSig03(void)
int idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;

@ -297,6 +297,7 @@ static int DetectIcmpIdMatchTest01 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
p = UTHBuildPacket(NULL, 0, IPPROTO_ICMP);
p->l4.vars.icmpv4.id = htons(21781);
@ -372,6 +373,7 @@ static int DetectIcmpIdMatchTest02 (void)
memset(&ip4h, 0, sizeof(IPV4Hdr));
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);

@ -333,6 +333,7 @@ static int DetectICodeMatchTest01(void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket(NULL, 0, IPPROTO_ICMP);
FAIL_IF_NULL(p);

@ -1918,6 +1918,7 @@ static int DetectIPProtoTestSig2(void)
p->proto = 0;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));
@ -1970,6 +1971,7 @@ static int DetectIPProtoTestSig3(void)
p->proto = 0;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));

@ -358,6 +358,7 @@ static int DetectIPRepTest01(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -409,6 +410,7 @@ static int DetectIPRepTest02(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -460,6 +462,7 @@ static int DetectIPRepTest03(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -511,6 +514,7 @@ static int DetectIPRepTest04(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -563,6 +567,7 @@ static int DetectIPRepTest05(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -614,6 +619,7 @@ static int DetectIPRepTest06(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -665,6 +671,7 @@ static int DetectIPRepTest07(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -716,6 +723,7 @@ static int DetectIPRepTest08(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -768,6 +776,7 @@ static int DetectIPRepTest09(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -832,6 +841,7 @@ static int DetectIPRepTest10(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -881,6 +891,7 @@ static int DetectIPRepTest11(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);

@ -126,6 +126,7 @@ static int DetectL3protoTestSig1(void)
IPV4Hdr ip4h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->dst.family = AF_INET;
@ -186,6 +187,7 @@ static int DetectL3protoTestSig2(void)
IPV6Hdr ip6h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET6;
p->dst.family = AF_INET6;
@ -246,6 +248,7 @@ static int DetectL3protoTestSig3(void)
IPV6Hdr ip6h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET6;
p->dst.family = AF_INET6;

@ -834,6 +834,7 @@ static int LuaMatchTest01(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -955,6 +956,7 @@ static int LuaMatchTest01a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1076,6 +1078,7 @@ static int LuaMatchTest02(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1187,6 +1190,7 @@ static int LuaMatchTest02a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1297,6 +1301,7 @@ static int LuaMatchTest03(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1406,6 +1411,7 @@ static int LuaMatchTest03a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1513,6 +1519,7 @@ static int LuaMatchTest04(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1632,6 +1639,7 @@ static int LuaMatchTest04a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1744,6 +1752,7 @@ static int LuaMatchTest05(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1856,6 +1865,7 @@ static int LuaMatchTest05a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1975,6 +1985,7 @@ static int LuaMatchTest06(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2092,6 +2103,7 @@ static int LuaMatchTest06a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -4747,6 +4747,7 @@ static int SigTestBidirec04 (void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, rawpkt1_ether, sizeof(rawpkt1_ether));

@ -1726,6 +1726,7 @@ static int DetectPcreTxBodyChunksTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1875,6 +1876,7 @@ static int DetectPcreTxBodyChunksTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -199,6 +199,7 @@ static int DetectQuicCyuHashTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP, "192.168.1.5", "192.168.1.1", 41424, 443);

@ -197,6 +197,7 @@ static int DetectQuicCyuStringTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP, "192.168.1.5", "192.168.1.1", 41424, 443);

@ -238,6 +238,7 @@ int DetectReplaceLongPatternMatchTest(uint8_t *raw_eth_pkt, uint16_t pktsize,
ThreadVars th_v;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
if (pp == NULL) {

@ -479,6 +479,7 @@ static int DetectRpcTestSig01(void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket(buf, buflen, IPPROTO_UDP);

@ -118,6 +118,7 @@ static int DetectSameipSigTest01(void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
/* First packet has same IPs */
Packet *p1 = UTHBuildPacketSrcDst(buf, buflen, IPPROTO_TCP, "1.2.3.4", "1.2.3.4");

@ -187,6 +187,7 @@ static int DetectAckSigTest01(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
/* TCP w/ack=42 */

@ -574,6 +574,7 @@ static int DetectThresholdTestSig1(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -675,6 +676,7 @@ static int DetectThresholdTestSig2(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -745,6 +747,7 @@ static int DetectThresholdTestSig3(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
ThresholdInit();
Packet *p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -810,6 +813,7 @@ static int DetectThresholdTestSig4(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -884,6 +888,7 @@ static int DetectThresholdTestSig5(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -965,6 +970,7 @@ static int DetectThresholdTestSig6Ticks(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -1054,6 +1060,7 @@ static int DetectThresholdTestSig7(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1143,6 +1150,7 @@ static int DetectThresholdTestSig8(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1232,6 +1240,7 @@ static int DetectThresholdTestSig9(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1321,6 +1330,7 @@ static int DetectThresholdTestSig10(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1410,6 +1420,7 @@ static int DetectThresholdTestSig11(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1499,6 +1510,7 @@ static int DetectThresholdTestSig12(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1593,6 +1605,7 @@ static int DetectThresholdTestSig13(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
FAIL_IF_NULL(p);
@ -1665,6 +1678,7 @@ static int DetectThresholdTestSig14(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p1 = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
p2 = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "3.3.3.3", 1024, 80);
FAIL_IF_NULL(p1);

@ -464,6 +464,7 @@ static int DetectUrilenSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -539,4 +540,4 @@ void DetectUrilenRegisterTests(void)
UtRegisterTest("DetectUrilenSetpTest01", DetectUrilenSetpTest01);
UtRegisterTest("DetectUrilenSigTest01", DetectUrilenSigTest01);
}
#endif /* UNITTESTS */
#endif /* UNITTESTS */

@ -552,6 +552,7 @@ static int XBitsTestSig01(void)
DetectEngineCtx *de_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;

@ -31,10 +31,11 @@
extern thread_local uint32_t ut_inspection_recursion_counter;
#define TEST_HEADER \
ThreadVars tv; \
memset(&tv, 0, sizeof(tv)); \
Flow f; \
#define TEST_HEADER \
ThreadVars tv; \
memset(&tv, 0, sizeof(tv)); \
StatsThreadInit(&tv); \
Flow f; \
memset(&f, 0, sizeof(f));
#define TEST_RUN(buf, buflen, sig, match, steps) \

@ -121,6 +121,7 @@ static int RunTest (struct TestSteps *steps, const char *sig, const char *yaml)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -940,6 +941,7 @@ static int DetectHttpClientBodyTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1043,6 +1045,7 @@ static int DetectHttpClientBodyTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1165,6 +1168,7 @@ static int DetectHttpClientBodyTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1290,6 +1294,7 @@ static int DetectHttpClientBodyTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1415,6 +1420,7 @@ static int DetectHttpClientBodyTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1536,6 +1542,7 @@ static int DetectHttpClientBodyTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1635,6 +1642,7 @@ static int DetectHttpClientBodyTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1734,6 +1742,7 @@ static int DetectHttpClientBodyTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1835,6 +1844,7 @@ static int DetectHttpClientBodyTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2033,6 +2043,7 @@ static int DetectHttpClientBodyTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -63,6 +63,7 @@ static int DetectEngineHttpCookieTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -130,6 +131,7 @@ static int DetectEngineHttpCookieTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -197,6 +199,7 @@ static int DetectEngineHttpCookieTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -264,6 +267,7 @@ static int DetectEngineHttpCookieTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -331,6 +335,7 @@ static int DetectEngineHttpCookieTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -398,6 +403,7 @@ static int DetectEngineHttpCookieTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -465,6 +471,7 @@ static int DetectEngineHttpCookieTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -532,6 +539,7 @@ static int DetectEngineHttpCookieTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -599,6 +607,7 @@ static int DetectEngineHttpCookieTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -666,6 +675,7 @@ static int DetectEngineHttpCookieTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -734,6 +744,7 @@ static int DetectEngineHttpCookieTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -802,6 +813,7 @@ static int DetectEngineHttpCookieTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -870,6 +882,7 @@ static int DetectEngineHttpCookieTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -938,6 +951,7 @@ static int DetectEngineHttpCookieTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1006,6 +1020,7 @@ static int DetectEngineHttpCookieTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1074,6 +1089,7 @@ static int DetectEngineHttpCookieTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1142,6 +1158,7 @@ static int DetectEngineHttpCookieTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1240,6 +1257,7 @@ static int DetectHttpCookieSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1307,6 +1325,7 @@ static int DetectHttpCookieSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1370,6 +1389,7 @@ static int DetectHttpCookieSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1433,6 +1453,7 @@ static int DetectHttpCookieSigTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1496,6 +1517,7 @@ static int DetectHttpCookieSigTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1559,6 +1581,7 @@ static int DetectHttpCookieSigTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1622,6 +1645,7 @@ static int DetectHttpCookieSigTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1694,6 +1718,7 @@ static int DetectHttpCookieSigTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1785,6 +1810,7 @@ static int DetectHttpCookieSigTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -112,6 +112,7 @@ static int DetectHttpHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -213,6 +214,7 @@ static int DetectHttpHeaderTest07(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -311,6 +313,7 @@ static int DetectHttpHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -435,6 +438,7 @@ static int DetectHttpHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -560,6 +564,7 @@ static int DetectHttpHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -681,6 +686,7 @@ static int DetectHttpHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -780,6 +786,7 @@ static int DetectHttpHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -879,6 +886,7 @@ static int DetectHttpHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -973,6 +981,7 @@ static int DetectHttpHeaderTest28(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1058,6 +1067,7 @@ static int DetectHttpHeaderTest29(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1143,6 +1153,7 @@ static int DetectHttpHeaderTest30(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1255,6 +1266,7 @@ static int DetectEngineHttpHeaderTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1349,6 +1361,7 @@ static int DetectEngineHttpHeaderTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1443,6 +1456,7 @@ static int DetectEngineHttpHeaderTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1537,6 +1551,7 @@ static int DetectEngineHttpHeaderTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1631,6 +1646,7 @@ static int DetectEngineHttpHeaderTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1725,6 +1741,7 @@ static int DetectEngineHttpHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1819,6 +1836,7 @@ static int DetectEngineHttpHeaderTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1913,6 +1931,7 @@ static int DetectEngineHttpHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2007,6 +2026,7 @@ static int DetectEngineHttpHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2101,6 +2121,7 @@ static int DetectEngineHttpHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2195,6 +2216,7 @@ static int DetectEngineHttpHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2289,6 +2311,7 @@ static int DetectEngineHttpHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2383,6 +2406,7 @@ static int DetectEngineHttpHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2477,6 +2501,7 @@ static int DetectEngineHttpHeaderTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2571,6 +2596,7 @@ static int DetectEngineHttpHeaderTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2665,6 +2691,7 @@ static int DetectEngineHttpHeaderTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2759,6 +2786,7 @@ static int DetectEngineHttpHeaderTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2854,6 +2882,7 @@ static int DetectEngineHttpHeaderTest20(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2974,6 +3003,7 @@ static int DetectEngineHttpHeaderTest21(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3094,6 +3124,7 @@ static int DetectEngineHttpHeaderTest22(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3214,6 +3245,7 @@ static int DetectEngineHttpHeaderTest23(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3334,6 +3366,7 @@ static int DetectEngineHttpHeaderTest24(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3454,6 +3487,7 @@ static int DetectEngineHttpHeaderTest25(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3574,6 +3608,7 @@ static int DetectEngineHttpHeaderTest26(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3694,6 +3729,7 @@ static int DetectEngineHttpHeaderTest27(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3819,6 +3855,7 @@ static int DetectEngineHttpHeaderTest28(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3940,6 +3977,7 @@ static int DetectEngineHttpHeaderTest29(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4095,6 +4133,7 @@ static int DetectEngineHttpHeaderTest30(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4215,6 +4254,7 @@ static int DetectEngineHttpHeaderTest31(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4319,6 +4359,7 @@ static int DetectEngineHttpHeaderTest32(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4424,6 +4465,7 @@ static int DetectEngineHttpHeaderTest33(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4524,6 +4566,7 @@ static int DetectEngineHttpHeaderTest34(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4639,6 +4682,7 @@ static int DetectEngineHttpHeaderTest35(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -54,6 +54,7 @@ static int RunTest(const uint8_t *buf, const uint32_t size, const char *sig_str,
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -651,6 +652,7 @@ static int DetectHttpHHTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -741,6 +743,7 @@ static int DetectHttpHHTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -836,6 +839,7 @@ static int DetectHttpHHTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -933,6 +937,7 @@ static int DetectHttpHHTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1113,6 +1118,7 @@ static int DetectHttpHHTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1317,6 +1323,7 @@ static int DetectHttpHRHTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1432,6 +1439,7 @@ static int DetectHttpHRHTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1554,6 +1562,7 @@ static int DetectHttpHRHTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1676,6 +1685,7 @@ static int DetectHttpHRHTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1856,6 +1866,7 @@ static int DetectHttpHRHTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2044,6 +2055,7 @@ static int DetectHttpHRHTest37(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -63,6 +63,7 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -469,6 +470,7 @@ static int DetectHttpMethodSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -543,6 +545,7 @@ static int DetectHttpMethodSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -614,6 +617,7 @@ static int DetectHttpMethodSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -680,6 +684,7 @@ static int DetectHttpMethodSigTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -138,6 +138,7 @@ static int DetectEngineHttpRawHeaderTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -206,6 +207,7 @@ static int DetectEngineHttpRawHeaderTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -273,6 +275,7 @@ static int DetectEngineHttpRawHeaderTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -342,6 +345,7 @@ static int DetectEngineHttpRawHeaderTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -409,6 +413,7 @@ static int DetectEngineHttpRawHeaderTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -476,6 +481,7 @@ static int DetectEngineHttpRawHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -542,6 +548,7 @@ static int DetectEngineHttpRawHeaderTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -608,6 +615,7 @@ static int DetectEngineHttpRawHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -674,6 +682,7 @@ static int DetectEngineHttpRawHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -740,6 +749,7 @@ static int DetectEngineHttpRawHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -807,6 +817,7 @@ static int DetectEngineHttpRawHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -875,6 +886,7 @@ static int DetectEngineHttpRawHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -943,6 +955,7 @@ static int DetectEngineHttpRawHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1010,6 +1023,7 @@ static int DetectEngineHttpRawHeaderTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1077,6 +1091,7 @@ static int DetectEngineHttpRawHeaderTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1145,6 +1160,7 @@ static int DetectEngineHttpRawHeaderTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1212,6 +1228,7 @@ static int DetectEngineHttpRawHeaderTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1279,6 +1296,7 @@ static int DetectEngineHttpRawHeaderTest20(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1364,6 +1382,7 @@ static int DetectEngineHttpRawHeaderTest21(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1446,6 +1465,7 @@ static int DetectEngineHttpRawHeaderTest22(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1529,6 +1549,7 @@ static int DetectEngineHttpRawHeaderTest23(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1612,6 +1633,7 @@ static int DetectEngineHttpRawHeaderTest24(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1695,6 +1717,7 @@ static int DetectEngineHttpRawHeaderTest25(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1777,6 +1800,7 @@ static int DetectEngineHttpRawHeaderTest26(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1859,6 +1883,7 @@ static int DetectEngineHttpRawHeaderTest27(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1947,6 +1972,7 @@ static int DetectEngineHttpRawHeaderTest28(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2034,6 +2060,7 @@ static int DetectEngineHttpRawHeaderTest29(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2121,6 +2148,7 @@ static int DetectEngineHttpRawHeaderTest31(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2197,6 +2225,7 @@ static int DetectEngineHttpRawHeaderTest32(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2284,6 +2313,7 @@ static int DetectHttpRawHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2360,6 +2390,7 @@ static int DetectHttpRawHeaderTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2447,6 +2478,7 @@ static int DetectHttpRawHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2536,6 +2568,7 @@ static int DetectHttpRawHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2625,6 +2658,7 @@ static int DetectHttpRawHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2711,6 +2745,7 @@ static int DetectHttpRawHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2784,6 +2819,7 @@ static int DetectHttpRawHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2859,6 +2895,7 @@ static int DetectHttpRawHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -82,6 +82,7 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -865,6 +866,7 @@ static int DetectEngineHttpServerBodyFileDataTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2280,6 +2282,7 @@ static int DetectHttpServerBodyTest14(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2397,6 +2400,7 @@ static int DetectHttpServerBodyTest15(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2739,6 +2743,7 @@ static int DetectHttpServerBodyFileDataTest09(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2843,6 +2848,7 @@ static int DetectHttpServerBodyFileDataTest10(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -62,6 +62,7 @@ static int DetectEngineHttpStatCodeTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -147,6 +148,7 @@ static int DetectEngineHttpStatCodeTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -225,6 +227,7 @@ static int DetectEngineHttpStatCodeTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -314,6 +317,7 @@ static int DetectEngineHttpStatCodeTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -399,6 +403,7 @@ static int DetectEngineHttpStatCodeTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -484,6 +489,7 @@ static int DetectEngineHttpStatCodeTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -569,6 +575,7 @@ static int DetectEngineHttpStatCodeTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -654,6 +661,7 @@ static int DetectEngineHttpStatCodeTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -739,6 +747,7 @@ static int DetectEngineHttpStatCodeTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -825,6 +834,7 @@ static int DetectEngineHttpStatCodeTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -911,6 +921,7 @@ static int DetectEngineHttpStatCodeTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -997,6 +1008,7 @@ static int DetectEngineHttpStatCodeTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1083,6 +1095,7 @@ static int DetectEngineHttpStatCodeTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1169,6 +1182,7 @@ static int DetectEngineHttpStatCodeTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1255,6 +1269,7 @@ static int DetectEngineHttpStatCodeTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1335,6 +1350,7 @@ static int DetectHttpStatCodeSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1402,6 +1418,7 @@ static int DetectHttpStatCodeSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1476,6 +1493,7 @@ static int DetectHttpStatCodeSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1550,6 +1568,7 @@ static int DetectHttpStatCodeSigTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -62,6 +62,7 @@ static int DetectEngineHttpStatMsgTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -150,6 +151,7 @@ static int DetectEngineHttpStatMsgTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -229,6 +231,7 @@ static int DetectEngineHttpStatMsgTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -318,6 +321,7 @@ static int DetectEngineHttpStatMsgTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -403,6 +407,7 @@ static int DetectEngineHttpStatMsgTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -488,6 +493,7 @@ static int DetectEngineHttpStatMsgTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -573,6 +579,7 @@ static int DetectEngineHttpStatMsgTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -658,6 +665,7 @@ static int DetectEngineHttpStatMsgTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -743,6 +751,7 @@ static int DetectEngineHttpStatMsgTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -829,6 +838,7 @@ static int DetectEngineHttpStatMsgTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -915,6 +925,7 @@ static int DetectEngineHttpStatMsgTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1001,6 +1012,7 @@ static int DetectEngineHttpStatMsgTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1088,6 +1100,7 @@ static int DetectEngineHttpStatMsgTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1174,6 +1187,7 @@ static int DetectEngineHttpStatMsgTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1260,6 +1274,7 @@ static int DetectEngineHttpStatMsgTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1340,6 +1355,7 @@ static int DetectHttpStatMsgSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1413,6 +1429,7 @@ static int DetectHttpStatMsgSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1481,6 +1498,7 @@ static int DetectHttpStatMsgSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -56,6 +56,7 @@ static int DetectEngineHttpUATest(
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -443,6 +444,7 @@ static int DetectHttpUATest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -519,6 +521,7 @@ static int DetectHttpUATest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -609,6 +612,7 @@ static int DetectHttpUATest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -703,6 +707,7 @@ static int DetectHttpUATest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -796,6 +801,7 @@ static int DetectHttpUATest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -882,6 +888,7 @@ static int DetectHttpUATest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -953,6 +960,7 @@ static int DetectHttpUATest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1025,6 +1033,7 @@ static int DetectHttpUATest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1103,6 +1112,7 @@ static int DetectHttpUATest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));

@ -269,6 +269,7 @@ static int DetectTlsFingerprintTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -269,6 +269,7 @@ static int DetectTlsIssuerTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -266,6 +266,7 @@ static int DetectTlsSerialTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -269,6 +269,7 @@ static int DetectTlsSubjectTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -633,6 +633,7 @@ static int ValidityTestDetect01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -955,6 +956,7 @@ static int ExpiredTestDetect01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -1257,6 +1259,7 @@ static int ValidTestDetect01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -265,6 +265,7 @@ static int DetectTlsCertsTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));

@ -166,6 +166,7 @@ static int DetectTtlTestSig1(void)
IPV4Hdr ip4h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ip4h, 0, sizeof(ip4h));
p->src.family = AF_INET;

@ -144,6 +144,7 @@ static int SigTest03 (void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -177,6 +178,7 @@ static int SigTest04 (void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -210,6 +212,7 @@ static int SigTest05 (void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -250,6 +253,7 @@ static int SigTest06 (void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -317,6 +321,7 @@ static int SigTest07 (void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -384,6 +389,7 @@ static int SigTest08 (void)
memset(&f, 0, sizeof(Flow));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&ssn, 0, sizeof(ssn));
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -451,6 +457,7 @@ static int SigTest09 (void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -513,6 +520,7 @@ static int SigTest10 (void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -574,6 +582,7 @@ static int SigTest11 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -613,16 +622,16 @@ static int SigTest11 (void)
if (PacketAlertCheck(p, 1) && PacketAlertCheck(p, 2))
result = 1;
end:
FlowCleanupAppLayer(&f);
if (det_ctx)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
return result;
end:
FlowCleanupAppLayer(&f);
if (det_ctx)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
return result;
}
static int SigTest12 (void)
@ -636,6 +645,7 @@ static int SigTest12 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Flow f;
memset(&f, 0, sizeof(Flow));
@ -690,6 +700,7 @@ static int SigTest13 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Flow f;
memset(&f, 0, sizeof(Flow));
@ -741,6 +752,7 @@ static int SigTest14 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -787,6 +799,7 @@ static int SigTest15 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -841,6 +854,7 @@ static int SigTest16 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&p, 0, sizeof(p));
p = UTHBuildPacketSrcDstPorts((uint8_t *)buf, buflen, IPPROTO_TCP, 12345, 1234);
@ -894,6 +908,7 @@ static int SigTest17 (void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacketSrcDstPorts((uint8_t *)buf, buflen, IPPROTO_TCP, 12345, 80);
FAIL_IF_NULL(p);
@ -942,6 +957,7 @@ static int SigTest18 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -993,6 +1009,7 @@ static int SigTest19 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->src.addr_data32[0] = UTHSetIPv4Address("192.168.0.1");
p->dst.addr_data32[0] = UTHSetIPv4Address("1.2.3.4");
@ -1053,6 +1070,7 @@ static int SigTest20 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->src.addr_data32[0] = UTHSetIPv4Address("192.168.0.1");
p->dst.addr_data32[0] = UTHSetIPv4Address("1.2.3.4");
@ -1104,6 +1122,7 @@ static int SigTest21 (void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
@ -1180,6 +1199,7 @@ static int SigTest22 (void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
@ -1253,6 +1273,7 @@ static int SigTest23 (void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
@ -1351,6 +1372,7 @@ static int SigTest24IPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV4(p1, valid_raw_ipv4);
p1->src.family = AF_INET;
@ -1448,6 +1470,7 @@ static int SigTest25NegativeIPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV4(p1, valid_raw_ipv4);
p1->src.family = AF_INET;
@ -1548,6 +1571,7 @@ static int SigTest26TCPV4Keyword(void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1643,6 +1667,7 @@ static int SigTest26TCPV4AndNegativeIPV4Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1764,6 +1789,7 @@ static int SigTest26TCPV4AndIPV4Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1872,6 +1898,7 @@ static int SigTest27NegativeTCPV4Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1993,6 +2020,7 @@ static int SigTest28TCPV6Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetTCP(p1, (valid_raw_ipv6 + 54));
@ -2116,6 +2144,7 @@ static int SigTest29NegativeTCPV6Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetTCP(p1, valid_raw_ipv6 + 54);
@ -2231,6 +2260,7 @@ static int SigTest30UDPV4Keyword(void)
"\r\n\r\nyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV4(p1, raw_ipv4);
PacketSetUDP(p1, valid_raw_udp);
@ -2334,6 +2364,7 @@ static int SigTest31NegativeUDPV4Keyword(void)
"\r\n\r\nyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV4(p1, raw_ipv4);
PacketSetUDP(p1, valid_raw_udp);
@ -2442,6 +2473,7 @@ static int SigTest32UDPV6Keyword(void)
"\r\n\r\n";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetUDP(p1, valid_raw_ipv6 + 54);
@ -2538,6 +2570,7 @@ static int SigTest33NegativeUDPV6Keyword(void)
"\r\n\r\n";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetUDP(p1, valid_raw_ipv6 + 54);
@ -2651,6 +2684,7 @@ static int SigTest34ICMPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
IPV4Hdr *ip4h = PacketSetIPV4(p1, valid_raw_ipv4);
ip4h->ip_verhl = 69;
@ -2766,6 +2800,7 @@ static int SigTest35NegativeICMPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
IPV4Hdr *ip4h = PacketSetIPV4(p1, valid_raw_ipv4);
ip4h->ip_verhl = 69;
@ -2880,6 +2915,7 @@ static int SigTest38(void)
uint16_t buflen = sizeof(buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
/* Copy raw data into packet */
if (PacketCopyData(p1, raw_eth, ethlen) == -1) {
@ -3003,6 +3039,7 @@ static int SigTest39(void)
uint16_t buflen = sizeof(buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
Packet *p1 = PacketGetFromAlloc();
FAIL_IF_NULL(p1);
@ -3105,6 +3142,7 @@ static int SigTest36ContentAndIsdataatKeywords01 (void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));
@ -3185,6 +3223,7 @@ static int SigTest37ContentAndIsdataatKeywords02 (void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));
@ -3268,6 +3307,7 @@ static int SigTest40NoPacketInspection01(void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
memset(&pq, 0, sizeof(pq));
memset(&f, 0, sizeof(f));
memset(&tcphdr, 0, sizeof(tcphdr));
@ -3332,6 +3372,7 @@ static int SigTest40NoPayloadInspection02(void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = PacketGetFromAlloc();
FAIL_IF_NULL(p);
@ -3384,6 +3425,7 @@ static int SigTestMemory01 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -3422,6 +3464,7 @@ static int SigTestMemory02 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
if (de_ctx == NULL) {
@ -3456,6 +3499,7 @@ static int SigTestMemory03 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
if (de_ctx == NULL) {
@ -3498,6 +3542,7 @@ static int SigTestContent01 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3540,6 +3585,7 @@ static int SigTestContent02 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3591,6 +3637,7 @@ static int SigTestContent03 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3633,6 +3680,7 @@ static int SigTestContent04 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3677,6 +3725,7 @@ static int SigTestContent05 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3736,6 +3785,7 @@ static int SigTestContent06 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3877,6 +3927,7 @@ static int SigTestWithin01 (void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
@ -3953,6 +4004,7 @@ static int SigTestDepthOffset01 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
@ -3990,6 +4042,7 @@ static int SigTestDetectAlertCounter(void)
ThreadVars tv;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -4047,6 +4100,7 @@ static int SigTestDropFlow01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -4122,6 +4176,7 @@ static int SigTestDropFlow02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -4233,6 +4288,7 @@ static int SigTestDropFlow03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -4384,6 +4440,7 @@ static int SigTestPorts01(void)
uint8_t payload[] = "AAAAAAAAAAAAAAAAAA";
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
p1 = UTHBuildPacket(payload, sizeof(payload), IPPROTO_ICMP);
@ -4429,6 +4486,7 @@ static int SigTestBug01(void)
DetectEngineThreadCtx *det_ctx = NULL;
uint8_t payload[] = "!mymy";
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
Packet *p1 = UTHBuildPacket(payload, sizeof(payload), IPPROTO_TCP);
FAIL_IF_NULL(p1);

@ -951,7 +951,7 @@ ThreadVars *TmThreadCreate(const char *name, const char *inq_name, const char *i
goto error;
SC_ATOMIC_INIT(tv->flags);
SCSpinInit(&tv->perf_public_ctx.lock, 0);
StatsThreadInit(tv);
strlcpy(tv->name, name, sizeof(tv->name));

@ -2297,6 +2297,7 @@ static int SCACTileTest29(void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();

@ -1981,6 +1981,7 @@ static int SCACTest29(void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);

@ -2227,6 +2227,7 @@ static int SCHSTest29(void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();

@ -1536,6 +1536,7 @@ static int SCThresholdConfTest09(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
ThresholdInit();
@ -1633,6 +1634,7 @@ static int SCThresholdConfTest10(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1717,6 +1719,7 @@ static int SCThresholdConfTest11(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1823,6 +1826,7 @@ static int SCThresholdConfTest12(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1981,6 +1985,7 @@ static int SCThresholdConfTest14(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
FAIL_IF_NOT_NULL(g_ut_threshold_fp);
g_ut_threshold_fp = SCThresholdConfGenerateValidDummyFD11();
@ -2025,6 +2030,7 @@ static int SCThresholdConfTest15(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2074,6 +2080,7 @@ static int SCThresholdConfTest16(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2122,6 +2129,7 @@ static int SCThresholdConfTest17(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2394,6 +2402,7 @@ static int SCThresholdConfTest22(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
ThresholdInit();
@ -2532,6 +2541,7 @@ static int SCThresholdConfTest23(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
ThresholdInit();

@ -698,6 +698,7 @@ int UTHMatchPacketsWithResults(DetectEngineCtx *de_ctx, Packet **p, int num_pack
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
@ -736,6 +737,7 @@ int UTHMatchPackets(DetectEngineCtx *de_ctx, Packet **p, int num_packets)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
SCSigRegisterSignatureOrderingFuncs(de_ctx);
SCSigOrderSignatures(de_ctx);
SCSigSignatureOrderingModuleCleanup(de_ctx);
@ -776,6 +778,7 @@ int UTHPacketMatchSigMpm(Packet *p, char *sig, uint16_t mpm_type)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
if (mpm_type == MPM_AC) {
SCConfSet("mpm-algo", "ac");
@ -838,6 +841,7 @@ int UTHPacketMatchSig(Packet *p, const char *sig)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
if (de_ctx == NULL) {

Loading…
Cancel
Save