Bug 1217190 - Printing is broken with e10s on OS X since a43f6bb86588
MOZ_IPC_MESSAGE_LOG=1

https://treeherder.mozilla.org/#/jobs?repo=try&revision=beb26954e340

INTERESTING. Disabling nsPrintingProxy::ShowProgress, somehow, miraculously, fixes it. What the flying hell?

Welp, let’s switch over to nsresult from status and see if that helps.

Huh… nope. :/

Okay. Now logging.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b1486659d76c

So, one possible workaround is to set print.show_print_progress to false. Let’s see if ehsan can confirm.

Yes! He can! Okay, I think we’re narrowing in. Let’s add some logging and see what we get.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=51a63253e605

AHHHH - an unitialized bool. GOT YOU. I THINK.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=eb81717eae79

DAMN IT. Ehsan broke my heart. We initialize that boolean at the start of ShowPrintProgress. SON OF A BITCH.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=de434d6f9558

Fixed (with logging): http://archive.mozilla.org/pub/firefox/try-builds/mconley@mozilla.com-450e58788309a2aa d381a027579c29f1384bc95e/try-macosx64/

Busted? (with logging): https://treeherder.mozilla.org/#/jobs?repo=try&revision=cdc54b1942e4


Working: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f447bdb63192

Not working: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e2d5d9368595

GAHHHHH. FIGURED IT OUT. Ehsan showed me the light.

This is a sad tale, where the main character is my flawed mental model of how outparams work over IPC.

I had assumed that if you passed an outparam over IPC initialized to some value, and the receiver didn't touch it, that the outparam would still have the same value when the message had returned.

This is NOT the case.

The generated IPC code on the receiver side will pass uninitialized memory to the receiving method, and then if the receiver doesn't touch it, that uninitialized memory will be passed back to the sender as the value, overwriting the initialized value that the outparam had been originally set to.

Filed bug 1220168 about that.

File bug about adding canary bits to uninitialized memory when passing outparams to message receivers - done.
Make uplift requests