History

added support for standalone operation

bellard committed 24 years ago

Commit 42642671 parent 59b27e81 file · +8 −2Browse files

Unified · Split

bcheck.c+8−2
@@ -95,10 +95,14 @@ static void *saved_realloc_hook; · 94 unmodified lines
95static void *saved_memalign_hook;95static void *saved_memalign_hook;
96#endif96#endif
97 97
98/* linker definitions */
98extern char _end;99extern char _end;
99 100
100/* TCC defines: */101/* TCC definitions */
101extern char __bounds_start; /* start of static bounds table */102extern char __bounds_start; /* start of static bounds table */
103/* error function. if NULL, simply do abort() */
104void (*__bound_error_func)(unsigned long caller, const char *msg);
105
102/* runtime error output */106/* runtime error output */
103extern void rt_error(unsigned long pc, const char *fmt, ...);107extern void rt_error(unsigned long pc, const char *fmt, ...);
104 108
@@ -141,7 +145,9 @@ static BoundEntry *__bound_find_region(BoundEntry *e1, void *p) · 36 unmodified lines
141/* print a bound error message */145/* print a bound error message */
142static void bound_error(const void *caller, const char *fmt, ...)146static void bound_error(const void *caller, const char *fmt, ...)
143{147{
144 rt_error((unsigned long)caller, "%s", fmt);148 if (!__bound_error_func)
149 abort();
150 __bound_error_func((unsigned long)caller, fmt);
145}151}
146 152
147static void bound_alloc_error(void)153static void bound_alloc_error(void)

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