• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/ucode/tests/custom/99_bugs/35_vm_callframe_double_free

  1 When invoking a native function as toplevel VM call which indirectly
  2 triggers an unhandled exception in managed code, the callframes are
  3 completely reset before the C function returns, leading to invalid
  4 memory accesses when `uc_vm_call_native()` subsequently popped it's
  5 own callframe again.
  6 
  7 This issue did not surface by executing script code through the
  8 interpreter since in this case the VM will always execute a managed
  9 code as toplevel call, but it could be triggered by invoking a native
 10 function triggering an exception through the C API using `uc_vm_call()`
 11 on a fresh `uc_vm_t` context or by utilizing the CLI interpreters `-l`
 12 flag to preload a native code library triggering an exception.
 13 
 14 
 15 -- File ex.uc --
 16 die("Exception");
 17 -- End --
 18 
 19 -- Args --
 20 -L files/ -l ex
 21 -- End --
 22 
 23 -- Expect stderr --
 24 Exception
 25 In main(), file files/ex.uc, line 1, byte 16:
 26   called from anonymous function ([C])
 27 
 28  `die("Exception");`
 29   Near here -----^
 30 
 31 
 32 -- End --
 33 
 34 -- Testcase --
 35 not reached
 36 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt