Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx3.pub.mailpod2-cph3.one.com ([10.27.25.13])
	by mailstorage18.cst.mailpod2-cph3.one.com with LMTP id kN5ALfumW1uhMwEAQS8vrQ
	for <filtered@awaresystems.be>; Fri, 27 Jul 2018 23:12:59 +0000
X-HalOne-ID: 99e8e650-91f2-11e8-99fb-e0d84895d241
Received: from mail-yw0-f173.google.com (unknown [209.85.161.173])
	by mx3.pub.mailpod2-cph3.one.com (Halon) with ESMTPS
	id 99e8e650-91f2-11e8-99fb-e0d84895d241;
	Fri, 27 Jul 2018 23:12:59 +0000 (UTC)
Received: by mail-yw0-f173.google.com with SMTP id 139-v6so2450605ywg.12
        for <filtered@awaresystems.be>; Fri, 27 Jul 2018 16:12:59 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :mime-version:from:date:message-id:to:subject:precedence:list-id
         :list-unsubscribe:list-archive:list-post:list-help:list-subscribe
         :mime-version:sender:errors-to;
        bh=tPAlw7n7AGSxnPx7wADArKL2IbXmBg3tGKUZQSXXGeo=;
        b=k+vHc5tDBvIjdWjk87MTAjOVvbe+wfNwo9xCeMHK+mX1/ql+5mD3TlTlH+/OEiUESz
         N9v1+xu50zwNj9BmBVqmjA9igE9cW1ab3hRj8pO/8/tnbuJqoBHyFdHERGAzKV+kiB/M
         8+08xHpfw0C8ka262YIy6LiIrMzUdHr4c00QZY5JUQaweULeQOI33v+Gp5vbwT2f6hc3
         GE4p6Z0ApskjEMeCrqAayckvHtGouKw/+8jLHrInqIIBbMBWzE3n1tTFQ5A6AjY98xZm
         mKqnbG/MXjg9zzgq12R1PbBiNt5SifsfBHMngSQSDSy1ZfRrqXDNhHYucycXOh3fPDLn
         +MDA==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;       dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AOUpUlGMHgoBYnhi/q5rz0/bFOLWBzM+CCKMU+1fZCzGlAzMkL1xHRYX
	g+lWui6BEcY8/o4pJfPpXFbdFOq/nWC4QGcPfGoghZYS9IFDfDU=
X-Received: by 2002:a0d:c744:: with SMTP id j65-v6mr4368484ywd.484.1532733178004;
        Fri, 27 Jul 2018 16:12:58 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 2002:a25:8683:0:0:0:0:0 with SMTP id z3-v6csp1235530ybk;
        Fri, 27 Jul 2018 16:12:56 -0700 (PDT)
X-Google-Smtp-Source: AAOMgpfj3Pe7wnVap7vBEks+BxUTC+w3TbTI8hp4JfxUff6hmXpbaDnGZ7COiy1MQbRCb3JqxUVg
X-Received: by 2002:a1c:c019:: with SMTP id q25-v6mr5938961wmf.148.1532733176808;
        Fri, 27 Jul 2018 16:12:56 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1532733176; cv=none;
        d=google.com; s=arc-20160816;
        b=FrfSHMUJIp2b6EDjj+ZukddecRoPfbk4yO1MBAA4inyHgeoldCvgVCF+IgoKhd1f05
         swsNaoP+Bjfrm1slCbmP71a16tWccDIdkqZqy/B33+Groic+cPfMxRBBjmpEnO2NuuRA
         rCoIR04il89giRBTyGg5Hu1hHwdADkaOIduNRUfmQHxy9Oi9XJ6JIYSI0IWf1u0rxaJm
         a9ai4UQDyPrSZXoRw+8wRmQaJo7iyKHQDY3XuGZtvBy7a5TCPLp36AzWMDT23wZj2nmA
         pFd1pLKVMxR3wg9scKat7VqGwuifYdJPfoV19WhU5vu9bExbXy2lPLmXGXFcVNefJ+Iw
         a0fA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:mime-version:list-subscribe:list-help:list-post
         :list-archive:list-unsubscribe:list-id:precedence:subject:to
         :message-id:date:from:mime-version:arc-authentication-results;
        bh=tPAlw7n7AGSxnPx7wADArKL2IbXmBg3tGKUZQSXXGeo=;
        b=H7nSSfOvrE7sWl86BKAijszawBkGhzz6/GFv8UV2ILCmIVP2LyY7H3RS0HKDh7Ny5p
         /vo89wsAbWEAzM31UwW9un0mW0SOKcTT7x+eHFnXmmypliRJtdrMcIRZ/Z7FrJuqVYMS
         tfPxROot3rN2qtqvZLMMkhUrXSal+RYkzvPBUyIPcAFbSqBqgSorhsYHTzxSnITi2Ikq
         1GXvo5k74SLyb/Yu9FyX+FTqbL4jGfl3KzHzxL2drKa3//Whf7keoeI67q0OHRWuxZOB
         4Gp7xv/Dn43hF1fszy28NUXhNvGt73c23/LfC38tS9wpOI3ZKzCXjPR7U4DjWj2VryT7
         bZDg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id e23-v6si3873273wmh.109.2018.07.27.16.12.54;
        Fri, 27 Jul 2018 16:12:56 -0700 (PDT)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id F015335C025;
	Fri, 27 Jul 2018 18:11:55 -0500 (EST)
Received: from mail-it0-f53.google.com (mail-it0-f53.google.com
	[209.85.214.53])
	by lists.maptools.org (Postfix) with ESMTPS id 5F25535C023
	for <tiff@lists.maptools.org>; Fri, 27 Jul 2018 18:11:38 -0500 (EST)
Received: by mail-it0-f53.google.com with SMTP id h20-v6so9562535itf.2
	for <tiff@lists.maptools.org>; Fri, 27 Jul 2018 16:11:37 -0700 (PDT)
X-Received: by 2002:a24:f83:: with SMTP id 125-v6mr7510809ito.18.1532733096618;
	Fri, 27 Jul 2018 16:11:36 -0700 (PDT)
MIME-Version: 1.0
From: Alan Koohi <hystaspesk@gmail.com>
Date: Fri, 27 Jul 2018 16:11:25 -0700
Message-ID: <CA+vLUQbAewpwHBNMqvJ2r6pGpYQNn787bPYUY=P1DiFnGUeDNw@mail.gmail.com>
To: tiff@lists.maptools.org
Subject: [Tiff] libtiff (v3 / v4) maintain/use shared global state?
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0740754066=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0740754066==
Content-Type: multipart/alternative; boundary="000000000000c26ebf0572033bea"

--000000000000c26ebf0572033bea
Content-Type: text/plain; charset="UTF-8"

Question: Does libtiff attempt at maintaining any sort of shared global
state among the DSOs dynamically referenced by the same process?

Background: I'm working on a plugin (C++) that ends up indirectly pulling
in 2 different versions of libtiff (library X dynamically linked against
libtiff v3.9.4 and library Y against libtiff v4.0.7) into the run-time
environment through two 3rd party dependencies, which results in a
segmentation fault crash due to a missing symbol (TIFFFindFieldInfo).

Considering I can rebuild X and Y from source, but modifying the source is
not an option, I tried to statically link libtiff v3.9.4 into library X to
make all the libtiff symbols it needs locally available, which avoids the
crash; I've been testing this for some time and can confirm this solves the
missing symbol problem.

The only concern I have is whether or not libtiff maintains some sort of a
global state which may be shared among all libtiff users (DSOs) referenced
by the same process. If this is not the case, then I can go with the static
linkage solution, otherwise it is probably not safe.

Thanks in advance for your help!

--000000000000c26ebf0572033bea
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Question: Does libtiff attempt at maintaining any sor=
t of shared global state among the DSOs dynamically referenced by the same =
process?</div><div><br></div><div>Background: I&#39;m working on a plugin (=
C++) that ends up indirectly pulling in 2 different versions of libtiff (li=
brary X dynamically linked against libtiff v3.9.4 and library Y against lib=
tiff v4.0.7) into the run-time environment through two 3rd party dependenci=
es, which results in a segmentation fault crash due to a missing symbol (TI=
FFFindFieldInfo).</div><div><br></div><div>Considering I can rebuild X and =
Y from source, but modifying the source is not an option, I tried to static=
ally link libtiff v3.9.4 into library X to make all the libtiff symbols it =
needs locally available, which avoids the crash; I&#39;ve been testing this=
 for some time and can confirm this solves the missing symbol problem.</div=
><div><br></div><div>The only concern I have is whether or not libtiff main=
tains some sort of a global state which may be shared among all libtiff use=
rs (DSOs) referenced by the same process. If this is not the case, then I c=
an go with the static linkage solution, otherwise it is probably not safe.<=
/div><div><br></div><div>Thanks in advance for your help!</div></div>

--000000000000c26ebf0572033bea--

--===============0740754066==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============0740754066==--
