Pure PIR segfault with empty 2nd proxy param to schedule_proxied() #924

rurban opened this Issue Jan 10, 2013 · 4 comments

2 participants

Parrot Virtual Machine member
   .local pmc interp, task, code, sem_priv
    interp = getinterp
    code = get_global 'some_function'
    task = new 'Task', code
    setattribute task, 'code', code
    interp.'schedule_proxied'(task, sem_priv)


Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b3af63 in Parrot_ParrotInterpreter_nci_schedule_proxied (interp=0x412050,
  _self=PMC<ParrotInterpreter> = {...})
   at ./src/pmc/parrotinterpreter.pmc:836
836         Interp                  * const proxied_interp = core_struct->interp;

(gdb) p proxy
$1 = PMC<Null> = {[] = }

schedule_proxied must be super-fast, but this should error, not segfault.

@rurban rurban was assigned Jan 10, 2013
Parrot Virtual Machine member

Please add this as a test to t/pmc/task.t

Parrot Virtual Machine member

As of 829fa8f, this code does not segfault in Darwin

$ ./parrot main.pir 
Null PMC access in isa()
current instr.: 'main' pc 5 (main.pir:8)
Parrot Virtual Machine member

@rurban can you recheck to see if this is still happening for you? Does it happen all the time, or only occasionally? What kind of hardware/OS does the problem occur on for you?

Parrot Virtual Machine member

What is the expected behavior of the above code? If you let me know, I can write the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment