JuliaPy / JuliaPy/PyCall.jl

Segmentation fault ( Pycall [BUG] Segmentation fault at 0x0000000000000010 )

Aperta
#1,082 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.5k
Fork
186
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

there is problem in the method import_module of file "pycall-1.5.2/lib/pycall.rb"

def import_module(name)
LibPython::Helpers.import_module(name)
end

it calls a c method in this file "ext/pycall/pycall.c"

# c language method
static VALUE
pycall_libpython_helpers_m_import_module(int argc, VALUE *argv, VALUE mod)
{
VALUE name, globals, locals, fromlist, level;
char const *name_cstr;

rb_scan_args(argc, argv, "14", &name, &globals, &locals, &fromlist, &level);

if (RB_TYPE_P(name, T_SYMBOL)) {
name = rb_sym_to_s(name);
}

name_cstr = StringValueCStr(name);

if (argc == 1) {
return pycall_import_module(name_cstr);
}

if (argc == 5) {
level = rb_check_to_integer(level, "to_int");
}
else {
/* TODO: set the default level to 0 */
}

return pycall_import_module_level(name_cstr, globals, locals, fromlist, NUM2INT(level));
}

which again calls the previous method and the process continues in an infinite loop, hence segmentation fault occurs

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.