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

Segmentation fault on prepare_cached with an empty query #583

Closed
tomhoule opened this issue Oct 29, 2019 · 5 comments
Closed

Segmentation fault on prepare_cached with an empty query #583

tomhoule opened this issue Oct 29, 2019 · 5 comments
Labels

Comments

@tomhoule
Copy link

tomhoule commented Oct 29, 2019

With the latest version, the following program segfaults on my machine:

use rusqlite::*;

fn main() -> Result<()> {
    let conn = Connection::open_in_memory()?;

    conn.prepare_cached("")?;

    Ok(())
}

rustqlite version: 0.20.0
sqlite version: 3.30.1-1
OS: Arch Linux

@gwenn
Copy link
Collaborator

gwenn commented Oct 29, 2019

Thank you.
See PR #584 for a fix.
I am not sure how we should handle this case !

@tomhoule
Copy link
Author

tomhoule commented Nov 19, 2019

Thanks for the fix! Should we close this issue, now that the PR is merged? :)

@gwenn
Copy link
Collaborator

gwenn commented Nov 19, 2019

PR is merged but not released yet.
I will try to release a new version this week.

@tomhoule
Copy link
Author

No hurry from our side, we worked around the issue for now.

@gwenn
Copy link
Collaborator

gwenn commented Dec 13, 2019

Fixed in 0.21

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