Browse Source

Merge branch 'add-noinline-handle-longjmp'

Minimal fix attempt for GH-55.
pull/92/head
Sami Vaarala 10 years ago
parent
commit
3e20fe8167
  1. 13
      src/duk_features.h.in
  2. 1
      src/duk_js_executor.c

13
src/duk_features.h.in

@ -1911,6 +1911,19 @@ typedef FILE duk_file;
#define DUK_UNLIKELY(x) (x)
#endif
/*
* DUK_NOINLINE: macro to avoid inlining a function.
*
* This has been added specifically to fix GH-55 and the macro syntax may not
* map well to all compilers.
*/
#if defined(DUK_F_CLANG)
#define DUK_NOINLINE __attribute__ ((noinline))
#else
#define DUK_NOINLINE /*nop*/
#endif
/*
* Symbol visibility macros
*

1
src/duk_js_executor.c

@ -668,6 +668,7 @@ DUK_LOCAL void duk__handle_yield(duk_hthread *thr, duk_hthread *resumer, duk_siz
}
DUK_LOCAL
DUK_NOINLINE /* Needed to fix crash on OSX, see GH-55. */
duk_small_uint_t duk__handle_longjmp(duk_hthread *thr,
duk_hthread *entry_thread,
duk_size_t entry_callstack_top) {

Loading…
Cancel
Save