Date: Sat, 01 Aug 2020 23:23:17 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 248420] benchmarks/blogbench: rand()-related crash Message-ID: <bug-248420-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248420 Bug ID: 248420 Summary: benchmarks/blogbench: rand()-related crash Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: sigsys@gmail.com CC: jmohacsi@bsd.hu Flags: maintainer-feedback?(jmohacsi@bsd.hu) CC: jmohacsi@bsd.hu blogbench uses rand() from multiple threads which crashes due to PRNG state corruption. The previous rand() implementation apparently had a simpler st= ate which did not cause crashes (but probably was still being corrupted by concurrent use). Patch switches it to arc4random(), which is thread-safe (but slower). Index: benchmarks/blogbench/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- benchmarks/blogbench/Makefile (revision 543925) +++ benchmarks/blogbench/Makefile (working copy) @@ -18,6 +18,10 @@ OPTIONS_DEFINE=3D DOCS +post-patch: + @${REINPLACE_CMD} -Ee 's|[[:<:]]rand\(|arc4random(|g' \ + "${WRKSRC}"/src/*.[ch] + post-install: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR} --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248420-7788>