Mail Archives: djgpp-workers/2001/04/11/11:28:53
On Fri, 6 Apr 2001, Nimrod A. Abing wrote:
> >I run InnoculateIT Personal Edition myself, but haven't tried your core
> >dump writing stuff yet. Maybe I will, so maybe I can help tracking this
> >one down.
Sorry it took me this long --- I finally managed to bring your dpmiexcp.c
to my machine at home and try it (DJGPP almost-current CVS, gcc-2.95.2,
binutils 2.9.5, Win98 first edition).
> I would assume that your InoculateIT is the same version as mine, that
> would be good then so this thing can be confirmed. Please cc to
> djgpp-workers when you do test it. TIA.
Seems my version of InnoculateIT is a bit older than yours (it's 5.2.5.0).
It did not create any of the problems you had, on my machine. I'm also
running another background virus scanner (H+BEDV AntiVir), and Norton
CrashGuard, both of which could interfere in a way similar to what your
version of InnocalateIT does. But they didn't. I'm getting updates for
InnoculateIT as I'm writing this and will try those, this evening.
But, since I used your modified dpmiexcp.c in an actual libc build so it
was compiled with the official picky set of gcc options, I found I had to
patch away some warnings (patch below). This means there is a slight
chance it's one of these changes that made the difference between the
crashes you observed and the nicely working setup on my machine at home.
So it would be advisable to try applying these patches and redoing your
own tests, to.
For reference, I built your first test program (the one with the abort()
in) using a command line like this:
gcc -o ct.exe coretest.c -O -g -L/cvsdjgpp/lib
i.e. dpmiesxcp.o is in the libc.a I used, not in a separately linked .o
file.
--- dpmiexcp.nimrod.c Tue Mar 27 21:30:48 2001
+++ dpmiexcp.c Wed Apr 11 00:48:06 2001
@@ -323,7 +323,7 @@ static void _writei4(int fd, int x)
buffer[0] = (x&0xff) >> 0;
buffer[1] = (x&0xff00) >> 8;
buffer[2] = (x&0xff0000) >> 16;
- buffer[3] = (x&0xff000000) >> 24;
+ buffer[3] = (x&0xff000000U) >> 24;
_write (fd, buffer, 4);
}
@@ -379,7 +379,7 @@ do_faulting_finish_message(int fake_exce
unsigned excpt_stack_addr = (unsigned)&djgpp_exception_stack;
int i;
const char *prog_name;
- int corefile;
+ int corefile = -1;
int errors = 0;
unsigned long __prog_eip;
#ifndef DISABLE_COREDUMP_DEBUGGING
@@ -518,7 +518,7 @@ do_faulting_finish_message(int fake_exce
if (__djgpp_enable_core_dump)
{
- int cftb_size, *cftb, i;
+ int cftb_size, *cftb;
int trunc, num_chunks = 0;
char *estr, **envarray;
int evsize = 0;
@@ -590,7 +590,7 @@ do_faulting_finish_message(int fake_exce
(void *)0x1000,
0x1000 - mem_block_list[i].address);
_write(corefile,
- (void *)mem_block_list[i].address + 0x1000,
+ (unsigned char *)mem_block_list[i].address + 0x1000,
(mem_block_list[i].chunks << 16) - (0x1000 - mem_block_list[i].address));
}
}
(The variable i I removed was shadowing one defined at function scope,
already).
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -