Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-19377

FreeLdr leaks memory when failing to load KERNEL or HAL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None

    Description

      Steps:
      0. Early on BootCD: 'F8', to get the menu.
      1. 'F10' > Add '/HAL=lah'.
      2. Try to start, in '(Debug)' mode > Get errors.
      3. Repeat last step.

      Workaround:
      Restart VM.

      QEMU 0.9.1 (64 MB)
      reactos-bootcd-0.4.15-dev-7199-gdc2d223-x86-gcc-lin-dbg
      reactos-livecd-0.4.15-dev-7199-gdc2d223-x86-gcc-lin-dbg
      Leaks memory at each iteration, eventually fails.

      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/disk/partition.c:425) fixme: DiskGetPartitionEntry() unimplemented for RAW
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:760) err: LoadModule('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:760) err: LoadModule('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:760) err: LoadModule('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:760) err: LoadModule('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:760) err: LoadModule('lah') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/lib/mm/mm.c:111) err: Memory allocation failed in MmAllocateMemoryAtAddress(). Not enough free memory to allocate 5394432 bytes (requesting 1317 pages but have only 533).
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/lib/mm/mm.c:54) err: Memory allocation failed in MmAllocateMemory(). Not enough free memory to allocate 5394432 bytes.
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/lib/peloader.c:808) err: Failed to alloc 5394432 bytes for image multi(0)disk(0)cdrom(96)\reactos\system32\ntoskrnl.exe
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('ntoskrnl.exe') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:750) err: LoadModule('ntoskrnl.exe') failed
      

      Same issue with '/KERNEL=kl' instead, though it takes a lot more iterations (42+ with 49 MB).

      [...]
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('kl') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:750) err: LoadModule('kl') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/lib/mm/mm.c:54) err: Memory allocation failed in MmAllocateMemory(). Not enough free memory to allocate 147456 bytes.
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:525) err: PeLdrLoadImage('kl') failed
      (/srv/buildbot/worker_data/Build_GCCLin_x86/build/boot/freeldr/freeldr/ntldr/winldr.c:750) err: LoadModule('kl') failed
      

      Attachments

        Activity

          People

            hbelusca hbelusca
            Serge Gautherie Serge Gautherie
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: