[PATCH] D46978: Delay emutls deallocation for one round

Ryan Prichard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 15:01:04 PDT 2018


rprichard marked 2 inline comments as done.
rprichard added inline comments.


================
Comment at: lib/builtins/emutls.c:373
             memset(array->data, 0, new_size * sizeof(void*));
+        array->skip_destructor_rounds = EMUTLS_SKIP_DESTRUCTOR_ROUNDS;
         emutls_check_array_set_size(array, new_size);
----------------
chh wrote:
> nit, line 373 sets array field; it's better to be nested inside the if-statement of line 371.
> 
Good catch. I think that line could have dereferenced NULL on out-of-memory.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D46978





More information about the llvm-commits mailing list