mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #5223 from shuujii/ensure-initialization-of-RVALUE_zero-in-mrb_obj_alloc
Ensure initialization of `RVALUE_zero` in `mrb_obj_alloc`
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user