Le mardi 3 janvier 2012 17:03:29, vous avez écrit :
> 
> I’m omitting -b when building mksh with tcc now, and it works
> and passes its testsuite fully, on i386. Just FYI.

I took a look at this bug recently. Thanks to this, two bugs have been fixed in 
tcc. Sadly it was regression both in tcc and due to change in the environment. 
I managed to go a bit further by changing the condition on NSIG from <= NSIG 
to < NSIG in inittraps in histrap.c Are you sure it should be <=NSIG?

I could go even further by changing NSIG to 32 when I noticed that the entries 
from 32 to 64 are null (I thought it could confuse tcc in some way). It then 
failed on the use of environ because the bound checking code cannot know the 
size of the valid area for environ and thus thinks an unsafe access is being 
done. The problem in histtrap seems to be the same. When computing the address 
of histtraps[i] at some point the bound checking code returns -2 (access to 
unsafe zone) which once multiplied by i * sizeof(void *) goes in the end of 
address space and causes a crash. I'll think how to solve this.

Anyway, I just wanted to tell you that we are trying to fix this and we didn't 
forget that bug.

Best regards,

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to