Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.3, 3.4
-
None
Description
clang based static analyzers and compiles have trouble with a int x=x type macro for UNINIT_VAR.
sample from MDBF-143, Infer, that uses clang |
#117
|
libmariadb/libmariadb/ma_dtoa.c:1306: error: Uninitialized Value
|
`ilim` is read without initialization.
|
1304. */
|
1305.
|
1306. int bbits, b2, b5, be, dig, i, ieps, UNINIT_VAR(ilim), ilim0,
|
^
|
1307. UNINIT_VAR(ilim1), j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
|
1308. spec_case, try_quick;
|
 |
#118
|
libmariadb/libmariadb/ma_dtoa.c:1307: error: Uninitialized Value
|
`ilim1` is read without initialization.
|
1305.
|
1306. int bbits, b2, b5, be, dig, i, ieps, UNINIT_VAR(ilim), ilim0,
|
1307. UNINIT_VAR(ilim1), j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
|
^
|
1308. spec_case, try_quick;
|
1309. Long L;
|
As found in MDEV-36542, clang, unlike gcc, at least the the C/C and server codebases, even with old clang versions, has not given a false uninitialized value warning.
Attachments
Issue Links
- relates to
-
MDEV-36542 Remove some markers that variable is not going to be used uninitalized in clang
-
- Closed
-