History

Revert "Fix wrong handling of strings..." (almost)

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)

grischka committed 4 years ago

Commit af1abf11 parent e588b658 files · +98 −129Browse files

Showing the changes to lib (1 of 8 files). Show all

Unified · Split

lib/bcheck.c+0−13
@@ -294,7 +294,6 @@ DLL_EXPORT int __bound_strncmp(const char *s1, const char *s2, size_t n); · 293 unmodified lines
294DLL_EXPORT char *__bound_strcat(char *dest, const char *src);294DLL_EXPORT char *__bound_strcat(char *dest, const char *src);
295DLL_EXPORT char *__bound_strchr(const char *string, int ch);295DLL_EXPORT char *__bound_strchr(const char *string, int ch);
296DLL_EXPORT char *__bound_strdup(const char *s);296DLL_EXPORT char *__bound_strdup(const char *s);
297DLL_EXPORT void __bound_struct_copy(void *dst,void *src,size_t size);
298 297
299#if defined(__arm__) && defined(__ARM_EABI__)298#if defined(__arm__) && defined(__ARM_EABI__)
300DLL_EXPORT void *__bound___aeabi_memcpy(void *dst, const void *src, size_t size);299DLL_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
427static unsigned long long bound_strcat_count;426static unsigned long long bound_strcat_count;
428static unsigned long long bound_strchr_count;427static unsigned long long bound_strchr_count;
429static unsigned long long bound_strdup_count;428static unsigned long long bound_strdup_count;
430static unsigned long long bound_struct_copy_count;
431static unsigned long long bound_not_found;429static unsigned long long bound_not_found;
432#define INCR_COUNT(x) ++x430#define INCR_COUNT(x) ++x
433#else431#else
@@ -1262,7 +1260,6 @@ void __attribute__((destructor)) __bound_exit(void) · 828 unmodified lines
1262 fprintf (stderr, "bound_strcat_count %llu\n", bound_strcat_count);1260 fprintf (stderr, "bound_strcat_count %llu\n", bound_strcat_count);
1263 fprintf (stderr, "bound_strchr_count %llu\n", bound_strchr_count);1261 fprintf (stderr, "bound_strchr_count %llu\n", bound_strchr_count);
1264 fprintf (stderr, "bound_strdup_count %llu\n", bound_strdup_count);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 fprintf (stderr, "bound_not_found %llu\n", bound_not_found);1263 fprintf (stderr, "bound_not_found %llu\n", bound_not_found);
1267#endif1264#endif
1268#if BOUND_STATISTIC_SPLAY1265#if BOUND_STATISTIC_SPLAY
@@ -1786,16 +1783,6 @@ void *__bound_memset(void *s, int c, size_t n) · 517 unmodified lines
1786 return memset(s, c, n);1783 return memset(s, c, n);
1787}1784}
1788 1785
1789void __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#if defined(__arm__) && defined(__ARM_EABI__)1786#if defined(__arm__) && defined(__ARM_EABI__)
1800void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n)1787void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n)
1801{1788{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t