smack
smack copied to clipboard
memcpy compiles to memcpy_chk, which is not recognized by smack
When I compile the following code, the function memcpy_chk gets inserted, which is not handled properly by SMACK.
#include <string.h>
int test(char* a, char* b, int len)
{
memcpy(a,b,len);
}
$uname -a
Darwin C02R432HFVH8 15.6.0 Darwin Kernel Version 15.6.0: Mon Nov 13 21:58:35 PST 2017; root:xnu-3248.72.11~1/RELEASE_X86_64 x86_64
$ clang --version
\clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /usr/local/opt/[email protected]/bin
FYI, we have a similar issue with Rust, where malloc
is called je_mallocx
. Maybe the names we match should be regular expressions instead of just string constants.