tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Grischka last commit breaks some ports


From: Herman ten Brugge
Subject: Re: [Tinycc-devel] Grischka last commit breaks some ports
Date: Sat, 19 Dec 2020 07:24:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 12/18/20 2:45 PM, grischka wrote:
Christian Jullien wrote:
On OpenBSD:

I noticed some tests were excluded but the reasons were say
not really obvious:

Test: 106_pthread...

From it's name it's testing pthreads. OpenBSD appears to have
pthreads. So what is the deal?
I added a comment that pthread_condattr_setpshared does not exists.


Test: 114_bound_signal...
^^^^  wait forever

I think I mailed the reason before.
The problem is in the libc implementation.
- signals should be disabled during pthread_create
- after a fork libc should init the internal i/o mutex for a client process.

I fixed the pthread_create problem in bcheck.c but this does not work
for bsd because of broken dlsym.
I disabled the fork test on mac. All other libc do this correctly.

There is also another problem.
The dlltest does not work on arm(32 bits) because the jmp_buf has
different size in tcc and gcc due to '__attribute__((__aligned__ (8)))'
See code below.
tcc prints: 388
gcc prints: 392.
If I move the jmpbuf field in the struct TCCState to the end the code works.

Should we implement the aligned attribute in tcc or should we disable
this test on arm32?

    Herman



#include <stdio.h>

typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
typedef struct
{
  unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;

struct __jmp_buf_tag
  {
    __jmp_buf __jmpbuf;
    int __mask_was_saved;
    __sigset_t __saved_mask;
  };

int
main(void)
{
   printf ("%d\n", sizeof (struct __jmp_buf_tag));
   return 0;
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]