talloc_stackframe_internal() calls SMB_THREAD_GET_TLS(global_ts) which calls smb_get_tls_pthread() in the POSIX pthread wrapper implementation.
If SMB_THREAD_SET_TLS() hasn't been called before, global_ts is NULL and smb_get_tls_pthread() dereferences it so it crashes.
Have patch, need bugnumber...
Created attachment 14308 [details]
Patch for 4.7 and 4.8 cherry-picked from master
Re-assigning to Karolin for inclusion in 4.8.next, 4.7.next.
(In reply to Jeremy Allison from comment #2)
Pushed to autobuild-v4-[8,7]-test.
Pushed to both branches.
Closing out bug report.