-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I get this strange error:
Inconsistency detected by ld.so: dl-fini.c: 87: _dl_fini: Assertion `ns != LM_ID_BASE || i == nloaded' failed!
The code used to work before until I rearranged it but I got segmentation fault when calling libc fgets twice or more until this recent error about assertion failed.
Here is the code causing the error:
get_inf :: fn(arg: *u8) -> []string {
_rcp_file : rawptr = fopen(arg, "r".raw)
if !_rcp_file {
printf("error: could not open file: '%s'\n".raw, arg)
exit(1)
}
INF_PKG, INF_VER, INF_REL: string
rcp_buff_pkg, rcp_buff_ver, rcp_buff_rel: *u8
rcp_line_pkg : i32 = 100
//rcp_line_ver : i32 = 50
//rcp_line_rel : i32 = 10
INF_PKG.raw = fgets(rcp_buff_pkg, rcp_line_pkg, _rcp_file)
//INF_VER.raw = fgets(rcp_buff_ver, rcp_line_ver, _rcp_file)
//INF_REL.raw = fgets(rcp_buff_rel, rcp_line_rel, _rcp_file)
//INF_PKG_CUT := strstr(INF_PKG.raw, ":".raw)
//INF_VER_CUT := strstr(INF_VER.raw, ":".raw)
//INF_REL_CUT := strstr(INF_REL.raw, ":".raw)
//INF_PKG_TRIM := trimstr(INF_PKG_CUT)
//INF_VER_TRIM := trimstr(INF_VER_CUT)
//INF_REL_TRIM := trimstr(INF_REL_CUT)
fclose(_rcp_file)
return []string { "hello", "world", "!" }
//return []string {INF_PKG_TRIM, INF_VER_TRIM, INF_REL_TRIM}
}
Metadata
Metadata
Assignees
Labels
No labels