Skip to content

OOM for record followed by other character. #15243

@sholderbach

Description

@sholderbach

Describe the bug

There is a memory leak/unterminated loop on the current main branch, but not in the released 0.102.0

Bisected down to #15023

How to reproduce

Will run out of memory

{a:b}/

will not run out of memory

{}/

For testing on Linux you can set the ulimit in a bash session to not wait for ever or having to manually kill

#!/usr/bin/env bash

# build untouched from the memory limit
cargo build
# 1 GB of virtual mem
ulimit -v 1024000
target/debug/nu -c "{a:b}/"

Expected behavior

Not going out of memory, still covering the spread operator edge cases from #15023

Configuration

key value
version 0.102.1
major 0
minor 102
patch 1
branch main
commit_hash 4779d69
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.83.0 (90b35a623 2024-11-26)
rust_channel 1.83.0-x86_64-unknown-linux-gnu
cargo_version cargo 1.83.0 (5ffbef321 2024-10-29)
build_time 2025-03-04 18:03:01 +01:00
build_rust_channel debug
allocator mimalloc
features default, sqlite, trash
installed_plugins formats 0.99.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:parserIssues related to parsingcategory:bugSomething isn't workingperformanceWork to make nushell quicker and use less resourcesstatus:needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions