You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// integers in different size:// 1-byte: sbyte, byte// 2-byte: short, ushort// 4-byte: int, uint// 8-byte: long, ulongnamespaceVars01;classProgram{staticvoidMain(string[]args){sbyteb1=SByte.MaxValue;byteb2=Byte.MaxValue;Console.WriteLine("signed byte and unsigned byte:");Console.Write(b1);Console.Write(',');Console.WriteLine(b2);shortshort1=Int16.MaxValue;ushortshort2=UInt16.MaxValue;Console.WriteLine("signed short and unsigned short:");Console.Write(short1);Console.Write(',');Console.WriteLine(short2);intint1=Int32.MaxValue;uintint2=UInt32.MaxValue;Console.WriteLine("signed int and unsigned int:");Console.Write(int1);Console.Write(',');Console.WriteLine(int2);longlong1=Int64.MaxValue;ulonglong2=UInt64.MaxValue;Console.WriteLine("signed long and unsigned long:");Console.Write(long1);Console.Write(',');Console.WriteLine(long2);}}
When I try to view the internal details through lldb + sos with clrstack command, I found it might be showing the wrong value for ushort, the key command and output is below:
The value for variable short2 at address 0x000000016B6A26F8 showing as 0xffffffffffffffff, it should be 0x000000000000ffff.
Configuration
sh vars $ dotnet --info
.NET SDK:
Version: 9.0.100
Commit: 59db016f11
Workload version: 9.0.100-manifests.3068a692
MSBuild version: 17.12.7+5b8665660
Runtime Environment:
OS Name: Mac OS X
OS Version: 15.2
OS Platform: Darwin
RID: osx-arm64
Base Path: /Users/gdc/dotnet/sdk/9.0.100/
.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.0
Architecture: arm64
Commit: 9d5a6a9aa4
.NET SDKs installed:
8.0.403 [/Users/gdc/dotnet/sdk]
8.0.404 [/Users/gdc/dotnet/sdk]
9.0.100 [/Users/gdc/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.10 [/Users/gdc/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.11 [/Users/gdc/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [/Users/gdc/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.10 [/Users/gdc/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [/Users/gdc/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [/Users/gdc/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/Users/gdc/dotnet]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
sh vars $ lldb -v
lldb version 16.0.6
sh vars $ which lldb
/opt/homebrew/bin/lldb
Regression?
Not sure.
Other information
The text was updated successfully, but these errors were encountered:
dacheng-gao
changed the title
[sos] lldb + sos: clrstack might show the wrong value for ushort
[sos] clrstack might show the wrong value for ushort
Feb 2, 2025
Description
With the test code:
When I try to view the internal details through lldb + sos with clrstack command, I found it might be showing the wrong value for ushort, the key command and output is below:
The value for variable
short2
at address0x000000016B6A26F8
showing as0xffffffffffffffff
, it should be0x000000000000ffff
.Configuration
Regression?
Not sure.
Other information
The text was updated successfully, but these errors were encountered: