You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:16:59 UTC

[GitHub] [commons-daemon] stevehof commented on a change in pull request #32: DAEMON-336 - If lCallbacks is empty don't call the fnCallbacks to avoid an ACCESS_VIOLATION

stevehof commented on a change in pull request #32:
URL: https://github.com/apache/commons-daemon/pull/32#discussion_r699137461



##########
File path: src/native/windows/src/handles.c
##########
@@ -496,13 +496,15 @@ apxCloseHandle(APXHANDLE hObject)
 
     if (IS_INVALID_HANDLE(hObject) || hObject->dwType == APXHANDLE_TYPE_INVALID)
         return FALSE;
-    /* Call the user callback first */
-    (*hObject->fnCallback)(hObject, WM_CLOSE, 0, 0);
-    /* Now go through the callback chain */
-    TAILQ_FOREACH(lpCall, &hObject->lCallbacks, queue) {
+    if (!TAILQ_EMPTY(&hObject->lCallbacks)) {
+        /* Call the user callback first */
+        (*hObject->fnCallback)(hObject, WM_CLOSE, 0, 0);

Review comment:
       This would also throw an access violation, i believe in the JVM.dll which is with a version i do not have pdb files for. I tested this on master with the current 1.2.5 fixes and this could also likely be caused by code from the java side of things. I do not have a good understanding of the issues here but i do know that lCallbacks was empty and that fnCallback would also raise an access violation. What are these meant to be calling? I presume something in the java, however i could not find any documentation, and this is the only "issue" to an otherwise well running service.




-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org