Skip to content

Reject invalid with_array_type registrations#169

Merged
SeanTAllen merged 1 commit intomainfrom
reject-invalid-array-type-registration
Mar 16, 2026
Merged

Reject invalid with_array_type registrations#169
SeanTAllen merged 1 commit intomainfrom
reject-invalid-array-type-registration

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

with_array_type() is now partial. It errors if the registration would cause recursive decode (element OID is itself an array OID), collide with an existing scalar or built-in array OID, or self-reference (array_oid == element_oid). Previously these misconfigurations were silently accepted and would cause incorrect behavior or stack overflow at decode time.

Closes #168

@SeanTAllen SeanTAllen added the changelog - changed Automatically add "Changed" CHANGELOG entry on merge label Mar 15, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 15, 2026
@SeanTAllen SeanTAllen force-pushed the reject-invalid-array-type-registration branch from 5fbcfa2 to 92b4a36 Compare March 16, 2026 00:05
@SeanTAllen SeanTAllen removed the changelog - changed Automatically add "Changed" CHANGELOG entry on merge label Mar 16, 2026
with_array_type is now partial. It errors if the registration would
cause recursive decode (element OID is itself an array OID), collide
with an existing scalar or built-in array OID, use an OID already
registered as a custom element OID, or self-reference. Previously
these misconfigurations were silently accepted and would cause
incorrect behavior or stack overflow at decode time.

Closes #168
@SeanTAllen SeanTAllen force-pushed the reject-invalid-array-type-registration branch from b3e410b to 239b0c6 Compare March 16, 2026 00:30
@SeanTAllen SeanTAllen merged commit 97ecb76 into main Mar 16, 2026
7 checks passed
@SeanTAllen SeanTAllen deleted the reject-invalid-array-type-registration branch March 16, 2026 00:31
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recursive decode possible with custom array-of-array element OIDs

2 participants