Tuesday, June 28, 2022

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

Abel Abraham Camarillo Ojeda wrote (2022-06-20 08:24 CEST):
> On Sun, Jun 19, 2022 at 5:09 AM Stefan Hagen <sh+openbsd-ports@codevoid.de>
> wrote:
>
> > Abel Abraham Camarillo Ojeda wrote (2022-06-19 04:52 CEST):
> > > On Sat, Jun 18, 2022 at 1:04 PM Omar Polo <op@openbsd.org> wrote:
> > >
> > > > Abel Abraham Camarillo Ojeda <acamari@verlet.org> wrote:
> > > > > > #7 0x00000324aacad36a in _libc_setlocale (category=4,
> > > > > > locname=0x322035807fb "C") at
> > /usr/src/lib/libc/locale/setlocale.c:177
> > > >
> > > > this seems to be a known issue, see
> > > > https://github.com/Beep6581/RawTherapee/issues/6452
> > > >
> > > > maybe you could try sdk@' diff (linked in the GH issue) and see if it
> > > > fixes the issue for you :)
> > > >
> > > >
> > > >
> > > sadly I can still reproduce with this patch
> > > https://codevoid.de/0/p/rawtherapee-rmlocale.diff
> >
> > I think you either didn't apply the patch correctly, or didn't install
> > the fixed executable.
> >
> > My patch comments the setlocale call at:
> >
> > >
> > /usr/ports/pobj/rawtherapee-5.8/rawtherapee-5.8/rtengine/procparams.cc:3732
> >
> > Maybe give it another shot and bump revision?
> >
> > Best Regards,
> > Stefan
> >
>
> You're right, I blindly ran
>
> $ make clean; make DEBUG="-g" repackage; make reinstall
>
> after applying the patch in /usr/ports/pobj/rawtherapee*, so the make clean
> stage deleted the patched files, haha.
>
> 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.

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