Hi

Johan Liljegren wrote:
> 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:
[...]
> 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);
> 
[...]
> But if you run
> xgettext --keyword=ngettext:1,1 -o - one.js two.js
> I get a seg fault.


I can reproduce this with Debian testing default xgettext. But it
doesn't look Javascript specific. e.g. if I create two identical
files 1.c and 2.c with the content:

int a() { ngettext("bla", 1); }

And call it like this:

xgettext --keyword=ngettext:1,1 -o - 1.c 2.c

*** Error in `xgettext': double free or corruption (fasttop):
0x0000000001428470 ***

I'm not sure if this keyword argument is valid, but at least
it should not die like this.


Regards, Andy

Reply via email to