Safe mode: Difference between revisions

m
(Added C3)
 
(2 intermediate revisions by 2 users not shown)
Line 92:
'cgo' is Go's bridge to using C code. As such it is just as unsafe as writing C code directly.
 
=={{header|JsishJ}}==
The ''security level'' (default: 0) can be increased to 1 by executing:
<syntaxhighlight lang="j">(9!:25) 1</syntaxhighlight>
Afterwards, all verbs able to alter the environment outside J are prohibited. See the [https://code.jsoftware.com/wiki/Vocabulary/ErrorMessages#security J Community Wiki] for details regarding the restrictions.
 
=={{header|Jsish}}==
The '''jsish''' interpreter allows a '''-s''', '''--safe''' command line switch to restrict access to the file system.
 
Line 119 ⟶ 123:
 
<syntaxhighlight lang="javascript">var interp1 = new Interp({isSafe:true, safeWriteDirs:['/tmp'], , safeReadDirs:['/tmp']});</syntaxhighlight>
 
=={{header|Julia}}==
Julia does not have a "sandbox" mode that restricts access to operating system resources such as files, since this is considered to be the province of the underlying operating system. Julia does have functions that handle underlying OS memory resources similar to C type pointers. Such functions, including <pre> unsafe_wrap unsafe_read unsafe_load unsafe_write unsafe_trunc unsafe_string unsafe_store! unsafe_copyto! </pre> are prefixed with "unsafe_" to indicate that a memory access fault could be generated if arguments to those functions are in error.
 
=={{header|Nim}}==
4,105

edits