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: Wiebe Cazemier
Subject: Re: Segmentation fault in dcigettext.c:925 using Apache + PHP
Date: Mon, 6 Jul 2020 09:16:00 +0200 (CEST)

----- Original Message -----
> From: "Bruno Haible" <bruno@clisp.org>
> To: "Wiebe Cazemier" <wiebe@halfgaar.net>
> Cc: bug-gettext@gnu.org
> Sent: Monday, 6 July, 2020 00:47:56
> Subject: Re: Segmentation fault in dcigettext.c:925 using Apache + PHP
>
> 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.

That's great to hear.

> 
> 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.

For us, it's done from Python code. We write to a temp file and on success, use 
Path.rename, because in-fs rename only changes directory entries, so we should 
be safe.. We haven't had segfaults since.





reply via email to

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