-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[win/asan] Improve SharedReAlloc with HEAP_REALLOC_IN_PLACE_ONLY. #132558
base: main
Are you sure you want to change the base?
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
Hello, I wonder if such a patch would be acceptable? Also I am not sure which configurations this should be tested before final submission? I found also most heap(re)alloc or rtlallocateheap tests contain an |
This patch allows reallocations in place if the size is below or equal to the initial allocated size. Currently it prints only a "use-after-poison" message, not a proper "heap-buffer-overflow" with a hint to a reallocation.
213f036
to
bfcb81b
Compare
Just corrected the clang-format. Another point I forgot to mention, this currently creates an issue when running with ASAN_OPTIONS containing
|
To the question where this should be tested before submission, I wondered why the "Windows Premerge Check" did not run the tests. But then I found about Is there any other way to submit a test to some buildbot or similar? |
I'm not aware of any such setup unfortunately... But I use a custom github actions setup for test running various things on the public github actions runners - see mstorsjo@gha-mingw-compiler-rt. I pushed a combination of that with this test branch, which should produce results at https://github.com/mstorsjo/llvm-project/actions/runs/14078778580. It should probably be possible to do a similar setup with clang-cl as well; it's mainly a question if it can be built with a recent enough separate build of clang (so one can build just compiler-rt), or if it requires a full build of clang+compiler-rt at the same time (which takes a fair bit of time on the github actions runners). |
This patch allows reallocations in place if the size is below or equal to the initial allocated size.
Currently it prints only a "use-after-poison" message, not a proper "heap-buffer-overflow" with a hint to a reallocation.