[
https://issues.apache.org/jira/browse/PROTON-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115329#comment-18115329
]
ASF subversion and git services commented on PROTON-2969:
---------------------------------------------------------
Commit 6e237cc6ce73dace6e7334062040e90eccbcb83a in qpid-proton's branch
refs/heads/main from Andrew Stitcher
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=6e237cc6c ]
PROTON-2969: Stop dumping a value once the output buffer is full
pn_value_dump_nondescribed_value() kept walking a value's children after the
output buffer had filled up, with nothing left to write. Return as soon as
the buffer is full.
Also:
- Skip a chain of descriptors iteratively rather than recursively, so dumping a
value uses a bounded amount of C stack whatever it contains.
Clean ups to pn_fixed_string_t:
- Assert that we only make pn_fixed_string_t with at least 1 byte of storage
otherwise there is nowehere for the terminating '\0'.
- Make that all users of pn_fixed_string (which is internal oinly) pass in at
least one
byte.
Assisted-By: Claude Opus 5 <[email protected]>
> Stop pn_value_dump from reading more input when the output is full
> ------------------------------------------------------------------
>
> Key: PROTON-2969
> URL: https://issues.apache.org/jira/browse/PROTON-2969
> Project: Qpid Proton
> Issue Type: Improvement
> Components: proton-c
> Reporter: Andrew Stitcher
> Assignee: Andrew Stitcher
> Priority: Minor
> Fix For: proton-c-0.41.0
>
>
> pn_value_dump() keeps walking a value's children after the output buffer has
> filled up, with nothing left to write. It should return as soon as the buffer
> is full to avoid doing unnecessary work.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]