Mail Archives: djgpp-workers/1999/03/23/18:49:37
Hmm. Are you sure the part about the limit checking is correct? I ask
because you are removing part of what I corrected some time ago. I
think I got some response (I think it was on c.o.m.d) that the limit
check would be better with something like you put in now.
I tried that way, and sure enough gdb was still crashing for me. Hence
I kept the more convoluted check.
Unfortunately I can't remember what the case where gdb crashed was
about (so I could test your patch).
The change I object to is this:
+ if (a <= 4096)
+ return 1; /* Null page */
limit = __dpmi_get_segment_limit(__djgpp_app_DS);
- if(4096 <= a /* First page is used for NULL pointer detection. */
- && a <= limit /* To guard against limit < len. */
- && a - 1 <= limit - len /* To guard against limit <= a + len - 1. */
- )
- return 0;
-/* printf("Invalid access to child, address %#x length %#x limit: %#x\n", a, len, limit);
- if (can_longjmp)
- longjmp(debugger_jmpbuf, 1); */
- return 1;
+ if (a > limit || (a - 1) > (limit - len))
+ return 1; /* Beyond limit */
A Shrine, Royalty,
MartinS
- Raw text -