1
1

Add asserts to catch when btl_eager_limit is smaller than the pml headers.

This commit was SVN r21707.
Этот коммит содержится в:
Terry Dontje 2009-07-17 14:54:18 +00:00
родитель ef20e778b3
Коммит d432c9fdbc
3 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -12,6 +12,7 @@
* Copyright (c) 2009 IBM Corporation. All rights reserved.
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -349,6 +350,7 @@ mca_pml_csum_send_request_start_btl( mca_pml_csum_send_request_t* sendreq,
size_t eager_limit = btl->btl_eager_limit - sizeof(mca_pml_csum_hdr_t);
int rc;
assert(btl->btl_eager_limit >= sizeof(mca_pml_csum_hdr_t));
if( OPAL_LIKELY(size <= eager_limit) ) {
switch(sendreq->req_send.req_send_mode) {
case MCA_PML_BASE_SEND_SYNCHRONOUS:

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -176,6 +177,7 @@ do {
sendreq->req_send.req_base.req_sequence = OPAL_THREAD_ADD32(&proc->send_sequence,1); \
\
/* select a btl */ \
assert(bml_btl->btl->btl_eager_limit >= sizeof(mca_pml_dr_hdr_t)); \
eager_limit = bml_btl->btl->btl_eager_limit - sizeof(mca_pml_dr_hdr_t); \
if(size <= eager_limit) { \
switch(sendreq->req_send.req_send_mode) { \

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -348,6 +349,7 @@ mca_pml_ob1_send_request_start_btl( mca_pml_ob1_send_request_t* sendreq,
size_t eager_limit = btl->btl_eager_limit - sizeof(mca_pml_ob1_hdr_t);
int rc;
assert(btl->btl_eager_limit >= sizeof(mca_pml_ob1_hdr_t));
if( OPAL_LIKELY(size <= eager_limit) ) {
switch(sendreq->req_send.req_send_mode) {
case MCA_PML_BASE_SEND_SYNCHRONOUS: