in reply to Re^2: xs, threads and panic
in thread xs, threads and panic

Okay. So you are trying to bypass the check that prevent you from passing a reference to a subroutine, by calling into XS and creating an oblique code reference and passing that between threads; and then complaining that it crashes when you bypass the mechanism put in place to prevent you from doing that.

That's cool. WAD. Working as designed. You reach behind the fireguard and get burned.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: xs, threads and panic
by Anonymous Monk on May 20, 2009 at 13:32 UTC
    I tried to help the OP with help from perlcall
    void registCallback(cb) SV* cb; PROTOTYPE: $ PPCODE: if (callback_ref == (SV*)NULL) { callback_ref = newSVsv((SV*)cb); } else { SvSetSV(callback_ref, cb); }
    I didn't realize it was WAD after getting error
    Bizarre copy of CODE in entersub (#1) (P) Perl detected an attempt to copy an internal value that is not copyable.
    :)

      Yeah! Me too.

      It was late (actually, very early), my time and I only scanned the XS code, and didn't look at what he was doing down the bottom in the Perl.

      Having also seen the same 5.10 panic message from previously working 5.8 code, I made assumptions.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.