Skip to content
  • Damien George's avatar
    py: Make sure that static emg-exc-buffer is aligned to size of mp_obj_t. · ee86de1f
    Damien George authored
    This buffer is used to allocate objects temporarily, and such objects
    require that their underlying memory be correctly aligned for their data
    type.  Aligning for mp_obj_t should be sufficient for emergency exceptions,
    but in general the memory buffer should aligned to the maximum alignment of
    the machine (eg on a 32-bit machine with mp_obj_t being 4 bytes, a double
    may not be correctly aligned).
    
    This patch fixes a bug for certain nan-boxing builds, where mp_obj_t is 8
    bytes and must be aligned to 8 bytes (even though the machine is 32 bit).
    ee86de1f