Skip to content

[BUG] EVAL "return _G" 0 leads to immediate panic #11030

@pragus

Description

@pragus

Describe the bug

redis-server crashes with message:

PANIC: unprotected error in call to Lua API (Script attempted to access nonexistent global variable 'err')

To reproduce

$ redis-cli -h localhost
localhost:6379> EVAL "return _G" 0
Error: Server closed the connection

Expected behavior

Server just returns error

Additional information

The problem reproduced on version 6.2 and 7.0.4 on x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions