aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-11-20 14:34:06 +0100
committerLukas Larsson <[email protected]>2013-11-25 10:00:50 +0100
commite9c04e92199deb274e1bb74e4caecd296443ca5f (patch)
tree0065b91b67fbb09b94fc40926e3a9b62a90ff9e5 /erts/emulator/beam
parent81a497cc1fd21cdd4f545c3ed7c64705ca5fc65c (diff)
downloadotp-e9c04e92199deb274e1bb74e4caecd296443ca5f.tar.gz
otp-e9c04e92199deb274e1bb74e4caecd296443ca5f.tar.bz2
otp-e9c04e92199deb274e1bb74e4caecd296443ca5f.zip
Improve error info when main carrier creation fails
Also fix testcase that failed due to main carrier creation failure.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_alloc_util.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_alloc_util.c b/erts/emulator/beam/erl_alloc_util.c
index 1fdee4db2c..b59fe0bf15 100644
--- a/erts/emulator/beam/erl_alloc_util.c
+++ b/erts/emulator/beam/erl_alloc_util.c
@@ -5593,8 +5593,15 @@ erts_alcu_start(Allctr_t *allctr, AllctrInit_t *init)
| CFLG_FORCE_SYS_ALLOC
#endif
| CFLG_MAIN_CARRIER);
- if (!blk)
- goto error;
+ if (!blk) {
+#ifdef USE_THREADS
+ if (allctr->thread_safe)
+ erts_mtx_destroy(&allctr->mutex);
+#endif
+ erl_exit(ERTS_ABORT_EXIT,
+ "Failed to create main carrier for %salloc\n",
+ init->name_prefix);
+ }
(*allctr->link_free_block)(allctr, blk);