Branch: Tag:

2012-01-09

2012-01-09 17:28:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Event handlers are now called as function #FUNCTION_BUILTIN.

This avoids having them collide with other symbols (or worse no symbol at all).
Added corresponding test code.
FIXME: interpret.c:find_external_context() may need to know about this as well.
Fixes [bug 6156 (#6156)].

960:   ]], 1)      test_any([[ +  // Test that backtraces with event handlers are rendered correctly. +  // These backtraces have caused SEGV's due to function pointers +  // out of bounds. cf [bug 6156]. +  return sizeof(describe_backtrace(catch { +  Builtin.__Backtrace_Test__(); +  })) > 0; + ]], 1) +  + test_any([[ +  // Test that backtraces with event handlers are rendered correctly. +  // These backtraces have caused SEGV's due to function pointers +  // out of bounds. cf [bug 6156]. +  return catch { Builtin.__Backtrace_Test__(); }[2][-1][2]; + ]], "__EVENT_HANDLER__") +  + test_any([[    // Test multiple inherit of same symbol,    // where later symbol is protected.    class A { constant foo = 1; };