Open lukeasrodgers opened 1 year ago
I think I have narrowed this down to the use of mongodb-schema-parser
.
If I
use mongodb_schema_parser::SchemaParser;
from mongodb.rs
read_and_parse_schema
to just return Ok(())
so that it is not relying on SchemaParser
If I only modify read_and_parse_schema
so that it doesn't use SchemaParser
I still get the segfault. This is surprising since I expected that use
in rust would be side-effect free (or at very least, free of side effects causing memory corruption!). I do see that the mongo schema parser appears to initialize a static allocator object here https://github.com/mongodb-rust/mongodb-schema-parser/blob/master/src/lib.rs#L74 but am not familiar with the wee library or the related wasm code.
running
cargo test --all
on the current commit (d6b35a7) i get the following outputUsing git bisect, looks like the first "bad" commit is 7714dd0a119d9246d4eae0f13130f6d4ce1fd997. I don't know rust well enough to be able to debug this any further. It seems as though the ability to run tests isn't actually impacted and the error is just noise, but the segfault is still somewhat concerning.
-- update
Actually it does seem that this segfault impacts the ability to run all tests. If I introduce artificial failures by e.g. changing
assert_ne
toassert_eq
in some transformer tests, the test output is the same and no error is reported for the transformer tests. As you can see they are not mentioned in the test output at all.