Skip to content

Comments

feat: add float/double comparison tracking to instrumentor#1045

Merged
kyakdan merged 1 commit intomainfrom
trace-floats-doubles
Feb 20, 2026
Merged

feat: add float/double comparison tracking to instrumentor#1045
kyakdan merged 1 commit intomainfrom
trace-floats-doubles

Conversation

@kyakdan
Copy link
Member

@kyakdan kyakdan commented Feb 18, 2026

Add support for tracing double and float compare instructions

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds float/double comparison tracing to Jazzer’s data-flow instrumentation so value profiling can learn from floating-point compares (including NaN and signed-zero edge cases).

Changes:

  • Extend the bytecode instrumentor to wrap DCMP* / FCMP* instructions and report raw float/double bits via existing cmp tracing.
  • Add runtime callback wrappers for float/double compare semantics (NaN handling, signed zero) and extend generic comparison tracing to include Float/Double.
  • Add/update tests (instrumentation golden expectations, runtime semantics tests, and a new fuzz target) plus update docs to reflect new cmp coverage.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/src/test/java/com/example/FloatDoubleCmpFuzzer.java New fuzz target validating float/double compare tracking under value profiling.
tests/BUILD.bazel Registers the new fuzz target test with value profile enabled.
src/test/java/com/code_intelligence/jazzer/runtime/TraceCmpHooksTest.java Adds unit tests asserting wrapper semantics for float/double compares.
src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTest.kt Updates expected callback traces to include float/double comparisons (incl. NaN/signed zero).
src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTarget.java Adds float/double comparison cases to exercise new instrumentation paths.
src/test/java/com/code_intelligence/jazzer/instrumentor/MockTraceDataFlowCallbacks.java Adds mock wrappers for float/double compare instrumentation used by tests.
src/main/java/com/code_intelligence/jazzer/runtime/TraceDataFlowNativeCallbacks.java Implements float/double wrapper callbacks and extends generic comparison tracing.
src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java Adds hooks for Float/Double compare/compareTo to trace operand bits.
src/main/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentor.kt Instruments DCMP*/FCMP* and refines IF* skip logic for wrapped compares.
docs/advanced.md Documents cmp tracing support for float/double.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kyakdan kyakdan force-pushed the trace-floats-doubles branch 2 times, most recently from bc07a12 to 5a24cb0 Compare February 18, 2026 19:58
Copy link
Contributor

@oetr oetr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kyakdan kyakdan force-pushed the trace-floats-doubles branch from 5a24cb0 to 703cba3 Compare February 20, 2026 15:41
@kyakdan kyakdan enabled auto-merge (rebase) February 20, 2026 15:41
@kyakdan kyakdan merged commit 305c6e2 into main Feb 20, 2026
9 checks passed
@kyakdan kyakdan deleted the trace-floats-doubles branch February 20, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants