Initialized "cmd" (and "buf" for symmetry) to sooth clang >= 8#501
Initialized "cmd" (and "buf" for symmetry) to sooth clang >= 8#501czurnieden wants to merge 1 commit intolibtom:developfrom
Conversation
|
Yes, it was definitely the uninitialized memory in the buffer named Run test with The string "sub_d" has 5 characters and the I did not dig through all 1827 lines with several preprocessor branches (the code also handles Who's to blame now? GLibC or me? Good question. |
|
It was the version of Valgrind, that was too old. All that ado for nothing, great! |
Picked up work at #499 after merging of #500 and found out that a newer clang compiler (somewhere between 7.0.0 and 8.0.0) caused problems that show up with valgrind. GCC up to version 9.1.0 caused no trouble.
(Last good commit was 1b3792b so it was something I did)
Commandline :
LTM_CFLAGS=" -g3 " ./testme.sh --with-cc=clang-8 --test-vs-mtest=333 --with-valgrind --valgrind-options="--track-origins=yes"Result in
test_vs_mtest_err.logLine 70 is
srand(LTM_MTEST_RAND_SEED);Line 336 is
} else if (strcmp(cmd, "invmod") == 0) {Difference of assembler dumps (left column with
cmd = {0};right as it was):Difference between Clang 7.0.0 and Clang 8.0.0, no initialisation of
cmdWell, Clang is correct, technically, no doubt.
Mmh…is initializing
cmdenough here?(I just saw that I initialized the buffers with
0instead of\0. To late for now, have to go.)