Skip to content

Commit

Permalink
Merge "Fix undefined left shifting of negative numbers" (#338) to hdf…
Browse files Browse the repository at this point in the history
…5_1_12 (#369)

* Snapshot version 1.12 release 1-3.  Update  version to 1.12.1-4.

* First cut of the H5 public API documentation. (#80)

* First cut of the H5 public API documentation.

* Added H5Z "bonus track."

* Applied Quincey's patch.

* Added the missing patches from Quincey's original patch.

* H5PL (complete) and basic H5VL API documentation.

* Added H5I API docs.

* Added H5L API docs.

* First installment from Elena's H5T batch.

* Second installment of Elena's H5T batch.

* Final installment of Elena's H5T batch.

* Full set of current H5F documentation. (#105)

* First cut of the H5 public API documentation.

* Added H5Z "bonus track."

* Applied Quincey's patch.

* Added the missing patches from Quincey's original patch.

* H5PL (complete) and basic H5VL API documentation.

* Added H5I API docs.

* Added H5L API docs.

* First installment from Elena's H5T batch.

* Second installment of Elena's H5T batch.

* Final installment of Elena's H5T batch.

* Migrated documentation for SWMR functions.

* Catching up on MDC functions.

* Integrated the H5F MDC function documentation.

* Added MDC and parallel H5F functions.

* Slightly updated main page.

* Added doxygen/dox/H5AC_cache_config_t.dox to MANIFEST.

* Doxygen - added (mostly) beginner functions (#112)

* Doxygen - added (mostly) beginner functions

* Removed duplicate H5Pset_szip function

* Add src/H5module.h to MANIFEST.

* close #195. (#196)

* Update HDF5PluginMacros.cmake

* Update HDF5PluginMacros.cmake

* Avoid aligned access for references by decoding into temporary buffer and then copying the result into the actual buffer.   Update test to be more thorough with using compound datatype fields everywhere. (#206)

* Modify temporary rpath for testing in java example scripts. (#230)

* Fix undefined left shifting of negative numbers (#338)

Undefined Bahavior Sanitizer errored here about left shifting negative numbers.

Co-authored-by: Gerd Heber <gheber@hdfgroup.org>
Co-authored-by: bljhdf <58825073+bljhdf@users.noreply.github.com>
Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org>
Co-authored-by: Quincey Koziol <quincey@koziol.cc>
Co-authored-by: Sean McBride <sean@rogue-research.com>
  • Loading branch information
6 people authored Feb 23, 2021
1 parent a544ef1 commit 2d8913c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/dsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -4041,7 +4041,7 @@ test_nbit_compound_2(hid_t file)
power = HDpow(2.0F, (double)(precision[1] - 1));
orig_data[i][j].a.c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
power = HDpow(2.0F, (double)(precision[2] - 1));
orig_data[i][j].a.s = (short)(-((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].a.s = (short)(-(((long long)HDrandom() % (long long)power) << offset[2]));
orig_data[i][j].a.f = float_val[i][j];

power = HDpow(2.0F, (double)precision[3]);
Expand All @@ -4057,7 +4057,7 @@ test_nbit_compound_2(hid_t file)
for (n = 0; n < (size_t)array_dims[1]; n++) {
power = HDpow(2.0F, (double)(precision[0] - 1));
orig_data[i][j].d[m][n].i =
(int)(-((long long)HDrandom() % (long long)power) << offset[0]);
(int)(-(((long long)HDrandom() % (long long)power) << offset[0]));
power = HDpow(2.0F, (double)(precision[1] - 1));
orig_data[i][j].d[m][n].c =
(char)(((long long)HDrandom() % (long long)power) << offset[1]);
Expand Down

0 comments on commit 2d8913c

Please sign in to comment.