bug-gettext
[Top][All Lists]
Advanced

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

Re: Segmentation fault in dcigettext.c:925 using Apache + PHP


From: Bruno Haible
Subject: Re: Segmentation fault in dcigettext.c:925 using Apache + PHP
Date: Mon, 06 Jul 2020 00:47:56 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

I wrote:
> Now I understand that you are replacing the .mo file *while the application
> (Apache + PHP) is running*.
>
> This is likely to crash (with SIGBUS or SIGSEGV) if you do so in such a
> way that the old .mo file and the new .mo file have the same inode.

Wiebe Cazemier wrote:
> To be more precise: using .mo files for website translations where the 
> translations are actively edited through the CMS. Others implementing a 
> similar technique are bound to repeat the same mistake, and overwrite the 
> existing .mo file with msgfmt. But, the lack of people having issues like 
> this, suggests few people do.

Even though few people do so, it is worth fixing.

I have now changed msgfmt to be more careful when writing .mo files.[1]
It should no longer crash processes that use the .mo file.

However, if you use 'msgfmt' to write the .mo file to a different
location and then 'cp' to copy it to the location where it is used,
the processes may still crash. It is better to use 'install' instead
of 'cp', for this case.

Bruno

[1] 
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=a361def05435e95d22725faf49d1bf5aa7c85414




reply via email to

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