See commit e588b65390bcfadabfb00c32ae0bfee12a8a8002. Was not "wrong" really, just different. But appears to be outdated. Now disabled by default (top of tccpp.c: ACCEPT_LF_IN_STRINGS) Also, in skipped code, just warn. Also: cleanup "Optimize small structure copying on x86_64" (commit 3715f1d7ee302c220d36f545107bbf808fd979d9) - remove some copy&paste coding (tccgen.c) - RSI/RDI need to be preserved on windows - simply don't use under bcheck (this is tinycc)
Showing the changes to lib (1 of 8 files). Show all
Unified · Split
| @@ -294,7 +294,6 @@ DLL_EXPORT int __bound_strncmp(const char *s1, const char *s2, size_t n); · 293 unmodified lines | ||
| 294 | 294 | DLL_EXPORT char *__bound_strcat(char *dest, const char *src); |
| 295 | 295 | DLL_EXPORT char *__bound_strchr(const char *string, int ch); |
| 296 | 296 | DLL_EXPORT char *__bound_strdup(const char *s); |
| 297 | −DLL_EXPORT void __bound_struct_copy(void *dst,void *src,size_t size); | |
| 298 | 297 | |
| 299 | 298 | #if defined(__arm__) && defined(__ARM_EABI__) |
| 300 | 299 | DLL_EXPORT void *__bound___aeabi_memcpy(void *dst, const void *src, size_t size); |
| @@ -427,7 +426,6 @@ static unsigned long long bound_strncmp_count; · 126 unmodified lines | ||
| 427 | 426 | static unsigned long long bound_strcat_count; |
| 428 | 427 | static unsigned long long bound_strchr_count; |
| 429 | 428 | static unsigned long long bound_strdup_count; |
| 430 | −static unsigned long long bound_struct_copy_count; | |
| 431 | 429 | static unsigned long long bound_not_found; |
| 432 | 430 | #define INCR_COUNT(x) ++x |
| 433 | 431 | #else |
| @@ -1262,7 +1260,6 @@ void __attribute__((destructor)) __bound_exit(void) · 828 unmodified lines | ||
| 1262 | 1260 | fprintf (stderr, "bound_strcat_count %llu\n", bound_strcat_count); |
| 1263 | 1261 | fprintf (stderr, "bound_strchr_count %llu\n", bound_strchr_count); |
| 1264 | 1262 | fprintf (stderr, "bound_strdup_count %llu\n", bound_strdup_count); |
| 1265 | − fprintf (stderr, "bound_struct_copy_count %llu\n", bound_struct_copy_count); | |
| 1266 | 1263 | fprintf (stderr, "bound_not_found %llu\n", bound_not_found); |
| 1267 | 1264 | #endif |
| 1268 | 1265 | #if BOUND_STATISTIC_SPLAY |
| @@ -1786,16 +1783,6 @@ void *__bound_memset(void *s, int c, size_t n) · 517 unmodified lines | ||
| 1786 | 1783 | return memset(s, c, n); |
| 1787 | 1784 | } |
| 1788 | 1785 | |
| 1789 | −void __bound_struct_copy(void *dst,void *src,size_t size) | |
| 1790 | −{ | |
| 1791 | − dprintf(stderr, "Copy struct from %p to %p,size %lx\n", | |
| 1792 | − src,dst,size); | |
| 1793 | − INCR_COUNT(bound_struct_copy_count); | |
| 1794 | − __bound_check(dst,size,"struct copy destination"); | |
| 1795 | − __bound_check(src,size,"struct copy source"); | |
| 1796 | − return; | |
| 1797 | −} | |
| 1798 | − | |
| 1799 | 1786 | #if defined(__arm__) && defined(__ARM_EABI__) |
| 1800 | 1787 | void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n) |
| 1801 | 1788 | { |