Reviewers: danno, Sven Panne, Jakob, titzer,
Message:
PTAL
Description:
Fix crash due RegExpAtom method called on RegExpCharacterClass object.
In the RegExpUnparser::VisitText(RegExpText* that, void* data) function
always
RegExpUnparser::VisitAtom function called via
that->elements()->at(i).data.u_atom->Accept(this, data); even if the type
of the
object is RegExpCharacterClass.
The problem shows using g++ 4.7(.2, .3) since r16232, since GCC optimizes
virtual method calls to direct calls based on __final/final hints. Tested on
MIPS and x64:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000588928 in
v8::internal::RegExpUnparser::VisitAtom(v8::internal::RegExpAtom*, void*) ()
This cleans up the TextElement class to avoid the unsafe+unchecked union
access,
that caused the crash.
TEST=cctest/test-regexp/ParserRegression
Please review this at https://codereview.chromium.org/22815033/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ast.cc
M src/jsregexp.h
M src/jsregexp.cc
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.