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

aio-libs / multidict / 24612615370 / 1
96%
master: 96%

Build:
DEFAULT BRANCH: master
Ran 18 Apr 2026 07:54PM UTC
Files 56
Run time 1s
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

18 Apr 2026 07:53PM UTC coverage: 96.772% (+0.02%) from 96.749%
24612615370.1

push

github

web-flow
fix format error that leads to segfaults (#1310)

<!-- Thank you for your contribution! -->

## What do these changes do?

This was based off a user-accessible segfault found by @devdanzin. Not
sure how this appeared out of nowhere but my best assumption it could've
been caused by developer fatigue or burn out. The reproducible seen in
this gist here
https://gist.github.com/devdanzin/a36588ae7e2b73f0d85f8a925fb13b3d is
not just limited to 3.14 but also 3.10 (which I have now recently tested
myself) so I've gone ahead and fixed it. Feel free to let me know if
this should somehow be added to pytest although IDK where to put it.
Originally was going to write this off as an ffmpeg fiasco but this does
not seem to be the case. Seems we might have couple of other sneaky bugs
to patch.

Reproducer from the gist brought here for reference
```python
"""Reproducer: multidict _err_cannot_fetch swapped format args — abort.

hashtable.h:1467-1475 passes (name, i) but format expects (i, name).
  %zd receives a char* → prints garbage number
  %s receives an int → dereferences integer as pointer → crash

No special setup required.
Tested: multidict 6.7.1, Python 3.14.
"""
from multidict import MultiDict

class BadItem:
    """Looks like a 2-element sequence but __getitem__ raises."""
    def __len__(self):
        return 2
    def __getitem__(self, i):
        raise RuntimeError("intentional getitem failure")

MultiDict([BadItem()])
# Expected: ValueError with proper error message
# Actual: Aborted (core dumped)
#   Assertion `!_PyErr_Occurred(tstate)' failed. 
```
## Are there changes in behavior for the user?

<!-- Outline any notable behaviour for the end users. -->

## Related issue number
> [!NOTE]
> This does not close this issue as there is still other information
about other bugs that have yet to be patched.

#1306 

<!-- Are there any issues opened that will be resolved by merging this
change? -->
<!-- Remember to prefix with 'Fixes' if it should close the i... (continued)

1233 of 1233 branches covered (100.0%)

Branch coverage included in aggregate %.

7760 of 8060 relevant lines covered (96.28%)

0.96 hits per line

Source Files on job MyPy - 24612615370.1
  • Tree
  • List 56
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24612615370
  • edb61e87 on github
  • Prev Job for on master (#24554257987.1)
  • Next Job for on master (#24614179601.1)
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