Skip to content

Conversation

@MADCATXXX
Copy link
Contributor

@MADCATXXX MADCATXXX commented Apr 17, 2023

In pull request #19064 variable "len" was moved to WEBSOCKET_DEBUG define, but it's used later in the function:
HEAPU32[(WS.socketEvent+8)>>2] = len;

So in case if we compile emscripten without "WEBSOCKET_DEBUG" define - value of "len" is undefined and being saved as 0 into structure on HEAP. Those websocket functionality with messages stops working.
This change was verified on our local project.

@sbc100
Copy link
Collaborator

sbc100 commented Apr 17, 2023

Nice find! I got fooled by a JS var scoping rules!

@sbc100 sbc100 enabled auto-merge (squash) April 17, 2023 16:07
@sbc100 sbc100 merged commit 354e03c into emscripten-core:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants