glibc-2.3.2 patches

Ankur Sheth
Mon Jul 26 17:20:00 GMT 2004

Hi Dan,
   Could you please add the following two patches to the patches directory
for glibc-2.3.2 in crosstool.  Both are already checked into glibc CVS.


The problem that I ran into was that multi-threaded apps would crash with a
seg fault when they invoked some of the socket calls (sendto() in my case.
This happened only on the sh4.  Turns out that a certain register (PR) was
not being saved and restored properly before and after invoking the system
call.  This patch fixes it.  It applies cleanly on glibc 2.3.2.  


This is actually a workaround for a bug in the sh4.  The actual bug is
documented here :

Basically the cache & TLB should not be accessed for 4 (or was it 5?) cycles
after isssuing a TRAPA instruction.  I didn't run into any specific problem
because of this bug, but it seems useful to have and the patch itself seems
pretty harmless.  

I haven't had a chance to run the full tool-chain regression tests on them
yet (I doubt that these two patches would break anything, both seem pretty
harmless), I'll let you know if the regression tests ring any alarm bells.


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list