This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug boehm-gc/33442] 1938 unexpected fails in libjava testsuite
- From: "danglin at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Oct 2007 03:45:00 -0000
- Subject: [Bug boehm-gc/33442] 1938 unexpected fails in libjava testsuite
- References: <bug-33442-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from danglin at gcc dot gnu dot org 2007-10-10 03:45 -------
The problem appears to be here in pthread_support.c:
# ifdef STACK_GROWS_DOWN
return stack_addr + stack_size;
# else
return stack_addr - stack_size;
# endif
SUSV3 says the stackaddr argument in pthread_attr_getstack is the base
(lowest addressable byte) of the storage and stacksize is the size of the
storage in bytes. So, it's wrong to subtract stack_size from stack_addr
in the STACK_GROWS_UP case.
Fixing this appears to fix the bug.
--
danglin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libgcj |boehm-gc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33442