You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Marcel Meulemans (JIRA)" <ji...@apache.org> on 2018/06/07 09:34:00 UTC

[jira] [Commented] (PROTON-1846) [proton-c] Message decode fails with PN_OUT_OF_MEMORY if there are large lists in the message

    [ https://issues.apache.org/jira/browse/PROTON-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16504462#comment-16504462 ] 

Marcel Meulemans commented on PROTON-1846:
------------------------------------------

I tried the diff above and and the {{uint32_t}} seems to introduce some unwanted side effects due to the with the singed/unsigned "magic" in {{pn_data_point/pn_data_restore}} (did look into the details, just that this branch, [https://github.com/apache/qpid-proton/blob/master/c/src/core/codec.c#L1177] isn't hit when it should be). Using {{typedef int32_t pni_nid_t;}} and fixing PNI_NID_MAX accordingly did worked for me.

> [proton-c]  Message decode fails with PN_OUT_OF_MEMORY if there are large lists in the message
> ----------------------------------------------------------------------------------------------
>
>                 Key: PROTON-1846
>                 URL: https://issues.apache.org/jira/browse/PROTON-1846
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.22.0
>            Reporter: Ganesh Murthy
>            Priority: Major
>         Attachments: send_large_structured_body.js
>
>
> Steps to reproduce -
>  
>  # Start the Qpid Dispatch router
>  # Run the following script that creates a bunch of addresses
>  # for i in `seq 1 6546`; do echo "\{\"prefix\":\"address-$i\",\"distribution\":\"balanced\"}" | qdmanage CREATE --type=org.apache.qpid.dispatch.router.config.address --name address-$i --stdin; done
>  # now run qdmanage QUERY --type=address
>  # You will receive a Data error (-10)
> The following diff seems to fix the issue
> diff --git a/c/src/core/data.h b/c/src/core/data.h
> index 94dc7d67..f4320e2a 100644
> --- a/c/src/core/data.h
> +++ b/c/src/core/data.h
> @@ -27,7 +27,7 @@
>  #include "decoder.h"
>  #include "encoder.h"
>  
> -typedef uint16_t pni_nid_t;
> +typedef uint32_t pni_nid_t;
>  #define PNI_NID_MAX ((pni_nid_t)-1)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org