Index: squid3/src/DelayId.cc diff -c squid3/src/DelayId.cc:1.13 squid3/src/DelayId.cc:1.14 *** squid3/src/DelayId.cc:1.13 Sun Aug 10 05:00:40 2003 --- squid3/src/DelayId.cc Sat Sep 6 06:47:34 2003 *************** *** 171,179 **** if (markedAsNoDelay) return; ! unsigned short tempPool = pool() - 1; ! ! assert (tempPool != 0xFFFF); if (compositeId.getRaw()) compositeId->bytesIn(qty); --- 171,177 ---- if (markedAsNoDelay) return; ! assert ((unsigned short)(pool() - 1) != 0xFFFF); if (compositeId.getRaw()) compositeId->bytesIn(qty); Index: squid3/src/client_side.cc diff -c squid3/src/client_side.cc:1.658 squid3/src/client_side.cc:1.659 *** squid3/src/client_side.cc:1.658 Sun Aug 31 21:49:38 2003 --- squid3/src/client_side.cc Sat Sep 6 06:47:34 2003 *************** *** 142,148 **** --- 142,150 ---- static void clientUpdateHierCounters(HierarchyLogEntry *); static bool clientPingHasFinished(ping_data const *aPing); static void clientPrepareLogWithRequestDetails(HttpRequest *, AccessLogEntry *); + #ifndef PURIFY static int connIsUsable(ConnStateData::Pointer conn); + #endif static int responseFinishedOrFailed(HttpReply * rep, StoreIOBuffer const &recievedData); static void ClientSocketContextPushDeferredIfNeeded(ClientSocketContext::Pointer deferredRequest, ConnStateData::Pointer & conn); static void clientUpdateSocketStats(log_type logType, size_t size); *************** *** 692,697 **** --- 694,700 ---- return 0; } + #ifndef PURIFY int connIsUsable(ConnStateData::Pointer conn) { *************** *** 701,706 **** --- 704,711 ---- return 1; } + #endif + ClientSocketContext::Pointer ConnStateData::getCurrentContext() const { *************** *** 1243,1251 **** assert(cbdataReferenceValid(node)); /* Set null by ContextFree */ assert(node->node.next == NULL); - ClientSocketContext *context = dynamic_cast(node->data.getRaw()); /* this is the assert discussed above */ ! assert(context == NULL); /* We are only called when the client socket shutsdown. * Tell the prev pipeline member we're finished */ --- 1248,1255 ---- assert(cbdataReferenceValid(node)); /* Set null by ContextFree */ assert(node->node.next == NULL); /* this is the assert discussed above */ ! assert(NULL == dynamic_cast(node->data.getRaw())); /* We are only called when the client socket shutsdown. * Tell the prev pipeline member we're finished */ Index: squid3/src/client_side_request.cc diff -c squid3/src/client_side_request.cc:1.33 squid3/src/client_side_request.cc:1.34 *** squid3/src/client_side_request.cc:1.33 Sun Aug 31 21:49:38 2003 --- squid3/src/client_side_request.cc Sat Sep 6 06:47:34 2003 *************** *** 800,806 **** ClientRequestContext::CheckNoCacheDone(int answer, void *data) { void *temp; ! bool valid = cbdataReferenceValidDone(data, &temp); /* acl NB calls cannot invalidate cbdata in the normal course of things */ assert (valid); ClientRequestContext *context = (ClientRequestContext *)temp; --- 800,810 ---- ClientRequestContext::CheckNoCacheDone(int answer, void *data) { void *temp; ! #ifndef PURIFY ! ! bool valid = ! #endif ! cbdataReferenceValidDone(data, &temp); /* acl NB calls cannot invalidate cbdata in the normal course of things */ assert (valid); ClientRequestContext *context = (ClientRequestContext *)temp; Index: squid3/src/comm.cc diff -c squid3/src/comm.cc:1.388 squid3/src/comm.cc:1.389 *** squid3/src/comm.cc:1.388 Sat Aug 30 19:22:05 2003 --- squid3/src/comm.cc Sat Sep 6 06:47:34 2003 *************** *** 713,721 **** fill->amountDone += len; ! StoreIOBuffer *sb = &fdc_table[fd].fill.requestedData; ! ! assert(fill->amountDone <= sb->length); comm_add_fill_callback(fd, fill->amountDone, COMM_OK, 0); } --- 713,719 ---- fill->amountDone += len; ! assert(fill->amountDone <= fdc_table[fd].fill.requestedData.length); comm_add_fill_callback(fd, fill->amountDone, COMM_OK, 0); } Index: squid3/src/errorpage.cc diff -c squid3/src/errorpage.cc:1.191 squid3/src/errorpage.cc:1.192 *** squid3/src/errorpage.cc:1.191 Sun Aug 31 21:49:38 2003 --- squid3/src/errorpage.cc Sat Sep 6 06:47:35 2003 *************** *** 344,351 **** errorAppendEntry(StoreEntry * entry, ErrorState * err) { HttpReply *rep; ! MemObject *mem = entry->mem_obj; ! assert(mem != NULL); assert (entry->isEmpty()); if (entry->store_status != STORE_PENDING) { --- 344,350 ---- errorAppendEntry(StoreEntry * entry, ErrorState * err) { HttpReply *rep; ! assert(entry->mem_obj != NULL); assert (entry->isEmpty()); if (entry->store_status != STORE_PENDING) { Index: squid3/src/peer_digest.cc diff -c squid3/src/peer_digest.cc:1.99 squid3/src/peer_digest.cc:1.100 *** squid3/src/peer_digest.cc:1.99 Sun Aug 10 05:00:44 2003 --- squid3/src/peer_digest.cc Sat Sep 6 06:47:35 2003 *************** *** 400,411 **** peerDigestHandleReply(void *data, StoreIOBuffer recievedData) { DigestFetchState *fetch = (DigestFetchState *)data; - PeerDigest *pd = fetch->pd; int retsize = -1; digest_read_state_t prevstate; int newsize; ! assert(pd && recievedData.data); /* The existing code assumes that the recieved pointer is * where we asked the data to be put */ --- 400,410 ---- peerDigestHandleReply(void *data, StoreIOBuffer recievedData) { DigestFetchState *fetch = (DigestFetchState *)data; int retsize = -1; digest_read_state_t prevstate; int newsize; ! assert(fetch->pd && recievedData.data); /* The existing code assumes that the recieved pointer is * where we asked the data to be put */ *************** *** 649,657 **** if (size >= (ssize_t)StoreDigestCBlockSize) { PeerDigest *pd = fetch->pd; - HttpReply const *rep = fetch->entry->getReply(); ! assert(pd && rep); if (peerDigestSetCBlock(pd, buf)) { /* XXX: soon we will have variable header size */ --- 648,655 ---- if (size >= (ssize_t)StoreDigestCBlockSize) { PeerDigest *pd = fetch->pd; ! assert(pd && fetch->entry->getReply()); if (peerDigestSetCBlock(pd, buf)) { /* XXX: soon we will have variable header size */ Index: squid3/src/stmem.cc diff -c squid3/src/stmem.cc:1.80 squid3/src/stmem.cc:1.81 *** squid3/src/stmem.cc:1.80 Mon Aug 4 16:14:42 2003 --- squid3/src/stmem.cc Sat Sep 6 06:47:35 2003 *************** *** 112,119 **** assert (aNode->canAccept (location)); /* these two can go I think */ ! size_t copyOffset = location - aNode->nodeBuffer.offset; ! assert (copyOffset == aNode->nodeBuffer.length); size_t copyLen = XMIN (amount, aNode->space()); xmemcpy(aNode->nodeBuffer.data + aNode->nodeBuffer.length, source, copyLen); --- 112,118 ---- assert (aNode->canAccept (location)); /* these two can go I think */ ! assert (location - aNode->nodeBuffer.offset == aNode->nodeBuffer.length); size_t copyLen = XMIN (amount, aNode->space()); xmemcpy(aNode->nodeBuffer.data + aNode->nodeBuffer.length, source, copyLen); Index: squid3/src/fs/diskd/store_io_diskd.cc diff -c squid3/src/fs/diskd/store_io_diskd.cc:1.38 squid3/src/fs/diskd/store_io_diskd.cc:1.39 *** squid3/src/fs/diskd/store_io_diskd.cc:1.38 Sat Aug 23 06:33:04 2003 --- squid3/src/fs/diskd/store_io_diskd.cc Sat Sep 6 06:47:36 2003 *************** *** 334,341 **** { assert (ioRequestor.getRaw() != NULL); off_t shm_offset; ! char *rbuf = (char *)IO->shm.get(&shm_offset); ! assert(rbuf); ioAway(); int x = storeDiskdSend(_MQD_READ, IO, --- 334,340 ---- { assert (ioRequestor.getRaw() != NULL); off_t shm_offset; ! IO->shm.get(&shm_offset); ioAway(); int x = storeDiskdSend(_MQD_READ, IO, *************** *** 691,697 **** } else { debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror()); cbdataReferenceDone(M.callback_data); ! assert(++send_errors < 100); IO->shm.put (shm_offset); } --- 690,699 ---- } else { debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror()); cbdataReferenceDone(M.callback_data); ! ! if (++send_errors > 100) ! fatal ("over 100 errors sending to the daemon - aborting\n"); ! IO->shm.put (shm_offset); } *************** *** 751,757 **** } else { debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror()); cbdataReferenceDone(M.callback_data); ! assert(++send_errors < 100); } /* --- 753,761 ---- } else { debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror()); cbdataReferenceDone(M.callback_data); ! ! if (++send_errors > 100) ! fatal ("over 100 errors sending to the daemon - aborting\n"); } /* Index: squid3/src/repl/heap/store_repl_heap.cc diff -c squid3/src/repl/heap/store_repl_heap.cc:1.13 squid3/src/repl/heap/store_repl_heap.cc:1.14 *** squid3/src/repl/heap/store_repl_heap.cc:1.13 Fri Feb 21 15:50:50 2003 --- squid3/src/repl/heap/store_repl_heap.cc Sat Sep 6 06:47:36 2003 *************** *** 298,304 **** assert(heap->nwalkers); assert(heap->count); /* Ok, time to destroy this policy */ ! safe_free(policy->_data); memset(policy, 0, sizeof(*policy)); cbdataFree(policy); } --- 298,304 ---- assert(heap->nwalkers); assert(heap->count); /* Ok, time to destroy this policy */ ! safe_free(heap); memset(policy, 0, sizeof(*policy)); cbdataFree(policy); } Index: squid3/src/repl/lru/store_repl_lru.cc diff -c squid3/src/repl/lru/store_repl_lru.cc:1.14 squid3/src/repl/lru/store_repl_lru.cc:1.15 *** squid3/src/repl/lru/store_repl_lru.cc:1.14 Fri Feb 21 15:50:50 2003 --- squid3/src/repl/lru/store_repl_lru.cc Sat Sep 6 06:47:39 2003 *************** *** 317,323 **** assert(lru->nwalkers); assert(lru->count); /* Ok, time to destroy this policy */ ! safe_free(policy->_data); memset(policy, 0, sizeof(*policy)); cbdataFree(policy); } --- 317,323 ---- assert(lru->nwalkers); assert(lru->count); /* Ok, time to destroy this policy */ ! safe_free(lru); memset(policy, 0, sizeof(*policy)); cbdataFree(policy); }