]> rtime.felk.cvut.cz Git - orte.git/commit
JORTE: fix bug in subscriber callback
authorMartin Vajnar <martin@martin-HP-ProBook-4330s.(none)>
Tue, 8 Apr 2014 08:51:27 +0000 (10:51 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Fri, 19 Sep 2014 20:22:37 +0000 (22:22 +0200)
commit5bf96e7548d090150fde1ca07552529d978509fd
tree0dc834bc8cbc4ced0d46ac3ba57d6b8dbf165cff
parent52dc18c2182b45db92dffaa06440b46fb797b0ac
JORTE: fix bug in subscriber callback

This fixes a rarely occurring bug in subscriber callback.

When a Java subscriber is being destroyed, during the process
a JORTECallbackContext_t structure, used for storing pointers to Java objects,
was free()'d. If this occurred when new issue had arrived and was being
processed by the receive thread, then the pointer to the, now non-existent,
callback structure would have been dereferenced, leading to a SEGFAULT.

To fix this we now create a pointer to pointer to the specific structure
and pass this pointer to ORTESubcriptionCreate() and use it from the recvCallBack().
orte/libjorte/JORTESubscriptionCreate.c
orte/libjorte/JORTESubscriptionDestroy.c