Low-level debugging pcre-8.20 JIT-compiled code segfault on PPC

Petr Pisar ppisar at redhat.com
Tue Sep 13 07:24:52 EDT 2011


Hello PowerPC hackers,

I've just pushed release candidate of pcre-8.20 into Fedora 17. This new
version allows to JIT-compile regular expression matching code and run it on
the fly.

Upstream wants to support PPC as well as PPC64 architecture, unfortunatelly
resulting code does not pass upstream tests (run while building the package in
Koji):

Running JIT regression tests:
............................................................................................................................................................................................................................................/bin/sh:
line 5:  7940 Segmentation fault      ${dir}$tst
FAIL: pcre_jit_test

And:

Test 1: main functionality (Compatible with Perl >= 5.8)
  OK
  OK with study
*** stack smashing detected ***: /builddir/build/BUILD/pcre-8.20-RC1/.libs/lt-pcretest terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x58)[0xfe2dba8]
/lib/libc.so.6(+0x11db48)[0xfe2db48]
/builddir/build/BUILD/pcre-8.20-RC1/.libs/libpcre.so.0(+0x3f6a4)[0xff8f6a4]
/builddir/build/BUILD/pcre-8.20-RC1/.libs/libpcre.so.0(+0x25948)[0xff75948]
/builddir/build/BUILD/pcre-8.20-RC1/.libs/libpcre.so.0(+0x25914)[0xff75914]
/builddir/build/BUILD/pcre-8.20-RC1/.libs/libpcre.so.0(_pcre_jit_exec+0x13c)[0xff75a8c]
/builddir/build/BUILD/pcre-8.20-RC1/.libs/libpcre.so.0(pcre_exec+0x234)[0xff733b4]
/builddir/build/BUILD/pcre-8.20-RC1/.libs/lt-pcretest[0x100044f8]
/lib/libc.so.6(+0x1e25c)[0xfd2e25c]
/lib/libc.so.6(+0x1e400)[0xfd2e400]


This is caused by "CFLAGS=D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector"
and by the pcre bug probably. I identified similar bug on my MIPS machine
too without the hardening CFLAGS.

I contacted upstream and they are seeking somebody who could help with this
low-level debugging or who could provide access to a PPC system (see original
message bellow).

Unfortunatelly I'm not expert in PPC area nor I can provide access to internal
Red Hat labs.

So If somebody is interrested, please contact me or better Herczeg Zoltán
<hzmester at freemail.hu> directly (he's CCed).

-- Petr

----- Forwarded message from Herczeg Zoltán <hzmester at freemail.hu> -----

Date: Tue, 13 Sep 2011 12:21:38 +0200 (CEST)
From: Herczeg Zoltán <hzmester at freemail.hu>
To: ppisar at redhat.com
Subject: Low-level debugging

Hi Petr,

from bactrace and some assembly code is really hard to figure out what is exactly happening. First we need to figure out the best way of debugging. Do you know someone who is knowledgeable in low-level debugging and have acccess to those machines (and have some free time to work on this)? Alternatively, I could do the debugging myself, but you probably can't allow an outsider to access those machines.

Regards,
Zoltan


----- End forwarded message -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/fedora-ppc/attachments/20110913/3dfa2765/attachment.sig>


More information about the Fedora-ppc mailing list