Skip to content

Conversation

ajbeamon
Copy link
Contributor

When creating a database with API version <610 and client libraries 6.1 or newer, the fdb_cluster_create_database function was implemented by calling fdb_create_database. When using the multi-version API with a program that was explicitly linked against fdb_c, this could result in an infinite recursion where an external library calls fdb_create_database on the primary library, who then calls back into the external, etc.

This is known to affect programs written using the Go and Flow bindings as well as some written using the C bindings.

The solution implemented here removes DLLEXPORT from a variety of functions that don't need to be public and avoids calling fdb_create_database by adding a private implementation function.

I've opened this PR against release-6.1, as it is necessary to backport this if we want to use 6.1 as an external client version. I'll update release notes on relevant branches once we've decided how we intend to release this.

This doesn't really address the issue of preventing this in the future (outside of a couple comments), and which ideas or other potential solutions to the problem are considered I'm leaving this as a draft PR.

…from the C bindings, as that has a bad interaction with the multi-version API.
@ajbeamon ajbeamon marked this pull request as ready for review September 30, 2019 19:51
@ajbeamon ajbeamon merged commit 1f6af42 into apple:release-6.1 Sep 30, 2019
@ajbeamon ajbeamon deleted the c-bindings-avoid-using-public-functions branch October 2, 2019 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant