From: matz@... (Yukihiro Matsumoto) Date: 2004-07-03T10:57:40+09:00 Subject: Re: ruby-dev summary 23763-23840 Hi, In message "Re: ruby-dev summary 23763-23840" on 04/07/03, Paul Brannan writes: |> 2. set_trace_func should be prohibited in $SAFE>0. |> |> -> Matz stated that $SAFE>3 check is enough, |> because we are trusting $SAFE<=3 codes. | |I'm not sure I agree. I don't think it should ever be possible to |downgrade your $SAFE level without help from a thread that already has |its $SAFE level downgraded, but it is: |I'd have to be malicious to write code like this, and potentially |malicious code shouldn't be executed in $SAFE=1, but if explicitly |setting $SAFE is disallowed, then so should the above code. Define "malicious" before saying "shouldn't". ;-) |Is there a practical use calling set_trace_func when $SAFE=1? For exmaple, running a debugger on -T1 program. matz.