Date: Sun, 28 Jul 2019 16:54:09 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 239493] signal SIGABRT in .__sys_thr_kill () from /lib/libc.so.7 on r350103 ppc64 Message-ID: <bug-239493-227-wEtfmekq9v@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-239493-227@https.bugs.freebsd.org/bugzilla/> References: <bug-239493-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239493 --- Comment #3 from Conrad Meyer <cem@freebsd.org> --- In fact, a similar issue was discussed on a 2017 GMP thread.[1] The problematic aspect is: (In reply to Dennis Clarke from comment #0) > int main () { > unsigned long *r, *r2; > ... > r =3D malloc (10000 * sizeof (unsigned long)); >... > if (r[2048] !=3D 0 || r[2049] !=3D 0 || r[2050] !=3D 0 || r[2051] !=3D = 0 || > r[2052] !=3D 0 || r[2053] !=3D 0 || r[2054] !=3D 0) > abort (); malloc() does not guarantee allocated memory is zero. A better test is to = use memset(r, 0, ....) or calloc() in place of malloc(). The GMP thread provid= ed this solution as well. [1]: https://gmplib.org/list-archives/gmp-devel/2017-January/004517.html --=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-239493-227-wEtfmekq9v>