The likely culprit for the assert() that Klemen sees is read_reply() in camessage.c. This, and vsend_err(), are the places where sizes are changed between a call to cas_copy_in_header() and to cas_commit_msg(). vsend_err() looks right, so I'm inclined to think that this is a new bug introduced since Jeff's fix. read_reply() does some complicated recalculation of sizes to handle count==0 requests. I can't find anything obviously wrong, but may be missing something. Hopefully Klemen can provide a stack trace as this would answer a lot of questions.
Also, it seems like the 'assert(count < 65536)' in cas_set_header_count() could be triggered when a get/monitor on a large array returns an error or autosize'd to a count smaller than 64k. Have to look more closely at this.
The likely culprit for the assert() that Klemen sees is read_reply() in camessage.c. This, and vsend_err(), are the places where sizes are changed between a call to cas_copy_ in_header( ) and to cas_commit_msg(). vsend_err() looks right, so I'm inclined to think that this is a new bug introduced since Jeff's fix. read_reply() does some complicated recalculation of sizes to handle count==0 requests. I can't find anything obviously wrong, but may be missing something. Hopefully Klemen can provide a stack trace as this would answer a lot of questions.
Also, it seems like the 'assert(count < 65536)' in cas_set_ header_ count() could be triggered when a get/monitor on a large array returns an error or autosize'd to a count smaller than 64k. Have to look more closely at this.