🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3610

Re: Multiple instances of libc (ELF shared object)

#3610
From: John Hickin
Date: Thu, 07 Oct 1999 00:00
23 lines
1369 bytes
Even Microsoft advises against this chicanery (for those with VC6 search
on LNK4096). I doubt that the Unix community would sanction this type of
thing either (and I don't know if Unix environments even let you do it).

Suppose, for example, that you execute:

	void* ptr = malloc(42); // malloc bound to libc #1

and subsequently do

	free( ptr );		// free bound to libc #2

You are hosed, well and truely. Similar _opportunities_, somewhat
disguised, occur with tempnam/free and strdup/free.

Cheers, John.

Arthur Gold wrote:
> 
> Perhaps someone can help me here.
> 
> I have a need, within a shared object, to have multiple instances of
> libc in my address space (this has to do with tracing library access),
Technical Details
Message-ID: <37FCE563.B01487E6@nortelnetworks.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37FCDB67.CBB5DD0A@bga.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,47089ab1deba9b43
X-Google-Attributes: gid11318c,public
X-Google-Thread: fc89c,47089ab1deba9b43
X-Google-Attributes: gidfc89c,public
From: John Hickin <hickin@nortelnetworks.com>
Subject: Re: Multiple instances of libc (ELF shared object)
Date: 1999/10/07
Message-ID: <37FCE563.B01487E6@nortelnetworks.com>
X-Deja-AN: 534006642
Content-Transfer-Encoding: 7bit
References: <37FCDB67.CBB5DD0A@bga.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Nortel
Mime-Version: 1.0
Newsgroups: comp.unix.programmer,gnu.gcc.help