Re: [PATCH] fix symbol namespace pollution from bundled libgd
| From: | Joe Orton | Date: | Sat, 07 Aug 2004 16:02:17 +0000 |
| Subject: | Re: [PATCH] fix symbol namespace pollution from bundled libgd | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11994@lists.php.net to get a copy of this message | ||
On Mon, Aug 02, 2004 at 10:55:27AM +0200, Derick Rethans wrote:
> On Fri, 23 Jul 2004, Joe Orton wrote:
>
> > Building the bundled libgd library into PHP causes symbol namespace
> > pollution; if any other Apache modules link a different version of libgd
> > into the Apache process they may instead pick up symbols from the PHP
> > libgd, and segfault randomly. (One of our users saw this when using
> > mod_perl with Perl::GD)
>
> Hmm, I don't really like this "hiding" of symbol names. Why just not fix
> our bundled GD to use the correct names?
That would mean adding exactly the reverse set of #defines to allow the
the GD extension to be built against an external copy of libgd (which of
course won't use the phpgd_* symbols).
Given that a complete set of #defines is needed anyway, doing it without
modifying libgd makes more sense since it's then easier to track the
upstream libgd sources.
joe