On Monday June 27, 2005 10:57, Joe Schaefer wrote:
> David Robins <[EMAIL PROTECTED]> writes:
>
> > C programmers will probably see what's wrong here: copying a volatile
> > pointer (aliasing bug). The char* comes from SvPV_nolen(), which
> > points into the SV, in this case $v from the 'each'. When $v changes,
> > so will the value of path. When $v goes out of scope and its PV gets
> > freed, 'val' will be overwritten by whatever uses the space.
> >
> > The same problem occurs in the other generated char* functions,
> > e.g. domain, port, comment, etc.
>
> Exactly- that's another bug we inherited from ExtUtils::XSBuilder, but
> our current svn trunk includes a fix for that.
Thanks, will grab latest from svn.
Do you know about this one?
httpd-apreq-2 # perl Makefile.PL
perl: 5.8.6 ok
mod_perl: 2.000000 ok
Apache::Test: 1.25 ok
ExtUtils::MakeMaker: 6.17 ok
ExtUtils::XSBuilder: 0.27 ok
build/version_check.pl failed: Test::More version 0.6 unsupported (0.47 or
greater is required).
# Looks like your test died before it could output anything.
Please upgrade Test::More first.
./configure --enable-perl-glue --with-perl="/usr/bin/perl"
sh: ./configure: No such file or directory
Doesn't seem to realize that 0.6 > 0.47. The splitting code in
build/version_check.pl looks very suspicious; perhaps use regular numeric
comparison if there's < 2 dots (see attached diff)?
--
Dave
Isa. 40:31
--- version_check.pl.old 2005-06-27 18:47:28.000000000 -0700
+++ version_check.pl 2005-06-27 18:53:16.000000000 -0700
@@ -212,17 +212,28 @@
my %prereq = (%svn, %build, %perl_glue, %test);
die "$0 failed: unknown tool '$tool'.\n" unless $prereq{$tool};
my $version = $prereq{$tool}->{version};
-my @version = split /\./, $version;
$_ = $prereq{$tool}->{test}->();
die "$0 failed: no version_string found in '$_' for '$tool'.\n" unless /(\d[.\d]+)/;
my $saw = $1;
-my @saw = split /\./, $saw;
-$_ = 0 for @[EMAIL PROTECTED] .. $#version]; # ensure @saw has enough entries
-for (0.. $#version) {
- last if $version[$_] < $saw[$_];
- die <<EOM if $version[$_] > $saw[$_];
+my $fail;
+
+if ($saw =~ /^(\d+)(\.(\d+))$/) {
+ $fail = $saw < $version;
+} else {
+ my @version = split /\./, $version;
+ my @saw = split /\./, $saw;
+ $_ = 0 for @[EMAIL PROTECTED] .. $#version]; # ensure @saw has enough entries
+ for (0.. $#version) {
+ last if $version[$_] < $saw[$_];
+ $fail = 1, last if $version[$_] > $saw[$_];
+ }
+}
+
+if ($fail) {
+ die <<EOM
$0 failed: $tool version $saw unsupported ($version or greater is required).
EOM
}
+
print "$tool: $saw ok\n";