This has detected a bug in detect_C89_integers() at H5detect.c line 1285:
DETECT_I(short, SHORT, d_g[nd_g]); nd_g++;
The DETECT_I macro is difficult to decipher, but I'm pretty sure it's doing a left shift that's too big. Shifting a uint16_t by 16 or more bits is undefined.
Could someone familiar with this code investigate?
It's especially annoying because this code seems to run at build time, causing build failure:
Which is much more annoying than just a failing unit test or two.
Cheers,
···
--
____________________________________________________________
Sean McBride, B. Eng sean@rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
Thank you for reporting! I created a ticket in our issues database (HDFFV-8147). We will try to take a look before our next release, but cannot promise.
If someone on FORUM will have time to investigate and have any questions, we will be more than happy to assist (and to accept a patch
Thank you!
Elena
···
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elena Pourmal The HDF Group http://hdfgroup.org
1800 So. Oak St., Suite 203, Champaign IL 61820
217.531.6112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On Sep 7, 2012, at 3:32 PM, Sean McBride wrote:
Hi all,
I have been experimenting with clang's -fcatch-undefined-behavior, which does like its name implies. For details:
This has detected a bug in detect_C89_integers() at H5detect.c line 1285:
DETECT_I(short, SHORT, d_g[nd_g]); nd_g++;
The DETECT_I macro is difficult to decipher, but I'm pretty sure it's doing a left shift that's too big. Shifting a uint16_t by 16 or more bits is undefined.
Could someone familiar with this code investigate?
It's especially annoying because this code seems to run at build time, causing build failure:
Which is much more annoying than just a failing unit test or two.
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean@rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada