in reply to Weirdness with XML-Encoding-1.01

Extremely odd. I have the same problem on a linux/PentiumII with GNU Make 3.79.1. and 5.6.0 It runs fine on Sun/Solaris using GNU Make 3.77 but with 5.005_03.

Subsequent analysis reveals that perl test.pl segfaults too. The last test is clearly the one that triggers it (I have removed all other tests and I still get it but if I remove the test it disappears). I tried adding code to clear $@ (and even $!) both directly and through eval-ing something that does not die, to na avail.

The only reason for that behaviour seems to be the last eval in the test, which is supposed to fail and set $@: if you comment it out and set the error to the right value then you avoid the segfault. So we have a block eval, with a die thrown in the middle of the eval. Everything works OK (including code after this piece of code) until the program exits without an exit statement, in which case it segfaults.

I guess you really found a bug in 5.6.0, maybe checking under 5.6.1 would find out whether it's already been fixed or whether it deserves a bug report.

Replies are listed 'Best First'.
Re: Re: Weirdness with XML-Encoding-1.01
by MeowChow (Vicar) on Feb 25, 2001 at 04:27 UTC
      You're right, it's definitely a problem with the XS code.

      Program received signal SIGSEGV, Segmentation fault. doContent (parser=0x824c7a0, startTagLevel=0, enc=0x401c2bc0, s=0x824e3d1 "</prefix>\n</encmap>\n", end=0x824e3e5 "", nextPtr=0x +0) at xmlparse.c:1709 1709 xmlparse.c: No such file or directory. (gdb)
      The fact that it's only segfaulting on exit, and not immediately makes me think its munging the stack, but I don't have the xmlparse source in front of me, so it's hard to tell.