add force_align_arg_pointer attribute to all callback functions

* inspired by issue #404 and respective fix PR #538
* possible fix for mysterious crashes, e.g. issue #497 and http://www.proxmark.org/forum/viewtopic.php?id=5388
This commit is contained in:
pwpiwi 2018-01-31 18:31:51 +01:00
commit f921c113c9
3 changed files with 37 additions and 5 deletions

View file

@ -295,7 +295,13 @@ typedef
// wrapper function for multi-threaded lfsr_recovery32
void* nested_worker_thread(void *arg)
void
#ifdef __has_attribute
#if __has_attribute(force_align_arg_pointer)
__attribute__((force_align_arg_pointer))
#endif
#endif
*nested_worker_thread(void *arg)
{
struct Crypto1State *p1;
StateList_t *statelist = arg;
@ -309,6 +315,7 @@ void* nested_worker_thread(void *arg)
return statelist->head.slhead;
}
int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *resultKey, bool calibrate)
{
uint16_t i;