Skip to content

Segfault when RGF is called with wrong number of arguments #100

Open
@hexaeder

Description

@hexaeder

Describe the bug 🐞
A RGF segfaults if called with the wrong number of arguments:

Expected behavior

Ideally a normal runtime exception.

Minimal Reproducible Example 👇

using Pkg
pkg"activate --temp"
pkg"add RuntimeGeneratedFunctions"

using RuntimeGeneratedFunctions
RuntimeGeneratedFunctions.init(@__MODULE__)

ex = :(function f(x, t)
        x[1]
    end)
f = @RuntimeGeneratedFunction(ex)
f([1.0]) # segfault💣 
julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 9 8945HS w/ Radeon 780M Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 16 default, 0 interactive, 8 GC (on 16 virtual cores)
Environment:
  JULIA_NUM_THREADS = auto
  JULIA_PKG_PRESERVE_TIERED_INSTALLED = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions