[PATCH] D59548: [Sanitizer] Add interceptor for wctomb

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 06:41:03 PDT 2019


labath updated this revision to Diff 191484.
labath marked 3 inline comments as done.
labath added a comment.

- add sanitizer_common test
- fix the "write to freed memory" issue by redirecting the function call to a local buffer. To know the size of the buffer I need to allocate, I needed to add a new "platform limits" constant for the value of MB_LEN_MAX (another option would be to use some upper bound which is large enough for all reasonable platforms, such as 32).

I'm very new to the sanitizer world, so I'm not sure I'm doing everything
correctly. Please let me know if I have done something wrong.


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D59548

Files:
  lib/msan/tests/msan_test.cc
  lib/sanitizer_common/sanitizer_common_interceptors.inc
  lib/sanitizer_common/sanitizer_platform_interceptors.h
  lib/sanitizer_common/sanitizer_platform_limits_posix.cc
  lib/sanitizer_common/sanitizer_platform_limits_posix.h
  test/sanitizer_common/TestCases/wctomb.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59548.191484.patch
Type: text/x-patch
Size: 3862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190320/7ab0a3bb/attachment.bin>


More information about the llvm-commits mailing list