[PR #826] [MERGED] Fix possible stack overflow in Listing/Mapping type checking #762

Closed
opened 2025-12-30 01:26:35 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/826
Author: @stackoverflow
Created: 11/21/2024
Status: Merged
Merged: 11/22/2024
Merged by: @stackoverflow

Base: mainHead: fix-stack-overflow-in-typenode


📝 Commits (1)

  • cd1a35b Fix possible stack overflow in Listing/Mapping type checking

📊 Changes

1 file changed (+42 additions, -38 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/ast/type/TypeNode.java (+42 -38)

📄 Description

This fixes a problem where the delegate chain of type casts for Listing/Mapping get unreasonably big, even though the type nodes are the same, which may lead to a stack overflow or performance degradation.

Closes #827


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/826 **Author:** [@stackoverflow](https://github.com/stackoverflow) **Created:** 11/21/2024 **Status:** ✅ Merged **Merged:** 11/22/2024 **Merged by:** [@stackoverflow](https://github.com/stackoverflow) **Base:** `main` ← **Head:** `fix-stack-overflow-in-typenode` --- ### 📝 Commits (1) - [`cd1a35b`](https://github.com/apple/pkl/commit/cd1a35bfef3dd437d7742177c3b5c5452d1b7782) Fix possible stack overflow in Listing/Mapping type checking ### 📊 Changes **1 file changed** (+42 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/ast/type/TypeNode.java` (+42 -38) </details> ### 📄 Description This fixes a problem where the delegate chain of type casts for `Listing`/`Mapping` get unreasonably big, even though the type nodes are the same, which may lead to a stack overflow or performance degradation. Closes #827 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:26:35 +01:00
adam closed this issue 2025-12-30 01:26:35 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#762