[Bug 1560] sparc64 [1/5]: _Objects_Extend_information improper alignment for 64-bit targets
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Wed Jun 16 12:27:56 UTC 2010
https://www.rtems.org/bugzilla/show_bug.cgi?id=1560
--- Comment #2 from Chris Johns <chrisj at rtems.org> 2010-06-16 07:27:54 ---
I think this patch is wrong if sizeof(uintptr_t) != sizeof(uint32_t). The
allocation above is for sizeof(uin32_t).
How is an array of uint32_t packed on a sparc64 ? For example if I did:
uint32_t* p = malloc (sizeof (uint32_t) * 100);
p[9] = 0;
Does the compiler handle the align issues around the 9th element ?
I assume the array is packed.
Does this mean we have a block_count that is odd ? This would cause the offset
into the table for the local_table to be aligned to a 32bit boundary.
The table is broken into:
a < void*[] >
b < uint32_t[] >
c < Objects_Name*[] >
Therefore address 'a' is aligned because malloc handles this. The address 'b'
should be aligned because sizeof(void*) should always result in an aligned
index. Address 'c' can be mis-aligned if block_size is odd. Is this what needs
to be handled ?
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list