harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivanov, Alexey A" <alexey.a.iva...@intel.com>
Subject RE: [general] platform support
Date Fri, 11 Aug 2006 08:36:19 GMT
Rana,

SetUnhandledExceptionFilter [1] is documented function which is
available since Windows 95. It is part of the Structured Exception
Handling.

Windows XP introduced the Vectored Exception Handling which is an
extension of SEH according to MSDN.

Using this function and therefore SEH (but not VEH) mechanism requires
you to guard each call with __try/__except as Gregory and Oleg pointed
out.


I'm not proficient in this kind of rather low-level Windows API though,
so I might be wrong.


Regards,
Alexey.


[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/b
ase/setunhandledexceptionfilter.asp

--
Alexey A. Ivanov
Intel Middleware Product Division


>-----Original Message-----
>From: Rana Dasgupta [mailto:rdasgupt@gmail.com]
>Sent: Thursday, August 10, 2006 9:51 PM
>To: harmony-dev@incubator.apache.org
>Subject: Re: [general] platform support
>
>Hi Mikhail,
>    As far as I know, SetUnhandledExceptionFilter was introduced as a
>backdoor method in in Win2K SP4 to get around the problem that the SEH
>handlers are limited to the frame and not process wide. It does handle
>problems like NPE and AV, but as you point out, it works by hijacking
the
>first and last chance debugger handlers. So, unlike VEH which are fully
>functional when debugging, these SetUnhandled...filters are not visible
>when
>debugging. I also believe that they execute in the context of the
current
>thread, which means that they are not so good to handle stack
corruption,
>SOE etc. which we are currently using VEH. Since one does not expect
them
>to
>be used on the newer Windows boxes, the .Net framework overwrites them
>...which means that any process that loads a Microsoft dll that has any
>Microsoft managed code in it ( and many do ), is at a risk that the
>SetUnhandled.. may or may not work.
>   I think that SetUnhandled..was a great(probably only ) solution on
the
>Win2K boxes, but VEH was put in place to solve some of its limitations.
The
>bottom line is that one needs to experiment with this on several
Windows
>boxes before we know how good or bad it is. I myself don't have a lot
of
>experience with it.
>
>Thanks,
>Rana
>
>
>On 8/10/06, Mikhail Fursov <mike.fursov@gmail.com> wrote:
>>
>> >**Using "SetUnhandledExceptionFilter" API call we can handle
hardware
>NPE
>> >for Win2k too.
>> >The only problem is debbuging of applications with exception filter
>> >installed. AFAIK debugger will catch all of these events.
>>
>>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message