When I :w when editing a binary file with vim -b <filename>, all my marks get deleted. This is especially frustrating when undoing a change and saving and not staying on the same line that I was on before saving.
I see that you use winsaveview, it looks like that doesn't include marks. Maybe something to do with :loc or getloclist or getmarklist (although I'm not sure how to restore from these)