pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/57708: rust problem when building firefox
The following reply was made to PR pkg/57708; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: he%NetBSD.org@localhost
Cc: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Subject: Re: pkg/57708: rust problem when building firefox
Date: Sun, 19 Nov 2023 20:54:57 +0000
This is a multi-part message in MIME format.
--=_k+R2A0jPCfl/fFvU84G4E4n02s6AxFtx
> Date: Sun, 19 Nov 2023 20:52:17 +0000
> From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
>
> The attached program [...]
actually attached now.
--=_k+R2A0jPCfl/fFvU84G4E4n02s6AxFtx
Content-Type: text/plain; charset="ISO-8859-1"; name="guard"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="guard.c"
#include <err.h>
#include <pthread.h>
#include <stdio.h>
static void
showstack(const char *who)
{
pthread_attr_t attr;
void *stackaddr, *guardaddr;
size_t stacksize, guardsize;
int error;
error =3D pthread_getattr_np(pthread_self(), &attr);
if (error)
errc(1, error, "pthread_getattr_np");
error =3D pthread_attr_getstack(&attr, &stackaddr, &stacksize);
if (error)
errc(1, error, "pthread_attr_getstack");
error =3D pthread_attr_getguardsize(&attr, &guardsize);
if (error)
errc(1, error, "pthread_attr_getguardsize");
error =3D pthread_attr_destroy(&attr);
if (error)
errc(1, error, "pthread_attr_destroy");
#ifdef __MACHINE_STACK_GROWS_UP
guardaddr =3D (char *)stackaddr + stacksize - guardsize;
#else
guardaddr =3D stackaddr;
#endif
printf("%s: stack %zu/0x%zx bytes @ [%p, %p)\n",
who, stacksize, stacksize,
stackaddr, (char *)stackaddr + stacksize);
printf("%s: guard %zu/0x%zx bytes @ [%p, %p)\n",
who, guardsize, guardsize,
guardaddr, (char *)guardaddr + guardsize);
}
static void *
start(void *cookie)
{
showstack("pthread_create");
return cookie;
}
int
main(void)
{
pthread_t t;
int error;
showstack("main thread");
fflush(stdout);
error =3D pthread_create(&t, NULL, &start, NULL);
if (error)
errc(1, error, "pthread_create");
error =3D pthread_join(t, NULL);
if (error)
errc(1, error, "pthread_join");
fflush(stdout);
return ferror(stdout);
}
--=_k+R2A0jPCfl/fFvU84G4E4n02s6AxFtx--
Home |
Main Index |
Thread Index |
Old Index