octave segfault under AIX/shared

G.. gail at tnp-online.de
Tue Dec 4 17:41:16 CST 2007



John W. Eaton wrote:
> 
> On  4-Dec-2007, G.. wrote:
> 
> | G.. wrote:
> | > 
> | > ~/octave-2.9.17> ./run-octave 
> | > ./run-octave[67]: 500156 Segmentation fault(coredump)
> | > 
> | 
> | I can make it work now! The problem was the generation of the history
> | filename. If OCTAVE_HISTFILE was set it works. Alternatively, one can
> | comment out the "file_ops::is_dir_sep"-clause in the function
> | default_history_file below (probably related to: file[file.length()-1]).
> 
> I'm not sure I see the problem with the code below.  If
> OCTAVE_HISTFILE is not set, then env_file should be empty, so file is
> not set from it.  Then file is empty, so we look for the home
> directory.  If it is not empty, then file is set to home_dir, and
> file.length() should be greater than zero, so file.length()-1 should
> be the last character of file.
> 
> What does file.length() return on your system?
> 
You're right. The error is not in file.length. It occurs in the function
file_ops::is_dir_sep from liboctave:
-----------
bool
file_ops::is_dir_sep (char c)
{
  return dir_sep_chars.find (c) != NPOS;                                                                                                                                      
}
-----------
If that function generally returns 0 (for example) everything works.

G.

-- 
View this message in context: http://www.nabble.com/octave-segfault-under-AIX-shared-tf4886987.html#a14161463
Sent from the Octave - Bugs mailing list archive at Nabble.com.



More information about the Bug-octave mailing list