Closed GoogleCodeExporter closed 9 years ago
patch combined with other fixes to make angle compile with Sun Studio on Solaris
Original comment by ginnc...@gmail.com
on 21 Jul 2010 at 9:13
Attachments:
Original comment by alokp@chromium.org
on 5 Aug 2010 at 10:05
I have submitted a portion of your patch in r373 and r374. However I am
hesitant in submitting changes to support non-standard STL allocator in
PoolAlloc.h. Is the compiler in question (sunstudio 12) really old? Is the
problem fixed in the new version of the compiler?
Original comment by alokp@chromium.org
on 9 Aug 2010 at 5:21
The lastest sunstudio is 12.1, the problem is the same.
AFAIK there's no plan to update the interface of libCStd.
Instead, stdcxx is supplied with the standard STL allocator.
But we can't use stdcxx in Firefox, because libCStd and stdcxx cannot be mixed
in the same process space and libflashplayer.so uses libCStd.
Original comment by ginnc...@gmail.com
on 9 Aug 2010 at 6:43
I'm not so sure that this is correct, though I don't have the SunStudio headers
to reference.
I think that the 'allocate' function called here should be
TPoolAllocator::allocate, which takes a size_t parameter with the number of
bytes to allocate, and is defined just above. Without the sizeof(T) parameter,
I don't think that you'll be allocating enough bytes.
Can you post the SunStudio definition that this seems to conflict with?
Original comment by gavriels...@gmail.com
on 9 Aug 2010 at 9:27
Hi Gav, Please review the patch here: http://codereview.appspot.com/1913048/show
Original comment by alokp@chromium.org
on 9 Aug 2010 at 9:31
#ifdef _RWSTD_ALLOCATOR
....
pointer allocate(size_type n, allocator<void>::const_pointer = 0)
{
pointer tmp =
_RWSTD_STATIC_CAST(pointer,(::operator
new(_RWSTD_STATIC_CAST(size_t,(n * sizeof(value_type))))));
_RWSTD_THROW_NO_MSG(tmp == 0, bad_alloc);
return tmp;
}
....
#else
....
void * allocate (size_type n, void * = 0)
{ void * tmp = _RWSTD_STATIC_CAST(void*,(::operator new(_RWSTD_STATIC_CAST(size_t,(n)))));
_RWSTD_THROW_NO_MSG(tmp == 0, bad_alloc);
return tmp;
}
....
#endif
See the discussion at
http://forums.sun.com/thread.jspa?messageID=10210406#10210406
Original comment by ginnc...@gmail.com
on 9 Aug 2010 at 9:48
Got it now - it's the caller interface that's different. I'm good with this
change provided that the comment reflects what's going on better.
Original comment by gavriels...@gmail.com
on 9 Aug 2010 at 10:07
Final patch submitted in r380.
Original comment by alokp@chromium.org
on 9 Aug 2010 at 10:33
Original issue reported on code.google.com by
Eagle...@gmail.com
on 21 Jul 2010 at 2:02Attachments: