fil-c: Not capable of building MicroPython #18320
Replies: 2 comments
-
|
What an interesting project! Because GitHub renders the branch diff against CircuitPython's main branch, I found it easier to look at the commit here: I guess a major limit to MicroPython+fil-c is MP's custom heap implementation. We won't gain any of fil-c's capability benefits on allocations from the Python heap, unless we retrofit it there. Still, that's a very interesting set of ideas - thanks for posting about it. |
Beta Was this translation helpful? Give feedback.
-
|
Since the next sticking point appeared to be GC, perhaps a fil-c MicroPython port should just rely on the garbage collector that it provides. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I found the fil-c project interesting. It wants to be a fully memory safe implementation of the C language.
However, various incompatibilities mean MicroPython doesn't work on it. I solved a few, but then got bogged down.
code in a branch: https://github.com/jepler/circuitpython/pull/new/fil-c
unix: Change minimal port to work somewhat with fil-c.
https://github.com/pizlonator/fil-c/ is an implementation of the C language that attempts to retrofit memory safety. I tried building MicroPython with v0.673.
Several MicroPython implementation choices are a little too spicy to work correctly, preventing MicroPython from starting at all:
This patch set is enough (together with the build command
assuming the fil-c compiler is on the PATH) to allow many tests to pass:
I did not yet investigate any of the failures in depth yet. However, it looks like there's another forbidden type of pointer provenance
in the garbage collector which may prove troublesome. Along with what might be easier problems in vstr_add_byte. The final cluster
of failures seem to be due to deactivated stack checing.
Beta Was this translation helpful? Give feedback.
All reactions