STINNER Victor added the comment:
Oops, the original code is:
---
/* Pack the frame_t structure to reduce the memory footprint on 64-bit
architectures: 12 bytes instead of 16. This optimization might produce
SIGBUS on architectures not supporting unaligned memory accesses (64-bit
IPS CPU?): on such architecture, the structure must not be packed. */
#pragma pack(4)
typedef struct
#ifdef __GNUC__
__attribute__((packed))
#endif
{
PyObject *filename;
int lineno;
} frame_t;
---
"#pragma pack(4)" is for Microsoft Visual Studio. For GCC, there is already the
"__attribute__((packed))" line. See attached workaround tracemalloc_gcov.patch.
But I would interested to understand why it does crash. It might be a GCC or
gcov bug.
----------
keywords: +patch
Added file: http://bugs.python.org/file33638/tracemalloc_gcov.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20354>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com