Skip to content

unpack inside createColPolygon with a bad number will freeze the server and cause memory leak #4263

@ArranTuna

Description

@ArranTuna

Describe the bug

Just run this and the server will freeze and memory usage will go up and up:

tbl = split("902.82,-939.72,904.83,-939.43,905.06,-945.88,917.76,-944.39,937.67,-943.21,937.22,-940.21,930.20,-940.73929.65,-931.94", ",")
createColPolygon("902.82", "-939.72", unpack(tbl))

Notice the second to last number is a bad number: -940.73929.65

Interestingly, if the defective number is at the end of the unpack you get this:

Bad argument @ 'createColPolygon' [Expected number, got non-convertible string]

Add back the -931.94 and you get the freeze.

Steps to reproduce

srun tbl = split("902.82,-939.72,904.83,-939.43,905.06,-945.88,917.76,-944.39,937.67,-943.21,937.22,-940.21,930.20,-940.73929.65,-931.94", ",")
srun createColPolygon("902.82", "-939.72", unpack(tbl))

Version

Latest (1.6-23243) server on Windows 10.

Additional context

No response

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions