openresty / openresty/lua-resty-string

the limit of luajit table ??

Open
#73 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
443
Forks
143
Avg merge
2h 31m
Merged PRs (30d)
1

Description

249577944 items is not very big at my In my opinion,but luajit just overflow , so whats the limit ?? Can be overcome ??

tb = table.new(249577944,0)
table overflow
stack traceback:
[C]: in function 'new'
stdin:1: in main chunk
[C]: at 0x004051e0

tb = {}
for i = 1, 449577944 do

tb[i] = "abcd"..i
end
PANIC: unprotected error in call to Lua API (stdin:2: table overflow
stack traceback:
stdin:2: in main chunk
[C]: at 0x004051e0)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the two reported LuaJIT cases using table.new and indexed insertion, then investigate the runtime's table-size limits and how table overflow is handled. Done means documenting the applicable limit and establishing whether a supported workaround or change is possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.