Hi, maybe the problem arises when you use ./configure --disable-nls
See that in the file "auxiliar.h" the header "libintl.h" for NLS stuff is
conditionally included. But when NLS is disabled, the macro "dngettext"
stays with no definition, becoming implicit declared. So we have to provide
a dummy for it, as for the other macros provided there, ok?

I'll fix this on next release, 3.04.

Kind regards,
Felipe Castro



Em qua, 23 de jan de 2019 às 22:06, Bernhard Übelacker <
bernha...@mailbox.org> escreveu:

> Control: tags 920179 + upstream patch
>
>
> Dear Maintainer,
> I tried to have a look at this and think I found something.
>
> This seems to be a case of implicit function declaration
> defaulting to int as return type but real function returns
> a pointer. Therefore an invalid pointer gets later used.
>
> This shows also up as gcc warnings:
>
>     warning: implicit declaration of function ‘dngettext’
>
> Attached patch includes libintl.h before usage of dngettext.
> That solves the crash but creates some new warnings
> about redefinition of gettext and dgettext, where I cannot
> say if that has a negative consequence.
>
> Kind regards,
> Bernhard
>
>
>
>
> Thread 1 "klavaro" hit Breakpoint 2, 0x0000555555565032 in
> main_window_init () at main.c:317
> 317             tmp = dngettext (PACKAGE, "Dictation mode (depends on this
> speech synthesizer: %s)",
> 1: x/i $pc
> => 0x555555565032 <main+1266>:  callq  0x555555563590 <dngettext@plt>
> 2: /x $eax = 0x0
> 3: /x $rdi = 0x55555558928b
> (gdb) nexti
> [Thread 0x7ffff25b3700 (LWP 5290) exited]
> 319             ttip = g_strdup_printf (tmp, "Espeak");
> 1: x/i $pc
> => 0x555555565037 <main+1271>:  lea    0x2406e(%rip),%rsi        #
> 0x5555555890ac
> 2: /x $eax = 0xf3732349
> 3: /x $rdi = 0x7ffff703fa60
> (gdb)
> 0x000055555556503e      319             ttip = g_strdup_printf (tmp,
> "Espeak");
> 1: x/i $pc
> => 0x55555556503e <main+1278>:  movslq %eax,%rdi
> 2: /x $eax = 0xf3732349
> 3: /x $rdi = 0x7ffff703fa60
> (gdb)
> 0x0000555555565041      319             ttip = g_strdup_printf (tmp,
> "Espeak");
> 1: x/i $pc
> => 0x555555565041 <main+1281>:  xor    %eax,%eax
> 2: /x $eax = 0xf3732349
> 3: /x $rdi = 0xfffffffff3732349
>         <<<<<<<<< $rdi should equal here $eax
> (gdb)
> 0x0000555555565043      319             ttip = g_strdup_printf (tmp,
> "Espeak");
> 1: x/i $pc
> => 0x555555565043 <main+1283>:  callq  0x5555555632f0 <g_strdup_printf@plt
> >
> 2: /x $eax = 0x0
> 3: /x $rdi = 0xfffffffff3732349
> (gdb)
> [Thread 0x7ffff2db4700 (LWP 5289) exited]
>
> Thread 1 "klavaro" received signal SIGSEGV, Segmentation fault.
> __strchrnul_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
> 32              movdqu  (%rdi), %xmm0
> 1: x/i $pc
> => 0x7ffff6f1af33 <__strchrnul_sse2+35>:        movdqu (%rdi),%xmm0
> 2: /x $eax = 0x349
> 3: /x $rdi = 0xfffffffff3732349
> (gdb) bt
> #0  0x00007ffff6f1af33 in __strchrnul_sse2 () at
> ../sysdeps/x86_64/multiarch/../strchr.S:32
> #1  0x00007ffff6ed2c49 in __find_specmb (format=0xfffffffff3732349 <error:
> Cannot access memory at address 0xfffffffff3732349>) at printf-parse.h:108
> #2  0x00007ffff6ed2c49 in _IO_vfprintf_internal (s=s@entry=0x7fffffffe1e0,
> format=format@entry=0xfffffffff3732349 <error: Cannot access memory at
> address 0xfffffffff3732349>, ap=ap@entry=0x7fffffffe350) at
> vfprintf.c:1315
> #3  0x00007ffff6f8d408 in __GI___vasprintf_chk 
> (result_ptr=result_ptr@entry=0x7fffffffe330,
> flags=flags@entry=1, format=0xfffffffff3732349 <error: Cannot access
> memory at address 0xfffffffff3732349>, format@entry=0x7fffffffe330 "",
> args=0x7fffffffe350) at vasprintf_chk.c:66
> #4  0x00007ffff730bef9 in vasprintf (__ap=<optimized out>,
> __fmt=<optimized out>, __ptr=0x7fffffffe330) at
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:213
> #5  0x00007ffff730bef9 in g_vasprintf (string=string@entry=0x7fffffffe330,
> format=<optimized out>, args=args@entry=0x7fffffffe350) at
> ../../../glib/gprintf.c:330
> #6  0x00007ffff72e555d in g_strdup_vprintf (format=<optimized out>,
> args=args@entry=0x7fffffffe350) at ../../../glib/gstrfuncs.c:514
> #7  0x00007ffff72e5619 in g_strdup_printf (format=<optimized out>) at
> ../../../glib/gstrfuncs.c:540
> #8  0x0000555555565048 in main_window_init () at main.c:319
> #9  0x0000555555565048 in main (argc=<optimized out>, argv=<optimized
> out>) at main.c:475
>

Reply via email to