summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-06-24 20:08:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-06-24 20:08:35 (GMT)
commit90f8e6c9f7eb8d7200e6a7500dfa1c64d364b305 (patch)
tree01c2080a732d3be1c26cd530ef90cdcf0faf9bcd /src
parent1db8cb828e4fb300c37cf836bee435900a726f66 (diff)
downloadhdf5-90f8e6c9f7eb8d7200e6a7500dfa1c64d364b305.zip
hdf5-90f8e6c9f7eb8d7200e6a7500dfa1c64d364b305.tar.gz
hdf5-90f8e6c9f7eb8d7200e6a7500dfa1c64d364b305.tar.bz2
[svn-r7096] Purpose:
Bug fix Description: Aligned data is not being detected by type conversion routines correctly on some Crays, causing corrupted data during I/O. Solution: Add extra checking for strange pointer behavior on Crays. Platforms tested: FreeBSD 4.8 (sleipnir) h5committest Cray SV1 (wind) Cray T3E (hubble) Cray T90 (gypsy)
Diffstat (limited to 'src')
-rw-r--r--src/H5Tconv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 92f6fa3..b230344 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -334,9 +334,11 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
/* Is alignment required for source or dest? */ \
s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
CI_INC_SRC(s_mv) \
CI_INC_DST(d_mv) \
@@ -2550,7 +2552,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
{
H5T_t *src = NULL; /*source data type */
H5T_t *dst = NULL; /*destination data type */
- int direction; /*direction of traversal */
+ int direction; /*direction of traversal */
hsize_t elmtno; /*element number */
size_t half_size; /*half the type size */
hsize_t olap; /*num overlapping elements */
@@ -2558,7 +2560,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
uint8_t dbuf[64]; /*temp destination buffer */
size_t first;
ssize_t sfirst; /*a signed version of `first' */
- size_t i;
+ size_t i; /* Local index variables */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_conv_i_i, FAIL);