mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-03 20:24:29 +00:00
Use max_align_t instead of void *
* src/thread.c (run_thread): Don’t assume void * is aligned enough.
This commit is contained in:
parent
eff901b8a3
commit
e2767bd010
@ -645,17 +645,12 @@ run_thread (void *state)
|
||||
{
|
||||
/* Make sure stack_top and m_stack_bottom are properly aligned as GC
|
||||
expects. */
|
||||
union
|
||||
{
|
||||
void *p;
|
||||
char c;
|
||||
} stack_pos;
|
||||
max_align_t stack_pos;
|
||||
|
||||
struct thread_state *self = state;
|
||||
struct thread_state **iter;
|
||||
|
||||
self->m_stack_bottom = &stack_pos.c;
|
||||
self->stack_top = &stack_pos.c;
|
||||
self->m_stack_bottom = self->stack_top = (char *) &stack_pos;
|
||||
self->thread_id = sys_thread_self ();
|
||||
|
||||
acquire_global_lock (self);
|
||||
|
Loading…
x
Reference in New Issue
Block a user