Bug #93888 for Sereal-Encoder: doesn't preserve special SV identity
This queue is for tickets about the Sereal-Encoder CPAN distribution.
Report information
The Basics
People
Owner:
Nobody in particular
Requestors:
zefram [...] fysh.org
Cc:
AdminCc:
BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)
Attachments
special_sereal.pl
From demerphq@gmail.com Sun Mar 16 06: | 56:24 2014 |
MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-3.73 tagged_above=-99.9 required=10 tests=[AWL=0.969, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FROM_OUR_RT=-2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham |
In-Reply-To: | <rt-4.0.18-15449-1394898804-1507.93888-4-0@rt.cpan.org> |
X-Spam-Flag: | NO |
X-RT-Interface: | API |
References: | <RT-Ticket-93888@rt.cpan.org> <20140315155312.GD18071@fysh.org> <rt-4.0.18-15449-1394898804-1507.93888-4-0@rt.cpan.org> |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
X-Received: | by 10.140.16.198 with SMTP id 64mr8526998qgb.10.1394967373514; Sun, 16 Mar 2014 03:56:13 -0700 (PDT) |
Message-ID: | <CANgJU+U_6Sv7vS8apQtP7+i3N-LTrxoXmRpHKqOEm3jmhqPybg@mail.gmail.com> |
content-type: | text/plain; charset="utf-8" |
X-RT-Original-Encoding: | utf-8 |
X-Spam-Score: | -3.73 |
Authentication-Results: | hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@gmail.com |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id DE0182404A1 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 06:56:24 -0400 (EDT) |
Received: | from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pe4-a3GaGAl3 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 06:56:23 -0400 (EDT) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 656EA2403BC for <bug-Sereal-Encoder@rt.cpan.org>; Sun, 16 Mar 2014 06:56:23 -0400 (EDT) |
Received: | (qmail 14284 invoked by alias); 16 Mar 2014 10:56:22 -0000 |
Received: | from mail-qa0-f44.google.com (HELO mail-qa0-f44.google.com) (209.85.216.44) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 16 Mar 2014 03:56:16 -0700 |
Received: | by mail-qa0-f44.google.com with SMTP id f11so4281119qae.3 for <bug-Sereal-Encoder@rt.cpan.org>; Sun, 16 Mar 2014 03:56:13 -0700 (PDT) |
Received: | by 10.140.104.200 with HTTP; Sun, 16 Mar 2014 03:56:13 -0700 (PDT) |
Delivered-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
Subject: | Re: [rt.cpan.org #93888] doesn't preserve special SV identity |
Return-Path: | <demerphq@gmail.com> |
Dkim-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=QdxPkFV0sfqKXusfOUjZyyI2G0anN8csLU2BAOGq8SE=; b=AbzKfqlitiNjo0L+ux3UgfSCgiKt6y+ekqH592xbSO+DZo6sBHNyqd25Td03Vvjo83 hbHhz0M+tR+3PnxqNC4rYY9YtOEPsFLTlf1tiRCl/GFqFSZYg5tvf1xt1pI4FYMpAfio jD30GaZCfO4S2gMx0b4gVvnQISA+Ff7/C9T6z2eNG1WMVBAe9AEI9XPfknBcZmesgG3M Db8mUrHnD+N2+IAqA00dBuKMgvTYiwIF17yWGNL165AfZW2L5nZ69KMn7hvCDF2JMXZg HZ2y4apADZQeNwfECUgOBs1HkV+Emn1Wx9PYNvbQxFB0yUyp9ARKoeUYDS70uSshsj8+ RqnQ== |
X-Spam-Check-BY: | la.mx.develooper.com |
X-Original-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
X-RT-Mail-Extension: | sereal-encoder |
Date: | Sun, 16 Mar 2014 11:56:13 +0100 |
X-Spam-Level: | |
To: | bug-Sereal-Encoder@rt.cpan.org |
From: | demerphq <demerphq@gmail.com> |
RT-Message-ID: | <rt-4.0.18-10975-1394967385-88.93888-0-0@rt.cpan.org> |
Content-Length: | 1525 |
On 15 March 2014 16:53, Zefram via RT <bug-Sereal-Encoder@rt.cpan.org> wrote:
Show quoted text
> Sat Mar 15 11:53:24 2014: Request 93888 was acted upon.
> Transaction: Ticket created by zefram@fysh.org
> Queue: Sereal-Encoder
> Subject: doesn't preserve special SV identity
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: zefram@fysh.org
> Status: new
> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93888 >
>
>
> There are some special standard SVs that can be readily referenced
> by Perl code, and so can be readily distinguished from ordinary SVs
> that have the same value. Sereal doesn't preserve their identities.
> It arguably should. Demonstration program attached.
We have tags for undef/true/false, and code for detecting them,
however as you observe it does not work very well.
When I did the initial implementation of these I ran into this problem
and filed a perlbug: perl #114838
https://rt.perl.org:443/rt3/Ticket/Display.html?id=114838
I will poke into this, but further investigation from you would be helpful.
The existing logic for handling this in srl_encoder.c at line 1353:
if (src == &PL_sv_yes) {
srl_buf_cat_char(enc, SRL_HDR_TRUE);
--enc->recursion_depth;
return;
}
else
if (src == &PL_sv_no) {
srl_buf_cat_char(enc, SRL_HDR_FALSE);
--enc->recursion_depth;
return;
}
--
perl -Mre=debug -e "/just|another|perl|hacker/"
From demerphq@gmail.com Sun Mar 16 07: | 48:48 2014 |
MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-3.774 tagged_above=-99.9 required=10 tests=[AWL=0.925, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FROM_OUR_RT=-2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham |
In-Reply-To: | <CANgJU+U_6Sv7vS8apQtP7+i3N-LTrxoXmRpHKqOEm3jmhqPybg@mail.gmail.com> |
X-Spam-Flag: | NO |
X-RT-Interface: | API |
References: | <RT-Ticket-93888@rt.cpan.org> <20140315155312.GD18071@fysh.org> <rt-4.0.18-15449-1394898804-1507.93888-4-0@rt.cpan.org> <CANgJU+U_6Sv7vS8apQtP7+i3N-LTrxoXmRpHKqOEm3jmhqPybg@mail.gmail.com> |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
X-Received: | by 10.224.74.201 with SMTP id v9mr177702qaj.94.1394970517660; Sun, 16 Mar 2014 04:48:37 -0700 (PDT) |
Message-ID: | <CANgJU+Xhhgzy2E9Os6DtXMit3+P3wva=ty79vT8PbbewUOx=Lw@mail.gmail.com> |
content-type: | text/plain; charset="utf-8" |
X-RT-Original-Encoding: | utf-8 |
X-Spam-Score: | -3.774 |
Authentication-Results: | hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@gmail.com |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 9C3E52404A1 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 07:48:48 -0400 (EDT) |
Received: | from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vaS5Vbb3-cnB for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 07:48:46 -0400 (EDT) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 287262403BC for <bug-Sereal-Encoder@rt.cpan.org>; Sun, 16 Mar 2014 07:48:46 -0400 (EDT) |
Received: | (qmail 24422 invoked by alias); 16 Mar 2014 11:48:44 -0000 |
Received: | from mail-qc0-f173.google.com (HELO mail-qc0-f173.google.com) (209.85.216.173) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 16 Mar 2014 04:48:40 -0700 |
Received: | by mail-qc0-f173.google.com with SMTP id r5so4829955qcx.32 for <bug-Sereal-Encoder@rt.cpan.org>; Sun, 16 Mar 2014 04:48:37 -0700 (PDT) |
Received: | by 10.140.104.200 with HTTP; Sun, 16 Mar 2014 04:48:37 -0700 (PDT) |
Delivered-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
Subject: | Re: [rt.cpan.org #93888] doesn't preserve special SV identity |
Return-Path: | <demerphq@gmail.com> |
Dkim-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XwHwbFgtntKNfuN+thQlH34H1yev0gsZoV5mjfGqzWA=; b=lPerzYw8v4cj0hbbNCTt9N8dGR07Gw1nhOL0MNKA51YG1/IDdGvweUVx/qbXJXjNEG dt8OWT6BYWWp0ZRzje/bSIekymNSFSlK5D3pa7O9aNO2PFdpHnwcSMSeuHSnx47cLVnX fYI33//JnQQMEgrOwRUdd9zxnkNjcRdCIAdjWUiNmYL+W9C5+izGGfl3V8XKpW6xpHZE 3Z1ZJGZ+XIFoUW3w5zRSpT57EYSYeRGXGyyVpuuFH+U7MiO2tVgUe0tc3IxwPBY4DNcz XH935mjNYxk0iB6JO1u2oIh4JWi/DIuIdZVlApc1v1UYOXoP4qU6/NP5smgjEwliP/vt douw== |
X-Spam-Check-BY: | la.mx.develooper.com |
X-Original-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
X-RT-Mail-Extension: | sereal-encoder |
Date: | Sun, 16 Mar 2014 12:48:37 +0100 |
X-Spam-Level: | |
To: | bug-Sereal-Encoder@rt.cpan.org |
From: | demerphq <demerphq@gmail.com> |
RT-Message-ID: | <rt-4.0.18-17714-1394970530-876.93888-0-0@rt.cpan.org> |
Content-Length: | 2503 |
On 16 March 2014 11:56, demerphq <demerphq@gmail.com> wrote:
Show quoted text
> On 15 March 2014 16:53, Zefram via RT <bug-Sereal-Encoder@rt.cpan.org> wrote:
This turns out to be a decoder issue. I can fix the decoder so it
passes 5 of your six tests, one however does not pass
\do { my $z = undef },
Which fails because perl says "not-special" and Sereal starts saying "undef".
I think there is a conceptual problem with undef. We have the tag
SRL_HDR_UNDEF which is used to represent any undef var, including true
PL_sv_undef. If we want to track PL_sv_undef properly I think we have
to introduce a new tag, SRL_HDR_PERL_UNDEF, which would be used when
it really is PL_sv_undef.
I am not sure that this is worth it. So I am inclined to keep this
behavior for TRUE/FALSE, but not keep it for UNDEF.
The patch with one failing test is in the custom_op branch as:
commit b4ed5b29aba568ec0bde310eed2afcf3e56811a1
Author: Yves Orton <yves.orton@booking.com>
Date: Sun Mar 16 12:48:00 2014 +0100
fix [rt.cpan.org #93888] does not preserve special SV identity
Includes one failing test for SRL_HDR_UNDEF related to \do{my $x= undef}
which suggests we may have to undo the UNDEF part of this patch and live
with the fact that we dont round trip \undef properly, or we have to
patch the protocol to support it (boo)
--
perl -Mre=debug -e "/just|another|perl|hacker/"
>> Sat Mar 15 11:53:24 2014: Request 93888 was acted upon.
>> Transaction: Ticket created by zefram@fysh.org
>> Queue: Sereal-Encoder
>> Subject: doesn't preserve special SV identity
>> Broken in: (no value)
>> Severity: (no value)
>> Owner: Nobody
>> Requestors: zefram@fysh.org
>> Status: new
>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93888 >
>>
>>
>> There are some special standard SVs that can be readily referenced
>> by Perl code, and so can be readily distinguished from ordinary SVs
>> that have the same value. Sereal doesn't preserve their identities.
>> It arguably should. Demonstration program attached.
>
> We have tags for undef/true/false, and code for detecting them,
> however as you observe it does not work very well.
>
> When I did the initial implementation of these I ran into this problem
> and filed a perlbug: perl #114838
> https://rt.perl.org:443/rt3/Ticket/Display.html?id=114838
>
> I will poke into this, but further investigation from you would be helpful.
>
> The existing logic for handling this in srl_encoder.c at line 1353:
From zefram@fysh.org Sun Mar 16 07: | 54:47 2014 |
MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-3.011 tagged_above=-99.9 required=10 tests=[AWL=0.900, BAYES_00=-1.9, FROM_OUR_RT=-2, SPF_HELO_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham |
In-Reply-To: | <rt-4.0.18-17714-1394970531-56.93888-6-0@rt.cpan.org> |
Content-Disposition: | inline |
X-Spam-Flag: | NO |
X-RT-Interface: | API |
References: | <RT-Ticket-93888@rt.cpan.org> <20140315155312.GD18071@fysh.org> <rt-4.0.18-15449-1394898804-1507.93888-4-0@rt.cpan.org> <CANgJU+U_6Sv7vS8apQtP7+i3N-LTrxoXmRpHKqOEm3jmhqPybg@mail.gmail.com> <CANgJU+Xhhgzy2E9Os6DtXMit3+P3wva=ty79vT8PbbewUOx=Lw@mail.gmail.com> <rt-4.0.18-17714-1394970531-56.93888-6-0@rt.cpan.org> |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
Message-ID: | <20140316115432.GH18071@fysh.org> |
content-type: | text/plain; charset="utf-8" |
X-RT-Original-Encoding: | utf-8 |
X-Spam-Score: | -3.011 |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 82D332404A1 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 07:54:47 -0400 (EDT) |
Received: | from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9uv817fF1bxj for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 07:54:46 -0400 (EDT) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 60FB62403BC for <bug-Sereal-Encoder@rt.cpan.org>; Sun, 16 Mar 2014 07:54:46 -0400 (EDT) |
Received: | (qmail 25568 invoked by alias); 16 Mar 2014 11:54:43 -0000 |
Received: | from river.fysh.org (HELO river.fysh.org) (5.135.154.127) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 16 Mar 2014 04:54:41 -0700 |
Received: | from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1WP9eC-0005r1-Dm; Sun, 16 Mar 2014 11:54:32 +0000 |
Delivered-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
Subject: | Re: [rt.cpan.org #93888] doesn't preserve special SV identity |
Return-Path: | <zefram@fysh.org> |
X-Spam-Check-BY: | la.mx.develooper.com |
X-Original-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
X-RT-Mail-Extension: | sereal-encoder |
Date: | Sun, 16 Mar 2014 11:54:32 +0000 |
X-Spam-Level: | |
To: | demerphq via RT <bug-Sereal-Encoder@rt.cpan.org> |
From: | Zefram <zefram@fysh.org> |
RT-Message-ID: | <rt-4.0.18-18639-1394970888-1564.93888-0-0@rt.cpan.org> |
Content-Length: | 578 |
demerphq via RT wrote:
Show quoted text
>I am not sure that this is worth it. So I am inclined to keep this
>behavior for TRUE/FALSE, but not keep it for UNDEF.
If you were generating an ordinary undef when given PL_sv_undef then this
would probably be OK. But generating PL_sv_undef when given an ordinary
undef is liable to be a problem, because the user may be expecting that
part of the data structure to be mutable, which PL_sv_undef isn't.
Modifying an undef part of a data structure to some other value is
probably much more common than relying on the identity of PL_sv_undef.
-zefram
From demerphq@gmail.com Sun Mar 16 08: | 12:51 2014 |
MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-3.814 tagged_above=-99.9 required=10 tests=[AWL=0.885, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FROM_OUR_RT=-2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham |
In-Reply-To: | <rt-4.0.18-18639-1394970888-709.93888-5-0@rt.cpan.org> |
X-Spam-Flag: | NO |
X-RT-Interface: | API |
References: | <RT-Ticket-93888@rt.cpan.org> <20140315155312.GD18071@fysh.org> <rt-4.0.18-15449-1394898804-1507.93888-4-0@rt.cpan.org> <CANgJU+U_6Sv7vS8apQtP7+i3N-LTrxoXmRpHKqOEm3jmhqPybg@mail.gmail.com> <CANgJU+Xhhgzy2E9Os6DtXMit3+P3wva=ty79vT8PbbewUOx=Lw@mail.gmail.com> <rt-4.0.18-17714-1394970531-56.93888-6-0@rt.cpan.org> <20140316115432.GH18071@fysh.org> <rt-4.0.18-18639-1394970888-709.93888-5-0@rt.cpan.org> |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
X-Received: | by 10.224.22.65 with SMTP id m1mr11222qab.103.1394971954719; Sun, 16 Mar 2014 05:12:34 -0700 (PDT) |
Message-ID: | <CANgJU+V3TjXYLU2fReAuxU_t_r3HqNYQ45XTTiT709_c_vGW0A@mail.gmail.com> |
content-type: | text/plain; charset="utf-8" |
X-RT-Original-Encoding: | utf-8 |
X-Spam-Score: | -3.814 |
Authentication-Results: | hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@gmail.com |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id C9CE82404A1 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 08:12:51 -0400 (EDT) |
Received: | from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ceqNP8LnAKj0 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Sun, 16 Mar 2014 08:12:50 -0400 (EDT) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 420072403BC for <bug-Sereal-Encoder@rt.cpan.org>; Sun, 16 Mar 2014 08:12:50 -0400 (EDT) |
Received: | (qmail 27993 invoked by alias); 16 Mar 2014 12:12:45 -0000 |
Received: | from mail-qc0-f180.google.com (HELO mail-qc0-f180.google.com) (209.85.216.180) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 16 Mar 2014 05:12:38 -0700 |
Received: | by mail-qc0-f180.google.com with SMTP id x3so4736498qcv.25 for <bug-Sereal-Encoder@rt.cpan.org>; Sun, 16 Mar 2014 05:12:34 -0700 (PDT) |
Received: | by 10.140.104.200 with HTTP; Sun, 16 Mar 2014 05:12:34 -0700 (PDT) |
Delivered-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
Subject: | Re: [rt.cpan.org #93888] doesn't preserve special SV identity |
Return-Path: | <demerphq@gmail.com> |
Dkim-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=OyabWf0tvaJPpFwZdI8QxGP4Nt/X/BytVurT1KpHWCM=; b=ru/Z+Yxjvyelt4kAAVZT23+JeuhF/IO0aVIc4BOAwuepkeqltRT087DqpmI1axiYrP y5t7QgSEArUMus435aENofcsAD6amrvr9C8yDGEqIo+lk8ooXnBph1SzfGK1joaaB1Fy wZbDN2TWHl4ctTEUw8GTtqUm70ngIITft9HJIctPhJKZq/0gnLBH0la+gnht3PYKiPij BDjmS05eUnzw1M9GiggbXPVmh1rGFfLHShihejyziQJTheVQxAquDqEawv1wMdyhpvPF BGsvXZh39pRRzJvQdmF0JenGc+l1Okba4K3qbS/qnjf64O3t3MUiIb5TaCLBLZBRlOVH ol7Q== |
X-Spam-Check-BY: | la.mx.develooper.com |
X-Original-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
X-RT-Mail-Extension: | sereal-encoder |
Date: | Sun, 16 Mar 2014 13:12:34 +0100 |
X-Spam-Level: | |
To: | bug-Sereal-Encoder@rt.cpan.org |
From: | demerphq <demerphq@gmail.com> |
RT-Message-ID: | <rt-4.0.18-17714-1394971972-190.93888-0-0@rt.cpan.org> |
Content-Length: | 1326 |
On 16 March 2014 12:54, Zefram via RT <bug-Sereal-Encoder@rt.cpan.org> wrote:
Show quoted text
> Queue: Sereal-Encoder
> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93888 >
>
> demerphq via RT wrote:
Ok, I applied the following:
commit 7f6797eae3f61aa0b9415128518d9d241dbdd20a
Author: Yves Orton <yves.orton@booking.com>
Date: Sun Mar 16 13:09:53 2014 +0100
followup for [rt.cpan.org #93888], leave SRL_HDR_UNDEF unchanged
SRL_HDR_UNDEF represents any undefined value. It does not represent
PL_sv_undef. For that we really need a new tag.
Also on the custom op branch.
Which BTW, we need to finish by adding comments, and renaming the new
subs to something more memorably different.
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
>>I am not sure that this is worth it. So I am inclined to keep this
>>behavior for TRUE/FALSE, but not keep it for UNDEF.
>
> If you were generating an ordinary undef when given PL_sv_undef then this
> would probably be OK. But generating PL_sv_undef when given an ordinary
> undef is liable to be a problem, because the user may be expecting that
> part of the data structure to be mutable, which PL_sv_undef isn't.
> Modifying an undef part of a data structure to some other value is
> probably much more common than relying on the identity of PL_sv_undef.
From zefram@fysh.org Mon Mar 17 07: | 19:32 2014 |
MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-3.034 tagged_above=-99.9 required=10 tests=[AWL=0.877, BAYES_00=-1.9, FROM_OUR_RT=-2, SPF_HELO_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham |
In-Reply-To: | <rt-4.0.18-17714-1394971972-1834.93888-6-0@rt.cpan.org> |
Content-Disposition: | inline |
X-Spam-Flag: | NO |
X-RT-Interface: | API |
References: | <RT-Ticket-93888@rt.cpan.org> <20140315155312.GD18071@fysh.org> <rt-4.0.18-15449-1394898804-1507.93888-4-0@rt.cpan.org> <CANgJU+U_6Sv7vS8apQtP7+i3N-LTrxoXmRpHKqOEm3jmhqPybg@mail.gmail.com> <CANgJU+Xhhgzy2E9Os6DtXMit3+P3wva=ty79vT8PbbewUOx=Lw@mail.gmail.com> <rt-4.0.18-17714-1394970531-56.93888-6-0@rt.cpan.org> <20140316115432.GH18071@fysh.org> <rt-4.0.18-18639-1394970888-709.93888-5-0@rt.cpan.org> <CANgJU+V3TjXYLU2fReAuxU_t_r3HqNYQ45XTTiT709_c_vGW0A@mail.gmail.com> <rt-4.0.18-17714-1394971972-1834.93888-6-0@rt.cpan.org> |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
Message-ID: | <20140317111921.GA2741@fysh.org> |
content-type: | text/plain; charset="utf-8" |
X-RT-Original-Encoding: | utf-8 |
X-Spam-Score: | -3.034 |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D04AD2403A6 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Mon, 17 Mar 2014 07:19:32 -0400 (EDT) |
Received: | from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BbD7V+zqXUx6 for <cpan-bug+Sereal-Encoder@hipster.bestpractical.com>; Mon, 17 Mar 2014 07:19:31 -0400 (EDT) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 5B85E24037F for <bug-Sereal-Encoder@rt.cpan.org>; Mon, 17 Mar 2014 07:19:31 -0400 (EDT) |
Received: | (qmail 14265 invoked by alias); 17 Mar 2014 11:19:30 -0000 |
Received: | from river.fysh.org (HELO river.fysh.org) (5.135.154.127) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 17 Mar 2014 04:19:28 -0700 |
Received: | from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1WPVZh-0000kC-Dr; Mon, 17 Mar 2014 11:19:21 +0000 |
Delivered-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
Subject: | Re: [rt.cpan.org #93888] doesn't preserve special SV identity |
Return-Path: | <zefram@fysh.org> |
X-Spam-Check-BY: | la.mx.develooper.com |
X-Original-To: | cpan-bug+Sereal-Encoder@hipster.bestpractical.com |
X-RT-Mail-Extension: | sereal-encoder |
Date: | Mon, 17 Mar 2014 11:19:21 +0000 |
X-Spam-Level: | |
To: | demerphq via RT <bug-Sereal-Encoder@rt.cpan.org> |
From: | Zefram <zefram@fysh.org> |
RT-Message-ID: | <rt-4.0.18-13846-1395055173-1013.93888-0-0@rt.cpan.org> |
Content-Length: | 81 |
demerphq via RT wrote:
Show quoted text
>Also on the custom op branch.
Code looks fine.
-zefram
This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.
Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.
Time to display: 0.324284 - RT Version 5.0.1
Copyright 1996-2021 »|« Best Practical Solutions, LLC.