[Bug 1708635] Re: Valgrind reports " Uninitialised value was created by a stack allocation" in __uuid_generate_random
Alan Griffiths
1708635 at bugs.launchpad.net
Fri Aug 4 14:07:48 UTC 2017
Not sure how to test this, but...
index b93b9ba47..cfa82d13c 100644
--- a/lib/randutils.c
+++ b/lib/randutils.c
@@ -81,8 +81,10 @@ void random_get_bytes(void *buf, size_t nbytes)
while (n > 0) {
ssize_t x = read(fd, cp, n);
if (x <= 0) {
- if (lose_counter++ > 16)
+ if (lose_counter++ > 16) {
+ while (n--) *cp++ = rand();
break;
+ }
continue;
}
n -= x;
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1708635
Title:
Valgrind reports " Uninitialised value was created by a stack
allocation" in __uuid_generate_random
Status in util-linux package in Ubuntu:
New
Bug description:
This has shown up in lp:mir CI on Artful amd64 (and no other
architecture or series we're using)
For example:
https://mir-jenkins.ubuntu.com/job/build-2-binpkg-
mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4870/consoleFull
Marking the memory with VALGRIND_MAKE_MEM_DEFINED() suppresses the
error.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1708635/+subscriptions
More information about the foundations-bugs
mailing list