Repository navigation
Commit ac46c17
committed
fix(pipeline): bind field_type_hint by owning QN segment, not substring
try_field_type_hint accepted any candidate whose qualified name merely
CONTAINED the hinted type name. A single-letter receiver (f.Close(),
hint "F") matched almost every same-named candidate - the method name
itself included - and rebound a call whose resolution had already
failed to an arbitrary project symbol at confidence 0.85, presented as
the one weak strategy the Go selector guard deliberately trusts.
Require the candidate's owning dot-segment - the segment immediately
before the method - to EQUAL the hinted type (or its I-prefixed
interface form). The intended variable-named-after-its-type case keeps
resolving (lrp_go_s8_field_type_hint stays green); the fabricated
bindings lose their only anchor and fall back to the weak short-name
strategies the guards already handle.
Measured on a real ~1150-file Go repo (with the DeusData#1906/DeusData#1909/DeusData#1910
fixes applied): field_type_hint 1484 -> 356 CALLS edges, the
single-character-receiver class 376 -> 0, Go->C/C++ targets 34 -> 0,
and no other strategy absorbed the removed edges. 63 edges moved to
the interface that declares the method instead of an arbitrary
implementation.
Fixes DeusData#1927
Signed-off-by: Ilya Brykau <ilya.brykau@orca.security>1 parent adff62e commit ac46c17
2 files changed
Lines changed: 145 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2092 | 2092 | | |
2093 | 2093 | | |
2094 | 2094 | | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
2095 | 2118 | | |
2096 | 2119 | | |
2097 | 2120 | | |
| |||
2131 | 2154 | | |
2132 | 2155 | | |
2133 | 2156 | | |
2134 | | - | |
| 2157 | + | |
| 2158 | + | |
2135 | 2159 | | |
2136 | 2160 | | |
2137 | 2161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4886 | 4886 | | |
4887 | 4887 | | |
4888 | 4888 | | |
| 4889 | + | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
| 4897 | + | |
| 4898 | + | |
| 4899 | + | |
| 4900 | + | |
| 4901 | + | |
| 4902 | + | |
| 4903 | + | |
| 4904 | + | |
| 4905 | + | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
| 4945 | + | |
| 4946 | + | |
| 4947 | + | |
| 4948 | + | |
| 4949 | + | |
| 4950 | + | |
| 4951 | + | |
| 4952 | + | |
| 4953 | + | |
| 4954 | + | |
| 4955 | + | |
| 4956 | + | |
| 4957 | + | |
| 4958 | + | |
| 4959 | + | |
| 4960 | + | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
| 4983 | + | |
| 4984 | + | |
| 4985 | + | |
| 4986 | + | |
| 4987 | + | |
| 4988 | + | |
| 4989 | + | |
| 4990 | + | |
| 4991 | + | |
| 4992 | + | |
| 4993 | + | |
| 4994 | + | |
| 4995 | + | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
| 5005 | + | |
| 5006 | + | |
| 5007 | + | |
4889 | 5008 | | |
4890 | 5009 | | |
4891 | 5010 | | |
| |||
13310 | 13429 | | |
13311 | 13430 | | |
13312 | 13431 | | |
| 13432 | + | |
13313 | 13433 | | |
13314 | 13434 | | |
13315 | 13435 | | |
| |||
0 commit comments