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

ASF subversion and git services commented on PROTON-2960:
---------------------------------------------------------

Commit caf0f45c5652d1576ca5af882fbc2be9b53800c0 in qpid-proton's branch 
refs/heads/main from Andrew Stitcher
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=caf0f45c5 ]

PROTON-2960: Don't pass uncast 0 as null pointer into pn_data_fill

Varargs requires pointers to be explicitly pointers, otherwise it'll use
the wrong number of bits on most 64 bit ABIs.


> pn_data_fill test passes uncast 0 into varargs for null pointer
> ---------------------------------------------------------------
>
>                 Key: PROTON-2960
>                 URL: https://issues.apache.org/jira/browse/PROTON-2960
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.40.0
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>            Priority: Major
>             Fix For: proton-c-0.41.0
>
>
> In a varargs context 0 is interpreted as int never void* (or any other 
> pointer type). This means that on a 64 bit machine (with the common ABIs) 0 
> is only 32 bits not the full 64 of a pointer. 
> This is especially visible on ARM64 under macOS, and can be hidden if it's on 
> a different ABI and in the early parameters - this is due to register versus 
> stack placement of parameters.
> There are some example of this error in the code testing pn_data_fill.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to