Commit b83a6ac
fix(lora): address CodeRabbit OOM and cancellation issues
- LoraViewModel: add ensureActive() in download loop so coroutine
cancellation is respected during blocking stream reads
- lora_registry: check all rac_strdup results in deep_copy_lora_entry
to prevent silent partial copies on OOM; use calloc for
compatible_model_ids array and set count before fill loop so
free_lora_entry can safely clean up on partial failure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 9ccc748 commit b83a6ac
2 files changed
Lines changed: 16 additions & 4 deletions
File tree
- examples/android/RunAnywhereAI/app/src/main/java/com/runanywhere/runanywhereai/presentation/lora
- sdk/runanywhere-commons/src/infrastructure/model_management
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| 215 | + | |
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
| |||
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | | - | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
48 | 59 | | |
49 | | - | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| |||
0 commit comments