Wednesday, June 29, 2022

Re: rawtherapee free(): chunk is already free 0x907fb48e800 when not in gdb

On Wed, June 29, 2022 11:12, Omar Polo wrote:
> +cc kirby@ (maintainer)
>
> Stefan Hagen <sh+openbsd-ports@codevoid.de> wrote:
>> Abel Abraham Camarillo Ojeda wrote (2022-06-20 08:24 CEST):
>> > [...]
>> >
>> > I now applied the patch correctly, I can no longer reproduce the issue.
>> >
>> > upstream seems unresponsive about this, any chance of getting it on ports?
>>
>> The one that rips out all setlocale calls? No.
>>
>> Here is a better diff, which replaces the setlocale(3) calls with thread
>> local (and therefore thread-safe) uselocale(3) calls.
>>
>> I'm still testing this, because it is not exactly the same as the original.
>>
>> If it improves the situation on OpenBSD, I'm not opposed to commit these
>> patches. Please test and report back.
>
> I don't use rawtherapee, and my understanding of the locale api is
> (voluntarely) scarse, but I'm not sure the patch is right.
>
> On OpenBSD there shouldn't be issue, because freelocale (AFAIU) is a
> no-op, but on other OSes you need to free the locale returned by
> newlocale or duplocale.
>
> See (but not too closely!) the example from the GNU man page for
> newlocale:
>
> https://man.voidlinux.org/newlocale
>
> so the patch may be OK for us, but not to fed it to upstream.

Hi,
If this patch is OK for OpenBSD, we could use it as a temporary
solution until cross-platform solution is found.

>
>> Best Regards,
>> Stefan
>>
>> Index: graphics/rawtherapee/Makefile
>> ===================================================================
>> RCS file: /home/cvs/ports/graphics/rawtherapee/Makefile,v
>> retrieving revision 1.38
>> diff -u -p -u -p -r1.38 Makefile
>> --- graphics/rawtherapee/Makefile 28 May 2022 06:20:01 -0000 1.38
>> +++ graphics/rawtherapee/Makefile 28 Jun 2022 14:49:21 -0000
>> @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS = amd64
>> COMMENT = RAW image processing application
>>
>> DISTNAME = rawtherapee-5.8
>> -REVISION = 1
>> +REVISION = 2
>>
>> CATEGORIES = graphics
>>
>> Index: graphics/rawtherapee/patches/patch-rtengine_dcraw_c
>> ===================================================================
>> RCS file: graphics/rawtherapee/patches/patch-rtengine_dcraw_c
>> diff -N graphics/rawtherapee/patches/patch-rtengine_dcraw_c
>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>> +++ graphics/rawtherapee/patches/patch-rtengine_dcraw_c 28 Jun 2022 15:45:04
>> -0000
>> @@ -0,0 +1,13 @@
>> +Index: rtengine/dcraw.c
>> +--- rtengine/dcraw.c.orig
>> ++++ rtengine/dcraw.c
>> +@@ -9853,8 +9853,7 @@ int CLASS main (int argc, const char **argv)
>> + putenv ((char *) "TZ=UTC");
>> +

No comments:

Post a Comment