Experimental Physics and
| |||||||||||||||
|
You probably fixed this one already - RSRV on SPARC dies with SIGBUS on putNotify due to a misaligned buffer. Just to make sure, there's a patch attached (3.14_beta1)... -- Till Index: camessage.c =================================================================== RCS file: /afs/slac/g/spear/cvsrep//epics/base/src/rsrv/camessage.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** camessage.c 2002/03/09 18:09:35 1.1.1.1 --- camessage.c 2002/09/19 23:52:08 1.2 *************** *** 1548,1555 **** --- 1548,1568 ---- * block if it is to small */ if(pciu->pPutNotify->valueSize<size){ + #ifdef MISALIGNED_BUFFER free(pciu->pPutNotify); pciu->pPutNotify = NULL; + #else + free(pciu->pPutNotify->dbPutNotify.pbuffer); + pciu->pPutNotify->valueSize = 0; + pciu->pPutNotify->dbPutNotify.pbuffer = casCalloc(1,size); + if (!pciu->pPutNotify->dbPutNotify.pbuffer) { + log_header ( "no memory to initiate put notify", + client, mp, pPayload, 0 ); + putNotifyErrorReply (client, mp, ECA_ALLOCMEM); + return RSRV_ERROR; + } + pciu->pPutNotify->valueSize = size; + #endif } } *************** *** 1559,1573 **** --- 1572,1598 ---- */ if(!pciu->pPutNotify){ pciu->pPutNotify = (RSRVPUTNOTIFY *) + #ifdef MISALIGNED_BUFFER casCalloc(1, sizeof(*pciu->pPutNotify)+size); + #else + casCalloc(1, sizeof(*pciu->pPutNotify)); + if (pciu->pPutNotify) + pciu->pPutNotify->dbPutNotify.pbuffer = casCalloc(1,size); + #endif + #ifdef MISALIGNED_BUFFER if(!pciu->pPutNotify){ + #else + if(!pciu->pPutNotify || !pciu->pPutNotify->dbPutNotify.pbuffer){ + #endif log_header ( "no memory to initiate put notify", client, mp, pPayload, 0 ); putNotifyErrorReply (client, mp, ECA_ALLOCMEM); return RSRV_ERROR; } pciu->pPutNotify->valueSize = size; + #ifdef MISALIGNED_BUFFER pciu->pPutNotify->dbPutNotify.pbuffer = (pciu->pPutNotify+1); + #endif pciu->pPutNotify->dbPutNotify.usrPvt = pciu; pciu->pPutNotify->dbPutNotify.paddr = &pciu->addr; pciu->pPutNotify->dbPutNotify.userCallback = write_notify_call_back; *************** *** 1758,1763 **** --- 1783,1792 ---- } if (pciu->pPutNotify) { + #ifdef MISALIGNED_BUFFER + #else + free (pciu->pPutNotify->dbPutNotify.pbuffer); + #endif free (pciu->pPutNotify); } Index: caservertask.c =================================================================== RCS file: /afs/slac/g/spear/cvsrep//epics/base/src/rsrv/caservertask.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** caservertask.c 2002/03/09 18:09:35 1.1.1.1 --- caservertask.c 2002/09/19 23:52:08 1.2 *************** *** 587,592 **** --- 587,596 ---- status = db_flush_extra_labor_event (client->evuser); assert (status==DB_EVENT_OK); if (pciu->pPutNotify) { + #ifdef MISALIGNED_BUFFER + #else + free (pciu->pPutNotify->dbPutNotify.pbuffer); + #endif free(pciu->pPutNotify); } LOCK_CLIENTQ;
| ||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |