diff options
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/thread.c b/src/thread.c index 21f74b7696f..a8e79e8377d 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -707,8 +707,10 @@ If NAME is given, it names the new thread. */) | |||
| 707 | new_thread->event_object = Qnil; | 707 | new_thread->event_object = Qnil; |
| 708 | 708 | ||
| 709 | new_thread->m_specpdl_size = 50; | 709 | new_thread->m_specpdl_size = 50; |
| 710 | new_thread->m_specpdl = xmalloc (new_thread->m_specpdl_size | 710 | new_thread->m_specpdl = xmalloc ((1 + new_thread->m_specpdl_size) |
| 711 | * sizeof (struct specbinding)); | 711 | * sizeof (union specbinding)); |
| 712 | /* Skip the dummy entry. */ | ||
| 713 | ++new_thread->m_specpdl; | ||
| 712 | new_thread->m_specpdl_ptr = new_thread->m_specpdl; | 714 | new_thread->m_specpdl_ptr = new_thread->m_specpdl; |
| 713 | 715 | ||
| 714 | sys_cond_init (&new_thread->thread_condvar); | 716 | sys_cond_init (&new_thread->thread_condvar); |