Status: New
Owner: ----
New issue 3258 by johann...@opera.com: Broken build for ARM when compiling
with DEBUG defined.
http://code.google.com/p/v8/issues/detail?id=3258
This is an issue that affects recent Chromium builds under certain
conditions.
The build fails on ARMv7/Android when compiling v8/src/arm/assembler-arm.cc
with DEBUG defined.
The line that fails is located in ConstantPoolBuilder::AddEntry:
entries_.push_back(rinfo);
It attempts to call stl::vector<RelocInfo>::push_back, where the STL is
provided by stlport.
The error generated is the following:
v8/src/allocation.h:67:9: note: static void* v8::internal::Embedded::
operator new(size_t)
v8/src/allocation.h:67:9: note: candidate expects 1 argument, 2 provided
As we're told by the error message, the problem is rooted in
v8/src/allocation.(h,cc), and is caused when BASE_EMBEDDED is defined to
expand to use of inheritance from v8::internal::Embedded.
v8::internal::Embedded defines two operators:
operator new(size_t) and
operator delete(void*)
When RelocInfo inherits from Embedded, the class defined operator
new(size_t) take presence over all overloads for ::operator new. Among them
is placement new;
::operator new(size_t, void*).
STL containers often use placement new, so it's not a surprise that the
compilation fails. The compiler fails to find the operator because it's
hidden, as the class scoped operator takes presence. See [1] and [2]
details.
The problem is easy to fix; in addition to the existing operators, define a
class scoped placement new operator in v8::internal::Embedded, preferably
by just redirecting the call to
::operator new(size_t, void*).
Any comments on this? I'm surprised that this problem hasn't surfaced
until now.
[1] http://www.gotw.ca/publications/mill15.htm
[2] http://www.gotw.ca/publications/mill16.htm
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.