aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_unicode.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-10-15 15:19:43 +0200
committerSverker Eriksson <[email protected]>2013-10-15 15:19:43 +0200
commit356c1e9312a640ac211b6d5d4110372742acfcde (patch)
tree1961a33422f0f4bdae6c1bc647b93a2441fe41e0 /erts/emulator/beam/erl_unicode.c
parentbbe80d2ad4ef0ca607ba557102212cb7c9a06e2c (diff)
parent5db2c05af6efaf636b2e41e3a1f305c592a71f34 (diff)
downloadotp-356c1e9312a640ac211b6d5d4110372742acfcde.tar.gz
otp-356c1e9312a640ac211b6d5d4110372742acfcde.tar.bz2
otp-356c1e9312a640ac211b6d5d4110372742acfcde.zip
Merge branch 'rickard-sverker/supercarrier/OTP-11149' into maint
* rickard-sverker/supercarrier/OTP-11149: (29 commits) erts: Add test case for erts_mmap erts: Add mutex to init_atoms in erts_mmap.c erts: Fix lock violation for init_atoms in erl_mmap.c erts: Fix misc minor bugs in supercarrier initialization erts: Add erts_mmap stats erts: Add erts_bld_tupleX macros erts: Rename erts_bld_atom_uint_2tup_list to *_uword_* erts: Fix bug in lookup_free_seg erts: Fix race bug in erts_munmap erts: Add HARD_DBG_MSEG erts: Refactor rbt_insert in erl_mmap erts: erts_mmap improved free seg desc management erts: Add documentation for +MMsc* system flags erts: Allow page aligned erts_munmap() erts: Sort tree in super aligned sizes (SA_SZ_ADDR_ORDER) erts: Fix ASSERT bug and void* arithmetics erts: Add mmap argument to erts_debug:get_internal_state erts: Improve erts_mmap out of free descriptor management erts: Cleanup erl_mmap erts: Add __func__ to ERTS_ASSERT macro ...
Diffstat (limited to 'erts/emulator/beam/erl_unicode.c')
-rw-r--r--erts/emulator/beam/erl_unicode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c
index e00440b905..569c0a7d31 100644
--- a/erts/emulator/beam/erl_unicode.c
+++ b/erts/emulator/beam/erl_unicode.c
@@ -1476,6 +1476,9 @@ static Eterm do_utf8_to_list_normalize(Process *p, Uint num, byte *bytes, Uint s
Uint16 savepoints[4];
int numpoints = 0;
+ if (num == 0)
+ return NIL;
+
ASSERT(num > 0);
hp = HAlloc(p,num * 2); /* May be to much */