[Top][All Lists]

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

Re: osx test

From: John Darrington
Subject: Re: osx test
Date: Sun, 11 May 2008 07:28:14 +0800
User-agent: Mutt/1.5.13 (2006-08-11)

What happens if you also add a line before the call to terminal_init
in main.c like:

printf ("%s:%d %p %p\n", __FILE__, __LINE__, &view_width_p,*view_length_p);

and can you dereference view_{width,length}_p inside terminal_init, or
is this where the problems start?


On Fri, May 09, 2008 at 01:21:40PM -0400, Jason Stover wrote:
     I got tired of trying to get gdb to work, so I started adding
     test code.
     On Mac OSX, the terminal version of pspp crashes here, in main.c:
     terminal_init (&view_width_p, &view_length_p);
     The trouble seems to be here:
     terminal_init (int **view_width_p, int **view_length_p)
       printf ("%x\t%x\n", view_width_p, view_length_p)
       *view_width_p = &view_width;
       *view_length_p = &view_length;
       terminal_check_size ();
     It shows view_width_p has address 0xfffffff0, and view_length_p
     has address 0xffffffec. 
     I tried fixing this by malloc'ing view_width_p and view_length_p
     in main(). Doing so gave the pointers acceptable addresses, but 
     those addresses seem to be overwritten by the time terminal_init()
     is called. The problem is that view_width_p and view_length_p don't
     seem to be referenced anywhere in main() between their declarations
     and the call to terminal_init(). I'm not sure what's going on.
     pspp-dev mailing list

PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See 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]