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

Qiskit / qiskit / 27432462323
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: fix-for-loop-negative-indexset
DEFAULT BRANCH: main
Ran 12 Jun 2026 06:07PM UTC
Jobs 1
Files 923
Run time 2min
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.89% (+0.003%) from 87.887%
27432462323

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%)

17 existing lines in 4 files now uncovered.

105220 of 119718 relevant lines covered (87.89%)

1006963.26 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
97.63
0.47% crates/qasm2/src/parse.rs
5
74.05
-0.2% crates/circuit/src/parameter/symbol_expr.rs
5
92.03
0.0% crates/qasm2/src/lex.rs
1
93.88
-0.18% crates/qasm2/src/expr.rs
Jobs
ID Job ID Ran Files Coverage
1 27432462323.1 12 Jun 2026 06:07PM UTC 923
87.89
GitHub Action Run
Source Files on build 27432462323
  • Tree
  • List 923
  • Changed 9
  • Source Changed 6
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27432462323
  • 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