aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/alloc_SUITE_data
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-01-11 17:20:24 +0100
committerSverker Eriksson <[email protected]>2016-01-11 17:20:24 +0100
commitae116fb714d54ca40bcd897195de521b0ca39f8c (patch)
tree1513d8794155d4e030bde93556e71f13214fbf88 /erts/emulator/test/alloc_SUITE_data
parent74a95b3d511177a9b35c2b0272b9ca5511b6f750 (diff)
downloadotp-ae116fb714d54ca40bcd897195de521b0ca39f8c.tar.gz
otp-ae116fb714d54ca40bcd897195de521b0ca39f8c.tar.bz2
otp-ae116fb714d54ca40bcd897195de521b0ca39f8c.zip
erts: Workaround memset bug in test case
memset seen to fail with values larger than 255 on (armata) 32-bit ARM Debian with EGLIBC 2.13-38+rpi2+deb7u8 and gcc 4.6.3-14+rpi1.
Diffstat (limited to 'erts/emulator/test/alloc_SUITE_data')
-rw-r--r--erts/emulator/test/alloc_SUITE_data/threads.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/test/alloc_SUITE_data/threads.c b/erts/emulator/test/alloc_SUITE_data/threads.c
index edad24ee6b..f0711ee6e7 100644
--- a/erts/emulator/test/alloc_SUITE_data/threads.c
+++ b/erts/emulator/test/alloc_SUITE_data/threads.c
@@ -397,7 +397,7 @@ alloc_op(int t_no, Allctr_t *a, block *bp, int id, int clean_up)
bp->p = (unsigned char *) ALLOC(a, bp->s);
if(!bp->p)
fail(t_no, "ALLOC(%lu) failed [id=%d])\n", bp->s, id);
- memset((void *) bp->p, id, (size_t) bp->s);
+ memset((void *) bp->p, (unsigned char)id, (size_t) bp->s);
}
else {
unsigned char *p = (unsigned char *) REALLOC(a, bp->p, bp->as[bp->i]);
@@ -407,7 +407,7 @@ alloc_op(int t_no, Allctr_t *a, block *bp, int id, int clean_up)
if(bp->s < bp->as[bp->i]) {
CHECK_BLOCK_DATA(t_no, p, bp->s, id);
- memset((void *) p, id, (size_t) bp->as[bp->i]);
+ memset((void *) p, (unsigned char)id, (size_t) bp->as[bp->i]);
}
else
CHECK_BLOCK_DATA(t_no, p, bp->as[bp->i], id);