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
Possible memory leak #800
Comments
Any idea what those 64 bytes are? It could be the static key for function hashing, which is static data. This may be valid engine infrastructure data that should stay on for the life of the program. Google's OSS-Fuzz doesn't find such leaks in normal scripts (it does find leaks in quite convoluted cases where you explicitly create a memory loop). |
Might be related, https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65646&q=rhai&can=1 |
I don't think so
This is only 8 words worth of leakage and very consistent. I suspect it has something to do with |
Hashing keys take 4 Indexer hashes take 2 So that's 6... The other two could be pub(crate) struct OnceCell<T> {
queue: AtomicPtr<Waiter>, // <-- This is one word
value: UnsafeCell<Option<T>>, // <-- The `Option` potentially adds one word...
} |
Hello, I'm interested in experimenting with Rhai for a potential IT project and have been exploring its scope and the ability to run multiple scripts simultaneously. In my efforts to ensure efficient memory usage, I decided to run valgrind and discovered a potential memory leak. While I'm not an expert, I want to make sure this issue is thoroughly investigated to ensure its significance or lack thereof.
The code executed:
Which valgrind tell me this:
There is also the same problem when i run it without threads:
The output of valgrind without threads:
The
Cargo.toml
:I am using rustc 1.75.0 with cargo 1.75.0 on stable channel.
The text was updated successfully, but these errors were encountered: