[pcre-dev] [Bug 1437] Using PCRE-8.34 on x86-64 Linux with …

Página Principal
Apagar esta mensagem
Autor: Shlomi Fish
Data:  
Para: pcre-dev
Assunto: [pcre-dev] [Bug 1437] Using PCRE-8.34 on x86-64 Linux with --enable-jit and --enable-utf , grep -iP '^S' gets stuck on a binary file consuming a lot of CPU for many seconds
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1437




--- Comment #5 from Shlomi Fish <shlomif@???> 2014-01-23 12:01:08 ---
OK, here is the arguments to the call to pcre_exec - there is only one of them
until the process hangs. Courtesy of gdb:

[SHELL]

shlomif@telaviv1:~/Download/unpack/pcre-8.34$ LC_ALL=en_US.UTF-8 gdb
--command=~/cmds.gdb ~/apps/TEST-grep-from-git-TO-DEL/bin/grep
GNU gdb (GDB) 7.6-6.mga4 (Mageia release 4)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/shlomif/apps/TEST-grep-from-git-TO-DEL/bin/grep...done.
Breakpoint 1 at 0x4028f0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, pcre_exec (argument_re=0x62c750, extra_data=0x62c7d0, 
    subject=0x62d000 "\277P\"\360\276P", length=808, start_offset=0, 
    options=8192, offsets=0x7fffffffc9a0, offsetcount=300) at pcre_exec.c:6364
6364    BOOL using_temporary_offsets = FALSE;
(gdb) print argument_re
$1 = (const pcre *) 0x62c750
(gdb) print argument_re[0]
Cannot perform pointer math on incomplete type "real_pcre", try casting to a
known type, or void *.
(gdb) print extra_data[0]
$2 = {flags = 65, study_data = 0x62c810, match_limit = 0, callout_data = 0x0, 
  tables = 0x0, match_limit_recursion = 0, mark = 0x0, 
  executable_jit = 0x62c850}
(gdb) print subject
$3 = 0x62d000 "\277P\"\360\276P"
(gdb) print offsets[0]
$4 = -13616
(gdb) print offsets[1]
$5 = 32767
(gdb) print offsets[2]
$6 = -142803672
(gdb) print offsets[3]
$7 = 32767
(gdb) print offsets[4]
$8 = 2
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x00007ffff7fe216a in ?? ()
(gdb) q
A debugging session is active.


        Inferior 1 [process 27484] will be killed.


Quit anyway? (y or n) y
shlomif@telaviv1:~/Download/unpack/pcre-8.34$

[/SHELL]

Regards,

Shlomi Fish


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email