Hi, I have no Win2K to check the issue, but I checked that dbghelp works
fine on WinXP and Windows Server 2003.
I see trivial solution here, we can simply disable dbghelp usage for systems
older than WinXp. It could be done by _WIN32_WINNT macros:
_WIN32_WINNT>=0x0501 means WinXP and Windows Server 2003 server only.
I also want to note that callstack print is caused by some crash in VM
handled with crash_handler.
Proposed fix:
Index: nt_exception_filter.cpp
===================================================================
--- nt_exception_filter.cpp (revision 427015)
+++ nt_exception_filter.cpp (working copy)
@@ -29,9 +29,11 @@
// Windows specific
#include <string>
#include <excpt.h>
+#if _WIN32_WINNT >= 0x0501
#include <dbghelp.h>
#include <windows.h>
#pragma comment(linker, "/defaultlib:dbghelp.lib")
+#endif
static inline void nt_to_vm_context(PCONTEXT context, Registers* regs)
{
@@ -86,6 +88,7 @@
}
// CallStack print
+#if _WIN32_WINNT >= 0x0501
#define CALLSTACK_DEPTH_LIMIT 100 // max stack length is 100 to prevent
getting into loop
static void print_callstack(LPEXCEPTION_POINTERS nt_exception)
@@ -148,6 +151,10 @@
fflush(stderr);
}
+#define PRINT_CALLSTACK(Exc) print_callstack(Exc)
+#else
+#define PRINT_CALLSTACK(Exc)
+#endif
/*
* Information about stack
@@ -367,7 +374,7 @@
if (!vm_get_boolean_property_value_with_default("vm.assert_dialog"))
{
print_state(nt_exception, msg);
- print_callstack(nt_exception);
+ PRINT_CALLSTACK(nt_exception);
LOGGER_EXIT(-1);
}
Best regards,
Aleksey.
On 8/2/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote:
Paulex Yang wrote:
> Geir Magnusson Jr wrote:
>> Paulex Yang wrote:
>>
>>> Finally I found a stable win2k installation(still server edition with
>>> SP4) , and installed Windows Platform SDK, but same error happens,
then
>>> I restarted it, but nothing changed:(, my Platform SDK was downloaded
at
>>> end of 2005, did I make any mistakes? Do I have to recompile DRLVM on
>>> win2k?
>>>
>>>
>>
>> I think we need to find out whatever is requiring dbghelp and fix that.
>> I'm really hoping we don't need a separate snapshot for Win2k
>>
>> geir
>>
> +1 from me, from Aleksey's comments below, can I safely assume it is
> done only by updating the nt_exception_filter.cpp? I did a search in
> DRLVM trunk, this is the only file referring to dbghelp.h.
>>
Ooh. Missed that. Ok, so the problem is clear. How do we want to
handle this?
I think it's important that on crashes, we get this info...
geir
>>> Aleksey Ignatenko wrote:
>>>
>>>> Hi, it looks like your friend needs to install Microsoft Platform SDK
>>>> on his
>>>> PC .
>>>> Another solution is to download and update version of dbghelp library
>>>> from
>>>> msdn site.
>>>> I didn't check the second solution.
>>>> If you don't not succeed for some reason, simply modify
>>>> nt_exception_filter.cpp file excluding lines:
>>>> #include <dbghelp.h>,
>>>> #pragma comment(linker, "/defaultlib:dbghelp.lib"),
>>>> print_callstack function. It will disable call stack printing when
>>>> crash
>>>> happens.
>>>>
>>>> Aleksey.
>>>>
>>>>
>>>>
>>
>>
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]