Skip to content

Commit b9dd5cd

Browse files
LiedtkeV8-internal LUCI CQ
authored andcommitted
DetectMissingBuiltins: Skip type coercion functions valueOf and toString
Bug: 487347678 Change-Id: I2157fdb4904c8cd5886c8cf9c3f230cab85fdd76 Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/9078877 Auto-Submit: Matthias Liedtke <mliedtke@google.com> Commit-Queue: Michael Achenbach <machenbach@google.com> Reviewed-by: Michael Achenbach <machenbach@google.com>
1 parent 2be4eeb commit b9dd5cd

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Sources/FuzzilliDetectMissingBuiltins/main.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,14 @@ func checkNode(_ nodeId: Int, path: [String]) {
168168
}
169169
}
170170

171-
// Each function has a name and a length property. We don't really care about them, so filter
172-
// them out.
173-
let propertyData = node.properties.filter {($0.key != "name" && $0.key != "length") || node.type != "function"}
171+
let propertyData = node.properties.filter {
172+
// Each function has a name and a length property. We don't really care about them, so filter
173+
// them out.
174+
(($0.key != "name" && $0.key != "length") || node.type != "function")
175+
// These conversion functions exist on a large amount of objects. The interesting part is
176+
// calling them during type coercion which will happen automatically.
177+
&& $0.key != "valueOf" && $0.key != "toString"
178+
}
174179
for (prop, propertyRef) in propertyData {
175180
let (childId, isGetter) = (propertyRef.id, propertyRef.isGetter)
176181

0 commit comments

Comments
 (0)