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
294294 DLL_EXPORT char *__bound_strcat(char *dest, const char *src);
295295 DLL_EXPORT char *__bound_strchr(const char *string, int ch);
296296 DLL_EXPORT char *__bound_strdup(const char *s);
297−DLL_EXPORT void __bound_struct_copy(void *dst,void *src,size_t size);
298297
299298 #if defined(__arm__) && defined(__ARM_EABI__)
300299 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
427426 static unsigned long long bound_strcat_count;
428427 static unsigned long long bound_strchr_count;
429428 static unsigned long long bound_strdup_count;
430−static unsigned long long bound_struct_copy_count;
431429 static unsigned long long bound_not_found;
432430 #define INCR_COUNT(x) ++x
433431 #else
@@ -1262,7 +1260,6 @@ void __attribute__((destructor)) __bound_exit(void) · 828 unmodified lines
12621260 fprintf (stderr, "bound_strcat_count %llu\n", bound_strcat_count);
12631261 fprintf (stderr, "bound_strchr_count %llu\n", bound_strchr_count);
12641262 fprintf (stderr, "bound_strdup_count %llu\n", bound_strdup_count);
1265− fprintf (stderr, "bound_struct_copy_count %llu\n", bound_struct_copy_count);
12661263 fprintf (stderr, "bound_not_found %llu\n", bound_not_found);
12671264 #endif
12681265 #if BOUND_STATISTIC_SPLAY
@@ -1786,16 +1783,6 @@ void *__bound_memset(void *s, int c, size_t n) · 517 unmodified lines
17861783 return memset(s, c, n);
17871784 }
17881785
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−
17991786 #if defined(__arm__) && defined(__ARM_EABI__)
18001787 void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n)
18011788 {

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