mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
Remove erroneous function cast (#14673)
### Description The custom thread entry point was declared `__stdcall` even though the API dictated a different type. Casting caused improper cleanup of the stack and crash manifested only in 32-bit Debug builds. ### Motivation and Context This addresses https://github.com/microsoft/onnxruntime/issues/14613
This commit is contained in:
parent
2a4c9a5cbf
commit
6eeeecf07f
1 changed files with 2 additions and 2 deletions
|
|
@ -95,7 +95,7 @@ class WindowsThread : public EnvThread {
|
|||
}
|
||||
|
||||
if (custom_create_thread_fn) {
|
||||
custom_thread_handle = custom_create_thread_fn(custom_thread_creation_options, (OrtThreadWorkerFn)CustomThreadMain, local_param.get());
|
||||
custom_thread_handle = custom_create_thread_fn(custom_thread_creation_options, CustomThreadMain, local_param.get());
|
||||
if (!custom_thread_handle) {
|
||||
ORT_THROW("custom_create_thread_fn returned invalid handle.");
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ class WindowsThread : public EnvThread {
|
|||
}
|
||||
#pragma warning(pop)
|
||||
|
||||
static void __stdcall CustomThreadMain(void* param) {
|
||||
static void CustomThreadMain(void* param) {
|
||||
std::unique_ptr<Param> p(static_cast<Param*>(param));
|
||||
ORT_TRY {
|
||||
p->start_address(p->index, p->param);
|
||||
|
|
|
|||
Loading…
Reference in a new issue