Skip to content

Fix "lambda in object literal" missing apply() in vtable.#4840

Draft
redvers wants to merge 1 commit intomainfrom
issue_4838
Draft

Fix "lambda in object literal" missing apply() in vtable.#4840
redvers wants to merge 1 commit intomainfrom
issue_4838

Conversation

@redvers
Copy link
Contributor

@redvers redvers commented Feb 19, 2026

The old code in reify_typeparamref() followed the ast_data chain only to one level. When they don't match, the type parameters are not substituted during subtype checking causing is_subtype() to incorrectly return false. In this case, the lambda's apply() function isn't marked as reachable resulting in a missing vtable entry and consequent runtime segfault.

Fixes: #4838

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 19, 2026
The old code in reify_typeparamref() followed the ast_data chain only to one level. When they don't match, the type parameters are not substituted during subtype checking causing is_subtype() to incorrectly return false. In this case, the lambda's apply() function isn't marked as reachable resulting in a missing vtable entry and consequent runtime segfault.

Fixes: #4838
@redvers redvers added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Feb 19, 2026
@ponylang-main
Copy link
Contributor

Hi @redvers,

The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.

Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 4840.md to match the number of this pull request.

The basic format of the release notes (using markdown) should be:

## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.

@redvers redvers marked this pull request as draft February 19, 2026 01:19
@redvers redvers removed the discuss during sync Should be discussed during an upcoming sync label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in reification results in missing functions in vtable causing runtime crash.

2 participants