-
Notifications
You must be signed in to change notification settings - Fork 38
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 with xml serialisation #96
Comments
I've reproduced the crash in a GitHub project, in a GitHub Action CI. Projet: https://github.com/jcamiel/testxml The command used: Output:
|
Thank you for the detailed report and testing @jcamiel ! I am not particularly looking forward to debugging this to a patch, but I guess I'll have to 😅 If I'm lucky it will be a matter of deferring some "free-on-drop" until a parent gets freed, but let's see... |
If I can help in any way, don't hesitate to ping me, event to test tiny changes. I can reproduce it easily on my Mac but I don't know how to have debug information (maybe with gdb from a core dump ?). We try to reproduce it on a Linux image but everything seems correct. |
I've updated the GitHub project with a simpler snippet: se libxml::tree::{Document, Node};
fn main() {
}
fn to_xml() -> String {
let doc = Document::new().unwrap();
let books = Node::new("books", None, &doc).unwrap();
doc.node_to_string(&books)
}
#[cfg(test)]
mod tests {
use crate::to_xml;
#[test]
fn it_works_0() {
assert_eq!(to_xml(), "<books/>");
}
#[test]
fn it_works_1() {
assert_eq!(to_xml(), "<books/>");
}
#[test]
fn it_works_2() {
assert_eq!(to_xml(), "<books/>");
}
#[test]
fn it_works_3() {
assert_eq!(to_xml(), "<books/>");
}
} |
I'm tracking a bug in Hurl, our cli tool that is using
libxml
crate.I think I've a very small and reproductible segmentation fault that is occurring in a multithreaded context (for instance in Rust unit test):
To reproduce:
with
run.sh
:My environnement:
Segmentation fault on:
I'm trying to setup an environment (like a Github action) where I can easily reproduce it.
I'm really not sure if this is a bug of the crate but the code seems so innocuous that I don' t know where to look.
By the way, thank you very much for your invaluable work, we're otherwise very happy with with crate,
Jc
The text was updated successfully, but these errors were encountered: