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

Qiskit / qiskit / 27432567304
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: fix-for-loop-negative-indexset
DEFAULT BRANCH: main
Ran 12 Jun 2026 06:11PM UTC
Jobs 1
Files 947
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:40PM UTC coverage: 87.479% (-0.004%) from 87.483%
27432567304

push

github

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

* 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.

* Lower recursion limit

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

17 existing lines in 4 files now uncovered.

110775 of 126630 relevant lines covered (87.48%)

963694.93 hits per line

Coverage Regressions

Lines Coverage ∆ File
12
97.15
-0.48% crates/qasm2/src/parse.rs
3
91.52
0.26% crates/qasm2/src/lex.rs
1
90.36
0.0% crates/circuit/src/parameter/parameter_expression.rs
1
74.27
-0.04% crates/circuit/src/parameter/symbol_expr.rs
Jobs
ID Job ID Ran Files Coverage
1 27432567304.1 12 Jun 2026 06:11PM UTC 947
87.48
GitHub Action Run
Source Files on build 27432567304
  • Tree
  • List 947
  • Changed 8
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27432567304
  • 4d4c7a69 on github
  • Prev Build on gh-readonly-queue/main/pr-16228-3f269fe0c6a860dc871d08d780a7d3f059bc3e96 (#27417302793)
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