xiangzhai added a comment. Hi Anna,
I am not clear why need to calculate the precise allocated size? for example: void *ptr = malloc(size); void *gptr = g_malloc_n(n_blocks, n_block_bytes); Memory-leak and Use-after-free issues' MallocChecker need the ***size*** or ***n_blocks*** x ***n_block_bytes***, but if the size is inaccurate, the checker is also ***able*** to detect the issues. Regards, Leslie Zhai ================ Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:889 + } else if (FunI == II_g_realloc_n || FunI == II_g_try_realloc_n) { + if (CE->getNumArgs() < 2) + return; ---------------- zaks.anna wrote: > Should this be 'getNumArgs() < 3' ? sorry typo... Repository: rL LLVM https://reviews.llvm.org/D28348 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits