Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created February 24, 2017 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/dba1581bddeb4f6d99e3c2c3b51d96e8 to your computer and use it in GitHub Desktop.
Save zoffixznet/dba1581bddeb4f6d99e3c2c3b51d96e8 to your computer and use it in GitHub Desktop.
cpan@perlbuild2~/CPANPRC/rakudo (nom)$ gd
diff --git a/src/vm/moar/ops/perl6_ops.c b/src/vm/moar/ops/perl6_ops.c
index e087a8e..d4215d1 100644
--- a/src/vm/moar/ops/perl6_ops.c
+++ b/src/vm/moar/ops/perl6_ops.c
@@ -263,9 +263,18 @@ static MVMuint8 s_p6recont_ro[] = {
};
static void p6recont_ro(MVMThreadContext *tc, MVMuint8 *cur_op) {
MVMObject *check = GET_REG(tc, 2).o;
+ printf("here1\n");
if (STABLE(check)->container_spec == Rakudo_containers_get_scalar()) {
MVMObject *desc = ((Rakudo_Scalar *)check)->descriptor;
+ printf("here2\n");
+ if ( !MVM_is_null(tc, desc) ) { printf("here2.1.1\n"); }
+ printf("here2.1\n");
+ if ( ((Rakudo_ContainerDescriptor *)desc) ) { printf("here2.1.2\n"); }
+ printf("here2.2\n");
+ if ( ((Rakudo_ContainerDescriptor *)desc)->rw ) { printf("here2.1.3\n"); }
+ printf("here2.3\n");
if (!MVM_is_null(tc, desc) && ((Rakudo_ContainerDescriptor *)desc)->rw) {
+ printf("here3\n");
/* We have an rw container; re-containerize it. */
MVMROOT(tc, check, {
MVMObject *result = MVM_repr_alloc_init(tc, Scalar);
@@ -275,7 +284,9 @@ static void p6recont_ro(MVMThreadContext *tc, MVMuint8 *cur_op) {
});
return;
}
+ printf("here4\n");
}
+ printf("here5\n");
GET_REG(tc, 0).o = check;
}
here1
here2
here2.1.1
here2.1
here2.1.2
here2.2
Segmentation fault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment