Skip to content

Commit

Permalink
Avoid OOB access of the line table during codegen. (JuliaLang#34973)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored and ravibitsgoa committed Apr 6, 2020
1 parent 7b10f28 commit ee26833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5899,7 +5899,7 @@ static std::pair<std::unique_ptr<Module>, jl_llvm_functions_t>

if (do_coverage(mod_is_user_mod)) {
coverageVisitLine(ctx, ctx.file, toplineno);
if (linetable.size() >= 1) {
if (linetable.size() >= 2) {
// avoid double-counting the entry line
const auto &info = linetable.at(1);
if (info.file == ctx.file && info.line == toplineno && info.is_user_code == mod_is_user_mod)
Expand Down

0 comments on commit ee26833

Please sign in to comment.