On Tue, 22 Mar 2005 12:01:30 +0100, Rafael Garcia-Suarez
<[EMAIL PROTECTED]> wrote:
> Rafael Garcia-Suarez wrote:
> > [EMAIL PROTECTED] wrote:
> > >
> > > The patch below against latest bleadperl is a quick and dirty first
> > > attempt at such a fix, which passes all tests (including the new one) 
> > > here;
> > > a cleaner attempt (feel free, that's all I have time for today) would 
> > > hoick
> > > the calculations of o and b up a level to avoid redoing them, and thus 
> > > also
> > > avoid relying on the value of locinput being the same at that point (not
> > > sure if that is guaranteed).
> > >
> > > This patch reverses patch #20538 as a side benefit; it could do with more
> > > eyeballs or some extra bedding-in time before going into the maintenance
> > > branch, but in principle it should be suitable for that.
> >
> > Thanks, applied as #24053 to bleadperl.
> 
> Well, in fact I'm going to revert it, since it makes installman segfault when
> installing perltoc. (tested with a threaded build on linux.)
> 

I can reproduce the problem here as well. I get a seg fault that
appears to ultimately come from a FREETMPS call in pp_nextstate. The
regex that is responsible is the following one from lib/pod/Man.pm

    # func(n) is a reference to a manual page.  Make it \fIfunc\fR\|(n).
    s{
        ( \b | \\s-1 )
        ( [A-Za-z_] (?:[.:\w]|\\-|\\s-?[01])+ )
        (
            \( \d [a-z]* \)
        )
    } { $1 . '\f(IS' . $2 . '\f(IE\|' . $3 }egx;


It goes crazy around the following point in perltoc.pod:

=head2 CPAN - query, download and build perl modules from CPAN sites

=over 4

=item SYNOPSIS

=item STATUS

=item DESCRIPTION

=over 4

=item Interactive Mode

Searching for authors, bundles, distribution files and modules, make, test,
install, clean  modules or distributions, get, readme, look module or
distribution, ls author, Signals

=item CPAN::Shell

=item autobundle

=item recompile

=item The four C<CPAN::*> Classes: Author, Bundle, Module, Distribution

=item Programmer's interface

expand($type,@things), expandany(@things), Programming Examples

=item Methods in the other Classes

CPAN::Author::as_glimpse(), CPAN::Author::as_string(),
CPAN::Author::email(), CPAN::Author::fullname(), CPAN::Author::name(),
CPAN::Bundle::as_glimpse(), CPAN::Bundle::as_string(),
CPAN::Bundle::clean(), CPAN::Bundle::contains(),

perltoc.tmp has the following lines at around this point:

.PD

.Sh "\s-1CPAN\s0 \- query, download and build perl modules from
\s-1CPAN\s0 sites"

.IX Subsection "CPAN - query, download and build perl modules from CPAN sites"

.IP "\s-1SYNOPSIS\s0" 4

.IX Item "SYNOPSIS"

.PD 0

.IP <segfault happened here>

The output from debug for the regex starts here....

Guessed: match at offset 0
Matching REx `
        ( \b | \\s-1 )
        ( [A-Za-z_] (?:[.:\w]|\\-|\\s-?[01])+ )
        (
            \( \d [a-z]* \)
        )
    ...' against `\f(ISCPAN::Author::as_glimpse()\f(IE,
\f(ISCPAN::Author::as_...'
  Setting an EVAL scope, savestack=308
   0 <> <\f(ISCPAN::A>    |  1:  OPEN1
   0 <> <\f(ISCPAN::A>    |  3:  BRANCH
  Setting an EVAL scope, savestack=318
   0 <> <\f(ISCPAN::A>    |  4:    BOUND
                                   failed...
   0 <> <\f(ISCPAN::A>    |  6:    EXACT <\\s-1>
Guessed: match at offset 0
Matching REx `
        ( \b | \\s-1 )
        ( [A-Za-z_] (?:[.:\w]|\\-|\\s-?[01])+ )
        (
            \( \d [a-z]* \)
        )
    ...' against `\f(ISCPAN::Author::as_glimpse()\f(IE,
\f(ISCPAN::Author::as_...'
  Setting an EVAL scope, savestack=308
   0 <> <\f(ISCPAN::A>    |  1:  OPEN1
   0 <> <\f(ISCPAN::A>    |  3:  BRANCH
  Setting an EVAL scope, savestack=318
   0 <> <\f(ISCPAN::A>    |  4:    BOUND
                                   failed...
   0 <> <\f(ISCPAN::A>    |  6:    EXACT <\\s-1>

Proceeds for a very long time and eventually craps out around here:

1225 <strib> <ution::>    | 42:                                       
                          EXACT <\\s>
                                                                      
                          failed...
  Clearing an EVAL scope, savestack=598..608
     restoring \2 to -1(1210)..-1(no)
     restoring \2..\3 to undef
                                                                      
                      failed, try continuation...
1225 <strib> <ution::>    | 61:                                       
                        NOTHING
1225 <strib> <ution::>    | 62:                                       
                        CLOSE2
1225 <strib> <ution::>    | 64:                                       
                        OPEN3
1225 <strib> <ution::>    | 66:                                       
                        EXACT <(>
                                                                      
                        failed...
                                                                      
                      (remove failure from success cache)
                                                                      
                      failed...
1224 <istri> <bution:>    | 39:                                       
                      EXACT <\\->
                                                                      
                      failed...
1224 <istri> <bution:>    | 42:                                       
                      EXACT <\\s>
                                                                      
                      failed...
  Clearing an EVAL scope, savestack=578..588
     restoring \2 to -1(1210)..-1(no)
     restoring \2..\3 to undef
                                                                      
                  failed, try continuation...
1224 <istri> <bution:>    | 61:                                       
                    NOTHING
1224 <istri> <bution:>    | 62:                                       
                    CLOSE2
1224 <istri> <bution:>    | 64:                                       
                    OPEN3
1224 <istri> <bution:>    | 66:                                       
                    EXACT <(>


Regards,
Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to