forked from pool/lcms2
Accepting request 1035287 from home:plater
Added reverse-0001-fix-memory-leaks-on-testbed.patch to fix colord's i586 build failure OBS-URL: https://build.opensuse.org/request/show/1035287 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lcms2?expand=0&rev=81
This commit is contained in:
parent
fcb0e32b3a
commit
583dabbf14
@ -1,7 +1,8 @@
|
||||
diff -Naur lcms2-2.11.orig/src/cmscgats.c lcms2-2.11/src/cmscgats.c
|
||||
--- lcms2-2.11.orig/src/cmscgats.c 2020-08-05 15:14:07.488229633 +0200
|
||||
+++ lcms2-2.11/src/cmscgats.c 2020-08-05 15:16:41.214899028 +0200
|
||||
@@ -930,7 +930,7 @@
|
||||
Index: b/src/cmscgats.c
|
||||
===================================================================
|
||||
--- a/src/cmscgats.c 2022-11-01 12:13:11.000000000 +0200
|
||||
+++ b/src/cmscgats.c 2022-11-11 14:16:56.842380821 +0200
|
||||
@@ -1017,7 +1017,7 @@ void InSymbol(cmsIT8* it8)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -10,7 +11,7 @@ diff -Naur lcms2-2.11.orig/src/cmscgats.c lcms2-2.11/src/cmscgats.c
|
||||
if (FileNest->Stream == NULL) {
|
||||
|
||||
SynError(it8, "File %s not found", FileNest->FileName);
|
||||
@@ -1773,7 +1773,7 @@
|
||||
@@ -1912,7 +1912,7 @@ cmsBool CMSEXPORT cmsIT8SaveToFile(cmsHA
|
||||
|
||||
memset(&sd, 0, sizeof(sd));
|
||||
|
||||
@ -19,7 +20,7 @@ diff -Naur lcms2-2.11.orig/src/cmscgats.c lcms2-2.11/src/cmscgats.c
|
||||
if (!sd.stream) return FALSE;
|
||||
|
||||
for (i=0; i < it8 ->TablesCount; i++) {
|
||||
@@ -2266,7 +2266,7 @@
|
||||
@@ -2423,7 +2423,7 @@ cmsBool IsMyFile(const char* FileName)
|
||||
cmsUInt32Number Size;
|
||||
cmsUInt8Number Ptr[133];
|
||||
|
||||
@ -28,7 +29,7 @@ diff -Naur lcms2-2.11.orig/src/cmscgats.c lcms2-2.11/src/cmscgats.c
|
||||
if (!fp) {
|
||||
cmsSignalError(0, cmsERROR_FILE, "File '%s' not found", FileName);
|
||||
return FALSE;
|
||||
@@ -2349,7 +2349,7 @@
|
||||
@@ -2506,7 +2506,7 @@ cmsHANDLE CMSEXPORT cmsIT8LoadFromFile(
|
||||
if (!hIT8) return NULL;
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: lcms2-2.13/src/lcms2_internal.h
|
||||
Index: b/src/lcms2_internal.h
|
||||
===================================================================
|
||||
--- lcms2-2.13.orig/src/lcms2_internal.h
|
||||
+++ lcms2-2.13/src/lcms2_internal.h
|
||||
--- a/src/lcms2_internal.h 2022-11-01 12:13:11.000000000 +0200
|
||||
+++ b/src/lcms2_internal.h 2022-11-11 14:17:12.797708563 +0200
|
||||
@@ -37,6 +37,7 @@
|
||||
// assert macro is part of C99 as per 7.2
|
||||
#include <assert.h>
|
||||
@ -10,7 +10,7 @@ Index: lcms2-2.13/src/lcms2_internal.h
|
||||
// Some needed constants
|
||||
#ifndef M_PI
|
||||
# define M_PI 3.14159265358979323846
|
||||
@@ -1122,4 +1123,5 @@ cmsBool _cmsBuildRGB2XYZtransferMatrix
|
||||
@@ -1149,4 +1150,5 @@ cmsBool _cmsBuildRGB2XYZtransferMatrix
|
||||
cmsBool _cmsGetTime(struct tm* ptr_time);
|
||||
|
||||
#define _lcms_internal_H
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 11 13:40:18 UTC 2022 - Dave Plater <davejplater@gmail.com>
|
||||
|
||||
- Added reverse-0001-fix-memory-leaks-on-testbed.patch to fix
|
||||
colord's i586 build failure
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 8 08:12:31 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
|
||||
|
||||
|
@ -25,8 +25,11 @@ Group: Productivity/Graphics/Other
|
||||
URL: https://www.littlecms.com/
|
||||
Source0: https://github.com/mm2/Little-CMS/releases/download/lcms%{version}/lcms2-%{version}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Patch1: lcms2-ocloexec.patch
|
||||
Patch2: lcms2-visibility.patch
|
||||
Patch0: lcms2-ocloexec.patch
|
||||
Patch1: lcms2-visibility.patch
|
||||
%ifarch i586
|
||||
Patch2: reverse-0001-fix-memory-leaks-on-testbed.patch
|
||||
%endif
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: glibc-devel
|
||||
|
204
reverse-0001-fix-memory-leaks-on-testbed.patch
Normal file
204
reverse-0001-fix-memory-leaks-on-testbed.patch
Normal file
@ -0,0 +1,204 @@
|
||||
Index: b/plugins/fast_float/testbed/fast_float_testbed.c
|
||||
===================================================================
|
||||
--- a/plugins/fast_float/testbed/fast_float_testbed.c 2022-11-01 12:13:11.000000000 +0200
|
||||
+++ b/plugins/fast_float/testbed/fast_float_testbed.c 2022-11-11 14:18:08.695497815 +0200
|
||||
@@ -24,10 +24,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
-// On Visual Studio, use debug CRT
|
||||
-#ifdef _MSC_VER
|
||||
-# include "crtdbg.h"
|
||||
-#endif
|
||||
|
||||
#define PROFILES_DIR "../../test_profiles/"
|
||||
|
||||
@@ -58,12 +54,12 @@ typedef struct { cmsFloat32Number L, a,
|
||||
static
|
||||
void trace(const char* frm, ...)
|
||||
{
|
||||
- va_list args;
|
||||
+ va_list args;
|
||||
|
||||
- va_start(args, frm);
|
||||
- vfprintf(stderr, frm, args);
|
||||
- fflush(stderr);
|
||||
- va_end(args);
|
||||
+ va_start(args, frm);
|
||||
+ vfprintf(stderr, frm, args);
|
||||
+ fflush(stderr);
|
||||
+ va_end(args);
|
||||
}
|
||||
|
||||
|
||||
@@ -592,9 +588,9 @@ void CheckUncommonValues(cmsHPROFILE hlc
|
||||
|
||||
for (i = 0; i < npixels; i++)
|
||||
{
|
||||
- bufferIn[i].r = i / 40.0f - 0.5f;
|
||||
- bufferIn[i].g = i / 20.0f - 0.5f;
|
||||
- bufferIn[i].b = i / 60.0f - 0.5f;
|
||||
+ bufferIn[i].r = i / 40.0 - 0.5;
|
||||
+ bufferIn[i].g = i / 20.0 - 0.5;
|
||||
+ bufferIn[i].b = i / 60.0 - 0.5;
|
||||
}
|
||||
|
||||
cmsDoTransform(xformPlugin, bufferIn, bufferPluginOut, npixels);
|
||||
@@ -677,7 +673,7 @@ void CheckToEncodedLab(void)
|
||||
}
|
||||
|
||||
|
||||
- cmsDeleteTransform(xform); cmsDeleteTransform(xform_plugin);
|
||||
+ cmsDeleteTransform(xform);
|
||||
cmsCloseProfile(hsRGB); cmsCloseProfile(hLab);
|
||||
cmsDeleteContext(Raw);
|
||||
cmsDeleteContext(Plugin);
|
||||
@@ -720,7 +716,7 @@ void CheckToFloatLab(void)
|
||||
}
|
||||
|
||||
|
||||
- cmsDeleteTransform(xform); cmsDeleteTransform(xform_plugin);
|
||||
+ cmsDeleteTransform(xform);
|
||||
cmsCloseProfile(hsRGB); cmsCloseProfile(hLab);
|
||||
cmsDeleteContext(Raw);
|
||||
cmsDeleteContext(Plugin);
|
||||
@@ -1219,9 +1215,6 @@ void CheckLab2RGB(void)
|
||||
cmsFloat32Number maxInside = 0, maxOutside = 0, L, a, b;
|
||||
|
||||
trace("Checking Lab -> RGB...");
|
||||
- cmsCloseProfile(hLab);
|
||||
- cmsCloseProfile(hRGB);
|
||||
-
|
||||
for (L = 4; L <= 100; L++)
|
||||
{
|
||||
for (a = -30; a < +30; a++)
|
||||
@@ -1327,7 +1320,6 @@ void CheckSoftProofing(void)
|
||||
j++;
|
||||
}
|
||||
|
||||
- free(In); free(Out1); free(Out2);
|
||||
cmsDeleteTransform(hXformNoPlugin);
|
||||
cmsDeleteTransform(hXformPlugin);
|
||||
|
||||
@@ -2180,7 +2172,7 @@ cmsFloat64Number SpeedTestFloatByUsing16
|
||||
}
|
||||
|
||||
diff = clock() - atime;
|
||||
- free(In); free(tmp16);
|
||||
+ free(In);
|
||||
|
||||
cmsDeleteTransform(xform16);
|
||||
return MPixSec(diff);
|
||||
@@ -2450,15 +2442,11 @@ void TestGrayTransformPerformance1()
|
||||
trace("Gray conversion using two devicelinks\t %-12.2f MPixels/Sec.\n", MPixSec(diff));
|
||||
}
|
||||
|
||||
+
|
||||
// The harness test
|
||||
int main()
|
||||
{
|
||||
-
|
||||
-#ifdef _MSC_VER
|
||||
- _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
-#endif
|
||||
-
|
||||
- trace("FastFloating point extensions testbed - 1.6\n");
|
||||
+ trace("FastFloating point extensions testbed - 1.5\n");
|
||||
trace("Copyright (c) 1998-2022 Marti Maria Saguer, all rights reserved\n");
|
||||
|
||||
trace("\nInstalling error logger ... ");
|
||||
@@ -2468,7 +2456,7 @@ int main()
|
||||
trace("Installing plug-in ... ");
|
||||
cmsPlugin(cmsFastFloatExtensions());
|
||||
trace("done.\n\n");
|
||||
-
|
||||
+
|
||||
CheckComputeIncrements();
|
||||
|
||||
// 15 bit functionality
|
||||
@@ -2476,26 +2464,26 @@ int main()
|
||||
Check15bitsConversions();
|
||||
|
||||
// 16 bits functionality
|
||||
- CheckAccuracy16Bits();
|
||||
+ CheckAccuracy16Bits();
|
||||
|
||||
// Lab to whatever
|
||||
CheckLab2RGB();
|
||||
|
||||
// Change format
|
||||
CheckChangeFormat();
|
||||
-
|
||||
+
|
||||
// Soft proofing
|
||||
CheckSoftProofing();
|
||||
-
|
||||
+
|
||||
// Floating point functionality
|
||||
CheckConversionFloat();
|
||||
trace("All floating point tests passed OK\n");
|
||||
-
|
||||
+
|
||||
SpeedTest8();
|
||||
SpeedTest16();
|
||||
SpeedTest15();
|
||||
SpeedTestFloat();
|
||||
-
|
||||
+
|
||||
ComparativeFloatVs16bits();
|
||||
ComparativeLineStride8bits();
|
||||
|
||||
@@ -2508,7 +2496,6 @@ int main()
|
||||
|
||||
trace("\nAll tests passed OK\n");
|
||||
|
||||
- cmsUnregisterPlugins();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Index: b/src/cmsplugin.c
|
||||
===================================================================
|
||||
--- a/src/cmsplugin.c 2022-11-01 12:13:11.000000000 +0200
|
||||
+++ b/src/cmsplugin.c 2022-11-11 14:18:08.699497675 +0200
|
||||
@@ -796,8 +796,6 @@ void* _cmsContextGetClientChunk(cmsConte
|
||||
// identify which plug-in to unregister.
|
||||
void CMSEXPORT cmsUnregisterPluginsTHR(cmsContext ContextID)
|
||||
{
|
||||
- struct _cmsContext_struct* ctx = _cmsGetContext(ContextID);
|
||||
-
|
||||
_cmsRegisterMemHandlerPlugin(ContextID, NULL);
|
||||
_cmsRegisterInterpPlugin(ContextID, NULL);
|
||||
_cmsRegisterTagTypePlugin(ContextID, NULL);
|
||||
@@ -810,10 +808,6 @@ void CMSEXPORT cmsUnregisterPluginsTHR(c
|
||||
_cmsRegisterTransformPlugin(ContextID, NULL);
|
||||
_cmsRegisterMutexPlugin(ContextID, NULL);
|
||||
_cmsRegisterParallelizationPlugin(ContextID, NULL);
|
||||
-
|
||||
- if (ctx->MemPool != NULL)
|
||||
- _cmsSubAllocDestroy(ctx->MemPool);
|
||||
- ctx->MemPool = NULL;
|
||||
}
|
||||
|
||||
|
||||
Index: b/testbed/testcms2.c
|
||||
===================================================================
|
||||
--- a/testbed/testcms2.c 2022-11-01 12:13:11.000000000 +0200
|
||||
+++ b/testbed/testcms2.c 2022-11-11 14:18:08.699497675 +0200
|
||||
@@ -9232,12 +9232,13 @@ int main(int argc, char* argv[])
|
||||
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
|
||||
#endif
|
||||
|
||||
+
|
||||
// First of all, check for the right header
|
||||
- if (cmsGetEncodedCMMversion() != LCMS_VERSION) {
|
||||
- Die("Oops, you are mixing header and shared lib!\nHeader version reports to be '%d' and shared lib '%d'\n", LCMS_VERSION, cmsGetEncodedCMMversion());
|
||||
- }
|
||||
+ if (cmsGetEncodedCMMversion() != LCMS_VERSION) {
|
||||
+ Die("Oops, you are mixing header and shared lib!\nHeader version reports to be '%d' and shared lib '%d'\n", LCMS_VERSION, cmsGetEncodedCMMversion());
|
||||
+ }
|
||||
|
||||
- printf("LittleCMS %2.2f test bed %s %s\n\n", cmsGetEncodedCMMversion() / 1000.0, __DATE__, __TIME__);
|
||||
+ printf("LittleCMS %2.2f test bed %s %s\n\n", LCMS_VERSION / 1000.0, __DATE__, __TIME__);
|
||||
|
||||
if ((argc == 2) && strcmp(argv[1], "--exhaustive") == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user