dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] coredump in ILSpawnProcessWaitForExit


From: afo
Subject: [Pnet-developers] coredump in ILSpawnProcessWaitForExit
Date: Tue, 29 Jul 2003 11:40:06 +0200 (CEST)

hello,

compiling pnetlib 0.5.10 on FreeBSD 5.1/x86,
gcc 3.3.1 [FreeBSD] 20030711 (prerelease) (the std system compiler in 5.1)
 cscc (0.5.10) coredumps in the runtime directory.
is this known ?

address@hidden [DotNet/pnetlib-0.5.10/runtime]gdb cscc cscc.core
GNU gdb 5.2.1 (FreeBSD)
This GDB was configured as "i386-undermydesk-freebsd"...
Core was generated by scc'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/lib/libm.so.2...done.
Loaded symbols for /usr/lib/libm.so.2
Reading symbols from /usr/lib/libc_r.so.5...done.
Loaded symbols for /usr/lib/libc_r.so.5
Reading symbols from /usr/lib/libc.so.5...done.
Loaded symbols for /usr/lib/libc.so.5
Reading symbols from /usr/libexec/ld-elf.so.1...done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0  0x281befb8 in __vfprintf () from /usr/lib/libc.so.5

(gdb) where
#0  0x281befb8 in __vfprintf () from /usr/lib/libc.so.5
#1  0x281bd64f in strchr () from /usr/lib/libc.so.5
#2  0x281bdd23 in __vfprintf () from /usr/lib/libc.so.5
#3  0x281bdc56 in vfprintf () from /usr/lib/libc.so.5
#4  0x281aaebd in fprintf () from /usr/lib/libc.so.5
#5  0x080876b5 in ILSpawnProcessWaitForExit (pid=34644, argv=0xd0d0d000)
    at spawn.c:349
#6  0x0804aaf3 in ProcessWithPlugin (
    filename=0xbfbf4fdc "./Microsoft/Win32/IRegistryKeyProvider.cs", 
    plugin=0xbfbf4d0c "/packages/pnet-0.5.10/lib/cscc/plugins/cscc-cs", 
    filenum=0, isMultiple=1) at cscc.c:1407
#7  0x0804961e in main (argc=993, argv=0xbfbf3c08) at cscc.c:313
#8  0x08049302 in _start ()


i happens in pnet/support/spawn.c in ILSpawnProcessWaitForExit (UNIX)
int ILSpawnProcessWaitForExit(int pid, char *argv[])
{
...
                fprintf(stderr, "%s: exited with signal %d%s\n",
                                argv[0], (int)(WTERMSIG(status)),
                                (WCOREDUMP(status) ? " (core dumped)" : ""));
...
}

somehow the argv is wrong, adding printf's gives me:

argv : 0x80ca280, argv[0]: 0xd0d0d0d0

analysing the callflow :
pnet/cscc/cscc.c:ProcessWithPlugin:
...
        /* Execute the plugin, using a pipe if possible */
        if(canPipe)
        {
                if(status < 0)
                {
                                ...
                }
                else if(!status)
                {
                        /* This platform does not support pipes: fall back */
                        ...

                }
                else
                {
                        /* We won't have an on-disk assembly output file */
                        fprintf(stderr," no on-disk ass\n");
                        asm_output = 0;
                        pipePid = status;
                        status = 0;
                        pluginCmdline = cmdline;
                }
        }
        ...
        /* Build the assembler command-line */
        cmdline = 0;
        cmdline_size = 0;
        ...
        lots of calls to AddArgument(&cmdline);
        ...
        /* Execute the assembler */
        DumpCmdLine(cmdline);
        ILCmdLineSuppressSlash();
        status = ILAsmMain(cmdline_size - 1, cmdline, newStdin);
        ILFree(cmdline);
        if(newStdin)
        {
                /* Close the pipe to the language plugin */
                int newStatus;
                fprintf(stderr,"foo\n");
                fclose(newStdin);
                newStatus = ILSpawnProcessWaitForExit(pipePid, cmdline);
                ILFree(pluginCmdline);
        }

i'm not exactly sure if 
(a) 'cmdline' is wrong (instead of 'pluginCmdline')
or
(b) the ILFree(cmdline) is too early

my bet is on (a), the ILSpawnProcessWaitForExit() returns now,
but it coredumps now in the cscc-cs plugin

i will analyse this later, hope this bugreport helps nevertheless
-- 
// Andre Fornacon -*- afo <at> zlug <dot> org
//
// You'll never know where you're going if you don't know where you've been.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]