Skip to content

Commit db52bee

Browse files
committed
debug: round 5 — full WER dump + ACP report + filename anomaly scan
1 parent ebece7e commit db52bee

1 file changed

Lines changed: 34 additions & 9 deletions

File tree

.github/workflows/debug-mcpp230.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ jobs:
1212
timeout-minutes: 30
1313
steps:
1414
- uses: actions/checkout@v4
15+
- name: report codepages
16+
shell: powershell
17+
run: |
18+
"ACP: $([System.Text.Encoding]::Default.CodePage)"
19+
chcp
20+
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage" | Select-Object ACP, OEMCP | Format-List
21+
- name: enable full WER dumps
22+
shell: powershell
23+
run: |
24+
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force | Out-Null
25+
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" DumpType -Value 2 -Type DWord
26+
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" DumpFolder -Value "D:\dumps" -Type ExpandString
27+
New-Item -ItemType Directory -Force -Path D:\dumps | Out-Null
1528
- name: Download mcpp
1629
shell: bash
1730
run: |
@@ -32,27 +45,39 @@ jobs:
3245
$p = Start-Process -FilePath $env:MCPP -ArgumentList "test" -NoNewWindow -Wait -PassThru `
3346
-RedirectStandardOutput out.txt -RedirectStandardError err.txt
3447
"RAW EXIT CODE: 0x{0:X8}" -f $p.ExitCode
35-
- name: analyze minidump with cdb
48+
- name: scan walked trees for anomalous filenames
3649
if: always()
3750
shell: powershell
3851
run: |
39-
$cdb = "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe"
40-
if (!(Test-Path $cdb)) { "cdb not found"; Get-ChildItem "C:\Program Files (x86)\Windows Kits" -Recurse -Filter cdb.exe -ErrorAction SilentlyContinue | Select-Object -First 3 FullName; exit 0 }
41-
$dmp = Get-ChildItem "$env:LOCALAPPDATA\CrashDumps\mcpp.exe.*.dmp" | Select-Object -First 1
42-
if (!$dmp) { "no dump found"; exit 0 }
43-
& $cdb -z $dmp.FullName -c ".exr -1; .ecxr; k 40; lm m mcpp; q"
52+
$roots = @("tests\examples\archive\.mcpp", "$env:USERPROFILE\.mcpp\registry\data\xpkgs")
53+
foreach ($r in $roots) {
54+
if (!(Test-Path $r)) { "missing: $r"; continue }
55+
"scanning $r"
56+
Get-ChildItem -LiteralPath $r -Recurse -Force -ErrorAction SilentlyContinue | ForEach-Object {
57+
$n = $_.FullName
58+
foreach ($ch in $n.ToCharArray()) {
59+
$c = [int]$ch
60+
if (($c -ge 0xD800 -and $c -le 0xDFFF) -or $c -eq 0xFFFD -or $c -gt 0x2FFF) {
61+
"ANOMALY: U+{0:X4} in: {1}" -f $c, $n
62+
break
63+
}
64+
}
65+
}
66+
}
67+
"scan done"
4468
- name: stage dump into workspace
4569
if: always()
4670
shell: bash
4771
run: |
4872
mkdir -p crashdump
73+
cp /d/dumps/*.dmp crashdump/ 2>/dev/null || true
4974
cp "$LOCALAPPDATA"/CrashDumps/mcpp.exe.*.dmp crashdump/ 2>/dev/null || true
50-
cp tests/examples/archive/out.txt tests/examples/archive/err.txt crashdump/ 2>/dev/null || true
51-
ls -la crashdump/
75+
ls -la crashdump/ || true
5276
- name: upload dump artifact
5377
if: always()
5478
uses: actions/upload-artifact@v4
5579
with:
56-
name: mcpp-crash-dump
80+
name: mcpp-full-dump
5781
path: crashdump/
5882
if-no-files-found: warn
83+
compression-level: 9

0 commit comments

Comments
 (0)