MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pf_create_poisoned

Function pf_create_poisoned

tests/test_pipeline_frozen.c:486–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484}
485
486static cbm_pipeline_frozen_status_t pf_create_poisoned(pf_fixture_t *f,
487 cbm_pipeline_frozen_t **out) {
488 CBMArena arena;
489 cbm_arena_init(&arena);
490 cbm_git_context_t git = pf_git(f);
491 char **fields[] = {&git.input_path, &git.worktree_root, &git.git_dir,
492 &git.git_common_dir, &git.canonical_root, &git.branch,
493 &git.branch_slug, &git.head_sha, &git.base_sha};
494 bool ok = true;
495 for (size_t i = 0; i < 9; ++i) {
496 *fields[i] = cbm_arena_strdup(&arena, *fields[i]);
497 if (!*fields[i])
498 ok = false;
499 }
500 cbm_pipeline_frozen_inputs_t in = pf_inputs(f, pf_config0, &git, NULL);
501 in.source_root = cbm_arena_strdup(&arena, f->source);
502 in.candidate_db_path = cbm_arena_strdup(&arena, f->db);
503 in.project = cbm_arena_strdup(&arena, PF_PROJECT);
504 in.config_bytes = cbm_arena_strdup(&arena, pf_config0);
505 ok = ok && in.source_root && in.candidate_db_path && in.project && in.config_bytes;
506 cbm_pipeline_frozen_status_t status =
507 ok ? cbm_pipeline_frozen_create(&in, out) : CBM_PIPELINE_FROZEN_OOM;
508 if (ok) {
509 for (size_t i = 0; i < 9; ++i)
510 memset(*fields[i], 0x5a, strlen(*fields[i]));
511 memset((void *)in.source_root, 0x5a, strlen(in.source_root));
512 memset((void *)in.candidate_db_path, 0x5a, strlen(in.candidate_db_path));
513 memset((void *)in.project, 0x5a, strlen(in.project));
514 memset((void *)in.config_bytes, 0x5a, in.config_len);
515 }
516 cbm_arena_destroy(&arena);
517 return status;
518}
519static bool pf_builtin_graph(const char *path) {
520 cbm_store_t *store = cbm_store_open_path_query(path);
521 if (!store)

Callers 1

Calls 6

pf_gitFunction · 0.85
pf_inputsFunction · 0.85
cbm_arena_initFunction · 0.50
cbm_arena_strdupFunction · 0.50
cbm_arena_destroyFunction · 0.50

Tested by

no test coverage detected