Fix regression in 0.10.x: fix type for is_detached#1123
Fix regression in 0.10.x: fix type for is_detached#1123bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
Conversation
| int __gc_ref_count; /* corresponds to header.ref_count */ | ||
| uint8_t __gc_mark; /* corresponds to header.mark/gc_obj_type */ | ||
| bool is_detached; | ||
| uint8_t is_detached; |
There was a problem hiding this comment.
Ah... do IUC that sizeof(bool) > sizeof(char) on ppc?
There was a problem hiding this comment.
Bool is 4 bytes in ppc ABI.
There was a problem hiding this comment.
It took me a while to understand how this could've happened because it's from a change we picked from bellard/quickjs...
...but looks like @saghul changed the uint8_t in commit bellard/quickjs@9bd10d8 to a bool, not realizing JSVarRef is aliased as JSGCObjectHeader (and I didn't catch that during review either.)
LGTM but I'll merge this with a commit log explaining the above.
| int __gc_ref_count; /* corresponds to header.ref_count */ | ||
| uint8_t __gc_mark; /* corresponds to header.mark/gc_obj_type */ | ||
| bool is_detached; | ||
| uint8_t is_detached; |
There was a problem hiding this comment.
It took me a while to understand how this could've happened because it's from a change we picked from bellard/quickjs...
...but looks like @saghul changed the uint8_t in commit bellard/quickjs@9bd10d8 to a bool, not realizing JSVarRef is aliased as JSGCObjectHeader (and I didn't catch that during review either.)
LGTM but I'll merge this with a commit log explaining the above.
This fixes regression in 0.10.0, see: #1122
Subsequent segfault still remains, but it also happens with 0.9.0 and 0.8.0.
@andrjohns @bnoordhuis