jmuehlner commented on PR #497:
URL: https://github.com/apache/guacamole-server/pull/497#issuecomment-1995109679
For the record, here are the coverity findings associated with the last PR:
```
________________________________________________________________________________________________________
*** CID 1593181: Program hangs (ORDER_REVERSAL)
/src/common/cursor.c: 180 in guac_common_cursor_update()
174 cursor->button_mask = button_mask;
175
176 /* Store time at which cursor was updated */
177 cursor->timestamp = guac_timestamp_current();
178
179 /* Notify all other users of change in cursor state */
>>> CID 1593181: Program hangs (ORDER_REVERSAL)
>>> Calling "guac_client_foreach_user" acquires lock "guac_rwlock.lock"
while holding lock "guac_common_cursor._lock" (count: 1 / 3).
180 guac_client_foreach_user(cursor->client,
181 guac_common_cursor_broadcast_state, cursor);
182
183 pthread_mutex_unlock(&(cursor->_lock));
184
185 }
** CID 1593180: (LOCK)
/src/protocols/rdp/rdp.c: 557 in guac_rdp_handle_connection()
/src/protocols/rdp/rdp.c: 690 in guac_rdp_handle_connection()
/src/protocols/rdp/rdp.c: 647 in guac_rdp_handle_connection()
________________________________________________________________________________________________________
*** CID 1593180: (LOCK)
/src/protocols/rdp/rdp.c: 557 in guac_rdp_handle_connection()
551 /* Connection complete */
552 rdp_client->rdp_inst = rdp_inst;
553
554 /* Signal that reconnect has been completed */
555 guac_rdp_disp_reconnect_complete(rdp_client->disp);
556
>>> CID 1593180: (LOCK)
>>> "guac_rwlock_release_lock" unlocks "rdp_client->lock.lock" while it
is unlocked.
557 guac_rwlock_release_lock(&(rdp_client->lock));
558
559 /* Handle messages from RDP server while client is running */
560 while (client->state == GUAC_CLIENT_RUNNING
561 && !guac_rdp_disp_reconnect_needed(rdp_client->disp)) {
562
/src/protocols/rdp/rdp.c: 549 in guac_rdp_handle_connection()
543 if (!freerdp_connect(rdp_inst)) {
544 guac_rdp_client_abort(client, rdp_inst);
545 goto fail;
546 }
547
548 /* Upgrade to write lock again for further exclusive operations
*/
>>> CID 1593180: (LOCK)
>>> "guac_rwlock_acquire_write_lock" unlocks "rdp_client->lock.lock"
while it is unlocked.
549 guac_rwlock_acquire_write_lock(&(rdp_client->lock));
550
551 /* Connection complete */
552 rdp_client->rdp_inst = rdp_inst;
553
554 /* Signal that reconnect has been completed */
/src/protocols/rdp/rdp.c: 690 in guac_rdp_handle_connection()
684 /* Client is now disconnected */
685 guac_client_log(client, GUAC_LOG_INFO, "Internal RDP client
disconnected");
686
687 return 0;
688
689 fail:
>>> CID 1593180: (LOCK)
>>> "guac_rwlock_release_lock" unlocks "rdp_client->lock.lock" while it
is unlocked.
690 guac_rwlock_release_lock(&(rdp_client->lock));
691 return 1;
692
693 }
694
695 void* guac_rdp_client_thread(void* data) {
/src/protocols/rdp/rdp.c: 549 in guac_rdp_handle_connection()
543 if (!freerdp_connect(rdp_inst)) {
544 guac_rdp_client_abort(client, rdp_inst);
545 goto fail;
546 }
547
548 /* Upgrade to write lock again for further exclusive operations
*/
>>> CID 1593180: (LOCK)
>>> "guac_rwlock_acquire_write_lock" locks "rdp_client->lock.lock" while
it is locked.
549 guac_rwlock_acquire_write_lock(&(rdp_client->lock));
550
551 /* Connection complete */
552 rdp_client->rdp_inst = rdp_inst;
553
554 /* Signal that reconnect has been completed */
/src/protocols/rdp/rdp.c: 647 in guac_rdp_handle_connection()
641 guac_socket_flush(client->socket);
642 rdp_client->frames_received = 0;
643 }
644
645 }
646
>>> CID 1593180: (LOCK)
>>> "guac_rwlock_acquire_write_lock" locks "rdp_client->lock.lock" while
it is locked.
647 guac_rwlock_acquire_write_lock(&(rdp_client->lock));
648
649 /* Clean up print job, if active */
650 if (rdp_client->active_job != NULL) {
651 guac_rdp_print_job_kill(rdp_client->active_job);
652 guac_rdp_print_job_free(rdp_client->active_job);
/src/protocols/rdp/rdp.c: 647 in guac_rdp_handle_connection()
641 guac_socket_flush(client->socket);
642 rdp_client->frames_received = 0;
643 }
644
645 }
646
>>> CID 1593180: (LOCK)
>>> "guac_rwlock_acquire_write_lock" unlocks "rdp_client->lock.lock"
while it is unlocked.
647 guac_rwlock_acquire_write_lock(&(rdp_client->lock));
648
649 /* Clean up print job, if active */
650 if (rdp_client->active_job != NULL) {
651 guac_rdp_print_job_kill(rdp_client->active_job);
652 guac_rdp_print_job_free(rdp_client->active_job);
** CID 1593179: (LOCK)
/src/protocols/rdp/rdp.c: 150 in rdp_freerdp_pre_connect()
/src/protocols/rdp/rdp.c: 223 in rdp_freerdp_pre_connect()
________________________________________________________________________________________________________
*** CID 1593179: (LOCK)
/src/protocols/rdp/rdp.c: 150 in rdp_freerdp_pre_connect()
144 } while (*(++current) != NULL);
145
146 }
147
148 /* Init FreeRDP internal GDI implementation */
149 if (!gdi_init(instance, guac_rdp_get_native_pixel_format(FALSE)))
>>> CID 1593179: (LOCK)
>>> Returning without unlocking "rdp_client->lock.lock".
150 return FALSE;
151
152 /* Set up bitmap handling */
153 rdpBitmap bitmap = *graphics->Bitmap_Prototype;
154 bitmap.size = sizeof(guac_rdp_bitmap);
155 bitmap.New = guac_rdp_bitmap_new;
/src/protocols/rdp/rdp.c: 223 in rdp_freerdp_pre_connect()
217 instance->settings)) {
218 guac_client_log(client, GUAC_LOG_WARNING,
219 "Failed to load drdynvc plugin. Display update and
audio "
220 "input support will be disabled.");
221 }
222
>>> CID 1593179: (LOCK)
>>> Returning without unlocking "rdp_client->lock.lock".
223 return TRUE;
224
225 }
226
227 /**
228 * Callback invoked by FreeRDP when authentication is required but
the required```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]