Conversation
Contributor
Author
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 31615ca. Configure here.
Coverage Report for CI Build 34947671934Coverage increased (+0.2%) to 82.294%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is a layer converting python structures into arguments for clvm programs. It's supposed to only be called by trusted code, but this hardens it a bit by using its own stack for the conversion, rather than using the program stack frames (with recursion).
Note
Medium Risk
Touches core PyO3 paths for
Program.toandrun_rustargs; logic is refactored but heavily tested, with moderate risk if stack ordering or serialize/convert semantics diverged subtly.Overview
Hardens Python→CLVM conversion by replacing recursive
clvm_convertandclvm_serializewith explicit heap-backed work stacks (ConvertOp/SerializeOp). Deep or hostile nesting no longer grows the native call stack (which could SIGSEGV past PyO3’s unwind boundary); depth is bounded byVecgrowth instead. Behavior is preserved: pairs/lists use deferredCons/BuildListops, allocator failures go through a sharedpy_mem_errhelper, andclvm_serializestill parsesProgramvalues into trees while other types fall back to convert mode.Adds broad pytest coverage for
Program.to(scalars, tuples, lists, fake SExp,__bytes__, errors) and forrun_rustargument serialization (lists, embedded programs vs atoms, nested cases), including a moderately deep nesting smoke test.Reviewed by Cursor Bugbot for commit 31615ca. Bugbot is set up for automated code reviews on this repo. Configure here.