Menu

#19 libextl: document EXTL_SAFE/'restricted mode'

open
nobody
libextl (2)
5
2011-05-08
2011-05-08
No

When executing lua code in 'restricted mode' calling C API functions not annotated with EXTL_SAFE produces a 'Attempt to call an unsafe function "...." in restricted mode' warning.

We should document when lua code runs in 'restricted mode' and when it is acceptable to annotate a C function with EXTL_SAFE.

Discussion

  • Arnout Engelen

    Arnout Engelen - 2011-05-08
    • summary: libextl: document 'safe mode'/'restricted mode' --> libextl: document EXTL_SAFE/'restricted mode'
     
  • Arnout Engelen

    Arnout Engelen - 2011-05-08
    • labels: --> libextl
     
  • Arnout Engelen

    Arnout Engelen - 2011-05-08

    ioncore_current seems like a good candidate for EXTL_SAFE, but I'm reluctant to add it without properly understanding what the issue is here.

     
  • Philipp Hartwig

    Philipp Hartwig - 2012-10-06

    I think a function has to be considered unsafe when it can alter a list that any of our foo_i functions could iterate over. For example when calling mplex:managed_i(fn), the function fn must not alter the list of managed regions of mplex because it could thereby violate assumptions that the code of WMPlex.managed_i relies on.

     
  • Philipp Hartwig

    Philipp Hartwig - 2012-12-18

    I've added some documentation in libextl/3387b2203cbb25818958a4b14c39cdc444dd325e and notion-doc/180422475c5f8cd64cbb3e804024d2dabd97976f

    Any comments or suggestions? :)

     

Anonymous
Anonymous

Add attachments
Cancel