Skip to content

SINGLE_FILE_BINARY_ENCODE=1 crashes at run-time with "Uncaught SyntaxError: octal escape sequences can't be used in untagged template literals or in strict mode code" #25906

@suzukieng

Description

@suzukieng

Please include the following in your bug report:

Version of emscripten/emsdk:
4.0.20

Failing command line in full:
Compilation works, error is at run-time

Full link command and output with -v appended:
Even for runtime issues it helps a lot if you can include the full link command.
Adding -v to the link command will show all of the sub-commands run which
can help us diagnose your issue.

-sSINGLE_FILE=1
-sSINGLE_FILE_BINARY_ENCODE=1
-sMODULARIZE=1 
-sENVIRONMENT=web

Hi emscripten team!

I'm using the new binary encoding for SINGLE_FILE mode in my library. Some users are now reporting that they are seeing an error: Uncaught SyntaxError: octal escape sequences can't be used in untagged template literals or in strict mode code. Are there some caveats of this feature that we should be aware of, especially in bundling scenarios?

The MDN page for the syntax error is here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_octal_escape_sequence

I'm working with the user to get more information about their bundling setup and a reproducer, but that may take a while.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions