Bug 806830: Enforce initializing strlib before using r=ehugg

This commit is contained in:
Randell Jesup 2012-11-16 14:37:08 -05:00
parent 2073190e7f
commit 5748e6d4d9
3 changed files with 8 additions and 0 deletions

View File

@ -211,6 +211,8 @@ ccInit ()
platInit();
strlib_init();
/*
* below should move to cprPreInit. keep it here until then
*/

View File

@ -42,6 +42,7 @@ string_t strlib_empty(void);
void strlib_debug_init(void);
long strlib_mem_used(void);
int strlib_test_memory_is_string(void *mem);
void strlib_init (void);
#ifndef __STRINGLIB_INTERNAL__
#define strlib_malloc(x,y) strlib_malloc(x,y,__FILE__,__LINE__)

View File

@ -379,3 +379,8 @@ strlib_empty (void)
return (empty_str);
}
void
strlib_init (void)
{
(void) strlib_empty(); // force it to allocate the empty string buffer
}