Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
windows/svc: align stack in servicemain before calling syscall
I noticed that we call syscall in servicemain without aligning stack. That is against Windows rules, so align the stack as required. I tried running this code with specifically non-aligned stack (I aligned stack, and then subtracted 1 from SP) on my Windows 10 to test this change. But it makes no difference on my Windows 10 PC - I built and run golang.org/x/sys/windows/svc/example, and it runs successfully regardless of stack alignment. But alignment might make difference on other computers. Maybe fixes golang/go#40160 Change-Id: I351f7f730fba4aa6dc409a79de4ad737b4a0a7d4 Reviewed-on: https://go-review.googlesource.com/c/sys/+/246317 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
- Loading branch information