[comp.os.msdos.programmer] TD 2.01 bug

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) (12/13/90)

Here's a bug in the new version of Borland's debugger that may have you
scratching your head for a while.

If you set a conditional breakpoint, TD will pop up a window telling you
when the condition has been met.  Nice and friendly.

However, if your condition has too many characters in it (mine was
  scWorld.right - scWorld.left > 100*scXAxisTicSize )
then the window may try to create itself wider than your screen.  (Mine's
80 characters wide, which is probably the only width that TD supports.)

If it's just a little bit too wide, it'll wrap around and you'll see the
left part on the right side of your screen.  But if it's a lot too wide,
as the expression above is, then your machine will crash before the
window pops up.  You won't know that the condition has been met, or why
your machine is in outer space.

If you want to try it yourself, you can just add embedded blanks to any
old condition, and eventually trigger the bug.

I've reported it to Borland.  If I hear of a patch from them, I'll 
pass it on.

Duncan Murdoch
dmurdoch@watstat.waterloo.edu

jrv@sdimax2.mitre.org (VanZandt) (12/15/90)

In article <1990Dec12.213319.20466@maytag.waterloo.edu> dmurdoch@watstat.waterloo.edu (Duncan Murdoch) writes:
>Here's a bug in the new version of Borland's debugger that may have you
>scratching your head for a while.
>
>If you set a conditional breakpoint, TD will pop up a window telling you
>when the condition has been met.  Nice and friendly.
>
>However, if your condition has too many characters in it ...

I tried to set a conditional breakpoint with a long expression and, nearly
as I could figure, the expression was being evaluated incorrectly (triggering
the breakpoint when it shouldn't).  Sounds to me like a buffer overflow that
can manifest itself in more than one way.

Incidently, I recently ran into a floating point divide by zero bug which
would appear only when output was being redirected to a file.  Later, it
crashed the debugger (error window popped up, but further keyboard input
was ignored), forcing a power down reset.  Is Borland's handling of
'87 exceptions up to spec?

                           - Jim Van Zandt