Repository navigation
Commit 2741d83
Fix StrcmpFixed matching prefixes in the Vulkan embedder tests (flutter#192999)
`StrcmpFixed` compares `N - 1` bytes, which stops at the literal's last
character, so it matches any name the literal is a prefix of.
`"vkQueueSubmit"` also claims `"vkQueueSubmit2"`, and the test hands
back a `vkQueueSubmit` wrapper for it.
Nothing in tree resolves both today, so this is latent. A dispatcher
that does gets a function with the wrong signature called with
`vkQueueSubmit2` arguments, and segfaults in the driver. Impeller's
dispatcher resolves both — that is how I found it.
Compare `N` bytes: the terminator is part of the literal, so the match
is exact.
No new test. The existing swap tests cover it once something resolves
both names; adding a test that asserts a helper's byte count is not
worth the line.
First of six, from flutter#187525. Independent — nothing else in
the series depends on it landing first.
## Pre-launch checklist
- No API change, no docs affected.
- Existing `EmbedderTest.CanSwapOutVulkanCalls` passes (host_debug,
Linux/SwiftShader).
---------
Co-authored-by: Andy Wolff <[email protected]>1 parent fcd17d4 commit 2741d83
1 file changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 57 | | |
63 | 58 | | |
64 | | - | |
| 59 | + | |
65 | 60 | | |
66 | 61 | | |
67 | 62 | | |
| |||
72 | 67 | | |
73 | 68 | | |
74 | 69 | | |
75 | | - | |
| 70 | + | |
76 | 71 | | |
77 | 72 | | |
78 | 73 | | |
| |||
108 | 103 | | |
109 | 104 | | |
110 | 105 | | |
111 | | - | |
| 106 | + | |
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
| |||
0 commit comments