Conversation
Signed-off-by: Schrodinger ZHU Yifan <i@zhuyi.fan>
|
With MinGW UCRT64 runtime, perf-contention fails with the following stacktrace: This is only reproducible under debug mode. |
|
Hi, most of these changes seem to be replacing stdio with iostreams. Can you pull those out into a separate PR? Are those things necessary for MinGW or just cleanups? |
|
Is it definitely using the |
Signed-off-by: Schrodinger ZHU Yifan <i@zhuyi.fan>
It is needed because mingw's gcc disagrees with |
davidchisnall
left a comment
There was a problem hiding this comment.
I think 90% of this PR is unnecessary after the latest refactorings, which should make it more maintainable going forward.
If it actually works, please can you add MinGW to CI as well?
| message(STATUS "snmalloc: Avoiding Windows 10 APIs is ${WIN8COMPAT}") | ||
| endif() | ||
|
|
||
| if (MINGW) |
There was a problem hiding this comment.
Please can you add a comment explaining what this is needed for (getrandom?)
| snprintf(buf, size, msg, __VA_ARGS__) | ||
| // Windows has it with an underscore prefix | ||
| #elif defined(_MSC_VER) | ||
| #elif defined(_MSC_VER) || defined(__MINGW32__) |
There was a problem hiding this comment.
This code is gone now, please can you rebase the diff?
| # include <windows.h> | ||
| # pragma comment(lib, "bcrypt.lib") | ||
| # ifndef __MINGW32__ | ||
| # pragma comment(lib, "bcrypt.lib") |
There was a problem hiding this comment.
If we're embedding something in the .lib to tell the linker to link bcrypt, then can we make bcrypt a PRIVATE library rather than an INTERFACE one in the cmake?
| if (errno != err && err != SUCCESS) | ||
| { | ||
| printf("Expected error: %d but got %d\n", err, errno); | ||
| std::cout << "Expected error: " << err << " but got " << errno << std::endl; |
There was a problem hiding this comment.
These have all been replaced with the INFO and EXPECT macros. If there are any other places where they're necessary then please can you use the new formatting infrastructure rather than iostream?
|
superseded by #808 |


The old problem was addressed by introducing new way to register clean-up callbacks. However, there are still some works to do.
Signed-off-by: Schrodinger ZHU Yifan i@zhuyi.fan