[PATCH] D148958: Size and element numbers are often swapped when calling calloc

Alf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 21 14:00:11 PDT 2023


gAlfonso-bit created this revision.
gAlfonso-bit added a reviewer: MaskRay.
Herald added a subscriber: Enna1.
Herald added projects: Flang, All.
gAlfonso-bit requested review of this revision.
Herald added subscribers: Sanitizers, cfe-commits, jdoerfert.
Herald added projects: clang, Sanitizers.

The element number comes first when calling calloc, but sometimes the element number is passed as the size and vice-versa.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148958

Files:
  clang/test/Analysis/malloc.mm
  clang/test/Analysis/uninit-vals.m
  clang/test/CodeGen/alloc-size.c
  compiler-rt/lib/profile/InstrProfilingFile.c
  compiler-rt/test/tsan/java_finalizer2.cpp
  flang/runtime/ragged.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148958.515906.patch
Type: text/x-patch
Size: 4639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230421/15c7f5e8/attachment.bin>


More information about the cfe-commits mailing list