4 Commits

Author SHA1 Message Date
Sven Klemm
f89fd07c5b Remove year from SQL file license text
This changes the license text for SQL files to be identical
with the license text for C files.
2019-01-13 23:30:22 +01:00
Sven Klemm
787cc0470e Replace hardcoded database name from regression tests
Replace hardcoded database name from regression tests with :TEST_DBNAME
Remove creation of database single_2 from test runner and add it to
bgw_launcher and loader test since no other tests used those
use SQL comments in test scripts
2018-12-28 19:26:27 +01:00
Joshua Lockerman
20ec6914c0 Add license headers to SQL files and test code 2018-10-29 13:28:19 -04:00
Erik Nordström
027b7b2942 Hide extension symbols by default on Unix platforms
On platforms using libraries and executables in ELF format (e.g.,
Linux), exported symbols can collide. If a symbol (e.g., a function)
is already available, loading a module with a function that has the
exact same name will cause the newly loaded library to use the already
existing function instead of the one in the new module. Unfortunately,
GCC and Clang exports all symbols by default.

To avoid symbol collisions, this change compiles the extension with
`-fvisibility=hidden` on Unix platforms, which means a symbol isn't
exported unless explicitly specified. Note that symbols are not
exported by default on Windows. For GCC and Clang, a symbol can be
exported by annotating a function or variable with `__attribute__
((visibility ("default")))`. This is done transparently using our
custom `TS_FUNCTION_INFO_V1` macro. Note that functions exported with
that macro might still collide with existing symbols so they should
have proper name prefixes that make collisions unlikely.

A test for conflicting symbols runs in Debug configuration. When
compiled in Debug configuration, code with an identically named
function is added to both the loader and then versioned extension,
although the functions return different outputs. The functions are
called from both the loader and the versioned extension and the output
should contain different module names if no conflict.

The test fails on Linux if not compiled with -fvisibility=hidden.
2018-08-24 10:23:03 +02:00