[PATCH] D42020: Correct ctype(3) functions with NLS on NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 20 14:56:03 PST 2018


krytarowski added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:3174
+#if SANITIZER_NETBSD
+    // Valid array indices: -1 (EOF), 0, 1, .. 255
+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, _ctype_tab_, 257 * sizeof(short));
----------------
vitalybuka wrote:
> should this be done only for category == LC_CTYPE 
It's possible to add if() for LC_CTYPE || LC_ALL, but I would need to define it in sanitizer_platform_limits_netbsd.*.

In real life, I'm not sure that this is really needed, overhead is negligible and hardly ever we will execute this code needlessly.


Repository:
  rL LLVM

https://reviews.llvm.org/D42020





More information about the llvm-commits mailing list