head 1.3; access; symbols pkgsrc-2019Q2:1.2.0.42 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.2.0.40 pkgsrc-2019Q1-base:1.2 pkgsrc-2018Q4:1.2.0.38 pkgsrc-2018Q4-base:1.2 pkgsrc-2018Q3:1.2.0.36 pkgsrc-2018Q3-base:1.2 pkgsrc-2018Q2:1.2.0.34 pkgsrc-2018Q2-base:1.2 pkgsrc-2018Q1:1.2.0.32 pkgsrc-2018Q1-base:1.2 pkgsrc-2017Q4:1.2.0.30 pkgsrc-2017Q4-base:1.2 pkgsrc-2017Q3:1.2.0.28 pkgsrc-2017Q3-base:1.2 pkgsrc-2017Q2:1.2.0.24 pkgsrc-2017Q2-base:1.2 pkgsrc-2017Q1:1.2.0.22 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.20 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.18 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.16 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.14 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.12 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.2.0.10 pkgsrc-2015Q3-base:1.2 pkgsrc-2015Q2:1.2.0.8 pkgsrc-2015Q2-base:1.2 pkgsrc-2015Q1:1.2.0.6 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.2.0.4 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.2 pkgsrc-2014Q3-base:1.2; locks; strict; comment @// @; 1.3 date 2019.09.21.21.34.44; author nia; state dead; branches; next 1.2; commitid FvoLTYzvzf6WqVDB; 1.2 date 2014.08.19.13.34.42; author joerg; state Exp; branches; next 1.1; commitid zYdzBhbZGBf6xYMx; 1.1 date 2014.08.15.18.07.41; author richard; state Exp; branches; next ; commitid lR0EbUHh43s6auMx; desc @@ 1.3 log @openexr: Update to 2.4.0 Summary of changes: All code compiles without warnings on gcc, clang, msvc Cleanup of license and copyright notices floating-point exception handling is disabled by default New Slice::Make method to reliably compute base pointer for a slice. Miscellaneous bug fixes This version fixes the following security vulnerabilities: CVE-2018-18444 Issue #351 Out of Memory CVE-2018-18443 Issue #350 heap-buffer-overflow @ text @$NetBSD: patch-IlmImf_ImfSystemSpecific.cpp,v 1.2 2014/08/19 13:34:42 joerg Exp $ Rework cpuid function to use gnuc __get_cpuid (requiring at least gcc 4.3) This get's over issues such as encountered with PIC builds. Upstream issue : https://github.com/openexr/openexr/issues/128 --- IlmImf/ImfSystemSpecific.cpp.orig 2014-08-10 04:23:57.000000000 +0000 +++ IlmImf/ImfSystemSpecific.cpp @@@@ -40,21 +40,30 @@@@ OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EN namespace { #if defined(IMF_HAVE_SSE2) && defined(__GNUC__) - // Helper functions for gcc + SSE enabled - void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) + void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, + unsigned int &ecx, unsigned int &edx) { +#ifdef __i386__ + __asm__ __volatile__ ( + "pushl %%ebx; cpuid; movl %%ebx, %0; popl %%ebx" + : /* Output */ "=m"(ebx), "=a"(eax), "=c"(ecx), "=d"(edx) + : /* Input */ "a"(n) + : /* Clobber */); +#else __asm__ __volatile__ ( "cpuid" : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) : /* Input */ "a"(n) : /* Clobber */); +#endif } #else // IMF_HAVE_SSE2 && __GNUC__ // Helper functions for generic compiler - all disabled - void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) + void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, + unsigned int &ecx, unsigned int &edx) { eax = ebx = ecx = edx = 0; } @@@@ -64,7 +73,7 @@@@ namespace { #ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - void xgetbv(int n, int &eax, int &edx) + void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) { __asm__ __volatile__ ( "xgetbv" @@@@ -75,7 +84,7 @@@@ namespace { #else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - void xgetbv(int n, int &eax, int &edx) + void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) { eax = edx = 0; } @@@@ -94,8 +103,8 @@@@ CpuId::CpuId(): f16c(false) { bool osxsave = false; - int max = 0; - int eax, ebx, ecx, edx; + unsigned int max = 0; + unsigned int eax, ebx, ecx, edx; cpuid(0, max, ebx, ecx, edx); if (max > 0) @ 1.2 log @Don't use gcc-specific cpuid.h, fix the inline asm to properly save/restore %ebx on i386. @ text @d1 1 a1 1 $NetBSD: patch-IlmImf_ImfSystemSpecific.cpp,v 1.1 2014/08/15 18:07:41 richard Exp $ @ 1.1 log @Rework cpuid function to use gnuc __get_cpuid (requiring at least gcc 4.3) This get's over issues such as encountered with PIC builds. Upstream issue : https://github.com/openexr/openexr/issues/128 Revbump due to new dependency on GCC_REQD+= 4.3 (additional patches available upon request for bmake test target) @ text @d1 1 a1 1 $NetBSD$ d9 1 a9 1 @@@@ -40,21 +40,19 @@@@ OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EN a13 1 +#include d19 13 a31 6 - __asm__ __volatile__ ( - "cpuid" - : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) - : /* Input */ "a"(n) - : /* Clobber */); + __get_cpuid(n, &eax, &ebx, &ecx, &edx); d43 1 a43 1 @@@@ -64,7 +62,7 @@@@ namespace { d52 1 a52 1 @@@@ -75,7 +73,7 @@@@ namespace { d61 1 a61 1 @@@@ -94,8 +92,8 @@@@ CpuId::CpuId(): @