Independent technical referenceOfficial site
  • Software and digital services
  • Operating system

KERNEL_MODE_HEAP_CORRUPTION

Windows KERNEL_MODE_HEAP_CORRUPTION on PC: kernel heap fault

Verified with sources8 sourcesReviewed Oct 18, 2026
Technician coming? See the 2 steps they must show you

Risk level

Medium

Proceed carefully and stop if the check is unclear.

Urgency

High

Quick answer

Stop code 0x0000013A appears when the kernel mode heap manager detects corruption inside a heap. Start by reviewing the event logs and updating or rolling back recently changed drivers; also run hardware and memory tests.

Safety first

Stop and check this first

  • Before updating BIOS, changing hardware, or resetting Windows, locate your 48-digit BitLocker recovery key (noting the first 8 digits of the key ID) via https://aka.ms/myrecoverykey or your work/school account; Microsoft Support cannot retrieve a lost key, and resetting the device removes all files.

Safe checks you can perform

  • Check event logs for the stop code and service activity
  • Update or roll back drivers after recent changes
  • Run memory tests and verify 10% to 15% free disk space
  • Scan with Microsoft Safety Scanner including MBR checks

Leave these tasks to a qualified professional

  • Do not attempt this professional task: Heap inspection with !analyze and !heap in WinDbg
  • Do not attempt this professional task: BIOS/firmware update and disabling unpatched third-party services

What a technician must be able to justify

Technician visit

These are the steps they must carry out and show you. Tick them as they work: if steps are skipped, do not accept a part swap.

These are not instructions for opening or handling the equipment yourself. They are the checks that should support a technical conclusion.

  1. Heap inspection with !analyze and !heap in WinDbg

    What they doA technician loads memory.dmp in WinDbg with Microsoft's public symbol server (https://msdl.microsoft.com/download/symbols) and runs !analyze -v along with the !heap extension to examine the heap address (Parameter 2), the corrupted address (Parameter 3), and page heap data.

    They must show youthe !analyze -v output, Parameter 1 subcode (0x3 through 0x17), and the faulting module in STACK_TEXT.

    In writingthe heap corruption type identified, the offending driver or DLL, and the remediation applied.

  2. BIOS/firmware update and disabling unpatched third-party services

    What they doThe specialist ensures the BIOS and firmware are up to date, verifies the crash dump with DumpChk if needed, and either installs an updated driver from the vendor or temporarily disables the related service or kernel-mode filter driver.

    They must show youthe current BIOS/firmware version and the vendor update or service disabled.

    In writingwhich BIOS, driver, or service was changed and how to re-enable it once a vendor fix ships.

Before accepting a part or repair

Nothing has been shown yet. Do not accept a part swap based on the code alone.

Follow these steps

Note: Follow the documented order. An error code identifies the affected system, but it does not prove by itself which part has failed.

  1. Check event logs for the stop code and service activity

    No special tools

    Who:
    you, signed in normally or from Safe Mode.
    How:
    review the event logs for stop code 0x0000013A and its parameters, and check whether a specific service was consistently starting or stopping right before each crash occurred.
    Result that matters:
    identifying which Parameter 1 value repeats and whether a service consistently precedes the stop.
    If a specific driver or service appears before every crash, note it so you can update or disable that service.
    If no consistent service stands out in the logs, proceed to driver rollback and memory checks.
    Evidence to keep:
    screenshot of the event log entry showing 0x13A parameters and timestamps.

    Evidence: Stop code error or bug check troubleshooting (IT professionals) · Bug Check 0x13A KERNEL_MODE_HEAP_CORRUPTION

  2. Update or roll back drivers after recent changes

    No special tools

    Who:
    you, after backing up personal files to another drive.
    How:
    right-click Start and open Device Manager to check for devices marked with an exclamation point (!) and select Update driver; if crashes started after a change, roll back the device driver to a previous version or restore Windows using a system restore point.
    Result that matters:
    testing whether undoing a recent driver or system change stops the kernel heap corruption.
    If rolling back the driver or using a system restore point resolves 0x13A, keep that state and check with the vendor.
    If the crash continues, install all latest Windows updates and cumulative updates via Settings, Windows Update.
    Evidence to keep:
    driver version rolled back or the date of the system restore point used.

    Evidence: Stop code error or bug check troubleshooting (IT professionals) · Troubleshooting Windows unexpected restarts and stop code errors

  3. Run memory tests and verify 10% to 15% free disk space

    No special tools

    Who:
    you, with open work saved.
    How:
    run the relevant hardware and memory tests on your PC to check for faulty RAM, and verify in File Explorer that your hard drive has 10% to 15% free space available for swap files.
    Result that matters:
    ruling out physical memory faults and low disk space as contributors.
    If hardware or memory tests report an error, save the log and arrange a hardware repair.
    If memory tests pass and free disk space is at least 10% to 15%, run the malware check next.
    Evidence to keep:
    hardware/memory test outcome and the free space percentage on the system drive.

    Evidence: Stop code error or bug check troubleshooting (IT professionals) · Troubleshooting Windows unexpected restarts and stop code errors

  4. Scan with Microsoft Safety Scanner including MBR checks

    No special tools

    Who:
    you, while online.
    How:
    run Microsoft Safety Scanner or another virus detection program that includes checks of the master boot record (MBR) for infections.
    Result that matters:
    ensuring no infection is corrupting kernel memory or boot components.
    If threats are found and removed, restart the computer and monitor whether 0x0000013A returns.
    If the scan is clean and crashes continue, hand the memory.dmp file to a technician for heap debugging.
    Evidence to keep:
    dated scan summary from Microsoft Safety Scanner or your antivirus tool.

    Evidence: Stop code error or bug check troubleshooting (IT professionals)

Still not solved

If the error persists, stop here. See what the technician must do and show you.

Where this code applies

A code is meaningful only inside the right product and version context.

Primary scope

System
Software and digital services
Brand
Microsoft Windows
Product type
Operating system

Known code variants

  • 0x0000013A
  • 0x13A
  • bug check 0x13A
  • KERNEL MODE HEAP CORRUPTION
  • STOP 0x0000013A
  • stop code KERNEL_MODE_HEAP_CORRUPTION

What it means

Microsoft documents bug check 0x0000013A (KERNEL_MODE_HEAP_CORRUPTION) when the kernel mode heap manager finds damaged heap structures. Parameter 1 identifies the corruption type, ranging from a corrupt entry header (0x3, 0x4, or 0x5) or buffer overrun/underrun (0x6 and 0x7) to using a block after freeing it (0xB), a corrupt free list (0xD and 0x17), a double-free (0x11), or a NULL heap handle (0x13). Because Microsoft's crash analysis shows 70% of stop errors come from third-party driver code and 10% from hardware issues, this code alone never proves that any physical component is broken.

Warnings and stop conditions

  • Highsource verified

    Before updating BIOS, changing hardware, or resetting Windows, locate your 48-digit BitLocker recovery key (noting the first 8 digits of the key ID) via https://aka.ms/myrecoverykey or your work/school account; Microsoft Support cannot retrieve a lost key, and resetting the device removes all files.

    Evidence: Find your BitLocker recovery key

Symptoms and causes

Probable causes · in order

  • Buffer overflow, double-free, or use-after-free in a driverCommon

    The Parameter 1 table for 0x13A lists buffer overruns (0x6, 0x10), use-after-free errors (0xB, 0xD, 0x12, 0x17), and double-free corruption (0x11) introduced by kernel-mode code.

    Evidence: Stop code error or bug check troubleshooting (IT professionals) · Bug Check 0x13A KERNEL_MODE_HEAP_CORRUPTION

  • Recent software, driver, or firmware changesCommon

    Microsoft notes that 70% of crashes are caused by third-party driver code and advises contacting the vendor after software or hardware changes or rolling back a driver to a previous version.

    Evidence: Stop code error or bug check troubleshooting (IT professionals)

  • Memory corruption or master boot record infectionPossible

    Parameter 1 value 0x16 points to a bad address or memory corruption, and Microsoft's troubleshooting checklist includes running memory tests and Microsoft Safety Scanner with MBR checks.

    Evidence: Stop code error or bug check troubleshooting (IT professionals) · Bug Check 0x13A KERNEL_MODE_HEAP_CORRUPTION

Virtual technician

Does KERNEL_MODE_HEAP_CORRUPTION still appear after these checks?

Answer a few questions to narrow down the likely cause and the safest next action. Guidance only - it never replaces a professional.

Sources and technical references

Sources: Stop code error or bug check troubleshooting (IT professionals) · Troubleshooting Windows unexpected restarts and stop code errors · Solución de problemas de reinicios inesperados y errores de código de detención de Windows · Find your BitLocker recovery key · Buscar la clave de recuperación de BitLocker · Resolución avanzada de problemas para errores de código de parada · Bug Check 0x13A KERNEL_MODE_HEAP_CORRUPTION · Comprobación de errores 0x13A KERNEL_MODE_HEAP_CORRUPTIONreviewed 2026-10-18 · verified

Was this entry useful?