Skip to content

RegEx.search_all causes 'Condition "p_ptr == nullptr" is true.' error with PCRE2 10.42 (Linux distro packages) #76174

Description

@Selenyhr

Godot version

v4.0.2.stable.arch_linux

System information

ArchLinux rolling, Linux 6.2.11-arch1-1. Vulkan Mobile on RX 6900XT

Issue description

When using RegEx.search_all, an error is added to the log:

ERROR: Condition "p_ptr == nullptr" is true.
at: free_static (core/os/memory.cpp:148)

The number of triggered errors seems to be affected by the number of matches the regex makes.

Steps to reproduce

Have any script that does something using RegEx.search_all:

var regex: RegEx = RegEx.new()
regex.compile(".")
regex.search_all("test")

The above example will trigger 5 error messages (1 per match + 1 fixed).

Minimal reproduction project

minimal_project.zip

Script was made for running through CLI:
godot --headless -s new_script.gd

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions