[jira] [Commented] (DISPATCH-1292) Coverity issues on master branch
[ https://issues.apache.org/jira/browse/DISPATCH-1292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16799460#comment-16799460 ] Ganesh Murthy commented on DISPATCH-1292: - {noformat} *** CID 337241: Null pointer dereferences (REVERSE_INULL) /home/gmurthy/opensource/qpid-dispatch/src/connection_manager.c: 780 in qd_dispatch_configure_connector() 774 qd_connection_manager_t *cm = qd->connection_manager; 775 qd_connector_t *ct = qd_server_connector(qd->server); 776 777 qd_error_clear(); 778 ct->policy_vhost = qd_entity_opt_string(entity, "policyVhost", 0); CHECK(); 779 >>> CID 337241: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "ct" suggests that it may be null, but it has already >>>been dereferenced on all paths leading to the check. 780 if (ct && load_server_config(qd, >config, entity, false) == QD_ERROR_NONE) { 781 DEQ_ITEM_INIT(ct); 782 DEQ_INSERT_TAIL(cm->connectors, ct); 783 log_config(cm->log_source, >config, "Connector"); 784 785 // ** CID 337240: Concurrent data access violations (MISSING_LOCK) /home/gmurthy/opensource/qpid-dispatch/src/policy.c: 1174 in qd_policy_amqp_open_connector() *** CID 337240: Concurrent data access violations (MISSING_LOCK) /home/gmurthy/opensource/qpid-dispatch/src/policy.c: 1174 in qd_policy_amqp_open_connector() 1168 qd_conn->policy_settings = NEW(qd_policy_settings_t); 1169 if (qd_conn->policy_settings) { 1170 ZERO(qd_conn->policy_settings); 1171 1172 if (qd_policy_open_fetch_settings(policy, policy_vhost, POLICY_VHOST_GROUP, qd_conn->policy_settings)) { 1173 qd_conn->policy_settings->outgoingConnection = true; >>> CID 337240: Concurrent data access violations (MISSING_LOCK) >>> Accessing "qd_conn->policy_counted" without holding lock >>>"sys_mutex_t.mutex". Elsewhere, "qd_connection_t.policy_counted" is accessed >>>with "sys_mutex_t.mutex" held 1 out of 2 times (1 of these accesses strongly >>>imply that it is necessary). 1174 qd_conn->policy_counted = true; // Count senders and receivers for this connection 1175 } else { 1176 qd_log(policy->log_source, 1177 QD_LOG_ERROR, 1178 "Failed to find policyVhost settings for connection '%d', policyVhost: '%s'", 1179 conn_id, policy_vhost);{noformat} > Coverity issues on master branch > > > Key: DISPATCH-1292 > URL: https://issues.apache.org/jira/browse/DISPATCH-1292 > Project: Qpid Dispatch > Issue Type: Bug > Components: Container >Affects Versions: 1.5.0 >Reporter: Ganesh Murthy >Assignee: Ganesh Murthy >Priority: Major > Fix For: 1.6.0 > > > {noformat} > 10 of 17,133 > New Defects reported by Coverity Scan for Apache Qpid dispatch-router > Inbox > x > scan-ad...@coverity.com > > 12:31 AM (7 hours ago) > > to me > Hi, > Please find the latest report on new defect(s) introduced to Apache Qpid > dispatch-router found with Coverity Scan. > 11 new defect(s) introduced to Apache Qpid dispatch-router found with > Coverity Scan. > 55 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 11 of 11 defect(s) > ** CID 336749: Control flow issues (MISSING_BREAK) > /home/gmurthy/opensource/qpid-dispatch/src/server.c: 909 in handle() > > *** CID 336749: Control flow issues (MISSING_BREAK) > /home/gmurthy/opensource/qpid-dispatch/src/server.c: 909 in handle() > 903 qdr_handle_authentication_service_connection_event(e); > 904 return true; > 905 } > 906 > 907 switch (pn_event_type(e)) { > 908 > >>> CID 336749: Control flow issues (MISSING_BREAK) > >>> The case for value "PN_PROACTOR_INTERRUPT" is not terminated by a > >>>'break' statement. > 909 case PN_PROACTOR_INTERRUPT: > 910 if (qd_server->stopping) { > 911 /* Interrupt the next thread */ > 912 pn_proactor_interrupt(qd_server->proactor); > 913 /* Stop the current thread */ > 914 return false; > ** CID 336748: Resource leaks (RESOURCE_LEAK) >
[jira] [Commented] (DISPATCH-1292) Coverity issues on master branch
[ https://issues.apache.org/jira/browse/DISPATCH-1292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16799458#comment-16799458 ] ASF subversion and git services commented on DISPATCH-1292: --- Commit c3079b3c2fec654ecfc667abc3c29cc787307c96 in qpid-dispatch's branch refs/heads/master from Ganesh Murthy [ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=c3079b3 ] DISPATCH-1292 - Coverity fixes > Coverity issues on master branch > > > Key: DISPATCH-1292 > URL: https://issues.apache.org/jira/browse/DISPATCH-1292 > Project: Qpid Dispatch > Issue Type: Bug > Components: Container >Affects Versions: 1.5.0 >Reporter: Ganesh Murthy >Assignee: Ganesh Murthy >Priority: Major > Fix For: 1.6.0 > > > {noformat} > 10 of 17,133 > New Defects reported by Coverity Scan for Apache Qpid dispatch-router > Inbox > x > scan-ad...@coverity.com > > 12:31 AM (7 hours ago) > > to me > Hi, > Please find the latest report on new defect(s) introduced to Apache Qpid > dispatch-router found with Coverity Scan. > 11 new defect(s) introduced to Apache Qpid dispatch-router found with > Coverity Scan. > 55 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 11 of 11 defect(s) > ** CID 336749: Control flow issues (MISSING_BREAK) > /home/gmurthy/opensource/qpid-dispatch/src/server.c: 909 in handle() > > *** CID 336749: Control flow issues (MISSING_BREAK) > /home/gmurthy/opensource/qpid-dispatch/src/server.c: 909 in handle() > 903 qdr_handle_authentication_service_connection_event(e); > 904 return true; > 905 } > 906 > 907 switch (pn_event_type(e)) { > 908 > >>> CID 336749: Control flow issues (MISSING_BREAK) > >>> The case for value "PN_PROACTOR_INTERRUPT" is not terminated by a > >>>'break' statement. > 909 case PN_PROACTOR_INTERRUPT: > 910 if (qd_server->stopping) { > 911 /* Interrupt the next thread */ > 912 pn_proactor_interrupt(qd_server->proactor); > 913 /* Stop the current thread */ > 914 return false; > ** CID 336748: Resource leaks (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/src/router_node.c: 567 in > AMQP_rx_handler() > > *** CID 336748: Resource leaks (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/src/router_node.c: 567 in > AMQP_rx_handler() > 561 qd_log(router->log_source, QD_LOG_DEBUG, "Message > rejected due to policy violation on target. User:%s", conn->user_id); > 562 pn_link_flow(pn_link, 1); > 563 pn_delivery_update(pnd, PN_REJECTED); > 564 pn_delivery_settle(pnd); > 565 qd_message_free(msg); > 566 qd_iterator_free(addr_iter); > >>> CID 336748: Resource leaks (RESOURCE_LEAK) > >>> Variable "link_exclusions" going out of scope leaks the storage it > >>>points to. > 567 return next_delivery; > 568 } > 569 } > 570 } else { > 571 // > 572 // This is a targeted link, not anonymous. > ** CID 336747: (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 81 in > test_send_to_messenger() > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 86 in > test_send_to_messenger() > > *** CID 336747: (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 81 in > test_send_to_messenger() > 75 static char* test_send_to_messenger(void *context) > 76 { > 77 qd_message_t *msg = qd_message(); > 78 qd_message_content_t *content = MSG_CONTENT(msg); > 79 qd_message_compose_1(msg, "test_addr_0", 0); > 80 qd_buffer_t *buf = DEQ_HEAD(content->buffers); > >>> CID 336747: (RESOURCE_LEAK) > >>> Variable "msg" going out of scope leaks the storage it points to. > 81 if (buf == 0) return "Expected a buffer in the test message"; > 82 > 83 pn_message_t *pn_msg = pn_message(); > 84 size_t len = flatten_bufs(content); > 85 int result = pn_message_decode(pn_msg, buffer, len); > 86 if (result != 0) return "Error in pn_message_decode"; > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 86 in >
[jira] [Commented] (DISPATCH-1292) Coverity issues on master branch
[ https://issues.apache.org/jira/browse/DISPATCH-1292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16796255#comment-16796255 ] ASF subversion and git services commented on DISPATCH-1292: --- Commit bdafbbe02f2762ec3c38bc254e59c3efa9b23c9e in qpid-dispatch's branch refs/heads/master from Ganesh Murthy [ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=bdafbbe ] DISPATCH-1292 - Fixes to coverity issues > Coverity issues on master branch > > > Key: DISPATCH-1292 > URL: https://issues.apache.org/jira/browse/DISPATCH-1292 > Project: Qpid Dispatch > Issue Type: Bug > Components: Container >Affects Versions: 1.5.0 >Reporter: Ganesh Murthy >Assignee: Ganesh Murthy >Priority: Major > Fix For: 1.6.0 > > > {noformat} > 10 of 17,133 > New Defects reported by Coverity Scan for Apache Qpid dispatch-router > Inbox > x > scan-ad...@coverity.com > > 12:31 AM (7 hours ago) > > to me > Hi, > Please find the latest report on new defect(s) introduced to Apache Qpid > dispatch-router found with Coverity Scan. > 11 new defect(s) introduced to Apache Qpid dispatch-router found with > Coverity Scan. > 55 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 11 of 11 defect(s) > ** CID 336749: Control flow issues (MISSING_BREAK) > /home/gmurthy/opensource/qpid-dispatch/src/server.c: 909 in handle() > > *** CID 336749: Control flow issues (MISSING_BREAK) > /home/gmurthy/opensource/qpid-dispatch/src/server.c: 909 in handle() > 903 qdr_handle_authentication_service_connection_event(e); > 904 return true; > 905 } > 906 > 907 switch (pn_event_type(e)) { > 908 > >>> CID 336749: Control flow issues (MISSING_BREAK) > >>> The case for value "PN_PROACTOR_INTERRUPT" is not terminated by a > >>>'break' statement. > 909 case PN_PROACTOR_INTERRUPT: > 910 if (qd_server->stopping) { > 911 /* Interrupt the next thread */ > 912 pn_proactor_interrupt(qd_server->proactor); > 913 /* Stop the current thread */ > 914 return false; > ** CID 336748: Resource leaks (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/src/router_node.c: 567 in > AMQP_rx_handler() > > *** CID 336748: Resource leaks (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/src/router_node.c: 567 in > AMQP_rx_handler() > 561 qd_log(router->log_source, QD_LOG_DEBUG, "Message > rejected due to policy violation on target. User:%s", conn->user_id); > 562 pn_link_flow(pn_link, 1); > 563 pn_delivery_update(pnd, PN_REJECTED); > 564 pn_delivery_settle(pnd); > 565 qd_message_free(msg); > 566 qd_iterator_free(addr_iter); > >>> CID 336748: Resource leaks (RESOURCE_LEAK) > >>> Variable "link_exclusions" going out of scope leaks the storage it > >>>points to. > 567 return next_delivery; > 568 } > 569 } > 570 } else { > 571 // > 572 // This is a targeted link, not anonymous. > ** CID 336747: (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 81 in > test_send_to_messenger() > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 86 in > test_send_to_messenger() > > *** CID 336747: (RESOURCE_LEAK) > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 81 in > test_send_to_messenger() > 75 static char* test_send_to_messenger(void *context) > 76 { > 77 qd_message_t *msg = qd_message(); > 78 qd_message_content_t *content = MSG_CONTENT(msg); > 79 qd_message_compose_1(msg, "test_addr_0", 0); > 80 qd_buffer_t *buf = DEQ_HEAD(content->buffers); > >>> CID 336747: (RESOURCE_LEAK) > >>> Variable "msg" going out of scope leaks the storage it points to. > 81 if (buf == 0) return "Expected a buffer in the test message"; > 82 > 83 pn_message_t *pn_msg = pn_message(); > 84 size_t len = flatten_bufs(content); > 85 int result = pn_message_decode(pn_msg, buffer, len); > 86 if (result != 0) return "Error in pn_message_decode"; > /home/gmurthy/opensource/qpid-dispatch/tests/message_test.c: 86 in >