Skip to content
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

Crash when trying to ToUpper() DbgEng> outputs #121

Open
alastorid opened this issue Jul 11, 2024 · 0 comments
Open

Crash when trying to ToUpper() DbgEng> outputs #121

alastorid opened this issue Jul 11, 2024 · 0 comments

Comments

@alastorid
Copy link

alastorid commented Jul 11, 2024

The DbgShell command to reproduce the issue:

?? `@`$peb|%{ $_.ToUpper() }

Crash stack and DbgShell command line

... # DbgShell.exe
Microsoft Debugger DbgShell
Copyright (c) 2015

Welcome.

Note that script execution policy is 'Bypass' for this process.
Run 'Get-Help about_DbgShell_GettingStarted' to learn about DbgShell.


PS Dbg:\
> ?? `@`$peb|%{ $_.ToUpper() }
Out-Default: OH NOES: The command code 'M' (0x4d) is not supported.
Out-Default: OH NOES: The command code 'o' (0x6f) is not supported.

Unhandled Exception: System.Management.Automation.CmdletInvocationException: The command code 'o' (0x6f) is not supported. ---> System.NotSupportedException: The command code 'o' (0x6f) is not supported.
   at MS.DbgShell.ConsoleControl.AnsiColorWriter._FindCommand(Char commandChar, Action`1& command) in C:\src\DbgShell\DbgShell\ConsoleControl.AnsiColorWriter.cs:line 244
   at MS.DbgShell.ConsoleControl.AnsiColorWriter._HandleControlSequence(String s, Int32 escIndex) in C:\src\DbgShell\DbgShell\ConsoleControl.AnsiColorWriter.cs:line 205
   at MS.DbgShell.ConsoleControl.AnsiColorWriter.Write(SafeFileHandle handle, String s) in C:\src\DbgShell\DbgShell\ConsoleControl.AnsiColorWriter.cs:line 158
   at MS.DbgShell.ConsoleControl.WriteConsole(SafeFileHandle consoleHandle, String output) in C:\src\DbgShell\DbgShell\ConsoleControl.cs:line 2767
   at MS.DbgShell.ConsoleTextWriter.Write(String value) in C:\src\DbgShell\DbgShell\ConsoleTextWriter.cs:line 60
   at MS.DbgShell.ColorHostUserInterface.Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, String value) in C:\src\DbgShell\DbgShell\ColorHostUserInterface.cs:line 799
   at System.Management.Automation.Host.PSHostUserInterface.WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, String value)
   at Microsoft.PowerShell.Commands.Internal.Format.ConsoleLineOutput.OnWriteLine(String s)
   at Microsoft.PowerShell.Commands.Internal.Format.ConsoleLineOutput.WriteLine(String s)
   at Microsoft.PowerShell.Commands.Internal.Format.ComplexWriter.WriteToScreen()
   at Microsoft.PowerShell.Commands.Internal.Format.ComplexWriter.WriteObject(List`1 formatValueList)
   at Microsoft.PowerShell.Commands.Internal.Format.OutCommandInner.ProcessPayload(FormatEntryData fed, OutputContext c)
   at Microsoft.PowerShell.Commands.Internal.Format.OutCommandInner.ProcessObject(PSObject so)
   at Microsoft.PowerShell.Commands.Internal.Format.OutCommandInner.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
   --- End of inner exception stack trace ---
   at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
   at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
   at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
   at MS.DbgShell.ColorConsoleHost._ReportException(Exception e, PowerShell shell) in C:\src\DbgShell\DbgShell\ColorConsoleHost.cs:line 857
   at MS.DbgShell.ColorConsoleHost.InputLoop.Run() in C:\src\DbgShell\DbgShell\ColorConsoleHost.cs:line 426
   at MS.DbgShell.ColorConsoleHost.Run(CommandLineParameterParser cpp) in C:\src\DbgShell\DbgShell\ColorConsoleHost.cs:line 1188
   at MS.DbgShell.ColorConsoleHost.Start(RunspaceConfiguration configuration, String bannerText, String helpText, String[] args) in C:\src\DbgShell\DbgShell\ColorConsoleHost.cs:line 1225
   at MS.DbgShell.MainClass.MainWorker(String[] args) in C:\src\DbgShell\DbgShell\MainClass.cs:line 828
   at MS.DbgShell.MainClass._NormalModeMainWrapper(String[] args) in C:\src\DbgShell\DbgShell\MainClass.cs:line 526
   at MS.DbgShell.MainClass.Main(String[] args) in C:\src\DbgShell\DbgShell\MainClass.cs:line 132

The version of DbgShell is:

0:000> lmDvm DbgShell
Browse full module list
start             end                 module name
00000001`40000000 00000001`4002c000   DbgShell   (deferred)             
    Image path: R:\fff\DbgShell\DbgShell\x64\DbgShell.exe
    Image name: DbgShell.exe
    Browse all global symbols  functions  data
    Has CLR image header, track-debug-data flag not set
    Timestamp:        Thu May  9 00:11:48 2019 (5CD2FFC4)
    CheckSum:         00000000
    ImageSize:        0002C000
    File version:     0.8.26.0
    Product version:  0.8.65535.65535
    File flags:       0 (Mask 3F)
    File OS:          4 Unknown Win32
    File type:        1.0 App
    File date:        00000000.00000000
    Translations:     0409.04b0
    Information from resource tables:
        CompanyName:      Microsoft
        ProductName:      DbgShell
        ProductVersion:   0.8
        FileVersion:      0.8.26.0 (inputHash 943ce528, from branch master, commit a84b57a48a)
        FileDescription:  Main DbgShell EXE: implements the PowerShell host.
        LegalCopyright:   Copyright (c) 2017

0:000> lmDvm dbgeng
Browse full module list
start             end                 module name
00007ff8`5f800000 00007ff8`5ff32000   dbgeng     (deferred)             
    Image path: R:\fff\DbgShell\DbgShell\x64\Debugger\dbgeng.dll
    Image name: dbgeng.dll
    Browse all global symbols  functions  data
    Image was built with /Brepro flag.
    Timestamp:        387CE7A3 (This is a reproducible build file hash, not a timestamp)
    CheckSum:         007000B0
    ImageSize:        00732000
    File version:     10.0.17763.132
    Product version:  10.0.17763.132
    File flags:       0 (Mask 3F)
    File OS:          40004 NT Win32
    File type:        2.0 Dll
    File date:        00000000.00000000
    Translations:     0409.04b0
    Information from resource tables:
        CompanyName:      Microsoft Corporation
        ProductName:      Microsoft® Windows® Operating System
        InternalName:     DbgEng.Dll
        OriginalFilename: DbgEng.Dll
        ProductVersion:   10.0.17763.132
        FileVersion:      10.0.17763.132 (WinBuild.160101.0800)
        FileDescription:  Windows Symbolic Debugger Engine
        LegalCopyright:   © Microsoft Corporation. All rights reserved.

@alastorid alastorid changed the title Crashj Crash when trying to ToUpper() DbgEng> outputs Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant