On 15.1.2016 10.08, Eli Zaretskii wrote: > Right, this can explain everything. It probably means that a build > configured --with-wide-int should also be tested there, as it has > different alignment needs. I'll test that as well, then. >> How should we fix this? I can write and test the fix, but I'd like to >> hear your opinion on the preferred mechanism. > > What fix did you have in mind? Over-allocating and recording the > offset in the initial part of the block that we don't pass to the > application? That was my first idea, yes. Of course, this introduces some memory overhead, especially if there are many small allocations. A proposal patch is attached. Reallocs needed some additional care, as there are two special cases to handle (source being in dumped memory, and source and destination alignments mismatching). -- Jussi Lahdenniemi