Hi Noam,
I have a meta-question that originated from this bug. I was able to reproduce this bug on an emacs session run in gdb and I even used the -ggdb3 -O3 switches when building emacs. But I was unable to get any backtrace[1] like you do here[2].
Any tips to what I am doing wrong here? [1] has details on what I tried to do in gdb to get the backtrace.
[1]:
http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00629.html