Uploaded image for project: 'ReactOS Test Suite'
  1. ReactOS Test Suite
  2. ROSTESTS-270

rostests/kmtests/kmtest_drv/kmtest_standalone.c: "static IrpHandlers[]" and "static MessageHandlers[]" are never cleaned up

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • ReactOS Tests
    • None

    Description

      (Noticed while looking at ROSTESTS-264.)

      kmtest_standalone.c

        45 #define KMT_MAX_IRP_HANDLERS 256
        46 static KMT_IRP_HANDLER_ENTRY IrpHandlers[KMT_MAX_IRP_HANDLERS] = { { 0 } };
        47 #define KMT_MAX_MESSAGE_HANDLERS 256
        48 static KMT_MESSAGE_HANDLER_ENTRY MessageHandlers[KMT_MAX_MESSAGE_HANDLERS] = { { 0 } };

      NB: Feature added in r52550 (by ThFabba).

      IrpHandlers grep
      Declaration, Add, Remove and Dispatch are supported.

      KmtRegisterIrpHandler grep
      1 call (from PoIrp_drv.c) + 2 calls (from Example_drv.c) + 17 other calls.

      KmtUnregisterIrpHandler grep
      (Only) 1 call (from PoIrp_drv.c).

      MessageHandlers grep
      Declaration, Add, Remove and Dispatch are supported.

      KmtRegisterMessageHandler grep
      1 call (from Example_drv.c) + 4 other calls.

      KmtUnregisterMessageHandler grep
      No call.

      It looks like we miss either/both of:
      *Matching KmtUnregister* calls for all KmtRegister* calls.
      *Detecting/Doing this automatically (after each test sub-driver is stopped).

      If, indeed, calling KmtUnregister* is (usually) unneeded, then that should be documented.

      Attachments

        Issue Links

          Activity

            People

              bug zilla Bug Zilla
              Serge Gautherie Serge Gautherie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: