Opened 18 years ago

Closed 18 years ago

Last modified 13 years ago

#130 closed defect (fixed)

Bugfixes: string_s selftest and isnan()

Reported by: Jan Wassenberg Owned by: Jan Wassenberg
Priority: Should Have Milestone:
Component: Core engine Keywords: selftest
Cc: Patch:

Description (last modified by Jan Wassenberg)

  • VC2005 release mode selftest crashes.
  • VC2003 string_s selftest complains due to missing debug_skip_next_error
  • isnan() reports spurious failures. TODO: check IA32 FXAM bit definitions.

Change History (8)

comment:1 by Jan Wassenberg, 18 years ago

(In [4066]) # fixes to string_s selftest snd_mgr: fix cppdoc comments (got shredded by IDE autofmt) string_s: disable WARN_IF_PTR_LEN (too many false positives) test_string_s: add missing debug_skip_next_err (fixes complaints on VC2003)

refs #130

comment:2 by Jan Wassenberg, 18 years ago

Description: modified (diff)

Crash is due to reentrancy issue in debug_dump_stack. Have fixed it locally, but need to refactor some; should have time after interview tonight.

comment:3 by Jan Wassenberg, 18 years ago

(In [4067]) # big refactor of error display code. fixes crash in release-mode selftest

  • debug_write_crashlog and debug_dump_stack are now responsible for detecting reentrancy (reported via new ERR_REENTERED error code).
  • export debug_error_message_build to allow unit test of stack dumper
  • split+clean up debug_display_error to allow this.
  • error_description_r now returns buf for convenience
  • ia32: fix typo causing disassembly to fail
  • wdbg_sym: bugfix causing incorrect debug_walk_stack return value. prevent recursive locking, provide locked version of debug_resolve_symbol. add skip_this_frame for convenience.

refs #130

comment:4 by Jan Wassenberg, 18 years ago

Description: modified (diff)

comment:5 by Jan Wassenberg, 18 years ago

Description: modified (diff)

It's not the FXAM bit definitions (NAN = c0 = 0x100 in FPU status word). Last idea I have is to check exact compiler output and compare against another; maybe that will explain why I don't get this error.

comment:6 by Jan Wassenberg, 18 years ago

There is exactly one difference: my VC2005, debug mode:

00636251 push ecx 00636252 fld dword ptr [edx+10h] 00636255 fstp dword ptr [esp]

vs Christopher's VC2003 (was it?):

006B15C1 mov eax,dword ptr [edx+10h] 006B15C4 push eax

(this is where the ia32_fpclassifyf parameter is pushed onto the stack). Unfortunately I can't see how this could cause the change in behavior :( Will sleep over it.

comment:7 by Jan Wassenberg, 18 years ago

Resolution: fixed
Status: newclosed

(In [4072]) #fix to isnan() bug big thanks to philip for seeing the problem! :D cause: not popping FPU stack. didn't happen on my athlonXP presumably due to different FPU usage (possibly in drivers): pushing 8 values could clear the stack and mask overflow. the cause was not due to compiler (and FLD/FSTP param passing) because Philip uses VC2005 as well, but saw the crash (on P4 CPU)

fixes #130

comment:8 by (none), 13 years ago

Milestone: ASAP

Milestone ASAP deleted

Note: See TracTickets for help on using tickets.