develooper Front page | perl.perl5.porters | Postings from May 2008

Re: [perl #53244] perl-5.10.0-33733 assertion with JSON::XS-2.2

Thread Previous | Thread Next
From:
Marc Lehmann
Date:
May 9, 2008 19:22
Subject:
Re: [perl #53244] perl-5.10.0-33733 assertion with JSON::XS-2.2
Message ID:
20080510022225.GA1904@schmorp.de
On Fri, May 09, 2008 at 11:04:44PM +0100, Nicholas Clark <nick@ccl4.org> wrote:
> > Because the module works fine with 5.10.0, so it is a regression?
> 
> It's not a regression.

I agree. It's breaking a working module when -g was specified at an
unopportune place.

> The assertions are only enabled if perl is built with the C pre-processor
> macro DEBUGGING defined, which in turn is enabled automatically by Configure
> if $optimize contains -g. (None of that has changed for years)

I didn't know, and, sorry to say so, but after compiler vendors worked so
very hard to guarentee that "-g" doesn't change the semantics of some code
I think it is a very bad idea for perl to do so, especially when it breaks
programs.

But then, I have personally no issue with that (fortunately, I alwyys
added -g to ccflags, not optimize) :)

> catch code that uses the macros when they're not valid. It's never been
> enforced before, but because I was making quite a few changes to the SV
> layout (to save lots of memory), I wanted to be sure that code wasn't doing

While we are at it, I cannot reproduce most of those memory savings. While
perldelta says, for example:

   "use POSIX;" now takes about 200K less memory.

I actually get an _additional_ 0.4MB memory use for use POSIX, compared to
5.8.8, both built with identical settings:

   TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
   pts/0    S+     0:00      0  1626 19309  1364  0.0 perl5.10.0 -esleep 60
   pts/0    S+     0:00      0  1626 24717  3420  0.0 perl5.10.0 -MPOSIX -esleep 60
   pts/0    S+     0:00      0    10 24893  1536  0.0 perl5.8.8 -esleep 60
   pts/0    S+     0:00      2    10 28377  3216  0.0 perl5.8.8 -MPOSIX -esleep 60

Note that perl without any modules is indeed smaller.

And this is not related to POSIX: (almost) any module I load uses more ram
with 5.10 then with an identically built 5.8.8.

> things that were going to break once 5.10 came out.

Apparently this was a failure (but good work, and a good idea).

> The changes are annotated
> here:
> 
> http://public.activestate.com/cgi-bin/perlbrowse?filename=sv.h&show_blame=Show+Annotated+File

I must admit I don't understand where to get the annotations from that
page (but I don't have to, so its not important). Do you mean the comments
that get extrated into perlapi as annotations?

> Specific changes to SvCUR() were made with changes 27328 and 29219, which
> date from Feburary 2006 and November 2006 respectively. So they've been
> present for a long time, and were useful as part of Andreas' smoking of
> CPAN modules with blead in the years leading up to 5.10.0

Not sure what the message here is. Lots of code in perl is very old, that
has little relevance to its correctness or usefulness. Or wether it breaks
code when not compiled in by default.

I must admit, your mail confused me.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg@goof.com
      -=====/_/_//_/\_,_/ /_/\_\

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About