By the way, until this bug is fixed, a reasonable workaround is to pass
--with-included-regex to configure.


On 30 January 2013 13:50, Reuben Thomas <[email protected]> wrote:

> When running the test for working re_compile_pattern, I get a hang;
> attaching to the process gives me:
>
> (gdb) where
> #0  __lll_lock_wait_private () at
> ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:93
> #1  0x00002ab6dd5c6221 in _L_lock_10625 () at malloc.c:5209
> #2  0x00002ab6dd5c3fa7 in __GI___libc_malloc (bytes=46964889589568) at
> malloc.c:2921
> #3  0x00002ab6dd32495e in local_strdup (s=0x2ab6ddc00ad8
> "/lib/x86_64-linux-gnu/libgcc_s.so.1") at dl-load.c:162
> #4  _dl_map_object (loader=0x2ab6dd33f4c0, name=0x2ab6dd6ba2b8
> "libgcc_s.so.1", type=2, trace_mode=0,
>     mode=-1879048191, nsid=<optimised out>) at dl-load.c:2473
> #5  0x00002ab6dd32f85b in dl_open_worker (a=0x7fff5cdce1a0) at
> dl-open.c:225
> #6  0x00002ab6dd32b186 in _dl_catch_error (objname=0x7fff5cdce1e8,
> errstring=0x7fff5cdce1f0,
>     mallocedp=0x7fff5cdce1ff, operate=0x2ab6dd32f710 <dl_open_worker>,
> args=0x7fff5cdce1a0) at dl-error.c:178
> #7  0x00002ab6dd32f32a in _dl_open (file=0x2ab6dd6ba2b8 "libgcc_s.so.1",
> mode=-2147483647,
>     caller_dlopen=0x2ab6dd64ba69 <__GI___backtrace+217>, nsid=-2, argc=1,
> argv=<optimised out>, env=0x7fff5cdcf408)
>     at dl-open.c:639
> #8  0x00002ab6dd671622 in do_dlopen (ptr=0x7fff5cdce3a0) at dl-libc.c:89
> #9  0x00002ab6dd32b186 in _dl_catch_error (objname=0x7fff5cdce3d0,
> errstring=0x7fff5cdce3c0,
>     mallocedp=0x7fff5cdce3df, operate=0x2ab6dd6715e0 <do_dlopen>,
> args=0x7fff5cdce3a0) at dl-error.c:178
> #10 0x00002ab6dd6716e4 in dlerror_run (args=0x7fff5cdce3a0,
> operate=0x2ab6dd6715e0 <do_dlopen>) at dl-libc.c:48
> #11 __GI___libc_dlopen_mode (name=<optimised out>, mode=<optimised out>)
> at dl-libc.c:165
> #12 0x00002ab6dd64ba69 in init () at
> ../sysdeps/x86_64/../ia64/backtrace.c:53
> #13 __GI___backtrace (array=<optimised out>, size=64) at
> ../sysdeps/x86_64/../ia64/backtrace.c:104
> #14 0x00002ab6dd5b53af in __libc_message (do_abort=2, fmt=0x2ab6dd6bf028
> "*** glibc detected *** %s: %s: 0x%s ***\n")
>     at ../sysdeps/unix/sysv/linux/libc_fatal.c:180
> #15 0x00002ab6dd5bfb96 in malloc_printerr (action=3, str=0x2ab6dd6bb9b2
> "malloc(): memory corruption",
>     ptr=<optimised out>) at malloc.c:5007
> #16 0x00002ab6dd5c1cfb in _int_malloc (av=0x2ab6dd8f9740 <main_arena>,
> bytes=88) at malloc.c:3555
> #17 0x00002ab6dd5c5365 in __libc_calloc (n=<optimised out>,
> elem_size=<optimised out>) at malloc.c:3274
> #18 0x00002ab6dd6161a4 in create_cd_newstate (hash=4, context=0,
> nodes=0x7fff5cdcf090, dfa=<optimised out>)
>     at regex_internal.c:1672
> #19 re_acquire_state_context (err=0x7fff5cdcf0c0, dfa=<optimised out>,
> nodes=0x7fff5cdcf090, context=0)
>     at regex_internal.c:1547
> #20 0x00002ab6dd61c9e1 in transit_state_mb (mctx=0x7fff5cdcefa0,
> pstate=<optimised out>) at regexec.c:2561
> #21 transit_state (state=0x1839340, mctx=0x7fff5cdcefa0,
> err=0x7fff5cdcf0b0) at regexec.c:2272
> #22 check_matching (p_match_first=0x7fff5cdcf0a0, fl_longest_match=1,
> mctx=0x7fff5cdcefa0) at regexec.c:1158
> #23 re_search_internal (preg=0x6010a0 <regex.4073>, string=0x400d00
> <data.4081> "x", length=25,
>     start=<optimised out>, range=25, stop=<optimised out>,
> nmatch=<optimised out>, pmatch=0x18372f0, eflags=0)
>     at regexec.c:829
> #24 0x00002ab6dd6210ec in re_search_stub (bufp=0x6010a0 <regex.4073>,
> string=0x400d00 <data.4081> "x",
>     length=<optimised out>, start=0, range=<optimised out>,
> stop=<optimised out>, regs=0x0, ret_len=0)
>     at regexec.c:449
> #25 0x00002ab6dd621b58 in __re_search (bufp=<optimised out>,
> string=<optimised out>, length=<optimised out>,
>     start=<optimised out>, range=<optimised out>, regs=<optimised out>) at
> regexec.c:312
> #26 0x000000000040083a in main () at conftest.c:190
>
> I have glibc 2.15 on my Ubuntu system.
>
> The test that is causing this error is:
>
>                 {
>                   /* This test is from glibc bug 15078.
>                      The test case is from Andreas Schwab in
>                      <
> http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
>                      */
>                   static char const pat[] = "[^x]x";
>                   static char const data[] =
>
> "\xe1\x80\x80\xe1\x80\xbb\xe1\x80\xbd\xe1\x80\x94\xe1\x80"
>                     "\xba\xe1\x80\xaf\xe1\x80\x95\xe1\x80\xbax";
>                   re_set_syntax (0);
>                   memset (&regex, 0, sizeof regex);
>                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
>                   if (s)
>                     result |= 1;
>                   else if (re_search (&regex, data, sizeof data - 1,
>                                       0, sizeof data - 1, 0)
>                            != 20)
>                     result |= 1;
>                 }
>
> Specifically, the re_search call. Great that it finds the bug, pity that
> it causes configure to hang…
>
> --
> http://rrt.sc3d.org
>



-- 
http://rrt.sc3d.org

Reply via email to