Skip to content
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

ffi: delegate all allocations to the caller #7

Merged

Conversation

jonasmalacofilho
Copy link
Contributor

This is a follow up to our email conversation.

As in this design both ulid_new_string() and ulid_write_new() would be identical, the latter is dropped.

Due to the increased number of tests, a problem with rand() not being reentrant became a lot more apparent. The tests can be made to work reliably with --test-threads 1, but a proper solution is still needed, as that is a bug that affects normal use of the public APIs.

Most of the tests can also be executed in Miri with:

MIRIFLAGS="-Zmiri-disable-isolation" cargo +nightly miri test

(-Zmiri-disable-isolation is required for SystemTime::new() ).

As in this design both ulid_new_string() and ulid_write_new() would be
identical, the latter is dropped.

Due to the increased number of tests, a problem with rand() not being
reentrant became a lot more apparent.  The tests can be made to work
reliably with `--test-threads 1`, but a proper solution is still needed,
as that is a bug that affects normal use of the public APIs.

Most of the tests can also be executed in Miri with:

MIRIFLAGS="-Zmiri-disable-isolation" cargo +nightly miri test

(-Zmiri-disable-isolation is required for SystemTime::new()).
@timClicks
Copy link
Owner

Thanks very much for this contribution @jonasmalacofilho. I have logged issue #8 .

@timClicks timClicks merged commit fb93e0d into timClicks:main May 23, 2021
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.

None yet

2 participants