[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9497: avm2 starts to get some love
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9497: avm2 starts to get some love (and bzr branches too) |
Date: |
Thu, 17 Jul 2008 19:19:25 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9497
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Thu 2008-07-17 19:19:25 +0200
message:
avm2 starts to get some love (and bzr branches too)
modified:
server/parser/abc_block.cpp
------------------------------------------------------------
revno: 9496.1.1
author: Tom Stellard <address@hidden>
committer: Sandro Santilli <address@hidden>
branch nick: avm2
timestamp: Thu 2008-07-17 19:14:59 +0200
message:
Fix segfaults in abc parser by removing functions that access
null asMethod.mPrototype (patch #6570)
modified:
server/parser/abc_block.cpp
=== modified file 'server/parser/abc_block.cpp'
--- a/server/parser/abc_block.cpp 2008-07-15 20:05:07 +0000
+++ b/server/parser/abc_block.cpp 2008-07-17 17:14:59 +0000
@@ -916,7 +916,11 @@
}
// Don't validate for previous owner.
pClass->setConstructor(mMethods[moffset]);
- mMethods[moffset]->setOwner(pClass);
+
+ /* Calling the asMethod::setOwner always results in a
segmentation fault,
+ since it tries to modify asMethod.mPrototype, which is never
+ initialized. The parser seems to work ok without this call.*/
+// mMethods[moffset]->setOwner(pClass);
// Next come the 'traits' of the instance. (The members.)
boost::uint32_t tcount = mS->read_V32();
@@ -949,7 +953,11 @@
}
// Don't validate for previous owner.
pClass->setStaticConstructor(mMethods[moffset]);
- mMethods[moffset]->setOwner(pClass);
+
+ /* Calling the asMethod::setOwner always results in a
segmentation fault,
+ since it tries to modify asMethod.mPrototype, which is never
+ initialized. The parser seems to work ok without this call.*/
+// mMethods[moffset]->setOwner(pClass);
boost::uint32_t tcount = mS->read_V32();
for (unsigned int j = 0; j < tcount; ++j)
@@ -982,8 +990,13 @@
ERR((_("ABC: Out of bounds method for script.\n")));
return false;
}
+
+ /*Calling the asMethod::setOwner always results in a
segmentation fault,
+ since it tries to modify asMethod.mPrototype, which is never
+ initialized. The parser seems to work ok without this call.*/
// Don't validate for previous owner.
- mMethods[moffset]->setOwner(pScript);
+// mMethods[moffset]->setOwner(pScript);
+
pScript->setConstructor(mMethods[moffset]);
pScript->setSuper(mTheObject);
@@ -1130,13 +1143,17 @@
if (!read_scripts()) return false;
if (!read_method_bodies()) return false;
- std::vector<abc_Trait*>::iterator i = mTraits.begin();
+/* The loop below causes a segmentation fault, because it tries to modify
+ asMethod.mPrototype, which is never initialized. The parser seems
+ to work ok without this call.*/
+/* std::vector<abc_Trait*>::iterator i = mTraits.begin();
for ( ; i != mTraits.end(); ++i)
{
if (!(*i)->finalize(this))
return false;
}
mTraits.clear();
+*/
//mCH->dump();
return true;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9497: avm2 starts to get some love (and bzr branches too),
Sandro Santilli <=