pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Raiskup <praiskup@redhat.com>
To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Cc: devrim@gunduz.org
Subject: plruby: rb_iterate symbol clash with libruby.so
Date: Sat, 03 Nov 2018 17:19:40 +0100
Message-ID: <4738198.8KVIIDhgEB@nb.usersys.redhat.com> (raw)

Hi, I'm curious how it worked before (seems like the function is defined
in both PostgreSQL and Ruby projects for quite some time) - but I recently
came across this situation:

    - /bin/postgres is build-time linked with 'ld -E'
    - /bin/postgres dlopen()s plruby.so
    - plruby.so calls rb_iterate, but linker prefers rb_iterate defined in
      /bin/postgres, instead of (the wanted one) rb_iterate from libruby.so

This means an ugly PG server crash.  I'm curious what to do with this;
ideally it would be solvable from plruby.so itself, but there doesn't seem
to be nice solution (one could do some hacks with dlopen('libruby.so')).

Is it realistic we could rename red-black tree methods from 'rb_*' to e.g.
'rbt_*' to avoid this clash?

Pavel







view thread (16+ messages)  latest in thread

Message-ID: <4738198.8KVIIDhgEB@nb.usersys.redhat.com>
Permalink:  ../4738198.8KVIIDhgEB@nb.usersys.redhat.com/
Also on:    postgresql.org/message-id/4738198.8KVIIDhgEB@nb.usersys.redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: praiskup@redhat.com, devrim@gunduz.org
  Subject: Re: plruby: rb_iterate symbol clash with libruby.so
  In-Reply-To: <4738198.8KVIIDhgEB@nb.usersys.redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox