-
Notifications
You must be signed in to change notification settings - Fork 9
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
relocate in multimap causes heap-use-after-free issue #153
Comments
I'm using apple-clang on mac os. c++17 |
It's very likely the same problem as I mentioned:
I've tried to modify this line:
to
And it won't lead to the issue anymore, so reallocating the vector is probably the problem.
|
Hi, thanks for reporting! |
I haven't managed to reproduce it. Could you do (some) of the following?
|
Btw, running the unit tests with ASAN can be done with |
Could you try running the following test with ASAN and see weather it fails?
|
Sorry for the late reply. I've been swamped these days... I may try them when I'm free, but no promise on the time, sadly :( |
@rockingdice No worries :-) |
Hi @tzaeschke , we have run into what I believe is the same issue. I took our repro case and minimized it (there might be smaller examples but this is fairly small already). We have some internal fixed point types and I couldn't get it to trivially reproduce with floats or doubles so I just ran the conversions and have a tree defined on 64 bit signed ints.
FWIW in your test cases, I see
using Bazel and testing with |
I don't know how much you looked into it when this issue was originally raised, but from my quick look and not understanding the code at all, it looks like this causes re-allocation and may invalidate the |
@polasek Thanks! I will have a look. |
I still can't reproduce the issue using your test or mine on my machine with
However, I tried to implement a fix, can you have a look whether it works for you? |
Hi @tzaeschke, that seems to address the test case I provided and it also fixes the other test cases in That's strange that you can't repro. Are you sure the clang compiler is being picked up? It could also be due to a different standard library. I am using:
|
@polasek Weirdly enough, today I could finally see the asan errors. I used the commands from command history, so this hasn't changed. The only thing that changed was a BIOS update earlier today, not sure whether that can/should affect anything....??? Anyway, I merged the fix, thanks a lot for you help! |
I cannot make a repro. It's a very big project. Dunno if the logs are helpful:
The text was updated successfully, but these errors were encountered: