octave segfault under AIX/shared
John W. Eaton
jwe at bevo.che.wisc.edu
Tue Dec 4 10:14:48 CST 2007
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?
| default_history_file (void)
| {
| std::string file;
|
| std::string env_file = octave_env::getenv ("OCTAVE_HISTFILE");
|
| if (! env_file.empty ())
| file = env_file;
|
| if (file.empty ())
| {
| std::string home_dir = octave_env::get_home_directory ();
|
| if (! home_dir.empty ())
| {
| file = home_dir;
| if (! file_ops::is_dir_sep (file[file.length()-1]))
| file.push_back (file_ops::dir_sep_char);
| file.append (".octave_hist");
| }
| else
| file = ".octave_hist";
| }
|
| return file;
| }
In any case, should the dlfcn directory be removed from Octave now?
I'd say yes, since that code is most likely obsolete by now, and if
anyone needs this functionality on a really old AIX system, they could
get it by building similar code as a library and setting CPPFLAGS and
LDFLAGS so that it is found at configure time.
jwe
More information about the Bug-octave
mailing list