plruby: rb_iterate symbol clash with libruby.so

From: Pavel Raiskup <praiskup(at)redhat(dot)com>
To: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Cc: devrim(at)gunduz(dot)org
Subject: plruby: rb_iterate symbol clash with libruby.so
Date: 2018-11-03 16:19:40
Message-ID: 4738198.8KVIIDhgEB@nb.usersys.redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2018-11-03 16:20:49 Re: Special role for subscriptions
Previous Message Karsten Hilbert 2018-11-03 16:03:14 Re: backend crash on DELETE, reproducible locally