This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug boehm-gc/33442] 1938 unexpected fails in libjava testsuite



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]