Two high-hit-rate crashes observed in TSF after ATL migration #1391

Closed
opened 2026-01-30 22:24:37 +00:00 by claunia · 3 comments
Owner

Originally created by @DHowett-MSFT on GitHub (May 28, 2019).

Originally assigned to: @miniksa on GitHub.

MSFT#21776133 caused by NULL_POINTER_READ_c0000005_conhost.exe!CConsoleTSF::Initialize
MSFT#21781836 caused by FATAL_USER_CALLBACK_EXCEPTION_c000041d_conhost.exe!wil::com_ptr_t_ITfContext,wil::err_returncode_policy_::try_query_ITfSourceSingle_

Originally created by @DHowett-MSFT on GitHub (May 28, 2019). Originally assigned to: @miniksa on GitHub. MSFT#21776133 caused by `NULL_POINTER_READ_c0000005_conhost.exe!CConsoleTSF::Initialize` MSFT#21781836 caused by `FATAL_USER_CALLBACK_EXCEPTION_c000041d_conhost.exe!wil::com_ptr_t_ITfContext,wil::err_returncode_policy_::try_query_ITfSourceSingle_`
Author
Owner

@miniksa commented on GitHub (May 28, 2019):

Related to #719

@miniksa commented on GitHub (May 28, 2019): Related to #719
Author
Owner

@miniksa commented on GitHub (May 28, 2019):

Relevant stack frames:

 # Child-SP          RetAddr           Call Site
00 (Inline Function) --------`-------- conhost!wil::details::default_query_policy::query_dispatch+0xa [wil\com.h @ 81] 
01 (Inline Function) --------`-------- conhost!wil::details::default_query_policy::query+0xa [wil\com.h @ 66] 
02 (Inline Function) --------`-------- conhost!wil::com_ptr_t<ITfSourceSingle,wil::err_returncode_policy>::{ctor}+0xa [wil\com.h @ 847] 
03 00000045`a8afed40 00007ff6`77c9be17 conhost!wil::com_ptr_t<ITfContext,wil::err_returncode_policy>::try_query<ITfSourceSingle>+0x16 [wil\com.h @ 583] 
04 00000045`a8afed70 00007ff6`77c1e767 conhost!CConsoleTSF::Uninitialize+0x43 [src\tsf\consoletsf.cpp @ 123] 
05 00000045`a8afedf0 00007ff6`77c1e6a5 conhost!CConsoleTSF::Initialize+0x7b [src\tsf\consoletsf.cpp @ 104] 
@miniksa commented on GitHub (May 28, 2019): Relevant stack frames: ``` # Child-SP RetAddr Call Site 00 (Inline Function) --------`-------- conhost!wil::details::default_query_policy::query_dispatch+0xa [wil\com.h @ 81] 01 (Inline Function) --------`-------- conhost!wil::details::default_query_policy::query+0xa [wil\com.h @ 66] 02 (Inline Function) --------`-------- conhost!wil::com_ptr_t<ITfSourceSingle,wil::err_returncode_policy>::{ctor}+0xa [wil\com.h @ 847] 03 00000045`a8afed40 00007ff6`77c9be17 conhost!wil::com_ptr_t<ITfContext,wil::err_returncode_policy>::try_query<ITfSourceSingle>+0x16 [wil\com.h @ 583] 04 00000045`a8afed70 00007ff6`77c1e767 conhost!CConsoleTSF::Uninitialize+0x43 [src\tsf\consoletsf.cpp @ 123] 05 00000045`a8afedf0 00007ff6`77c1e6a5 conhost!CConsoleTSF::Initialize+0x7b [src\tsf\consoletsf.cpp @ 104] ```
Author
Owner

@miniksa commented on GitHub (May 28, 2019):

https://github.com/microsoft/wil/blob/master/include/wil/com.h#L81

Doesn't check ptr for nullness before deref-ing to QueryInterface which is causing access violation.

@miniksa commented on GitHub (May 28, 2019): https://github.com/microsoft/wil/blob/master/include/wil/com.h#L81 Doesn't check `ptr` for nullness before deref-ing to `QueryInterface` which is causing access violation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1391