Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7912819f7b2cab5f99a30a100cea2be6791fa556
Ticket: 1910041fffffffffffffffffffffffffffffffff
Support of gnu x86_64-pc-mingw SEH
User & Date: kennykb on 2010-09-08 21:02:26
Changes

  1. icomment:
    Is there an actual case where the SEH stuff is needed in 64-bit Windows?
    
    I had an earlier patch for it, that I didn't apply because it's far from obvious that it's needed.
    
    SEH appears in the following places in the code.
    
    (1) tclWin32Dll.c (TclWinCPUID) - Conditioned away on Win64; protects the CPUID instruction from causing an illegal operation exception on early 386/486 CPUs. (Almost certainly no longer relevant in any case.)
    
    (2)  tclWinChan.c (Tcl_MakeFileChannel) - This one is weird, but appears to come up on WinNT and Win2k only. On those systems, if certain channel handles are duplicated, the DuplicateHandle function will succeed, but closing the duplicated handle will throw EXCEPTION_INVALID_HANDLE.  This is almost certainly a bug in a Windows device driver somewhere. I'll be happy to put in protective logic on Win64 in this spot if someone can come up with a test case that fails on some machine, somewhere.
    
    (3) tclWinFCmd.c (DoRenameFile): On Windows NT/2k (and not on more recent versions nor on Windows CE), an attempt to rename a serial port gets a null pointer exception down inside kernel32.dll. This code is definitely a workaround for an operating system bug that was fixed years ago.
    
    (4) tclWinFCmd.c (TclpObjDoCopyFIle): The same error, only with copying a serial port. Once again, it's an operating system bug that was fixed years ago.
    
    So in short, all of these things appear to be in places that aren't relevant for 64-bit versions of Windows. I'll certainly bump the priority for a failing test case, but it's hard to justify the complexity of the assembly code solution if it's just to provide workarounds for operating system bugs that were fixed years ago.
     
    
    
  2. login: "kennykb"
  3. mimetype: "text/plain"
  4. priority changed to: "3 Low"
  5. username: "kennykb"