【原创】chrome已提交的两个漏洞分析(三)

[复制链接]
查看944 | 回复5 | 2022-1-28 22:16:56 | 显示全部楼层 |阅读模式
Reduction RedundancyElimination::ReduceSpeculativeNumberOperation(Node* node) {
DCHECK(node->opcode() == IrOpcode::kSpeculativeNumberAdd ||
node->opcode() == IrOpcode::kSpeculativeNumberSubtract ||
node->opcode() == IrOpcode::kSpeculativeSafeIntegerAdd ||
node->opcode() == IrOpcode::kSpeculativeSafeIntegerSubtract ||
node->opcode() == IrOpcode::kSpeculativeToNumber);
DCHECK_EQ(1, node->op()->EffectInputCount());
DCHECK_EQ(1, node->op()->EffectOutputCount());

Node* const first = NodeProperties::GetValueInput(node, 0);
Node* const effect = NodeProperties::GetEffectInput(node);
EffectPathChecks const* checks = node_checks_.Get(effect);
// If we do not know anything about the predecessor, do not propagate just yet
// because we will have to recompute anyway once we compute the predecessor.
if (checks == nullptr) return NoChange();

// Check if there's a CheckBounds operation on {first}
// in the graph already, which we might be able to
// reuse here to improve the representation selection
// for the {node} later on.
if (Node* check = checks->LookupBoundsCheckFor(first)) {
// Only use the bounds {check} if its type is better <----------[1]
// than the type of the {first} node, otherwise we
// would end up replacing NumberConstant inputs with
// CheckBounds operations, which is kind of pointless.
if (!NodeProperties::GetType(first).Is(NodeProperties::GetType(check))) {
NodeProperties::ReplaceValueInput(node, check, 0);
}
}

return UpdateChecks(node, checks);
}

为了触发ReduceSpeculativeNumberOperation函数,我们需要创造出那几个特定的节点,比如SpeculativeNumberAdd,通过x + (o.cf ? “” : 0)操作可以达到,cf是false。
#【原创】chrome已提交的两个漏洞分析(四)#
aaaa
村长黑科技是专业提供项目资源的服务的村长黑科技平台,如合购网赚项目、引流推广软件、软件程序开发等项目就选村长黑科技平台,参与或发布项目定制各种软件就来村长黑科技平台
伴我多久 | 2022-1-29 10:54:18 | 显示全部楼层
路过 帮顶 嘿嘿
aaaa
村长黑科技是专业提供项目资源的服务的村长黑科技平台,如合购网赚项目、引流推广软件、软件程序开发等项目就选村长黑科技平台,参与或发布项目定制各种软件就来村长黑科技平台
回复

使用道具 举报

68079330 | 2022-2-2 16:59:57 | 显示全部楼层
看帖要回,回帖才健康,在踩踩,楼主辛苦了!
aaaa
村长黑科技是专业提供项目资源的服务的村长黑科技平台,如合购网赚项目、引流推广软件、软件程序开发等项目就选村长黑科技平台,参与或发布项目定制各种软件就来村长黑科技平台
回复

使用道具 举报

千面萌萌 | 2022-2-3 13:29:57 | 显示全部楼层
aaaa
村长黑科技是专业提供项目资源的服务的村长黑科技平台,如合购网赚项目、引流推广软件、软件程序开发等项目就选村长黑科技平台,参与或发布项目定制各种软件就来村长黑科技平台
回复

使用道具 举报

neige | 2022-2-3 19:01:40 | 显示全部楼层
为保住菊花,这个一定得回复!
aaaa
村长黑科技是专业提供项目资源的服务的村长黑科技平台,如合购网赚项目、引流推广软件、软件程序开发等项目就选村长黑科技平台,参与或发布项目定制各种软件就来村长黑科技平台
回复

使用道具 举报

大司命 | 2022-2-4 13:46:26 | 显示全部楼层
我了个去,顶了
aaaa
村长黑科技是专业提供项目资源的服务的村长黑科技平台,如合购网赚项目、引流推广软件、软件程序开发等项目就选村长黑科技平台,参与或发布项目定制各种软件就来村长黑科技平台
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则