use Perl Log In
This Week on perl5-porters - 18-24 September 2006
If we fake times in our fake stat then fake futimes makes sense. But chown and chmod make little sense to me - only the current process can access the scalar so current UID is owner (and can't exec it).
We could accept the calls and set errno to nearest code that made sense, or perhaps just set the mode so that fake stat saw it.
Have we missed any more fd related calls? If there anything else that we can do to filehandles via perl interface that we missed?
-- Nick Ing-Simmons, discussing how to improve
September 1st, 2006.
Nicholas Clark noticed a sly new technique to fiddle around with unions of structs used for dealing with contexts, which would result in some memory savings that had the added bonus of bringing the size of the structure down to 64 bytes in the ILP32 data model.
(ILP32 means that integers, longs and pointers are all 32-bit data types).
So Nicholas applied the change, and then stepped gingerly back from the keyboard to see what the smoke machines would make of it.
Michael G. Schwern posted his thoughts on what needs to be done to get a new stable version out the door, as well as future directions, which includes the desire for a major rewrite of the documentation.
The list appeared to be furious agreement.
Philip M. Gollucci was having great difficulty in figuring out why gcc
on FreeBSD was stumbling over an
__attribute__ attribute to the
printf C declaration, and declared it to be a show-stopper for 5.10,
since it breaks mod_perl2.
He also supplied the current crop of compiler warnings when compiling
Andy Lester wrote up a report on Klocwork, a source code analysis tool, comparing it to Coverity, another tool that does the same sort of work. Jonathon Rockway appeared interested in following up on the issues uncovered.
Allen Smith posed a most interesting question about sorts, in
relation to genetics, whereby it may be cheap to compare (and thus
order) X and Y, and is comparing Y and Z. But comparing X and Z may
be inconveniently expensive. So he wanted to know if there was a
sort algorithm that allowed one to punt the decision (for instance,
undef), and force the algorithm to use different
comparisons to arrive at a sorted order.
John P. Linderman thought that what Allen really needed was not a
relational sort, but a topological sort, and suggested taking a
Jarkko Hietaniemi posted his latest patchwork to get the perl
distribution comping with C++. The two remaining modules that
still cause problems are
Part of the problem with
Compress::Zlib is that it is
possibly even more widely used than Perl, and its authors are
understandably loathe to give up K&R function signatures. And
it seems the only way to have both K&R and ANSI signatures is
to use horrible #if/#else botches.
Yves Orton taught us a little more about how he taught the regexp optimiser to make use of the information available in zero-width lookahead (and lookbehind) assertions.
Andrew Savige and Yves continued to beat this patch into shape.
Gabor Szabo suggested adding
use strict/use warnings/use base into
the documentation for
Exporter. It seemed to rub a number of people
the wrong way.
John Peacock supplied a patch to fix this problem in
promised a new version of
Rafael thought that it would be difficult to resolve this problem in a sufficiently robust way, mainly because of whitespace issues on the command line.
This was a false alarm that Nicholas Clark figured out was because the code in question was based an incorrect assumption about what pointer to use.
pjm at sanger reported a problem on a Tru64 platform with a test for the parent pid not working correctly. No takers for the moment.
millions and millions of pids http://xrl.us/rx6o
Posting a broken program to a bug-tracker...
Ammon spotted a bug in
File::Find's code, that has probably existed
forever, and fixed it. Steve Peters applied the change.
Aaron Dancygier hit a problem with
enums created with
Peters thought that the bug had possibly been fixed since, and asked for
a test case. Aaron supplied a tarball.
Tune in next week http://xrl.us/rx6q
Tsutomu Ikegami demonstrated how to produce thread deadlocks
(threadlocks?) more or less on demand, and noted that
better but not perfect. Jerry D. Hedden, having spent an inordinate
amount of time on this issue in the recent past wanted to know if
the fault was still observed when using the latest version (v1.42)
threads module. When he tried, everything went swimmingly.
Alex Davies demonstrated a bug that exposed some borderline behaviour
s///g matches and capture variables. Dave Mitchell
noted that the test suite didn't exercise this problem, and wasn't
even sure what the correct behaviour should be anyway.
And if Dave's not sure... http://xrl.us/rx6s
Gozer demonstrated two ways to produce leaks, but Andy Dougherty was unable
to recreate them with a fresh copy of
blead, and asked Gozer to check and
see whether he still saw the same problems with that.
The dynamic duo http://xrl.us/rx6t http://xrl.us/rx6u
%SIG isn't cleared during
Gozer also went on to show that a signal handler may still be
perl_shutdown even though the data structures
for them have been freed. If a signal arrives after this has occurred,
bad things happen.
Steve Hay was trying to bend
PerlIO::encoding to do his bidding, but
was not having much luck.
Sakina Suliman was having trouble building the JPL interpreter.
I guess that's why we pulled it http://xrl.us/rx6x
Sakina then managed to get JPL to run anyway, but then ran into grief a little further on.
The last JPL user on earth http://xrl.us/rx6y
"buu" discovered that if you open a filehandle to an in-memory scalar, and then undef the scalar, perl will segfault. While this is probably a silly thing to do at the best of times, a segfault is perhaps a tad severe to indicate that it's wrong.
One less than last week http://xrl.us/rx62
Get 'em while they're hot http://rt.perl.org/rt3/NoAuth/perl5/Overview.html
SIGILL signals are now delivered
unsafely, paradoxically, for added safety.
David Landgren followed up on a problem posted by Xho Jingleheimerschmidt,
whereby running the same program under taint mode doubled the amount
of memory used. It turned out to be a problem to do with using the
x repetition operator on a list, rather than a scalar. Thus, the
fix was easy, but the reason remains unknown.
The Mac OS/X / SpamAssassin problem continued to roll along with Dominic Dunlop trying to get a handle on the problem. Alas, without success.
Yuval Kogman got caught out by the interpolation of scalar references
in a string and wondered if it was a bug or a feature. It is,
of course, a feature, and
perlref was amended to clarify the
Sebastian Steinlechner spotted a problem with the ordering of
variable declarations in
IO::Socket and got things straightened
Filip Filipov wanted to know how to write
Storable data files
in Java, so that Perl could read them. Yuval Kogman thought that
it would be easier to use YAML or something else.
tied too intimately to Perl's internals to be used easily as an
The way perl allocates more memory than immediately (with an eye
to reducing the amount of subsequent reallocations required) was
tweaked slightly for 5.8.8. It turns out that this caused a
DBD::ODBC . But knowing the cause of the problem is
half way to figuring out the solution.
The optimisations that Nicholas Clark introduced into inlined
constant subroutines a while back caused new warnings to emerge
File::Slurp's test suite. But since the code in question is
somewhat questionable, Nicholas felt that it was working as
Doctor, it hurts when I do this http://xrl.us/rx7a
Yves Orton and Nicholas Clark continued to kick around the idea of a pluggable regexp engine. Stay tuned for more information next week.
Adriano Ferreira added test descriptions to lib/File/Copy.t,
This summary was written by David Landgren. According to my records, last week's summary rolled the total words written past the 100 000 words threshold.
Weekly summaries are published on http://use.perl.org/ and posted on a mailing list, (subscription: firstname.lastname@example.org ). 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 to help support the development of Perl.