-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add region interprocedural fixpoint error test
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SKIP PARAM: --set ana.activated[+] region | ||
// FIXPOINT | ||
#include<stdlib.h> | ||
#include<pthread.h> | ||
#include<goblint.h> | ||
|
||
typedef struct POOL_job_s { | ||
void *opaque; | ||
} POOL_job; | ||
|
||
typedef struct POOL_ctx_s { | ||
POOL_job *queue; | ||
} POOL_ctx; | ||
|
||
POOL_ctx* ctx_global; | ||
|
||
POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) | ||
{ | ||
POOL_ctx* ctx_create; | ||
ctx_create = (POOL_ctx*)malloc(sizeof(POOL_ctx)); | ||
ctx_create->queue = (POOL_job*)malloc(queueSize * sizeof(POOL_job)); | ||
|
||
int r; // rand | ||
if (r) | ||
ctx_global = ctx_create; // pretend escape | ||
return ctx_create; | ||
} | ||
|
||
int main() { | ||
while (1) { | ||
POOL_ctx *ctx_main; | ||
ctx_main = POOL_create(20, 10); | ||
} | ||
} |