Reviewers: Jakob, danno, Christian Plesner Hansen, Benedikt Meurer, Paul
Lind, kisg, palfia,
Description:
Fix call of finalized virtual function.
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 comes up using g++ 4.7(.2, .3) sice r16232. Tested on MIPS and
x64:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000588928 in
v8::internal::RegExpUnparser::VisitAtom(v8::internal::RegExpAtom*, void*) ()
BUG=
TEST=cctest/test-regexp/ParserRegression
Please review this at https://codereview.chromium.org/22799023/
SVN Base: https://github.com/v8/v8.git@gbl
Affected files:
M src/ast.cc
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index
8f69bd705923b7e9136d3881ebffca5f4507d9e8..3c968528dde6dad95edb0da3fa94213772d6cc6d
100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -967,7 +967,8 @@ void* RegExpUnparser::VisitText(RegExpText* that, void*
data) {
stream()->Add("(!");
for (int i = 0; i < that->elements()->length(); i++) {
stream()->Add(" ");
- that->elements()->at(i).data.u_atom->Accept(this, data);
+
static_cast<RegExpTree*>(that->elements()->at(i).data.u_atom)->Accept(
+ this, data);
}
stream()->Add(")");
}
--
--
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.