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

Segfault on NA sample size #9

Open
jonlachmann opened this issue Apr 29, 2021 · 1 comment
Open

Segfault on NA sample size #9

jonlachmann opened this issue Apr 29, 2021 · 1 comment
Labels

Comments

@jonlachmann
Copy link

Hi, I am building a package using this package, and am very happy with it!

I found a bug that if for some reason NA is passed as the sample size to sample_int_expj (and possibly other functions), the R process will be terminated caused by a "memory not mapped" exception. It is of course reasonable that is it not realistic to sample NA items, but maybe it would be appropriate to check for this in some way?

Code reproducing the error is

sample_int_expj(5, NA, rep(1,5))
@krlmlr
Copy link
Owner

krlmlr commented Apr 30, 2021

Thanks, we need to do better input checking here. Would you like to contribute?

@krlmlr krlmlr added the bug label Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants