From bug-octave-request at che dot utexas dot edu Sun Oct 24 13:11:34 1993 Subject: 0.75.1: SIGSEGV when using clear to force reload From: iwj10 at cus dot cam dot ac dot uk (Ian Jackson) To: bug-octave at che dot utexas dot edu Date: Sun, 24 Oct 93 11:57 GMT I'm running a binary distribution of Octave 0.75.1 under Linux 0.99pl13 on a no-name 486DX/33. Octave gets a segmentation fault when I try to use `clear' to force reloading of a function defined in an M-file. Reproduce as follows: Create the following file and call it `makei.m': function I = makei ( L ) n = rows(L) C = sum(L)' U = diag(C) - (C * ones(1,n))' invU = inv(U) cumI = zeros(n) ; B = -ones(n,1) / n ; p=1 while (p < n) B(p)= 1 - 1/n ; V = invU * B Vmat = V*ones(1,n) ; F = (XX - XX) .* L cumI = cumI + F ; B(p)= 1/n ; p=p+1 endwhile I = CI endfunction Now run octave: $ octave Octave, version 0.75.1. Copyright (C) 1992, 1993, John W. Eaton. This is free software with ABSOLUTELY NO WARRANTY. For details, type `warranty'. octave:1> L=[0 1; 1 0] L = 0 1 1 0 octave:2> makei(L) error: `XX' undefined n = 2 (rest of output deleted for brevity) octave:2> clear makei At this point, without exiting Octave, edit the file makei.m, changing the two occurrences of XX to Vmat, producing the following contents: function I = makei ( L ) n = rows(L) C = sum(L)' U = diag(C) - (C * ones(1,n))' invU = inv(U) cumI = zeros(n) ; B = -ones(n,1) / n ; p=1 while (p < n) B(p)= 1 - 1/n ; V = invU * B Vmat = V*ones(1,n) ; F = (Vmat - Vmat') .* L cumI = cumI + F ; B(p)= 1/n ; p=p+1 endwhile I = CI endfunction Now go back to Octave and try to run the changed function: octave:3> makei(L) error: caught SIGSEGV -- stopping myself... Viola! Unfortunately I do not have available to me the command line arguments to configure, and it doesn't leave a corefile (despite the working directory being writeable) so I can't send you a stack backtrace. This particular distribution of Octave has crashed in this way several times under different circumstances; this is the first error I have been able to repeat. The tarfile containing the distribution had all the files owned by user `btenison', group `users', and it looks like it was compiled on September the 26th, if that's any help.