diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-12-15 22:32:32 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-12-15 22:32:32 +0900 |
| commit | c1c8c25e70a54e6a82ab8cea05c115b94eb3d5ab (patch) | |
| tree | af9eee9726539708d02d08b3b564855668997e07 /src | |
| parent | aec8eba076cde1394cce376908b93648d55fbeb9 (diff) | |
| parent | d5cb54d4df298d11158f8ff684845182dda0e3f7 (diff) | |
| download | mruby-c1c8c25e70a54e6a82ab8cea05c115b94eb3d5ab.tar.gz mruby-c1c8c25e70a54e6a82ab8cea05c115b94eb3d5ab.zip | |
Merge pull request #5223 from shuujii/ensure-initialization-of-RVALUE_zero-in-mrb_obj_alloc
Ensure initialization of `RVALUE_zero` in `mrb_obj_alloc`
Diffstat (limited to 'src')
| -rw-r--r-- | src/gc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -107,8 +107,14 @@ struct free_obj { struct RBasic *next; }; +struct RVALUE_initializer { + MRB_OBJECT_HEADER; + char padding[sizeof(void*) * 4 - sizeof(uint32_t)]; +}; + typedef struct { union { + struct RVALUE_initializer init; /* must be first member to ensure initialization */ struct free_obj free; struct RBasic basic; struct RObject object; |
