I think this means that (ueventStrLen > 0) is always true, so the "else" branch is never taken; (platform->handleUevent(&ctx->Callbacks, ueventParam, ueventStrLen)) is never true; (ctx && !ctx->uevent_thread_exit) is either always true or always false.
I.e., I suspect that the coverage point on line 15 is for the "else" branch - but since there is no "else" in the code, it is recorded on the "if" line. Yes, this is very confusing. On Fri, Jun 2, 2017 at 11:29 PM, <[email protected]> wrote: > I do some test of sanitize coverage with libfuzzer as > http://releases.llvm.org/4.0.0/tools/clang/docs/SanitizerCoverage.html > > > I know lightgreen is covered ,lightcoral is not-covered, navajowhite is > partially-covered > > However , I still got confused when look the report like this : > > How can the line 16 get covered with line 15 not covered? > > Do I make some mistake? > > > > > 1 int ueventStrLen = 0; > > 2 > 3 do { > 4 PlatformDependent* platform = Config::GetPlatform(); > 5 if (!platform) { > 6 LOGW("platform is null ptr."); > 7 break; > 8 } > 9 IAccelerator* acc = platform->getAccelerator(); > 10 if (!acc) { > 11 LOGW("acc is null ptr."); > 12 break; > 13 } > 14 ueventStrLen = acc->getUeventNextEvent(ueventParam, > (int)sizeof(ueventParam) - 2); > 15 if (ueventStrLen > 0) { > 16 if (platform->handleUevent(&ctx->Callbacks, ueventParam, > ueventStrLen)) { > 17 ctx->global_comp_info.settingChanged = true; > 18 } > 19 } > 20 } while(ctx && !ctx->uevent_thread_exit); > > > > > > -- > You received this message because you are subscribed to the Google Groups > "address-sanitizer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
