aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/dist.h
diff options
context:
space:
mode:
authorMaxim Fedorov <[email protected]>2017-12-13 12:22:59 -0800
committerMaxim Fedorov <[email protected]>2018-05-15 09:18:30 -0700
commitd23487f5daa4e898767b8171732c0fe0516bc1d0 (patch)
tree71f311edd44cc68ece707253d4b2a0435f04f4c0 /erts/emulator/beam/dist.h
parent3b3e2f46841e3e86c991be92d62cbb0360ca80e3 (diff)
downloadotp-d23487f5daa4e898767b8171732c0fe0516bc1d0.tar.gz
otp-d23487f5daa4e898767b8171732c0fe0516bc1d0.tar.bz2
otp-d23487f5daa4e898767b8171732c0fe0516bc1d0.zip
Throw 'system_limit' when distribution message size exceed INT_MAX instead of crashing emulator with 'Absurdly large distribution data buffer'
Exception must be thrown when buffer has been created and it's size is known. The actual buffer size is not known until the message has been encoded in ERTS_DSIG_SEND_PHASE_FIN. It would have been nice to abort before allocating and encoding, but in order to do that in a safe way the size calculation would need improvements. It is good enough to abort in the ERTS_DSIG_SEND_PHASE_FIN while we wait for the "fragmented distribution message" feature.
Diffstat (limited to 'erts/emulator/beam/dist.h')
-rw-r--r--erts/emulator/beam/dist.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/dist.h b/erts/emulator/beam/dist.h
index dda2029a4c..55204eb83d 100644
--- a/erts/emulator/beam/dist.h
+++ b/erts/emulator/beam/dist.h
@@ -376,6 +376,7 @@ typedef struct {
#define ERTS_DSIG_SEND_OK 0
#define ERTS_DSIG_SEND_YIELD 1
#define ERTS_DSIG_SEND_CONTINUE 2
+#define ERTS_DSIG_SEND_TOO_LRG 3
extern int erts_dsig_send_link(ErtsDSigData *, Eterm, Eterm);
extern int erts_dsig_send_msg(Eterm, Eterm, ErtsSendContext*);