msvcp110: Add std::_Throw_future_error.
Merge request reports
Activity
requested review from @piotr
979 980 /* ?_Throw_future_error@std@@YAXABVerror_code@1@@Z */ 981 /* ?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z */ 982 void __cdecl DECLSPEC_NORETURN _Throw_future_error( const error_code *error_code ) 983 { 984 static const char *names[4] = { 985 "broken promise", 986 "future already retrieved", 987 "promise already satisfied", 988 "no state", 989 }; 990 future_error e; 991 992 TRACE("(%p)\n", error_code); 993 994 MSVCP_logic_error_ctor(&e.base, EXCEPTION_NAME(names[error_code->code-1])); changed this line in version 2 of the diff
added 50 commits
-
19a8d045...126363ea - 49 commits from branch
wine:master
- 7c2af8df - msvcp110: Add std::_Throw_future_error.
-
19a8d045...126363ea - 49 commits from branch
which version? 5 (and 0) crashes in ucrtbase.dll for me with 14.36.32532.0 which is the latest from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
ah.. that's what you meant. i get non-null for 5 and up from msvcp110:
---- msvcp110.dll 0 code 'future:0', what 00007FF9D8133BB8: code 'future:1', what 00007FF9D8133BC8: code 'future:2', what 00007FF9D8133BE8: code 'future:3', what 00007FF9D8133C08: code 'future:4', what 70206E656B6F7262: code 'future:5', what 00006573696D6F72: ---- msvcp120.dll 1 code 'future:1', what 00007FF9C8926C68: code 'future:2', what 00007FF9C8926C78: code 'future:3', what 00007FF9C8926C98: code 'future:4', what 00007FF9C8926CB8: code 'future:5', what 0000000000000000: code 'future:6', what 0000000000000000: ---- msvcp140.dll 1 code 'future:1', what 00007FF9D88390B0: code 'future:2', what 00007FF9D88390C0: code 'future:3', what 00007FF9D88390E0: code 'future:4', what 00007FF9D8839100: code 'future:5', what 0000000000000000: code 'future:6', what 0000000000000000: done
but do see null for msvcp120 and msvcp140. i'll fix it
964 965 DEFINE_THISCALL_WRAPPER(future_error_copy_ctor, 8) 966 future_error* __thiscall future_error_copy_ctor(future_error *this, const future_error *rhs) 967 { 968 logic_error_copy_ctor(&this->base, &rhs->base); 969 this->code = rhs->code; 970 this->base.e.vtable = &future_error_vtable; 971 return this; 972 } 973 974 DEFINE_THISCALL_WRAPPER(MSVCP_future_error_what, 4) 975 const char* __thiscall MSVCP_future_error_what(future_error *this) 976 { 977 978 TRACE("%p\n", this); 979 return this->base.e.name; - Comment on lines +977 to +979
977 978 TRACE("%p\n", this); 979 return this->base.e.name; 977 const char *names[4] = { 978 "broken promise", 979 "future already retrieved", 980 "promise already satisfied", 981 "no state", 982 }; 983 #if _MSVCP_VER == 110 984 int code = this->code.code; 985 #else 986 int code = this->code.code - 1; 987 #endif 988 989 TRACE("%p\n", this); 990 991 return code >= 0 && code < ARRAY_SIZE(names) ? names[code] : NULL; changed this line in version 5 of the diff
993 "broken promise", 994 "future already retrieved", 995 "promise already satisfied", 996 "no state", 997 }; 998 future_error e; 999 #if _MSVCP_VER == 110 1000 int code = error_code->code; 1001 #else 1002 int code = error_code->code-1; 1003 #endif 1004 const char *name = code >= 0 && code < ARRAY_SIZE(names) ? names[code] : NULL; 1005 1006 TRACE("(%p)\n", error_code); 1007 1008 MSVCP_logic_error_ctor(&e.base, EXCEPTION_NAME(name)); added 51 commits
-
d73d8d55...1b987bfd - 50 commits from branch
wine:master
- 407ba9ca - msvcp110: Add std::_Throw_future_error.
-
d73d8d55...1b987bfd - 50 commits from branch
Merge request !3767 (merged) !3767 (merged) was reviewed by Piotr Caban https://gitlab.winehq.org/piotr
Piotr Caban https://gitlab.winehq.org/piotr started a new discussion on dlls/msvcp90/exception.c !3767 (comment 44866): 977
978
- TRACE("%p\n", this);
979
- return this->base.e.name;
const char *names[4] = { "broken promise", "future already retrieved", "promise already satisfied", "no state", };#if _MSVCP_VER == 110 int code = this->code.code;#else int code = this->code.code - 1;#endif TRACE("%p\n", this); return code >= 0 && code < ARRAY_SIZE(names) ? names[code] : NULL;
Piotr Caban https://gitlab.winehq.org/piotr started a new discussion on dlls/msvcp90/exception.c !3767 (comment 44867): 1006
- TRACE("(%p)\n", error_code);
1007
1008
- MSVCP_logic_error_ctor(&e.base, EXCEPTION_NAME(name));
e.base.name should be set to "".
i get a different result from windows with the attached test when i set it to "" but in a more pure c++ sample, it's the same as windows
added 49 commits
-
407ba9ca...0c777a7d - 48 commits from branch
wine:master
- 23cab920 - msvcp110: Add std::_Throw_future_error.
-
407ba9ca...0c777a7d - 48 commits from branch