Skip to content

ruvector-core-win32-x64-msvc OOM: ~4GB malloc crash in cache_optimized.rs::grow() #796

Description

@9802805

Summary

ruvector-core-win32-x64-msvc@0.1.29 crashes on Windows with a ~4GB memory allocation failure during initialization. Reproduced on both Node v22.23.2 and v24.18.1.

Error

Root Cause

In crates/ruvector-core/src/cache_optimized.rs, the grow() method uses unchecked multiplication when calculating allocation sizes. Integer overflow produces an undersized value that hits the 4GB boundary, causing malloc to fail.

The upstream weave-logic-ai/ruvector already has a fix using checked_mul() to detect overflow safely.

Steps to Reproduce

  1. npm install @ruvector/core@0.1.31 on Windows x64
  2. require('@ruvector/core') → loads ruvector-core-win32-x64-msvc
  3. Crashes with OOM during initialization

Environment

  • OS: Windows 11 Pro 10.0.26200 x64
  • Node: v22.23.2 / v24.18.1
  • @ruvector/core: 0.1.31
  • ruvector-core-win32-x64-msvc: 0.1.29

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions