bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] xgettext segmentation fault javascript


From: Johan Liljegren
Subject: [bug-gettext] xgettext segmentation fault javascript
Date: Fri, 24 Oct 2014 12:39:00 +0200

I get seg faults when running xgettext on _javascript_ files.

I've narrowed it down to ngettext and custom keywords.
Since we use keybased translations (monolingual) instead of english we've specified

--keyword=ngettext:1,1

This works, but only once per key, if I have more than one file with an ngettext call to the same key the seg fault appears with the following error:

*** Error in `xgettext': double free or corruption (fasttop): 0x0000000001af9d80 ***
======= Backtrace: =========
/lib64/libc.so.6[0x344d275acf]
/lib64/libc.so.6[0x344d27cdf8]
xgettext[0x408084]
xgettext[0x408a04]
xgettext[0x427d5b]
xgettext[0x427e6c]
xgettext[0x4283aa]
xgettext[0x406117]
xgettext[0x404b2d]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x344d221d65]
xgettext[0x405395]
======= Memory map: ========
00400000-0043f000 r-xp 00000000 fd:00 526956                             /usr/bin/xgettext
0063e000-0063f000 r--p 0003e000 fd:00 526956                             /usr/bin/xgettext
0063f000-00641000 rw-p 0003f000 fd:00 526956                             /usr/bin/xgettext
00641000-00643000 rw-p 00000000 00:00 0 
00840000-00843000 rw-p 00040000 fd:00 526956                             /usr/bin/xgettext
01aa6000-01b09000 rw-p 00000000 00:00 0                                  [heap]
30e1600000-30e1615000 r-xp 00000000 fd:00 523211                         /usr/lib64/libgcc_s-4.8.3-20140911.so.1
30e1615000-30e1814000 ---p 00015000 fd:00 523211                         /usr/lib64/libgcc_s-4.8.3-20140911.so.1
30e1814000-30e1815000 r--p 00014000 fd:00 523211                         /usr/lib64/libgcc_s-4.8.3-20140911.so.1
30e1815000-30e1816000 rw-p 00015000 fd:00 523211                         /usr/lib64/libgcc_s-4.8.3-20140911.so.1
30e1a00000-30e1a16000 r-xp 00000000 fd:00 534175                         /usr/lib64/libgomp.so.1.0.0
30e1a16000-30e1c15000 ---p 00016000 fd:00 534175                         /usr/lib64/libgomp.so.1.0.0
30e1c15000-30e1c16000 r--p 00015000 fd:00 534175                         /usr/lib64/libgomp.so.1.0.0
30e1c16000-30e1c17000 rw-p 00016000 fd:00 534175                         /usr/lib64/libgomp.so.1.0.0
30e1e00000-30e1e3a000 r-xp 00000000 fd:00 525772                         /usr/lib64/libgettextlib-0.18.3.so
30e1e3a000-30e203a000 ---p 0003a000 fd:00 525772                         /usr/lib64/libgettextlib-0.18.3.so
30e203a000-30e203b000 r--p 0003a000 fd:00 525772                         /usr/lib64/libgettextlib-0.18.3.so
30e203b000-30e203c000 rw-p 0003b000 fd:00 525772                         /usr/lib64/libgettextlib-0.18.3.so
30e203c000-30e2040000 rw-p 00000000 00:00 0 
30e2200000-30e2240000 r-xp 00000000 fd:00 527441                         /usr/lib64/libgettextsrc-0.18.3.so
30e2240000-30e2440000 ---p 00040000 fd:00 527441                         /usr/lib64/libgettextsrc-0.18.3.so
30e2440000-30e2441000 r--p 00040000 fd:00 527441                         /usr/lib64/libgettextsrc-0.18.3.so
30e2441000-30e2443000 rw-p 00041000 fd:00 527441                         /usr/lib64/libgettextsrc-0.18.3.so
344ce00000-344ce20000 r-xp 00000000 fd:00 527230                         /usr/lib64/ld-2.18.so
344d01f000-344d020000 r--p 0001f000 fd:00 527230                         /usr/lib64/ld-2.18.so
344d020000-344d021000 rw-p 00020000 fd:00 527230                         /usr/lib64/ld-2.18.so
344d021000-344d022000 rw-p 00000000 00:00 0 
344d200000-344d3b4000 r-xp 00000000 fd:00 527231                         /usr/lib64/libc-2.18.so
344d3b4000-344d5b3000 ---p 001b4000 fd:00 527231                         /usr/lib64/libc-2.18.so
344d5b3000-344d5b7000 r--p 001b3000 fd:00 527231                         /usr/lib64/libc-2.18.so
344d5b7000-344d5b9000 rw-p 001b7000 fd:00 527231                         /usr/lib64/libc-2.18.so
344d5b9000-344d5be000 rw-p 00000000 00:00 0 
344d600000-344d603000 r-xp 00000000 fd:00 554118                         /usr/lib64/libdl-2.18.so
344d603000-344d802000 ---p 00003000 fd:00 554118                         /usr/lib64/libdl-2.18.so
344d802000-344d803000 r--p 00002000 fd:00 554118                         /usr/lib64/libdl-2.18.so
344d803000-344d804000 rw-p 00003000 fd:00 554118                         /usr/lib64/libdl-2.18.so
344da00000-344da18000 r-xp 00000000 fd:00 543215                         /usr/lib64/libpthread-2.18.so
344da18000-344dc17000 ---p 00018000 fd:00 543215                         /usr/lib64/libpthread-2.18.so
344dc17000-344dc18000 r--p 00017000 fd:00 543215                         /usr/lib64/libpthread-2.18.so
344dc18000-344dc19000 rw-p 00018000 fd:00 543215                         /usr/lib64/libpthread-2.18.so
344dc19000-344dc1d000 rw-p 00000000 00:00 0 
344de00000-344de15000 r-xp 00000000 fd:00 523205                         /usr/lib64/libz.so.1.2.8
344de15000-344e014000 ---p 00015000 fd:00 523205                         /usr/lib64/libz.so.1.2.8
344e014000-344e015000 r--p 00014000 fd:00 523205                         /usr/lib64/libz.so.1.2.8
344e015000-344e016000 rw-p 00015000 fd:00 523205                         /usr/lib64/libz.so.1.2.8
344e200000-344e305000 r-xp 00000000 fd:00 554126                         /usr/lib64/libm-2.18.so
344e305000-344e505000 ---p 00105000 fd:00 554126                         /usr/lib64/libm-2.18.so
344e505000-344e506000 r--p 00105000 fd:00 554126                         /usr/lib64/libm-2.18.so
344e506000-344e507000 rw-p 00106000 fd:00 554126                         /usr/lib64/libm-2.18.so
344e600000-344e624000 r-xp 00000000 fd:00 554124                         /usr/lib64/liblzma.so.5.0.99
344e624000-344e823000 ---p 00024000 fd:00 554124                         /usr/lib64/liblzma.so.5.0.99
344e823000-344e824000 r--p 00023000 fd:00 554124                         /usr/lib64/liblzma.so.5.0.99
344e824000-344e825000 rw-p 00024000 fd:00 554124                         /usr/lib64/liblzma.so.5.0.99
344ee00000-344ee37000 r-xp 00000000 fd:00 523299                         /usr/lib64/libcroco-0.6.so.3.0.1
344ee37000-344f037000 ---p 00037000 fd:00 523299                         /usr/lib64/libcroco-0.6.so.3.0.1
344f037000-344f03a000 r--p 00037000 fd:00 523299                         /usr/lib64/libcroco-0.6.so.3.0.1
344f03a000-344f03b000 rw-p 0003a000 fd:00 523299                         /usr/lib64/libcroco-0.6.so.3.0.1
344f600000-344f75e000 r-xp 00000000 fd:00 523259                         /usr/lib64/libxml2.so.2.9.1
344f75e000-344f95d000 ---p 0015e000 fd:00 523259                         /usr/lib64/libxml2.so.2.9.1
344f95d000-344f965000 r--p 0015d000 fd:00 523259                         /usr/lib64/libxml2.so.2.9.1
344f965000-344f967000 rw-p 00165000 fd:00 523259                         /usr/lib64/libxml2.so.2.9.1
344f967000-344f969000 rw-p 00000000 00:00 0 
344fa00000-344fa26000 r-xp 00000000 fd:00 554178                         /usr/lib64/libncurses.so.5.9
344fa26000-344fc25000 ---p 00026000 fd:00 554178                         /usr/lib64/libncurses.so.5.9
344fc25000-344fc26000 r--p 00025000 fd:00 554178                         /usr/lib64/libncurses.so.5.9
344fc26000-344fc27000 rw-p 00026000 fd:00 554178                         /usr/lib64/libncurses.so.5.9
344fe00000-344ff29000 r-xp 00000000 fd:00 523241                         /usr/lib64/libglib-2.0.so.0.3800.2
344ff29000-3450129000 ---p 00129000 fd:00 523241                         /usr/lib64/libglib-2.0.so.0.3800.2
3450129000-345012a000 r--p 00129000 fd:00 523241                         /usr/lib64/libglib-2.0.so.0.3800.2
345012a000-345012b000 rw-p 0012a000 fd:00 523241                         /usr/lib64/libglib-2.0.so.0.3800.2
345012b000-345012c000 rw-p 00000000 00:00 0 
3450200000-3450225000 r-xp 00000000 fd:00 523300                         /usr/lib64/libtinfo.so.5.9
3450225000-3450425000 ---p 00025000 fd:00 523300                         /usr/lib64/libtinfo.so.5.9
3450425000-3450429000 r--p 00025000 fd:00 523300                         /usr/lib64/libtinfo.so.5.9
3450429000-345042a000 rw-p 00029000 fd:00 523300                         /usr/lib64/libtinfo.so.5.9
3450a00000-3450b13000 r-xp 00000000 fd:00 523298                         /usr/lib64/libunistring.so.0.1.2
3450b13000-3450d13000 ---p 00113000 fd:00 523298                         /usr/lib64/libunistring.so.0.1.2
3450d13000-3450d16000 r--p 00113000 fd:00 523298                         /usr/lib64/libunistring.so.0.1.2
3450d16000-3450d17000 rw-p 00116000 fd:00 523298                         /usr/lib64/libunistring.so.0.1.2
3450d17000-3450d18000 rw-p 00000000 00:00 0 
7fefa0102000-7fefa662b000 r--p 00000000 fd:00 554111                     /usr/lib/locale/locale-archive
7fefa662b000-7fefa6634000 rw-p 00000000 00:00 0 
7fefa6640000-7fefa6643000 rw-p 00000000 00:00 0 
7fffde3bd000-7fffde3de000 rw-p 00000000 00:00 0                          [stack]
7fffde3fc000-7fffde3fe000 r-xp 00000000 00:00 0                          [vdso]
7fffde3fe000-7fffde400000 r--p 00000000 00:00 0                          [vvar]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]


To reproduce the error create two files, 'one.js' and 'two.js' with the following content in both files (one line):
ngettext('common.product.ucfirst', 1);

now, if you run 
xgettext --keyword=ngettext:1,1 -o - one.js
or
xgettext --keyword=ngettext:1,1 -o - two.js
it works.

But if you run
xgettext --keyword=ngettext:1,1 -o - one.js two.js
I get a seg fault.

If you change one.js and two.js to use standard ngettext with ngettext('singular', 'plural', 2) and remove the --keyword it works.

I've tried this on fedora 20 with xgettext 0.18.3, 0.19.2 and 0.19.3 and on ubuntu 14.04 with xgettext 0.18.3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]