Skip to content

r([]).sample(1e13) crashes server with huge malloc #6148

@srh

Description

@srh

Pretty self-explanatory.
rethinkdb(958,0x700009ebf000) malloc: *** mach_vm_map(size=240000000000000) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug rethinkdb: Memory allocation failed. This usually means that we have run out of RAM. Aborting.
Desired behavior is to behave like r([]).sample(1e12) and smaller values which on my machine produce [].

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions