This Week on perl5-porters - 25-31 May 2008

  "I've fixed the bug itself as change #33952. (Whoo hoo! A bug that
  was easy to locate, fix, and test for. You don't see that very often
  :-)"                                    -- Dave Mitchell, happy man.

Topics of Interest

"File::Path::mkpath()" incompatibility in perl-5.10

  David Landgren replied to Jan Dubois on the subject of inodes on
  Win32. "perlport" says the second value in the return list from "stat"
  is always 0, and this throws off the code that detects race
  conditions. As such, there's no way to determine if an attacker is
  manipulating the filesystem for some nefarious purpose while a
  long-running "rmtree()" call is running.

  As it turns out, Windows filesystems may be intrinsically immune to
  the attack, since you cannot move (or remove) a directory if any
  process whatsoever has set their current working directory to it, or
  any directory underneath it.

    different strokes for different folks
    http://xrl.us/bmj52

"Data::Dumper" patch

  Earlier this month, Rafaël Garcia-Suarez applied a patch from Alexandr
  Ciornii to get the bleading "Data::Dumper" to compile on older perls.
  Dave Mitchell wondered whether C compilers understood Perl comments.
  If not, this may mean that the patch needs patching.

    slash that hash
    http://xrl.us/bmj56

Change 30608 (17 March 2007)

  Bram looked at change #30608, which involved commenting out a "study"
  operation in op/taint.t. This results in the tests not really testing
  what they set out to test.

  He asked if anyone could recall why the line was commented out. No
  takers, but I wonder if it has something to do with Yves Orton
  discovering and UTF-8 and "study" studiously ignored each other in the
  regexp engine.

    http://xrl.us/bmj58

Consistent use of honor (instead of honour)

  The British speller in me hates this idea.

    but consistency has a lot going for it
    http://xrl.us/bmj6a

"Module::Build" changes for VMS

  John E. Malmberg revived the stranded changes for "Module::Build" that
  were put aside in the lead up to 5.10.0. Essentially a number of
  Unixisms needed to be excised from the code.

  Craig A. Berry went through the changes with a fine-toothed comb and
  picked up a number of glitches that needed work. John revised his work
  and then had a patch ready for consideration by Ken Williams.

  Craig found it hard to reconcile blead's "Module::Build" with Ken's
  own repository. Ken found himself regretting Perforce's ability to
  track the integration of patches. The plan at the end of the week was
  to attack Ken's repository directly, and then dump something from that
  back into blead.

  John also figured out what was going wrong with "Archive::Tar"
  creating an unopenable archive on VMS, which would have them within an
  inch of having "Module::Build" build and test perfectly on VMS.

    tales of the reconstruction
    http://xrl.us/bmj6c

  John detailed the "Archive::Tar" issue with VMS regarding
  Module/Build/t/ppm.t in more detail in another thread. The problem
  boils down to the different ways (stream and record oriented) that one
  may employ to read a file on VMS. After this is fixed all that will be
  needed is to mark VMS as having case-insensitive file names.

    http://xrl.us/bmj6e

Confused about "close STDIN"

  Bram was looking over an old bug report and trying to understand what
  happens when one closes "STDIN", and wondered if the documentation for
  "close" needed improvement.

  Mark Mielke explained the difference between file descriptor 0 and the
  "STDIN" file handle, which, through an extraordinary coincidence of
  fate are usually the same, but sometimes aren't.

  In which case, the documentation about "STDIN" needs to be worked on,
  rather than "close".

    closer
    http://xrl.us/bmj6g

ext/POISX/t/sigaction.t failing under harness

  (And the rest of the title of the thread is "...but not under test
  (and not failing with threads under harness)"). Bram spent some time
  working to reduce the problem down to the tiniest test case possible,
  and in getting down to about five lines of real code, succeeded.

  When he asked if anyone had an explanation for what was happening,
  however, he met with less success.

    http://xrl.us/bmj6i

TODO of the week

  Something for a person with basic Perl skills.

Profile "installman"

  The "installman" script is slow. All it is doing text processing,
  which we're told is something Perl is good at. So it would be nice to
  know what it is doing that is taking so much CPU, and where possible
  address it.

  (And there's a hot new profiler in town, "Devel::NYTProf").

Patches of Interest

Testing $/ with in memory files

  Back in April, Bram had added some new regression tests for bug
  #44833, that had itself been resolved many moons ago. At the time,
  Rafaël applied them. Early in May, Ben Morrow suggested that Bram's
  technique was not very cross-platform compatible, relying as it did on
  a specific environment variable that specific Unix shells leave
  behind. At the same time, Ben suggested a better internal-to-Perl
  condition, so Bram rewrote the test to use that.

  This week Bram pinged the list since the change still hadn't been
  committed.

    http://xrl.us/bmj6k

Recent lib.pm change imposes dual-life

  Steffen Mïller was keen to see an updated lib.pm make it out to CPAN,
  since that would allow him to upgrade older perl installations. This
  in turn would stop "use lib 'foo.par'" from issuing a useless warning.

  He tracked down Tim Bunce, who was listed as the current author. Tim
  pleaded amnesia. Steffen took over maintenance, and posted a few
  tweaks that would allow him to ready the module for a CPAN release.
  Rafaël tweaked the license section to make it friendlier to license
  lawyers.

    lib liberation front
    http://xrl.us/bmj6n

Watching the smoke signals

Smoke [5.11.0] 33949 FAIL(F) MSWin32 WinXP/.Net SP3 (x86/2 cpu)

  Craig Berry glanced at one of Steve Hay's regular reports of smoke
  failures to the list, and suggested he try one of Craig's own tweaks
  to fix a failure that he had seen appearing on VMS.

    preserving bits with File::Copy
    http://xrl.us/bmj6p

New and old bugs from RT

Document behaviour when optional match does not match (#3589)

  Reini Urban wrote a patch for "perlre" in an attempt to resolve an
  eight year old bug report from Hugo van der Sanden, in which he was
  misled by the documentation (or rather, its ambiguity) to think that

    "babadad" =~ /^((.)?a\2)+$/

  should succeed. Other porters explained the reasoning behind the
  observed behaviour, and it was agreed that the documentation needed to
  clarify this issue.

  And so it came to pass that Reini added a paragraph to "perlre" to do
  just that. Bram considered the explanation without looking at the bug
  report, and admitted that he didn't have a clue as to what it meant.

    needs work
    http://xrl.us/bmj6r

\n after $ in regex (was: Strange regex failure?) (#35877)

  As Bram continued his culling of RT issues, he came across the issue
  of "qq[>10\n] =~ />\d+$ \n/ix" failing, where the original ticket
  author thought it should succeed.

  As it turns out, on 5.10 and beyond, it does in fact succeed. But then
  Bram thought it might be worthwhile checking what happens when one
  omits the "/x" modifier, and was surprised to see that it failed,
  along with four other variations on a theme.

  Zefram explained that this was to be expected, since the lack of
  spaces meant that "dollar something" turned into a real Perl scalar
  that contained something completely different, thus causing the match
  to fail.

    meta dollar
    http://xrl.us/bmj6t

"sub foo(@$) {}" should generate an error (#36673)

  Renée Bäcker thought that a prototyped function that has no body
  should be an error. Rafaël thought so too, but said that he needed to
  think about the ramifications a bit more. In the meantime, Renée
  revised the path.

    http://xrl.us/bmj6v

Certain string handling functions don't warn on undef (#36875)

  Now that "uc", "lc" and the like warn if asked to operate on "undef",
  Bram completed the picture by making "reverse undef" warn as well.

    http://xrl.us/bmj6x

Threads + "require IO" causes segmentation fault (#37076)

  Bram reported that this bug does not manifest itself on 5.8.9-tobe,
  nor on 5.10 and beyond. He concluded that the bug had likely been
  fixed, but asked for people on other platforms to take the test script
  for a spin.

    reflexions in a threaded perl
    http://xrl.us/bmj6z

Back reference problem with quantified groups (#38133)

  Bram supplied a TODO test for this problem, which was still waiting to
  be applied at the end of the week.

    http://xrl.us/bmj63

Fix bit-fields for VC ("GIMME_Vbroken" with 5.10.0/GCC and XS?) (#50386)

  Dave Mitchell asked if the patch that resolved this bug was safe for
  5.10.1, but Jan Dubois admitted that it wasn't binary compatible. But
  it's not that bad, just a bit of bloat.

    http://xrl.us/bmj65

Prototypes sneakily break :lvalue subs (#51408)

  Rafaël Garcia-Suarez wondered if this problem could be solved through
  some judicious tweaking of ENTERSUB flags.

    http://xrl.us/bmj67

Doubled <meta http-equiv> header (#51542)

  Renée supplied a patch to fix the two code paths in CGI.pm which could
  lead to "<meta http-equiv>" headers being emitted twice.

    http://xrl.us/bmj69

Trying to build perl5.8.3 under Maemo environment. (#53328)

  After much to'ing and fro'ing, Bram managed to get Devendra Purbiya up
  and running. A symbolic link for "pwd" did the trick.

    http://xrl.us/bmj7b

Bug with "index()" matching beyond end of string when \0 bytes (00000000) are involved (#53746)

  Once he saw the TODO test, Dave Mitchell realised that there was a
  really simple fix for the bug.

    so he fixed it
    http://xrl.us/bmj7d

"usethread=no" Configure compiler test file try.c is missing. (#54042)

  H.Merijn Brand was puzzled as to why Reini Urban had only recently
  begun (for some definition of recent) to encounter this error, since
  the code in question has been touched in over a year. Andy Dougherty
  suspected that something must have changed in Reini's setup, to
  trigger a walk down a previously unvisited codepath.

  Reini concurred, saying that an upgrade to cygwin2.dll could have
  changed the result from a "fflush(NULL)" call, which is what tripped
  up "Configure".

    all fixed
    http://xrl.us/bmj7f

Double free or corruption using threads and goto (#54756)

  Luis Lencina reported this problem on 5.8.8, but Dave Mitchell was
  unable to reproduce it on 5.10 and beyond.

    a good reason to upgrade
    http://xrl.us/bmj7h

Perl 5.10 memory corruption (#54758)

  George Greer reported a problem with in-place sorts on 5.10. Rafaël
  tried to diagnose the problem, and Moritz Lenz tried to bisect the
  error to determine what patch caused the error. But while they were
  trying to work things out, Dave Mitchell strolled by and tweaked a
  couple of spots in pp_sort.c.

  George was happy to report that Dave's patch corrected his cut-down
  test, as well as the real-life code from whence the problem came.

    wrap it up as a test
    http://xrl.us/bmkmo

perlio.c has a problem (both 5.8 and 5.10) (#54828)

  Goro Fuji reported an issue with "PerlIORaw_pushed()" and offered a
  patch to fix things up. Rafaël Garcia-Suarez agreed with the reasoning
  and applied one part of the patch. For the second part, he deferred to
  people with more experience with Windows, since he wasn't sure why it
  was needed.

    http://xrl.us/bmj7j

Perl 5.10 segmentation fault using "Net::SSH2::Channel" (#54908)

  Sebastien Rodriguez suffered segmentation faults with 5.10 when trying
  to use this module. Steve Peters built the module, and was alarmed by
  the number of compiler warnings it emitted. He also saw it fail an
  assertion.

  Ævar Arnfjörð Bjarmason traced the problem down to the fact that it
  used the PV slot of a GV to store a pointer to a custom data
  structure, which reminded him of "Math::Pari" (another module that
  gave the porters grief a few weeks back).

  On IRC, the concensus was that it would be very difficult to tweak the
  core to play nicely with the module, so the module will just have to
  adapt. What is more, despite the extensive test campaign that the
  porters conducted, it turns out that the test suite itself was
  hopelessly inadequate, since it passed, and yet the most basic real
  usage failed.

  Which also meant that not a single person had tried 5.9.x with the
  module in the months leading up to 5.10.

    so when we say test, TEST!
    http://xrl.us/bmj7m

IO on active pipes fails after ithread fork in 5.8.8 (#54926)

  John Heidemann wrote about a simple program that performs differently
  depending on how it is run:

    cat data | prog
    # or
    prog <data

  Specifically, according to "strace", the internals perform an "lseek"
  after spinning off a new thread, and this appears to fail in the first
  example.

    that's not supposed to happen
    http://xrl.us/bmj7o

Attempt to free unreferenced scalar fiddling with the symbol table (#54934)

  Niko Tyni showed a tiny program that demonstrated a larger problem
  that occurs when one tries to blow away a dynamically created package.
  I give him bonus points for taking the time to bisect the change log
  and isolate the offending patch.

  Armed with that information, Rafaël Garcia-Suarez was able to supply a
  patch that fixed up the problem, but he had a sneaking feeling that it
  might cause a memory leak. Alex Vandiver was pretty pleased, since a
  corollary of the bug fix was that SVK no longer segfaults on 5.10 and
  blead.

    heads up for 5.10.1
    http://xrl.us/bmj7q

Building 5.6.2 Fails with -Duseshrplib on Leopard (#54952)

  David Wheeler had problems with a build of 5.6.2, and despite its
  exceptional old age, a number of porters spent a surprising amount of
  time trying to figure out why it had stopped working and what one
  might to be able to do in order to get it working again.

    it's dead Jim
    http://xrl.us/bmj7u

Crash on binary-or lvalue operation on "qr//" (#54956)

  Steve Peters delved further into this problem and discovered that "&="
  fails in the same way (which means "^=" is probably a likely bet too)
  and any sort of reference to a non-numeric scalar would suffice.

  He graciously stepped aside to wait in case anyone felt like jumping
  in and fixing it. He can dream, right?

    no, after you
    http://xrl.us/bmj7w

Strange "map {}" behavior when returning two values (#54974)

  David Wheeler was bitten by the tokeniser choosing between a code
  block and an anonymous hash and taking the wrong decision. The
  disambiguation involves using a leading semi-colon or parentheses.
  Debate raged as to what would be clearest to a maintenance programmer
  of little brain.

    http://xrl.us/bmj7y

Initial make failing, but don't know why (#55008)

  Steve Michel was mystified by a build failing. Andy Dougherty was
  quite puzzled as well, but thought some of the configure switches
  seemed a little unusual. Jim Cromie pinged the list about his patch
  from last year that would outlaw unrecognised switches.

    http://xrl.us/bmj72

Problem with porting perl on Armel (#55038)

  Devendra Purbiya continued to have build troubles, this time on an ARM
  platform. All sorts of weird failures were encountered. Bram patiently
  walked Devendra through a series of steps to try and get to the bottom
  of the issues.

    http://xrl.us/bmj74

Debugger loops infinitely with "__DIE__" and "DESTROY" (#55084)

  Peter Scott showed a nifty technique to give the debugger a bad case
  of indigestion, and traced the problem all the way back to 5.004.

    time to die
    http://xrl.us/bmj76

Perl5 Bug Summary

  Hey, we cracked he 1600 barrier!

    280 new + 1309 open = 1589 (+12 -54)
    http://xrl.us/bmj78
    http://rt.perl.org/rt3/NoAuth/perl5/Overview.html

New Core Modules

  Thread::Queue 2.09
      Jerry D. Hedden pushed a new version out that deals more
      gracefully with older perls.

        http://xrl.us/bmj8a

In Brief

  Andreas König filed bug #54776 concerning a failure with
  "Archive::Extract" on 5.10.1-tobe, and then later reported that change
  #33470 corrected the problem.

    http://xrl.us/bmj8c

  Renée Bäcker found some tickets in RT that had patches ready for the
  picking, as well as some more that could be closed.

    low hanging fruit
    http://xrl.us/bmj8e

  Renée also supplied documentation for attributes.pm to render it less
  recursive and incomplete (bug #36516)

    http://xrl.us/bmj8g

  H.Merijn Brand found some warnings in a Unicode test environment when
  dealing with "Module::Build".

    nasty unexpected non-continuation bytes, we hates them
    http://xrl.us/bmj8i

  Steve Peters added some more "-fstack-protector" goodness. (bug
  #54120)

    http://xrl.us/bmj8k

  H.Merijn Brand issued a ping for "Math::Complex" regarding smoke
  failures on HP-UX. Since maintenance is currently in a state of flux,
  somewhere between Jarkko Hietaniemi and Zefram, the message went
  adrift.

    http://xrl.us/bmj8v

  Andy Dougherty and Craig Berry managed to propagate new i_gdbm*ndbm
  variables somewhere in the depths of Configure.

    http://xrl.us/bmj8x

Last week's summary

  I think these must have got wedged in a moderator queue somewhere.

    This Week on perl5-porters - 11-17 May 2008
    http://xrl.us/bmj8z

    This Week on perl5-porters - 18-24 May 2008
    http://xrl.us/bmj83

About this summary

  This summary was written by David Landgren.

  Weekly summaries are published on http://use.perl.org/ and posted on a
  mailing list, (subscription: [EMAIL PROTECTED]). The
  archive is at http://dev.perl.org/perl5/list-summaries/. Corrections
  and comments are welcome.

  If you found this summary useful, please consider contributing to the
  Perl Foundation or attending a YAPC to help support the development of
  Perl.

--
stubborn tiny lights vs. clustering darkness forever ok?

Reply via email to