Skip to content

Reads returns a result with an exception set, leading to a SystemError #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gabe-sherman opened this issue May 3, 2025 · 1 comment
Closed

Comments

@gabe-sherman
Copy link

The below code raises a SystemError when provided with the following input. This indicates unexpected behavior, as the function returns with an error set, yet the return value is not NULL.

import hiredis
import sys

data = open(sys.argv[1], "rb").read().decode("utf-8")
r = hiredis.Reader()
r.feed(data)
r.gets()

Environment Info

Commit: 5b34a0e

POC File:

https://github.com/FuturesLab/POC/blob/main/hiredis-py/poc-02

To reproduce

python3 <filename>.py poc-02

Stack Trace

TypeError: unhashable type: 'dict'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "rep.py", line 7, in <module>
    r.gets()
SystemError: <class 'hiredis.ProtocolError'> returned a result with an exception set
@uglide
Copy link
Contributor

uglide commented May 9, 2025

@uglide uglide closed this as completed May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants