-
Notifications
You must be signed in to change notification settings - Fork 15
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
Getting SIGSEGV: invalid memory reference when running tests #35
Comments
In the meantime I found the following out: The main issue here lies in the try_extend_from_slice_no_copy function. After trying to clone the |
It appears that when trying to reserve the memory for a new Vec, the allocator should not return a valid pointer. When running the test for 64 bit architectures, it obviously does not work because no machine has that much memory and the allocator return |
The new fallible_collections/src/vec.rs Lines 826 to 829 in ecd9e2b
That's allocating a single |
🐮 The problem with this test when using fsanitize=address is initially because the requested allocation is too large. However, if we try to rewrite the code by making a small TryVec of 16mb first with the right layout, and then using try_clone() on it while retaining the references, and do this until there is no more memory at all, well, it takes hours to execute since try_clone() seems to make a rather slow copy... It would be necessary to say that for this test only, TryClone should not make a copy. But I have no idea how to do that! |
I am currently in the process of packaging this crate for fedora.
When trying to build the crate for the i686 architecture, I get the following error after running
cargo test
:Full build log
I could isolate the problem to the following test.
While I am trying to understand the underlying problem, I thought I would create this issue.
The text was updated successfully, but these errors were encountered: