Skip to content

Commit 949a730

Browse files
committed
Fixed "memory access out of bounds"
1 parent 66d130f commit 949a730

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

README.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -872,27 +872,10 @@ RuntimeError: memory access out of bounds
872872

873873
Why the invalid Style Pointer `0xaaaaaaaa`?
874874

875-
Our Workaround...
875+
Because we forgot to copy the old memory in `realloc`. Duh!
876876

877-
```c
878-
static lv_style_res_t get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, lv_style_value_t * v) {
879-
...
880-
for(; i < obj->style_cnt; i++) {
881-
if (obj->styles[i].style == (void*)0xaaaaaaaa) continue;////
882-
```
883877

884-
After Workaround...
885878

886-
```text
887-
Uncaught (in promise) RuntimeError: memory access out of bounds
888-
at lv_style_reset (004a21c6:0xfc8f)
889-
at lv_obj_remove_style (004a21c6:0x504e)
890-
at lv_disp_drv_register (004a21c6:0xce04)
891-
at lv_demo_widgets (004a21c6:0x29ab3)
892-
at loop (lvglwasm.js:57:14)
893-
at main (lvglwasm.js:67:5)
894-
at lvglwasm.js:40:9
895-
```
896879

897880
TODO: How to disassemble Compiled WebAssembly with cross-reference to Source Code? See [wabt](https://github.com/WebAssembly/wabt) and [binaryen](https://github.com/WebAssembly/binaryen)
898881

0 commit comments

Comments
 (0)