diff options
author | Sverker Eriksson <[email protected]> | 2016-01-21 19:54:46 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-01-21 20:11:04 +0100 |
commit | e9d6797e15e687828e5ef0d33fb790181d657779 (patch) | |
tree | 1176445060b94d307dc8e868d61cc368af606425 | |
parent | 66a80a7ab735a22249ffbbb7c88eccebba906194 (diff) | |
download | otp-e9d6797e15e687828e5ef0d33fb790181d657779.tar.gz otp-e9d6797e15e687828e5ef0d33fb790181d657779.tar.bz2 otp-e9d6797e15e687828e5ef0d33fb790181d657779.zip |
erts: Fix faulty assert for non-smp
-rw-r--r-- | erts/emulator/beam/erl_message.c | 2 | ||||
-rw-r--r-- | erts/emulator/beam/sys.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c index b3e74e3e6a..88efb2c59f 100644 --- a/erts/emulator/beam/erl_message.c +++ b/erts/emulator/beam/erl_message.c @@ -1504,7 +1504,7 @@ erts_factory_message_create(ErtsHeapFactory* factory, } if (on_heap) { - ASSERT(*proc_locksp & ERTS_PROC_LOCK_MAIN); + ERTS_SMP_ASSERT(*proc_locksp & ERTS_PROC_LOCK_MAIN); ASSERT(ohp == &proc->off_heap); factory->mode = FACTORY_HALLOC; factory->p = proc; diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h index 53f8313daa..37fcfd1c52 100644 --- a/erts/emulator/beam/sys.h +++ b/erts/emulator/beam/sys.h @@ -196,6 +196,12 @@ __decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *f # define ASSERT(e) ((void) 1) #endif +#ifdef ERTS_SMP +# define ERTS_SMP_ASSERT(e) ASSERT(e) +#else +# define ERTS_SMP_ASSERT(e) ((void)1) +#endif + /* ERTS_UNDEF can be used to silence false warnings about * "variable may be used uninitialized" while keeping the variable * marked as undefined by valgrind. |