|
1 |
| -// Code generated by https://github.com/gagliardetto/codebox. DO NOT EDIT. |
| 1 | +// Code partially generated by https://github.com/gagliardetto/codebox, with manual additions |
| 2 | +// for atomic.Pointer and Uintptr, as well as atomic.Value's Swap method. |
2 | 3 |
|
3 | 4 | package main
|
4 | 5 |
|
@@ -99,6 +100,73 @@ func TaintStepTest_SyncAtomicValueStore_B0I0O0(sourceCQL interface{}) interface{
|
99 | 100 | return intoValue631
|
100 | 101 | }
|
101 | 102 |
|
| 103 | +func TaintStepTest_SyncAtomicValueSwap(sourceCQL interface{}) interface{} { |
| 104 | + fromInterface598 := sourceCQL.(interface{}) |
| 105 | + var intoValue631 atomic.Value |
| 106 | + intoValue631.Swap(fromInterface598) |
| 107 | + return intoValue631 |
| 108 | +} |
| 109 | + |
| 110 | +func TaintStepTest_SyncAtomicValueSwap2(sourceCQL interface{}) interface{} { |
| 111 | + fromValue246 := sourceCQL.(atomic.Value) |
| 112 | + intoInterface898 := fromValue246.Swap("clean") |
| 113 | + return intoInterface898 |
| 114 | +} |
| 115 | + |
| 116 | +func TaintStepTest_SyncAtomicPointerLoad_B0I0O0(sourceCQL interface{}) interface{} { |
| 117 | + fromValue246 := sourceCQL.(atomic.Pointer[string]) |
| 118 | + intoInterface898 := fromValue246.Load() |
| 119 | + return intoInterface898 |
| 120 | +} |
| 121 | + |
| 122 | +func TaintStepTest_SyncAtomicPointerStore_B0I0O0(sourceCQL interface{}) interface{} { |
| 123 | + fromInterface598 := sourceCQL.(*string) |
| 124 | + var intoValue631 atomic.Pointer[string] |
| 125 | + intoValue631.Store(fromInterface598) |
| 126 | + return intoValue631 |
| 127 | +} |
| 128 | + |
| 129 | +func TaintStepTest_SyncAtomicPointerSwap(sourceCQL interface{}) interface{} { |
| 130 | + fromInterface598 := sourceCQL.(*string) |
| 131 | + var intoValue631 atomic.Pointer[string] |
| 132 | + intoValue631.Swap(fromInterface598) |
| 133 | + return intoValue631 |
| 134 | +} |
| 135 | + |
| 136 | +func TaintStepTest_SyncAtomicPointerSwap2(sourceCQL interface{}) interface{} { |
| 137 | + fromValue246 := sourceCQL.(atomic.Pointer[string]) |
| 138 | + clean := "Clean" |
| 139 | + intoInterface898 := fromValue246.Swap(&clean) |
| 140 | + return intoInterface898 |
| 141 | +} |
| 142 | + |
| 143 | +func TaintStepTest_SyncAtomicUintptrLoad_B0I0O0(sourceCQL interface{}) interface{} { |
| 144 | + fromValue246 := sourceCQL.(atomic.Uintptr) |
| 145 | + intoInterface898 := fromValue246.Load() |
| 146 | + return intoInterface898 |
| 147 | +} |
| 148 | + |
| 149 | +func TaintStepTest_SyncAtomicUintptrStore_B0I0O0(sourceCQL interface{}) interface{} { |
| 150 | + fromInterface598 := sourceCQL.(uintptr) |
| 151 | + var intoValue631 atomic.Uintptr |
| 152 | + intoValue631.Store(fromInterface598) |
| 153 | + return intoValue631 |
| 154 | +} |
| 155 | + |
| 156 | +func TaintStepTest_SyncAtomicUintptrSwap(sourceCQL interface{}) interface{} { |
| 157 | + fromInterface598 := sourceCQL.(uintptr) |
| 158 | + var intoValue631 atomic.Uintptr |
| 159 | + intoValue631.Swap(fromInterface598) |
| 160 | + return intoValue631 |
| 161 | +} |
| 162 | + |
| 163 | +func TaintStepTest_SyncAtomicUintptrSwap2(sourceCQL interface{}) interface{} { |
| 164 | + fromValue246 := sourceCQL.(atomic.Uintptr) |
| 165 | + clean := "Clean" |
| 166 | + intoInterface898 := fromValue246.Swap(uintptr(unsafe.Pointer(&clean))) |
| 167 | + return intoInterface898 |
| 168 | +} |
| 169 | + |
102 | 170 | func RunAllTaints_SyncAtomic() {
|
103 | 171 | {
|
104 | 172 | source := newSource(0)
|
@@ -170,4 +238,54 @@ func RunAllTaints_SyncAtomic() {
|
170 | 238 | out := TaintStepTest_SyncAtomicValueStore_B0I0O0(source)
|
171 | 239 | sink(13, out)
|
172 | 240 | }
|
| 241 | + { |
| 242 | + source := newSource(14) |
| 243 | + out := TaintStepTest_SyncAtomicValueSwap(source) |
| 244 | + sink(14, out) |
| 245 | + } |
| 246 | + { |
| 247 | + source := newSource(15) |
| 248 | + out := TaintStepTest_SyncAtomicValueSwap2(source) |
| 249 | + sink(15, out) |
| 250 | + } |
| 251 | + { |
| 252 | + source := newSource(16) |
| 253 | + out := TaintStepTest_SyncAtomicPointerLoad_B0I0O0(source) |
| 254 | + sink(16, out) |
| 255 | + } |
| 256 | + { |
| 257 | + source := newSource(17) |
| 258 | + out := TaintStepTest_SyncAtomicPointerStore_B0I0O0(source) |
| 259 | + sink(17, out) |
| 260 | + } |
| 261 | + { |
| 262 | + source := newSource(18) |
| 263 | + out := TaintStepTest_SyncAtomicPointerSwap(source) |
| 264 | + sink(18, out) |
| 265 | + } |
| 266 | + { |
| 267 | + source := newSource(19) |
| 268 | + out := TaintStepTest_SyncAtomicPointerSwap2(source) |
| 269 | + sink(19, out) |
| 270 | + } |
| 271 | + { |
| 272 | + source := newSource(20) |
| 273 | + out := TaintStepTest_SyncAtomicUintptrLoad_B0I0O0(source) |
| 274 | + sink(20, out) |
| 275 | + } |
| 276 | + { |
| 277 | + source := newSource(21) |
| 278 | + out := TaintStepTest_SyncAtomicUintptrStore_B0I0O0(source) |
| 279 | + sink(21, out) |
| 280 | + } |
| 281 | + { |
| 282 | + source := newSource(22) |
| 283 | + out := TaintStepTest_SyncAtomicUintptrSwap(source) |
| 284 | + sink(22, out) |
| 285 | + } |
| 286 | + { |
| 287 | + source := newSource(23) |
| 288 | + out := TaintStepTest_SyncAtomicUintptrSwap2(source) |
| 289 | + sink(23, out) |
| 290 | + } |
173 | 291 | }
|
0 commit comments