|
Boost Users : |
From: Liam Routt (caligari_at_[hidden])
Date: 2005-08-22 20:12:35
Peter Dimov wrote:
> Ben Hutchings wrote:
> > Liam Routt wrote:
> >
> >> In the smart_ptr_test and shared_ptr_test output I note a fair
> >> number of use_count() related error messages, which might indeed
> >> indicate that the shared_count is a problem area.
> >>
> >> I have saved the output and can provide it on request, but I didn't
> >> think that simply mailing it to the list was necessarily the right
> >> step to take. What *is* the right step to take next?
> >
> > I believe that the shared count is 64-bit on PPC64 (since it is
> > declared long) but the atomic operations being used on it assume it's
> > 32-bit, since they were written for PPC32.
>
> That's my guess as well.
>
> > If you send the log to me I might
> > be able to tell whether this is the case. May I suggest also that you
> > try applying the following (wholly untested) patch to
> > boost/detail/sp_counted_base_gcc_ppc.hpp and re-running the test:
> >
> > --- sp_counted_base_gcc_ppc.hpp.orig 2005-08-22 14:31:10.315970200
> > +0100 +++ sp_counted_base_gcc_ppc.hpp 2005-08-22 14:30:47.512073200
> > +0100 @@ -41,9 +41,9 @@
> > __asm__
> > (
> > "0:\n\t"
> > - "lwarx %1, 0, %2\n\t"
> > + "ldarx %1, 0, %2\n\t"
>
> [...]
>
> I think that it would be better to use a 32 bit count instead, as in the
> patch below (int is 32-bit under both PPC32 and PPC64, right?)
Surely we have some sort of "bit-sized" basic types? I'm new to Boost,
but we've had typedefs in our own project for as long as we've been
using C++...
> Either way, please let us know whether one or both of these changes resolve
> the issue, so that we can put the fix in 1.33.1, if one is released.
Both patches allow us to pass the entire suite on the PPC64/Linux/gcc
combo.
Any suggestion which I should apply locally to allow us to proceed?
Are there more parts of the test suite that we should run?
Take care,
Liam
-- Liam Routt Ph: (03) 8344-1315 Research Programmer caligari_at_[hidden] Computer Science, Melbourne University (or liam_at_[hidden])
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net