~/talk

Symbolic Execution Explained: Finding Bugs in Complex Code Paths

Talkat Sonar Summit 2026 · on Tuesday, 2026-03-03· [testing, security]
links:none on file
slides:none on file

Sonar’s static analyzer uses symbolic execution to simulate execution paths with symbolic ranges (e.g., remainder 0..9 or -9..0) and flags contradictions; it finds a real bug in .NET’s SqlMoney rounding where C#’s negative remainder in C# makes the “round up if remainder ≥ 5” branch unreachable. The engine produces a path map, reports the unreachable branch detected, and the issue is reported to the repo — the analyzer successfully exposes the root cause.

AI-written summary · about

  1. 0:00Introduction
  2. 0:27How Conditionals Create Alternate Code Execution Paths
  3. 1:03Using Symbolic Execution to Map Possible Code Paths
  4. 1:22Real Bug Example from the .NET Runtime
  5. 1:56SqlMoney Conversion and Rounding Logic Explained
  6. 3:01How Modulo Behavior Introduces a Hidden Bug
  7. 4:27Why C# Modulo Keeps the Negative Sign
  8. 4:47Example Demonstrating Incorrect Rounding Behavior
  9. 5:34Why This Type of Bug Is Hard to Detect
  10. 5:51Static Analyzer Detects Unreachable Code Paths
  11. 6:44How Symbolic Execution Works in Static Code Analysis
  12. 7:18Symbolic Values Represent Input Ranges
  13. 8:03Engine Simulates Different Execution Paths
  14. 8:47First Scenario: Positive Value Execution Path
  15. 9:18Remainder Range Becomes 0 to 9
  16. 10:07Branch Where Remainder Is Less Than 5
  17. 10:47Branch Where Remainder Is Greater Than or Equal to 5
  18. 11:17Inner Condition Always True in This Scenario
  19. 11:53Second Scenario: Negative Value Execution Path
  20. 13:15Negative Modulo Produces a Negative Remainder
  21. 13:52Why the Condition “Remainder ≥ 5” Becomes Impossible
  22. 14:22Missing Execution Scenario Reveals the Bug
  23. 15:15Analyzer Detects the Unreachable Code Path
  24. 16:16Root Cause: Negative Modulo Behavior in C#
  25. 16:33Static Analysis Also Detects Null Dereference Risks
  26. 16:45Detecting Index Out-of-Bounds Errors Automatically
  27. 16:56How Symbolic Execution Finds Subtle Software Bugs
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.