Commit d562f5d
Phase 116.1: Fix Clang 15 sign-conversion errors in span accessors
Fixed implicit sign conversion errors when using std::span with integer indices.
Changed loop variables from 'int' to 'size_t' where used as span indices.
Files modified:
- src/core/ldebug.cpp: Fixed 3 functions (luaG_getfuncline, nextline, changedline,
collectvalidlines) to use size_t for span indexing
- src/objects/ltable.cpp: Fixed NodeArray::allocate overflow check
- src/serialization/lundump.cpp: Fixed loadConstants, loadUpvalues, loadDebug
to use size_t loop variables
Critical fix in luaG_getfuncline: Changed loop from 'i < pc' to 'i <= pc' to
match original while(basepc++ < pc) semantics (process indices basepc+1 through pc inclusive).
All tests passing with GCC 13 and Clang 15 in Release and Debug modes.
Performance: 2.26-2.56s (well within target ≤4.33s)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent bf12327 commit d562f5d
File tree
3 files changed
+17
-18
lines changed- src
- core
- objects
- serialization
3 files changed
+17
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | | - | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
303 | | - | |
| 304 | + | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| |||
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| |||
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
331 | | - | |
| 332 | + | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| |||
953 | 954 | | |
954 | 955 | | |
955 | 956 | | |
956 | | - | |
| 957 | + | |
957 | 958 | | |
958 | | - | |
| 959 | + | |
| 960 | + | |
959 | 961 | | |
960 | 962 | | |
961 | 963 | | |
962 | | - | |
| 964 | + | |
963 | 965 | | |
964 | 966 | | |
965 | 967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | 216 | | |
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
221 | 220 | | |
222 | 221 | | |
223 | 222 | | |
224 | | - | |
| 223 | + | |
225 | 224 | | |
226 | 225 | | |
227 | 226 | | |
| |||
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
281 | | - | |
282 | 280 | | |
283 | 281 | | |
284 | 282 | | |
| |||
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | | - | |
| 288 | + | |
291 | 289 | | |
292 | 290 | | |
293 | 291 | | |
| |||
297 | 295 | | |
298 | 296 | | |
299 | 297 | | |
300 | | - | |
301 | 298 | | |
302 | 299 | | |
303 | 300 | | |
| |||
330 | 327 | | |
331 | 328 | | |
332 | 329 | | |
333 | | - | |
| 330 | + | |
334 | 331 | | |
335 | 332 | | |
336 | 333 | | |
| |||
339 | 336 | | |
340 | 337 | | |
341 | 338 | | |
342 | | - | |
| 339 | + | |
343 | 340 | | |
344 | 341 | | |
345 | 342 | | |
| |||
0 commit comments