HaxeFoundation / HaxeFoundation/hxcpp

EXC_BAD_ACCESS in ArrayBase::Realloc on iOS after updating to 4.2.1

Open
#957 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

A bit of a shot in a dark here, but any suggestions would be very helpful.

We've been experimenting with updating from Haxe/HXCPP `4.1.5` to `4.2.2/4.2.1`, at which point we started getting a very frequent crash on iOS devices, but only in release mode (*seems* fine in debug).

This appears to occur most frequently (but not 100%) here in the realloc. The game code at the this point is doing a lot of work (loading the world) so maybe some memory pressure, but nothing excessive.

I appreciate this is wildly vague, but any ideas?

```hx::ArrayBase::Realloc:
0x104864608 <+0>: stp x22, x21, [sp, #-0x30]!
0x10486460c <+4>: stp x20, x19, [sp, #0x10]
0x104864610 <+8>: stp x29, x30, [sp, #0x20]
0x104864614 <+12>: add x29, sp, #0x20 ; =0x20
0x104864618 <+16>: mov x21, x1
0x10486461c <+20>: mov x19, x0
0x104864620 <+24>: ldr w8, [x0, #0x10]
0x104864624 <+28>: add w22, w8, #0x10 ; =0x10
0x104864628 <+32>: ldr x8, [x0]
EXC_BAD_ACCESS -> 0x10486462c <+36>: ldr x8, [x8, #0x110]
0x104864630 <+40>: blr x8
0x104864634 <+44>: mov x20, x0
0x104864638 <+48>: mul w2, w0, w21
0x10486463c <+52>: cmp w22, w21
0x104864640 <+56>: b.ge 0x10486466c ; <+100>
0x104864644 <+60>: ldr x1, [x19, #0x18]
0x104864648 <+64>: cbz x1, 0x1048646d4 ; <+204>
0x10486464c <+68>: ldr w8, [x19, #0x10]
0x104864650 <+72>: tbnz w8, #0x1f, 0x1048646f4 ; <+236>
0x104864654 <+76>: ldr w8, [x19, #0xc]
0x104864658 <+80>: mul w0, w8, w20
0x10486465c <+84>: mov w3, #0x0
0x104864660 <+88>: bl 0x1048a811c ; hx::InternalRealloc(int, void*, int, bool)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.