Re: Random segmentation fault

Michael Schout <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On 9/14/15 12:12 PM, Steve Hay wrote:
> Have you tried 5.20.3? This has just been released and contains a
> number of crash fixes. (I wonder if #123398 might be relevant?)
I just tried 5.20.3.

For my issue (mentioned earlier in this thread), 5.20.3 does not help.

I'll post a followup message in  anew thread when I have time, but
basically, I started seeing two different problems somewhere between
5.19.0 and and 5.20.0:

1) "panic: attempt to copy freed scalar xxxx to yyyy" reliably
reproduced when calling $cgi->param(x => ''); inside a TryCatch try { }
block. (and $cgi is CGI.pm here)

   Test case I have works perfectly against perl, but produces the above
panic under mod_perl.

  Seems to be something to do with TryCatch or Devel::Declare as the
problem goes away if I use eval { } instead of try { }.  Unfortunately
this is a large client codebase heavly invested in TryCatch so moving
away from that is not going to be fun/easy.

2) repeatable segfault by a certain subroutine doing something as simple as:

  sub foo {
        my ($self, $field, $type) = @_;

        if ($type = 'X') {
             return $self->_bar($field);
        }
  }

  The fun part of this one is that if I remove the "return" keyword, the
segfault goes away.

Regards,
Michael Schout
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.