Skip to content

Commit

Permalink
Add _pad field to frame_descr_long to ensure frame_size is aligned
Browse files Browse the repository at this point in the history
instead of relying on the C compiler to insert it.
  • Loading branch information
gretay-js committed Oct 20, 2022
1 parent ec43e50 commit f607750
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ocaml/runtime/caml/stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ typedef struct {

typedef struct {
uintnat retaddr;
unsigned short marker; /* frame_size_long */
unsigned short marker; /* LONG_FRAME_MARKER */
unsigned short _pad; /* Ensure frame_size is 4-byte aligned */
uint32_t frame_size;
uint32_t num_live;
uint32_t live_ofs[1 /* num_live */];
Expand Down

0 comments on commit f607750

Please sign in to comment.