BUG: FreeSelector() Frees More Than One Selector
PSS ID Number: Q111594
Article last modified on 05-07-1994

3.10

WINDOWS


---------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows Software Development Kit (SDK) for Windows
   version 3.1
---------------------------------------------------------------------

SYMPTOMS
========

Calling FreeSelector() on a selector with a LIMIT greater that 64K will
cause the Windows Kernel to free LIMIT/64K worth of selectors. For example,
with the following code

   _asm {¬
        push     ds
        call     AllocSelector
        mov      wSel, ax
        }
   SetSelectorLimit(wSel,0x0fffff);
   FreeSelector(wSel);

KRNL386 will free the specified selector, wSel, and 15 more selectors
following it.

CAUSE
=====

When the limit of a selector is set to greater than 64K, Kernel allocates
an array of tiled selectors, and the entire set of these selectors will
be freed.

STATUS
======

Microsoft has confirmed this to be a problem in Windows version 3.1. We are
researching this problem and will post new information here in the
Microsoft Knowledge Base as it becomes available.

Additional reference words: 3.10 synthesis
KBCategory: Prg
KBSubcategory: KrMm

=============================================================================

Copyright Microsoft Corporation 1994.
