[Openmp-commits] [PATCH] D90962: [OpenMP] Fix possible NULL dereferences

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 30 08:27:58 PST 2020


jdoerfert added a comment.

I like the approach. Minor nits and one question though: Why are we talking about two line numbers and not line + column? This confuses me.



================
Comment at: openmp/runtime/src/kmp_itt.inl:118
         char *buff = NULL;
-        kmp_str_loc_t str_loc = __kmp_str_loc_init(loc->psource, 1);
+        kmp_str_loc_t str_loc = __kmp_str_loc_init(loc->psource, 0);
         buff = __kmp_str_format("%s$omp$parallel:%d@%s:%d:%d", str_loc.func,
----------------
Why do these inputs change?


================
Comment at: openmp/runtime/src/kmp_str.cpp:328
+    *line_end = 0; // broken format of input string, cannot read number
+} // kmp_str_loc_numbers
+
----------------
No "end" comment. Also, if we want to adapt to LLVM style we should put comments on their own line and make them full sentences with punctuation etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90962/new/

https://reviews.llvm.org/D90962



More information about the Openmp-commits mailing list