octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #29491] recursive source() causes segfault


From: Jaroslav Hajek
Subject: [Octave-bug-tracker] [bug #29491] recursive source() causes segfault
Date: Mon, 12 Apr 2010 19:18:35 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ; rv:1.9.0.19) Gecko/2010040121 Ubuntu/9.04 (jaunty) Firefox/3.0.19

Follow-up Comment #7, bug #29491 (project octave):

I'd like to note that to make things absolutely bulletproof, we'd need to
have an extra total limit on call stack anyway. I can imagine a script
dynamically creating another script using tmpnam, then sourcing it (and
fooling the checks). 

For another (completely braindead) example how to forge an infinite
recursion, consider this stupid example:

function tt()
  fdisp (stderr, length (dbstack));
  system ("touch ./tt.m");
  pause (0.2);
  rehash ();
  tt();
endfunction

I'm not sure whether we should attempt to "fix" this nonsense, maybe we
should just have a limit (say, 100*max_recursion_depth) on the total size of
the call stack for safety.
The original issue would be fixed as a side effect.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29491>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]