[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
doc: Mention glibc initstate, initstate_r bug
From: |
Bruno Haible |
Subject: |
doc: Mention glibc initstate, initstate_r bug |
Date: |
Sun, 25 Jun 2023 18:04:59 +0200 |
There's a test failure on cfarm105.cfarm.net:
../../build-aux/test-driver: line 112: 3107617 Bus error "$@" >>
"$log_file" 2>&1
FAIL: test-random_r
Just documenting it should be enough, since most state arrays allocated by
applications should be aligned by the compiler or through malloc().
2023-06-25 Bruno Haible <bruno@clisp.org>
doc: Mention glibc initstate, initstate_r bug.
* doc/posix-functions/initstate.texi: Mention glibc bug.
* doc/glibc-functions/initstate_r.texi: Likewise.
* tests/test-random_r.c: Add a comment.
diff --git a/doc/glibc-functions/initstate_r.texi
b/doc/glibc-functions/initstate_r.texi
index b2bcc18cf8..9c1ea829db 100644
--- a/doc/glibc-functions/initstate_r.texi
+++ b/doc/glibc-functions/initstate_r.texi
@@ -32,6 +32,10 @@
Portability problems not fixed by Gnulib:
@itemize
@item
+This function crashes if the state buffer is unaligned on on some platforms:
+@c https://sourceware.org/bugzilla/show_bug.cgi?id=30584
+glibc 2.36/sparc.
+@item
This function has a slightly different (but compatible) declaration on some
platforms:
Haiku 2017.
diff --git a/doc/posix-functions/initstate.texi
b/doc/posix-functions/initstate.texi
index 2f7a83ca95..a1de753e1f 100644
--- a/doc/posix-functions/initstate.texi
+++ b/doc/posix-functions/initstate.texi
@@ -19,6 +19,10 @@
Portability problems not fixed by Gnulib:
@itemize
@item
+This function crashes if the state buffer is unaligned on on some platforms:
+@c https://sourceware.org/bugzilla/show_bug.cgi?id=30584
+glibc 2.36/sparc.
+@item
The first parameter is @code{unsigned long} instead of @code{unsigned int} on
some platforms:
MidnightBSD 2.0.
diff --git a/tests/test-random_r.c b/tests/test-random_r.c
index dffa709f5e..0dacd360ae 100644
--- a/tests/test-random_r.c
+++ b/tests/test-random_r.c
@@ -29,6 +29,9 @@ SIGNATURE_CHECK (random_r, int, (struct random_data *,
int32_t *));
#include "macros.h"
+/* Note: This test crashes on glibc/SPARC systems.
+ Reported at <https://sourceware.org/bugzilla/show_bug.cgi?id=30584>. */
+
static int
test_failed (int alignment)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- doc: Mention glibc initstate, initstate_r bug,
Bruno Haible <=