Closed svenha closed 3 years ago
More details:
gccx32 /var/tmp/actestsh.c -o /var/tmp/Xactestsh -lpthread
/var/tmp/actestsh.c: In function ‘main’:
/var/tmp/actestsh.c:5:28: error: ‘pthread_kill’ undeclared (first use in this function); did you mean ‘pthread_self’?
fprintf( stderr, "%p", &pthread_kill );
^~~~~~~~~~~~
pthread_self
/var/tmp/actestsh.c:5:28: note: each undeclared identifier is reported only once for each function it appears in
I have a fix, see pull request #37
There might be more problems related to pthreads. For example, if building a 32bit version, recette will fail for 11 tests in pthread/recette.
Hi Sven,
I did not notice any problems on my 32bit platforms but I will investigate. Thanks anyhow for the configuration fix.
Here are more details for the failed tests in pthread/recette. If I have no stack limit or extremely high stack limits (ulimit -S -s 4200000), it works. Any lower stack value causes these test failures.
@manuel-serrano I have more details for the latest unstable version (build for 32-bit). The critical stack size is 4194304. Every value below this value causes an error in pthread or fthread, e.g.
ulimit -S -s 4194300 && make fulltest
Whether I disable gmp or not, does not make any difference. Same for pcre.
Hi Sven,
I don't think this reflects a particular problem with Bigloo. I have tried the following:
#include <stdio.h>
#include <pthread.h>
#include <errno.h>
#include <string.h>
static void *start_routine( void *x ) { ; }
int main() {
pthread_t pth;
fprintf( stderr, "th=%d\n", pthread_create( &pth, 0L, start_routine, 0L ) );
fprintf( stderr, "%s", strerror( errno ) );
}
and I have compiled that file on a 32bit platform:
gcc foo.c -lpthread
This program run fine with no limit but if you apply the limit you have mentioned I get an error:
th=11
Cannot allocate memory
After upgrading to Ubuntu 19.10, bigloo is configured with
TGKILL
instead ofPTHREADKILL
. What does this mean? (Recette for pthread will fail inthread-start
test.)