aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-05-31 16:15:57 +0200
committerRickard Green <[email protected]>2016-05-31 16:15:57 +0200
commit5add0e9c741379a928f21c783316310fec6de095 (patch)
tree08f70810c20e739ccc2b9260de2d962e4e3ec6ff /erts
parentb2207f7174a4b6f0906da0c8b4d2458397de7e0f (diff)
parenta6a4ce5c63cae9e0d3a35fea3074a59dd06f22fc (diff)
downloadotp-5add0e9c741379a928f21c783316310fec6de095.tar.gz
otp-5add0e9c741379a928f21c783316310fec6de095.tar.bz2
otp-5add0e9c741379a928f21c783316310fec6de095.zip
Merge branch 'rickard/off_heap-nonsmp-fix/OTP-13366'
* rickard/off_heap-nonsmp-fix/OTP-13366: Do not send on_heap msgs to error logger in non-smp emulator
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/utils.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index f0418446a8..675fafa726 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -2210,7 +2210,9 @@ do_allocate_logger_message(Eterm gleader, Eterm **hp, ErlOffHeap **ohp,
#ifndef ERTS_SMP
#ifdef USE_THREADS
- if (erts_get_scheduler_data()) /* Must be scheduler thread */
+ if (!erts_get_scheduler_data()) /* Must be scheduler thread */
+ *p = NULL;
+ else
#endif
{
*p = erts_whereis_process(NULL, 0, am_error_logger, 0, 0);
@@ -2226,18 +2228,10 @@ do_allocate_logger_message(Eterm gleader, Eterm **hp, ErlOffHeap **ohp,
}
/* So we have an error logger, lets build the message */
- if (sz <= HeapWordsLeft(*p)) {
- *ohp = &MSO(*p);
- *hp = HEAP_TOP(*p);
- HEAP_TOP(*p) += sz;
- } else {
-#endif
- *bp = new_message_buffer(sz);
- *ohp = &(*bp)->off_heap;
- *hp = (*bp)->mem;
-#ifndef ERTS_SMP
- }
#endif
+ *bp = new_message_buffer(sz);
+ *ohp = &(*bp)->off_heap;
+ *hp = (*bp)->mem;
return (is_nil(gleader)
? am_noproc