Skip to content

The module_str parameter of open_resource_type has to be NULL #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

filmor
Copy link
Contributor

@filmor filmor commented Jan 18, 2025

As documented in https://www.erlang.org/doc/apps/erts/erl_nif#enif_open_resource_type.

This only leads to problems in debug builds as the value is currently guarded by an assertion.

As documented in

    https://www.erlang.org/doc/apps/erts/erl_nif#enif_open_resource_type

This only leads to problems in debug builds as the value is
currently guarded by an assertion.
@warmwaffles
Copy link
Member

Odd. Makes sense as I never build the library in debug mode. Always in -O3.

@warmwaffles warmwaffles merged commit 0f4091e into elixir-sqlite:main Jan 19, 2025
9 checks passed
@filmor filmor deleted the patch-1 branch January 19, 2025 19:56
@filmor
Copy link
Contributor Author

filmor commented Jan 19, 2025

This has nothing to do with the library, it's about the BEAM. A debug BEAM will be compiled with the respective assertion and fail to load this NIF, see https://erlangforums.com/t/debug-emulator-fails-to-run-with-exqlite-nif/4399.

@warmwaffles
Copy link
Member

Makes sense. I haven't built a debug BEAM or used one before.

@filmor just curious, why were you running a debug build? Just wondering if I should be integrating it into my workflow for NIF development.

@filmor
Copy link
Contributor Author

filmor commented Jan 20, 2025

I wasn't, @alanj853 was :)

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.

2 participants