• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 27432489006
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: python-optional-quantum-info-crate
DEFAULT BRANCH: main
Ran 12 Jun 2026 06:09PM UTC
Jobs 1
Files 923
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jun 2026 05:38PM UTC coverage: 87.872% (-0.02%) from 87.887%
27432489006

push

github

web-flow
Fix stack-overflow segfault in OpenQASM 2 expression parsers (#16422)

* Fix stack-overflow segfault in OpenQASM 2 expression parsers

The current recursive implementation of the operator-precedence
expression parsers is susceptible to overflowing the stack on
excessively deep expressions.  The simplest way to trigger this is to
enter an arbitrary number of parentheses.

This patch puts a simple recursion-depth limit on the expression parser
to safely error out before it comes close to the stack depth.  We use
`sys.getrecursionlimit` on input simply as a compromise between not
wanting to define new keyword arguments in bugfix patches and still
wanting to allow some amount of control over the limit.

Future patches could consider replacing the recursive components of the
expression parser with iterative state-tracking parsing.  The outer
recursive-descent parser that handles the rest of the OpenQASM 2 grammar
has a bounded recursion depth by nature of the grammar it is parsing; it
is only the expression subparser that can reach arbitrary depths.

* Prepare Qiskit 2.4.2

* Lower recursion limit

28 of 28 new or added lines in 5 files covered. (100.0%)

26 existing lines in 5 files now uncovered.

105199 of 119718 relevant lines covered (87.87%)

1009595.43 hits per line

Coverage Regressions

Lines Coverage ∆ File
12
96.2
-0.95% crates/qasm2/src/parse.rs
6
74.09
-0.16% crates/circuit/src/parameter/symbol_expr.rs
6
91.0
-1.03% crates/qasm2/src/lex.rs
1
90.53
0.0% crates/circuit/src/parameter/parameter_expression.rs
1
80.0
-2.5% qiskit/version.py
Jobs
ID Job ID Ran Files Coverage
1 27432489006.1 12 Jun 2026 06:09PM UTC 923
87.87
GitHub Action Run
Source Files on build 27432489006
  • Tree
  • List 923
  • Changed 11
  • Source Changed 6
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27432489006
  • 5a1cf315 on github
  • Prev Build on gh-readonly-queue/stable/2.4/pr-16398-b75807b84298b7e851479e43c72cf883671a2b19 (#27215308696)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc