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

ASF subversion and git services commented on DISPATCH-1906:
-----------------------------------------------------------

Commit 41139d8c5a68631060029d5e89675aaa42092133 in qpid-dispatch's branch 
refs/heads/master from Ken Giusti
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=41139d8 ]

DISPATCH-1906: fix coverity false positive [pass_freed_arg]


> Coverity error relating to adding delivery id in trace logs
> -----------------------------------------------------------
>
>                 Key: DISPATCH-1906
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1906
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Container
>            Reporter: Ganesh Murthy
>            Assignee: Charles E. Rolke
>            Priority: Major
>
> {noformat}
> 5 new defect(s) introduced to Apache Qpid dispatch-router found with Coverity 
> Scan.
> 2 defect(s), reported by Coverity Scan earlier, were marked fixed in the 
> recent build analyzed by Coverity Scan.New defect(s) Reported-by: Coverity 
> Scan
> Showing 5 of 5 defect(s)
> ** CID 365060:  API usage errors  (PRINTF_ARGS)
> ________________________________________________________________________________________________________
> *** CID 365060:  API usage errors  (PRINTF_ARGS)
> /qpid-dispatch/src/router_core/delivery.c: 910 in 
> qdr_delivery_mcast_outbound_settled_CT()
> 904     
> 905             qd_log(core->log, QD_LOG_TRACE,
> 906                    DLV_FMT" mcast delivery has settled, disp=0x%"PRIx64,
> 907                    DLV_ARGS(in_dlv), in_dlv->disposition);
> 908         } else {
> 909     
> >>>     CID 365060:  API usage errors  (PRINTF_ARGS)
> >>>     No argument for format specifier "%d".
> 910             qd_log(core->log, QD_LOG_TRACE,
> 911                    DLV_FMT" mcast delivery (%p) out peer "DLV_FMT" has 
> settled, remaining peers=%d",
> 912                    DLV_ARGS(in_dlv), DLV_ARGS(out_dlv), peer_count - 1);
> 913         }
> 914     
> 915         // now settle the peer itself and remove it from link unsettled 
> list** CID 365059:  API usage errors  (PRINTF_ARGS)
> ________________________________________________________________________________________________________
> *** CID 365059:  API usage errors  (PRINTF_ARGS)
> /qpid-dispatch/src/router_core/transfer.c: 779 in qdr_link_deliver_CT()
> 773     
> 774             qdr_forward_deliver_CT(core, link->connected_link, peer);
> 775     
> 776             if (!dlv->settled) {
> 777                 DEQ_INSERT_TAIL(link->unsettled, dlv);
> 778                 dlv->where = QDR_DELIVERY_IN_UNSETTLED;
> >>>     CID 365059:  API usage errors  (PRINTF_ARGS)
> >>>     No argument for format specifier "%lx".
> 779                 qd_log(core->log, QD_LOG_DEBUG, DLV_FMT"Delivery 
> transfer:  dlv:%lx qdr_link_deliver_CT: action-list -> unsettled-list", 
> DLV_ARGS(dlv));
> 780             } else {
> 781                 //
> 782                 // If the delivery is settled, decrement the ref_count on 
> the delivery.
> 783                 // This count was the owned-by-action count.
> 784                 //** CID 365058:  Memory - illegal accesses  
> (USE_AFTER_FREE)
> /qpid-dispatch/src/adaptors/http1/http1_server.c: 439 in _do_reconnect()
> ________________________________________________________________________________________________________
> *** CID 365058:  Memory - illegal accesses  (USE_AFTER_FREE)
> /qpid-dispatch/src/adaptors/http1/http1_server.c: 439 in _do_reconnect()
> 433         // progress. This happens when the server has closed the 
> connection before
> 434         // the request message has fully arrived (!rx_complete).
> 435         // qdr_connection_process() will continue to invoke the
> 436         // qdr_http1_server_core_link_deliver callback until the request 
> message is
> 437         // complete.
> 438     
> >>>     CID 365058:  Memory - illegal accesses  (USE_AFTER_FREE)
> >>>     Passing freed pointer "hconn->requests.head" as an argument to 
> >>> "_is_request_in_progress".
> 439         if (!_is_request_in_progress((_server_request_t*) 
> DEQ_HEAD(hconn->requests))) {
> 440             qd_log(qdr_http1_adaptor->log, QD_LOG_DEBUG,
> 441                    "[C%"PRIu64"] Connecting to HTTP server...", conn_id);
> 442             sys_mutex_lock(qdr_http1_adaptor->lock);
> 443             hconn->raw_conn = pn_raw_connection();
> 444             pn_raw_connection_set_context(hconn->raw_conn, 
> &hconn->handler_context);** CID 365057:  API usage errors  (PRINTF_ARGS)
> ________________________________________________________________________________________________________
> *** CID 365057:  API usage errors  (PRINTF_ARGS)
> /qpid-dispatch/src/router_core/delivery.c: 910 in 
> qdr_delivery_mcast_outbound_settled_CT()
> 904     
> 905             qd_log(core->log, QD_LOG_TRACE,
> 906                    DLV_FMT" mcast delivery has settled, disp=0x%"PRIx64,
> 907                    DLV_ARGS(in_dlv), in_dlv->disposition);
> 908         } else {
> 909     
> >>>     CID 365057:  API usage errors  (PRINTF_ARGS)
> >>>     Argument "out_dlv->delivery_id" to format specifier "%lu" was 
> >>> expected to have type "unsigned long" but has type "unsigned int".
> 910             qd_log(core->log, QD_LOG_TRACE,
> 911                    DLV_FMT" mcast delivery (%p) out peer "DLV_FMT" has 
> settled, remaining peers=%d",
> 912                    DLV_ARGS(in_dlv), DLV_ARGS(out_dlv), peer_count - 1);
> 913         }
> 914     
> 915         // now settle the peer itself and remove it from link unsettled 
> list** CID 365056:  API usage errors  (PRINTF_ARGS)
> ________________________________________________________________________________________________________
> *** CID 365056:  API usage errors  (PRINTF_ARGS)
> /qpid-dispatch/src/router_core/delivery.c: 910 in 
> qdr_delivery_mcast_outbound_settled_CT()
> 904     
> 905             qd_log(core->log, QD_LOG_TRACE,
> 906                    DLV_FMT" mcast delivery has settled, disp=0x%"PRIx64,
> 907                    DLV_ARGS(in_dlv), in_dlv->disposition);
> 908         } else {
> 909     
> >>>     CID 365056:  API usage errors  (PRINTF_ARGS)
> >>>     Argument "out_dlv->conn_id" to format specifier "%p" was expected to 
> >>> have pointer type but has type "unsigned long".
> 910             qd_log(core->log, QD_LOG_TRACE,
> 911                    DLV_FMT" mcast delivery (%p) out peer "DLV_FMT" has 
> settled, remaining peers=%d",
> 912                    DLV_ARGS(in_dlv), DLV_ARGS(out_dlv), peer_count - 1);
> 913         }
> 914     
> 915         // now settle the peer itself and remove it from link unsettled 
> list {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to