It fails here: if(sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVGV)) ch = (SSH2_CHANNEL *)SvIVX((SV*)SvRV(ST(0))) It's using the PV slot of a GV to store a pointer to a custom datastructure (similar to Math::Pari if I'm not mistaken). This results in a failed assertion (but not a segfault) on my system: sh-3.1$ perl5.11.0 -Mblib -MNet::SSH2 -E 'my $ssh2 = Net::SSH2->new; $ssh2->connect(q[localhost]) or die $!; if ($ssh2->auth_password(qw(avar password))) { my $chan = $ssh2->channel; $chan->exec(q[date]) }' perl5.11.0: SSH2.c:2350: XS_Net__SSH2__Channel_process: Assertion `!((((_svi)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((_svi)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((_svi)->sv_flags & 0xff)) == SVt_PVLV))' failed. AbortedThread Previous | Thread Next