Author: tdd
Date: 2009-07-17 10:54:18 EDT (Fri, 17 Jul 2009)
New Revision: 21707
URL: https://svn.open-mpi.org/trac/ompi/changeset/21707
Log:
Add asserts to catch when btl_eager_limit is smaller than the pml
headers.
Text files modified:
trunk/ompi/mca/pml/csum/pml_csum_sendreq.h | 2 ++
trunk/ompi/mca/pml/dr/pml_dr_sendreq.h | 2 ++
trunk/ompi/mca/pml/ob1/pml_ob1_sendreq.h | 2 ++
3 files changed, 6 insertions(+), 0 deletions(-)
Modified: trunk/ompi/mca/pml/csum/pml_csum_sendreq.h
==============================================================================
--- trunk/ompi/mca/pml/csum/pml_csum_sendreq.h (original)
+++ trunk/ompi/mca/pml/csum/pml_csum_sendreq.h 2009-07-17 10:54:18
EDT (Fri, 17 Jul 2009)
@@ -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 @@
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:
Modified: trunk/ompi/mca/pml/dr/pml_dr_sendreq.h
==============================================================================
--- trunk/ompi/mca/pml/dr/pml_dr_sendreq.h (original)
+++ trunk/ompi/mca/pml/dr/pml_dr_sendreq.h 2009-07-17 10:54:18
EDT (Fri, 17 Jul 2009)
@@ -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 @@
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)
{ \
Modified: trunk/ompi/mca/pml/ob1/pml_ob1_sendreq.h
==============================================================================
--- trunk/ompi/mca/pml/ob1/pml_ob1_sendreq.h (original)
+++ trunk/ompi/mca/pml/ob1/pml_ob1_sendreq.h 2009-07-17 10:54:18
EDT (Fri, 17 Jul 2009)
@@ -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 @@
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:
_______________________________________________
svn-full mailing list
svn-f...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/svn-full