forked from len0rd/rockbox
Fix non aligned crashes with tlsf
When the starting address of the plugin buffer is not aligned to 8 bytes crashes occur in tlsf (on ARM atleast) Change-Id: I655500c25e1c8f84b4a2418e9ec5c5948e4bea82
This commit is contained in:
parent
321de68b21
commit
e1475a38ef
2 changed files with 4 additions and 2 deletions
|
|
@ -921,7 +921,8 @@ int plugin_load(const char* plugin, const void* parameter)
|
|||
return -1;
|
||||
}
|
||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||
plugin_size = hdr->end_addr - pluginbuf;
|
||||
/* tlsf crashes observed on arm with 0x4 aligned addresses */
|
||||
plugin_size = ALIGN_UP(hdr->end_addr - pluginbuf, 0x8);
|
||||
#else
|
||||
plugin_size = 0;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue