Anti-AIClone

Log date · Thu

How does KLEECopilot guide symbolic execution?

KLEECopilot guides KLEE toward suspicious code and loop exits; exploration order matters when the budget is limited.

How can KLEECopilot help find bugs?

KLEECopilot uses a language model to mark suspicious code, then guides KLEE toward relevant paths and loop exits. It helps allocate a search budget; it cannot guarantee that every bug is found. The paper’s abstract reports 42.24% higher basic-block coverage and 125.82% higher line coverage against baselines including Empc, with 1,335 violations, 87 unique. [1]

Our own small concrete-path queue illustrates the budget problem: with three steps, loop-first did not reach the target, while exit-first reached it on step one. This Clang-compiled scheduling illustration is not a test of KLEE or KLEECopilot, or a replication of the paper.

Paper and illustration
QuestionFinding
What does the paper propose?Suspicious-code marking and loop-exit priority.
What happened in three steps?Loop-first missed the target; exit-first reached it on step one.
Do the paper’s numbers transfer?No; they belong to the paper’s evaluation.

The search problem in the paper

The paper’s v1 was submitted to arXiv on 23 July 2026 at 10:54 UTC. Its authors explain that repeated branching in loops can consume an exploration budget before code beyond them is examined. KLEECopilot combines model-produced indications of potentially vulnerable locations with loop-exit prioritization. [1]

The abstract also reports sensitivity to model family and only marginal sensitivity to model scale. Coverage and violation counts are different measures: more coverage does not automatically mean more exploitable defects. Each reported violation still needs deduplication, reproduction and impact assessment. The current arXiv page displays the later v2; the submission time above refers to v1. [1]

The KLEE project describes it as a dynamic symbolic execution engine built on LLVM. Its tutorial uses symbolic input and LLVM bitcode to generate tests, and notes that larger programs can leave paths incomplete under time or memory limits. [2][3] Those constraints make exploration order consequential.

Two orders under the same budget

We wrote five prearranged depth choices. Depth zero stands for reaching a target after a loop; the other values stand for loop branches. The program takes only the first three. Both variants use the same choices and budget and differ only in order. There is no solver, real loop state or vulnerability here; the result follows from the chosen queues.

The two queues in our sample.
const int loop_first[] = {4, 3, 2, 1, 0};
const int exit_first[] = {0, 4, 3, 2, 1};
Contiguous excerpt from the transcript.
loop-first
step=1 depth=4 loop-branch
step=2 depth=3 loop-branch
step=3 depth=2 loop-branch
== same budget, exit first ==
exit-first
step=1 depth=0 target-reached
step=2 depth=4 loop-branch
step=3 depth=3 loop-branch

If the budget allowed all five choices, both queues would reach the target. Under this three-step limit, ordering changes what is seen within the budget. In real analysis, safety is not known in advance, and exit priority can defer a defect inside the loop. Track target reachability, coverage, incomplete paths and elapsed time together instead of relying on one hit.

Recommendations for evaluation

These are engineering recommendations, not benefits measured by our toy comparison. Fix the target and budget before comparing a baseline with a new strategy.

Recommendations by case
QuestionFinding
Native code handling external inputBuild a repeatable harness and input constraints first.
Loops consume the budgetCompare search orders and coverage inside and beyond loops.
Evaluating model guidanceRecord model, prompt, versions, budget and markings.
A violation is reportedSave and replay the input, deduplicate, fix and regress.

Keep the program revision, input model, environment, time and memory limits fixed; retain raw logs and generated tests. Re-evaluate after changing a model or prompt. Individual runs can vary with search order and environment, so repeat them and report the spread. The paper’s results do not directly establish performance on binary-only or obfuscated releases.

Run this on your own code

First reproduce our queue, then build a separate harness for a parser or protocol handler you own. Run these commands in the sample directory. The second and third commands change only the ordering; their output is in the experiment transcript.

Reproduce this comparison.
clang -std=c11 -Wall -Wextra -Werror -O0 schedule.c -o schedule
./schedule loop-first
./schedule exit-first

For KLEE, follow its tutorial to mark input symbolic, compile compatible LLVM bitcode, then inspect generated tests and incomplete paths. [2] Bound realistic input lengths for the actual entry point and retain boundary cases. Constraints that are too tight exclude real inputs; overly broad ones can waste the budget. Start with a small function and make its dependencies and environment repeatable.

For each report, add the generated input to a regression set, reproduce it in a normal build and assess the root cause. After fixing it, rerun the test and use the same regression set on the hardened or obfuscated build. No report is not proof of no defects; combine this with fuzzing, code review and release-build testing.

Your checklist

  • Build harnesses for native code that handles external input.
  • Record program revision, input constraints, and time and memory budgets.
  • Compare coverage inside and beyond loops and inspect incomplete paths.
  • Save model, prompt, markings, and generated tests.
  • Reproduce and fix violations; regress on hardened builds.

Primary sources

All sources and reproduction status ↗