Overview
| Artifact ID: | 114096f6e237569240a86cc2afaa3db48d64b791 |
|---|---|
| Ticket: | 2184717fffffffffffffffffffffffffffffffff
unaligned malloc() -> Tcl panic |
| User & Date: | cc_benny on 2008-10-25 00:10:34 |
Changes
- icomment:
> However, EF is a useful tool, I'm sure it is. I haven't used it before, but I have heard about it. > and this aspect of its brokenness is essential to how it > functions. I just downloaded ElectricFence to understand what you mean. From the manual page it seems that this exact issue is addressed by its configuration parameter EF_ALIGNMENT and the section in the manual "WORD-ALIGNMENT AND OVERRUN DETECTION". To counteract the problem posed in that section, Tcl_Alloc could round up every allocation to a multiple of sizeof(void*) before calling malloc. OTOH setting EF_ALIGNMENT=8 seems to have the exact same effect (on a 64 bit system) without requiring changes to Tcl. That seems to me to be the better option. Or did you have some other change in mind that is not just equivalent to EF_ALIGNMENT=8?
- login: "cc_benny"
- mimetype: "text/plain"
- username: "cc_benny"