[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default
Juneyoung Lee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 17 20:25:16 PDT 2021
aqjune added a comment.
It seems the original code has a use of an uninitialized variable.
Line 4420 at seek-preproc.c (function `ff_seek_frame_binary`):
int64_t pos_min=pos_min, pos_max=pos_max, pos, pos_limit; // pos_min and pos_max are self-assigned.
...
if (sti->index_entries) {
...
}
// pos_min and pos_max are used as arguments below
pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit,
ts_min, ts_max, flags, &ts, avif->read_timestamp);
https://gist.github.com/aqjune/3bd0ea19bbc12b4744843c0c070e994c
If the branch is not taken, `pos_min` and `pos_max` are read while they are still uninitialized.
I guess the variables are self-assigned to avoid warnings?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105169/new/
https://reviews.llvm.org/D105169
More information about the cfe-commits
mailing list