--with-blas/lapack being ignored

Ben Abbott bpabbott at mac.com
Thu Dec 6 20:18:17 CST 2007


On Dec 6, 2007, at 7:20 PM, John W. Eaton wrote:

> On  6-Dec-2007, Ben Abbott wrote:
>
> | On Dec 6, 2007, at 6:34 PM, John W. Eaton wrote:
> |
> | > On  5-Dec-2007, Ben Abbott wrote:
> | >
> | > | Which may be duplicated with the simpler ....
> | > |
> | > | strptime ('09/13', '%m/%d')
> | > | panic: Bus error -- stopping myself...
> | > | attempting to save variables to `octave-core'...
> | > | save to `octave-core' complete
> | > | Bus error
> | >
> | > Does the attached program work correctly on your system?
> | >
> | > jwe
> | >
> | >
> | > #define _XOPEN_SOURCE
> | > #if defined (HAVE_SYS_TYPES_H)
> | > #include <sys/types.h>
> | > #if defined (HAVE_UNISTD_H)
> | > #include <unistd.h>
> | > #endif
> | > #endif
> | > #include <stdio.h>
> | > #include <time.h>
> | >
> | > int
> | > main (void)
> | > {
> | >  struct tm t;
> | >  char *q = strptime ("09/13", "%m/%d", &t);
> | >  if (q)
> | >    {
> | >      printf ("%d/%d\n", t.tm_mon+1, t.tm_mday);
> | >      return 0;
> | >    }
> | >  else
> | >    return 1;
> | > }
> |
> | gcc test.c
> | ./a.out
> | 9/13
> |
> | ... I assume that means the strptime is working?
>
> It would seem so, and that should be precisely the call to strptime
> that Octave is making when it crashes.  You could verify this by
> running Octave under the debugger and set a breakpoint in the
> oct_strptime function and see what values are passed to the strptime
> functoin and what it returns.  But I suspect that may be working
> correctly as your gdb trace showed that the crash is in
> octave_base_tm::init, which is called after strptime.
>
> If you set a breakpoint in octave_strptime::init and step through it
> when you execute
>
>  strptime ('09/13', '%m/%d')
>
> in Octave, what does oct_strptime return?  Does it look like the
> fields of the tm struct are set correctly?  Does the tm struct contain
> the tm_zone field?  What is its value?
>
> jwe

I've run octave in ddd (I modified run_octave to use ddd in addition  
gdb).

As expected octave crashes on the command strptime('09/13','%m/%d')

	Program recieved signal EXC_BAD_ACCESS, Could not access memory.
	Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
	0x9110f590 in strlen ()
	No source file named address.

A dialog is also produced by ddd. Which says

	/Users/bpabbott/Desktop/octave/address: No such file or directory

The crash occurs when line 307 of oct-time.cc is exectuted.

    306 #if defined (HAVE_STRUCT_TM_TM_ZONE)
 >> 307   tm_zone = t->tm_zone;
    308 #elif defined (HAVE_TZNAME)

Just prior to the crash, the date and time variables were set to

   tm_sec = 0
   tm_min = 0
   tm_hour = 0
   tm_mday = 13
   tm_mon = 8
   tm_year = 0
   tm_wday = 0
   tm_yday = 0
   tm_isdst = 0

I'm not familiar with what to expect from strptime('09/13','%m/ 
%d') ... is the month supposed to be 8 rather than 9?

In any event, shall I make the change below to config.h?

- #define HAVE_STRUCT_TM_TM_ZONE 1
+ #define HAVE_STRUCT_TM_TM_ZONE 0

Ben

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071206/94d7bb80/attachment.html 


More information about the Bug-octave mailing list