| Commit message (Expand) | Author | Age | Files | Lines |
* | Guard tmux title changes | toonn | 2018-01-30 | 1 | -1/+1 |
* | rifle_sxiv.sh: be POSIX, single = for string eq | Daniel Lublin | 2017-12-14 | 1 | -1/+1 |
* | Add a :narrow keybind to rc_emacs.conf | Wojciech Siewierski | 2017-05-21 | 1 | -0/+1 |
* | config/rc.conf: Properly set `preview_script` by default | nfnty | 2017-04-12 | 1 | -2/+2 |
* | linting: pylint: Remove most `disabled=protected-access` | nfnty | 2017-01-30 | 1 | -2/+2 |
* | examples: Added plugin_fasd_add.py | Theo Laurent | 2017-01-29 | 1 | -0/+25 |
* | Add setting `hostname_in_titlebar` | nfnty | 2017-01-29 | 1 | -0/+3 |
* | linting: pylint: Enable `broad-except`, Improve logging | nfnty | 2017-01-21 | 1 | -16/+13 |
* | Python 3 division: Import `division` from `__future__` | nfnty | 2017-01-21 | 8 | -8/+8 |
* | linting: pylint 2.0.0 | nfnty | 2017-01-17 | 1 | -2/+1 |
* | linting: Python 2 compat: Import from `__future__` | nfnty | 2017-01-17 | 8 | -0/+17 |
* | linting: Python 2 compat | nfnty | 2017-01-17 | 2 | -6/+6 |
* | linting: pylint and flake8 | nfnty | 2017-01-17 | 8 | -25/+46 |
* | linting: autopep8 | nfnty | 2017-01-17 | 1 | -4/+10 |
* | Merge branch 'automatic-cd-osx' of https://github.com/arshiamufti/ranger | hut | 2016-11-04 | 1 | -0/+2 |
|\ |
|
| * | Add correct path to ranger on OS X | Arshia Mufti | 2016-09-06 | 1 | -0/+2 |
* | | Fix the urxvt preview documentation | Wojciech Siewierski | 2016-10-08 | 1 | -1/+1 |
* | | Implement the urxvt-based image previews | Wojciech Siewierski | 2016-10-05 | 1 | -0/+8 |
|/ |
|
* | Fix misspellings | stepshal | 2016-06-26 | 1 | -1/+1 |
* | Merge branch 'E301' of https://github.com/stepshal/ranger | hut | 2016-06-18 | 2 | -0/+2 |
|\ |
|
| * | Add one blank line where is expected | stepshal | 2016-06-16 | 2 | -0/+2 |
* | | Add two blank lines where is expected | stepshal | 2016-06-16 | 7 | -0/+12 |
|/ |
|
* | doc/tools/print_colors.py: remove trailing newline | stepshal | 2016-06-07 | 1 | -1/+0 |
* | examples/plugin_new_macro.py: fix spaces | hut | 2016-06-02 | 1 | -3/+3 |
* | fixed key binding for new tabs in in the source language and x86 machine code.
Zero runtime.
=> Programmers have to decide how to use registers.
=> Translator can't insert any instructions that write to registers. (We don't know if a register is in use.)
== Lessons from Mu
1. For easy bounds checking, never advance pointers to arrays or heap allocations. No pointer arithmetic.
2. Store the array length with the array.
3. Store an allocation id with heap allocations. Allocation id goes monotonically up, never gets reused. When it wraps around to zero the program panics.
4. Heap pointers also carry around allocation id.
5. When dereferencing a heap pointer, first ensure its alloc id matches the alloc id of the payload. This ensures some other copy of the pointer didn't get freed (and potentially reused)
== Problem 1
How to index into an array?
The array has a length that needs to be checked.
Its elements have a type T.
The base will be in memory, either on the stack or the heap.
The index may be in the register, stack or heap.
That's too much work to do in a single instruction.
So arrays have to take multiple steps. And we have to guard against the steps
being misused in unsafe ways.
To index into an array with elements of type T, starting with the size of the
array in bytes:
step 1: get the offset the index is at
<reg offset> : (index T) <- index <reg/mem idx> : int, <literal> : (size T)
step 2: convert the array to address-of-element
<reg x> : (address T) <- advance <reg/mem A> : (array T), <reg offset> : (index T)
implicitly compares the offset with the size, panic if greater
=>
compare <reg offset> : (index T), <reg/mem> : (array T)
jge panic
step 3: use the address to the element
...
(index T) is a special type. You can do only two things with it:
- pass it to the advance instruction
- convert it to a number (but no converting back)
(address T) is a short-term pointer. You can't store addresses in structs, you
can't define global variables of that type, and you can't pass the type to the
memory allocator to save to the heap. You also can't store addresses in the
stack, because you may encounter a free before you end the function.
Maybe we'll also forbid any sort of copy of address types. Only place you can
store an (address T) is the register you saved to. To copy you need a handle
to a heap allocation.
Still not entirely protected against temporal issues. But pretty close.
== Problem 2
How to dereference a heap allocation?
== List of types
int
char
(address _) X
(array _)
(handle _)
n>/+1 |
* | Replaced file.basename with file.relative_path where appropriate. | Wojciech Siewierski | 2015-05-08 | 2 | -3/+3 |
* | added examples/rc_emacs.conf | hut | 2015-05-04 | 1 | -0/+533 |
* | added example plugin that adds a linemode | hut | 2015-04-19 | 1 | -0/+16 |
* | Should I dual ranger/cleric or wait for the THAC0 bonus? v1.7.0 | hut | 2015-04-14 | 10 | -10/+10 |
* | moved "doc/examples" to "examples" for more visibility | hut | 2015-04-13 | 11 | -0/+221 |
* | move examples to doc/examples | hut | 2013-03-09 | 11 | -200/+0 |
* | examples/rifle_sxiv: fix rifle_sxiv with chars like [] | hut | 2013-03-09 | 1 | -1/+1 |
* | Fixed the sxiv workaround to handle spaces and be more POSIX compliant. | Pierre Neidhardt | 2013-03-05 | 1 | -7/+21 |
* | Added version info to examples | hut | 2013-03-01 | 11 | -0/+22 |
* | use 4-space-indents in files that had 2-space-indents | hut | 2013-02-22 | 1 | -5/+5 |
* | core.main: added RANGER_LOAD_DEFAULT_RC environment variable | hut | 2013-02-22 | 1 | -9/+0 |
* | examples/plugin_chmod_keybindings.py: fixed crash | hut | 2013-02-22 | 1 | -1/+1 |
* | examples/rifle_sxiv.sh: removed realpath dependency | hut | 2013-02-18 | 1 | -1/+8 |
* | examples/rifle_sxiv.sh: remove bash dependency | hut | 2013-02-18 | 1 | -1/+1 |
* | fsobject.directory.accept_file: pass directory, not dirname | hut | 2013-02-15 | 1 | -3/+3 |
* | examples/README: add instructions on how to install plugins | hut | 2013-02-13 | 1 | -0/+3 |
* | removed all trailing whitespaces | hut | 2013-02-10 | 1 | -1/+1 |
* | replaced tabs with 4 spaces in all python files | hut | 2013-02-10 | 1 | -7/+7 |
* | added examples/rifle_different_file_opener.conf | hut | 2012-12-04 | 1 | -0/+7 |