pspp-dev
[Top][All Lists]
Advanced

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

Re: PSPP on windows: backtraces.


From: John Darrington
Subject: Re: PSPP on windows: backtraces.
Date: Wed, 21 Feb 2007 19:38:42 +0900
User-agent: Mutt/1.5.9i

On Sat, Feb 17, 2007 at 12:59:15PM +0900, John McCabe-Dansted wrote:
     
     Uh... if I compile with "-g -O0" only 15 tests fail, and I get no
     segfaults. I've put the log up at:
     http://www.csse.uwa.edu.au/~john/make.check.2007-02-17.gO0.log

Can you try adding a "-b" to all the instances of "diff" in
tests/command/npar-binomial.sh, tests/command/npar-chisquare.sh and
tests/command/very-long-strings.sh

I *think* this will fix these three failures.
     
     If this helps, I have put up a log with "-g -O2" at:
     http://www.csse.uwa.edu.au/~john/make.check.2007-02-17.gO2.log.bz2

Many (all?) of the seg faults here have the form:

Backtrace:
=>1 0x601b79dc memcpy+0x1c() in libc.so.6 (0x0099fc28)
  2 0x00458769 dfm_put_record+0xc9(w=0x126e10, rec=0x12e500, len=0x4)
  
[/opt/user/cross-tools/bin/../lib/gcc/i386-mingw32msvc/3.4.1/../../../../i386-mingw32msvc/include/stdio.h:262]
 in pspp (0x0099fc58)
  
So it looks as if there may be a problem with dfm_put_record.
Examining that function, I'm suspicious, because:

 switch (fh_get_mode (w->fh))
    {
    case FH_MODE_TEXT:
      fwrite (rec, len, 1, w->file);
      putc ('\n', w->file);
      break;

    case FH_MODE_BINARY:
      {
        size_t record_width = fh_get_record_width (w->fh);
        size_t write_bytes = MIN (len, record_width);
        size_t pad_bytes = record_width - write_bytes;
        fwrite (rec, write_bytes, 1, w->file);

... the tests for record_width are not performed in the first case.
And this case I suspect never arises except under windows.  I suggest
that we start by putting some assertions in the first case of this
switch  and see what happens.

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

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