[Bug 216206] editors/openoffice-4 and editors/openoffice-devel: fails to build with clang 4.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jan 27 18:14:25 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216206

--- Comment #20 from Don Lewis <truckman at FreeBSD.org> ---
Another piece of the puzzle is --enable-debug.  The new operator is overridden
to call allocate(), which in turn calls rtl_allocateMemory(), which either
calls malloc() or uses the internal allocator code, depending on the
--with-alloc setting.

Inside allocate() the allocation size (n) is adjusted by n = rTraits.size (n). 
If --enable-debug is set, then the size is increased by 8 bytes.  Then the
pointer returned by rtl_allocateMemory() is adjusted by rTraits.init (p), which
writes a signature to the first 8 bytes of the memory block and increments the
pointer by 8.

When the memory is freed, the pointer is decremented by 8 bytes and the
signature is checked before calling rtl_freeMemory().

Basically even if rtl_allocateMemory() always returns a properly aligned block
of memory, --enable-debug will break things if 16 byte alignment is needed.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-office mailing list