Skip to content
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

Segfault when using None as dict key in table_from() #137

Closed
kirillyar opened this issue Apr 29, 2020 · 1 comment · Fixed by #223
Closed

Segfault when using None as dict key in table_from() #137

kirillyar opened this issue Apr 29, 2020 · 1 comment · Fixed by #223
Milestone

Comments

@kirillyar
Copy link

Python 3.7.2

from lupa import LuaRuntime

lua_runtime = LuaRuntime()
lua_runtime.table_from({None: {}})

Output
python[27326]: segfault at 1 ip 0000000000000001 sp 00007ffe1475e9f8 error 14 in python[400000+290000]

@scoder
Copy link
Owner

scoder commented May 19, 2020

Confirmed. I guess None / null dict/table keys are not a good idea. PR welcome that prevents this case by checking for None explicitly while copying the items.

@scoder scoder added this to the 2.0 milestone Apr 3, 2023
@scoder scoder changed the title Segfault Segfault when using None as dict key in table_from() Apr 3, 2023
scoder pushed a commit that referenced this issue Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants