glibc says memcpy cannot take NULL
At least since 2004, glibc's <string.h> annotates memcpy as __attribute__((__nonnull__)). This basedir is passed to it. When LOAD_RELATIVE is not defined and MJIT_SEARCH_BUILD_DIR is not set, this variable is never updated. Should initialize with meaningful default value.
This commit is contained in:
parent
e7b18ca6d9
commit
34e1079aef
2
mjit.c
2
mjit.c
@ -469,7 +469,7 @@ init_header_filename(void)
|
|||||||
// Root path of the running ruby process. Equal to RbConfig::TOPDIR.
|
// Root path of the running ruby process. Equal to RbConfig::TOPDIR.
|
||||||
VALUE basedir_val;
|
VALUE basedir_val;
|
||||||
#endif
|
#endif
|
||||||
const char *basedir = NULL;
|
const char *basedir = "";
|
||||||
size_t baselen = 0;
|
size_t baselen = 0;
|
||||||
char *p;
|
char *p;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user