bug-make
[Top][All Lists]
Advanced

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

Re: make + cmake = test failure


From: Matthew Woehlke
Subject: Re: make + cmake = test failure
Date: Thu, 22 Mar 2007 11:40:47 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.0

Paul Smith wrote:
On Wed, 2007-03-21 at 16:17 -0500, Matthew Woehlke wrote:
Any guesses?

No guesses here.  I can't think of any changes in make 3.81, offhand,
that would impact the environment used by the child process.

I think before we can debug this we need you or someone to examine the
cmake failure and try to figure out what is causing it.  If we had some
idea of what that test is testing and why it's not working we might be
able to understand what is different.

It seems that the child process termination happens differently when invoked via 'make' as opposed to when run directly.

The test looks like:

====
int test4(int argc, const char* argv[])
{
#if defined(_WIN32)
  /* Avoid error diagnostic popups since we are crashing on purpose.  */
  SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
#endif
  (void)argc; (void)argv;
  fprintf(stdout, "Output before crash on stdout from crash test.\n");
  fprintf(stderr, "Output before crash on stderr from crash test.\n");
  fflush(stdout);
  fflush(stderr);
  *(int*)0 = 0;
  fprintf(stdout, "Output after crash on stdout from crash test.\n");
  fprintf(stderr, "Output after crash on stderr from crash test.\n");
  return 0;
}
====

In both cases, this is seen leading up to the SEGV...

====
7835:   setustack(0xFEEE2060)
7835:   sysi86(SI86FPSTART, 0xFEFCCC80, 0x0000133F, 0x00001F80) = 0x00000001
7835:   sysconfig(_CONFIG_PAGESIZE)                     = 4096
7835:   ioctl(1, TCGETA, 0x080467A4)                    Err#22 EINVAL
7835:   fstat64(1, 0x080467D0)                          = 0
7835:   brk(0x08068940)                                 = 0
7835:   brk(0x0806A940)                                 = 0
7835:   fstat64(1, 0x08046710)                          = 0
7835:   fstat64(2, 0x08046710)                          = 0
7833:   pollsys(0x08047250, 3, 0x080472F0, 0x00000000)  = 1
7835:   write(2, " O u t p u t   b e f o r".., 47)    = 47
7833:   read(6, " O u t p u t   b e f o r".., 1024)   = 47
7835:   write(1, " O u t p u t   b e f o r".., 47)    = 47
7833:   write(1, " O u t p u t   b e f o r".., 47)    = 47
7832:   pollsys(0x08042A50, 3, 0x08042AF0, 0x00000000)  = 1
7833:   pollsys(0x08047250, 3, 0x080472F0, 0x00000000)  = 1
7832:   read(8, " O u t p u t   b e f o r".., 1024)   = 47
7833:   read(8, " O u t p u t   b e f o r".., 1024)   = 47
7832:   pollsys(0x08042A50, 3, 0x08042AF0, 0x00000000)  = 1
7833:   write(1, " O u t p u t   b e f o r".., 47)    = 47
====

When run directly, it continues as it should...

====
7835:       Incurred fault #6, FLTBOUNDS  %pc = 0x080516E5
7835:         siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
7835:       Received signal #11, SIGSEGV [default]
7835:         siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
7832:   read(8, " O u t p u t   b e f o r".., 1024)   = 47
7833:   pollsys(0x08047250, 3, 0x080472F0, 0x00000000)  = 2
7833:   read(8, 0x08069D70, 1024)                       = 0
7833:   close(8)                                        = 0
7833:   read(6, 0x08069D70, 1024)                       = 0
7833:   close(6)                                        = 0
7833:       Received signal #18, SIGCLD, in pollsys() [caught]
7833:         siginfo: SIGCLD CLD_DUMPED pid=7835 status=0x000B
====

...but in make, this happens...

====
7846:   read(8, " O u t p u t   b e f o r".., 1024)   = 47
7849:   write(2, " O u t p u t   a f t e r".., 46)    = 46
7847:   pollsys(0x08047210, 3, 0x080472B0, 0x00000000)  = 1
7849:   write(1, " O u t p u t   a f t e r".., 46)    = 46
7847:   read(6, " O u t p u t   a f t e r".., 1024)   = 46
7849:   _exit(0)
7847:   write(1, " O u t p u t   a f t e r".., 46)    = 46
7846:   pollsys(0x08042A10, 3, 0x08042AB0, 0x00000000)  = 1
7847:   pollsys(0x08047210, 3, 0x080472B0, 0x00000000)  = 2
7846:   read(8, " O u t p u t   a f t e r".., 1024)   = 46
7847:   read(8, " O u t p u t   a f t e r".., 1024)   = 46
7846:   pollsys(0x08042A10, 3, 0x08042AB0, 0x00000000)  = 1
7847:   write(1, " O u t p u t   a f t e r".., 46)    = 46
7847:   read(6, 0x08069D70, 1024)                       = 0
7846:   read(8, " O u t p u t   a f t e r".., 1024)   = 46
7847:   close(6)                                        = 0
7847:   pollsys(0x08047210, 2, 0x080472B0, 0x00000000)  = 1
7847:   read(8, 0x08069D70, 1024)                       = 0
7847:   close(8)                                        = 0
7847:       Received signal #18, SIGCLD, in pollsys() [caught]
7847:         siginfo: SIGCLD CLD_EXITED pid=7849 status=0x0000
====

I also tried this little program:

====
#include <unistd.h>
#include <sys/wait.h>

int main() {
        int st;
        pid_t bar = fork();
        if (0 == bar) {
                execlp("ctest", "ctest", "-I", "6,7");
        }
        waitpid(bar, &st, 0);
        return WEXITSTATUS(st);
}
====

...and it works, so make is doing something more than this.

My makefile that I am using to test is:

====
all:
        ctest -I 6,7
====

--
Matthew
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!





reply via email to

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