Skip to content

Commit

Permalink
Add zstd unsound both branches dead test
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Sep 25, 2023
1 parent 23a5d83 commit 810fab5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/regression/03-practical/31-zstd-cctxpool-blobs.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <stdlib.h>
#include <pthread.h>

struct ZSTD_CCtx_s {
int bmi2;
};

typedef struct ZSTD_CCtx_s ZSTD_CCtx;

typedef struct {
ZSTD_CCtx* cctx[1];
} ZSTDMT_CCtxPool;

void *t_fun(void *arg) {
return NULL;
}

int main() {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL); // enter multithreaded

ZSTDMT_CCtxPool* const cctxPool = calloc(1, sizeof(ZSTDMT_CCtxPool));
cctxPool->cctx[0] = malloc(sizeof(ZSTD_CCtx));
if (!cctxPool->cctx[0]) // TODO NOWARN
__goblint_check(1); // TODO reachable
else
__goblint_check(1); // TODO reachable
return 0;
}

0 comments on commit 810fab5

Please sign in to comment.