<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>212887</bug_id>
          
          <creation_ts>2020-06-07 20:14:54 -0700</creation_ts>
          <short_desc>Invalid escape sequence with a non-octal-eight</short_desc>
          <delta_ts>2020-06-08 14:21:18 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jefferson Junior">junior.jefferson</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ross.kirsling</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1660118</commentid>
    <comment_count>0</comment_count>
    <who name="Jefferson Junior">junior.jefferson</who>
    <bug_when>2020-06-07 20:14:54 -0700</bug_when>
    <thetext>Hi everyone,
maybe is a case of an invalid numeric escape (non-octal-eight) in strict mode, but the same occurs using the strict mode and without it. Is this an expected behavior of JavaScriptCore? (implementation-dependent)

version: 262693
OS: Linux Ubuntu 19.10 x64

Steps to reproduce:

print(`\8`);
Actual results:

SyntaxError: untagged template literal contains invalid escape sequence
Expected results:

8
The same occurs in strict mode

&quot;use strict&quot;;
print(`\8`);
V8, SpiderMonkey, Chakra works as expected.

cinfuzz</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660354</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2020-06-08 13:39:59 -0700</bug_when>
    <thetext>Based on the spec:
https://tc39.es/ecma262/#sec-literals-string-literals
https://tc39.es/ecma262/#sec-additional-syntax-string-literals
https://tc39.es/ecma262/#sec-template-literal-lexical-components
https://tc39.es/ecma262/#sec-static-semantics-template-early-errors

It would appear that our behavior is correct -- namely, it&apos;s only non-template strings that should support numeric escapes other than &apos;\0&apos;.

If so, then the thing to do here would be to add test262 cases for the other engines to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660357</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2020-06-08 13:40:45 -0700</bug_when>
    <thetext>(In reply to Ross Kirsling from comment #1)
&gt; It would appear that our behavior is correct -- namely, it&apos;s only
&gt; non-template strings that should support numeric escapes other than &apos;\0&apos;.

Oops, I ended my sentence too early. Should be &quot;... in sloppy mode.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660386</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2020-06-08 14:21:18 -0700</bug_when>
    <thetext>Closing here but opened https://github.com/tc39/test262/issues/2653 for the remaining work.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>