🔎 搜索词
你好
这是来自 fuzzing crashes discussion 和 the first debug failure report 的另一个跟进工单
搜索词:
transpileModule
debug failure
- crash
checkImportMetaProperty
🕗 版本与回归信息
- 这是一次崩溃
- 我正在使用的版本是:
5.3.0
,或者更具体地说是提交了 08d6df0813e9a2227afb26721e1f64ef0a402f6e 的版本
⏯ Playground链接
- 无响应*
💻 代码
const ts = require("typescript");
const hex_string = "2c726270726f746f74797065326f746f747970656201000000000000053c7b746f3b6f74796f6a7375747270726f3b6f747970652d7c7b7c3c7b643c7c3c7f004005041274747375747270726f3b70652d72742a40283c7f7f61776169747f7f7670652d7c7b7c3c7b643c7c3c7f000005045b1274747375743170726f3b70652d7c28696d706f72742a40283c7f7f5f7f7f7f7f00000061776169747f7f7661727b067b636f6e7374727563746f722e70726f746f7439707b6f6a737574722c726f3b6f747970652d7c7b7c3c7b643c7c3c7f000005041274747375747270726f63617f3d045f523c6e7b5b233c7c213c7576616e0a726c3c696d706f726c742e7d0c3c696d706f72742e7d0c7b746f7b746f5c5c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c745c74733d3d2b3333333328732e2e73706f726c742e7d0c3c696d706f72742e7d0c7b743d083e28732c08006172756e6b6e6f776e747275270b100d2e70726f746f7479707b7c3c7b743c7c3c5100007b7b75740b00000000652e0030002a00002c000000120c0b50000000007273000005041274747375740470726f3b7f7f7f7f7f7f7f2e283c7f7f61776169747f7f7670650d2d7c7b7c3c7b643c7c3c7f0000050412747473757432707211440f742c637b6f127d3d7b0500000000000000742c637b6f127d3d7b05000000000000007a21593a";
const input = hex_string.match(/.{1,2}/g).map(byte => String.fromCharCode(parseInt(byte, 16))).join('');
ts.transpileModule(input, {});
🙁 实际行为
TypeScript/node_modules/typescript/lib/typescript.js:119406
throw e;
^
Error: Debug Failure. False expression: Containing file is missing import meta node flag.
at checkImportMetaProperty (TypeScript/node_modules/typescript/lib/typescript.js:74543:13)
at checkMetaProperty (TypeScript/node_modules/typescript/lib/typescript.js:74506:16)
at checkExpressionWorker (TypeScript/node_modules/typescript/lib/typescript.js:77249:18)
at checkExpression (TypeScript/node_modules/typescript/lib/typescript.js:77138:34)
at maybeCheckExpression (TypeScript/node_modules/typescript/lib/typescript.js:76222:30)
at BinaryExpressionStateMachine.onRight (TypeScript/node_modules/typescript/lib/typescript.js:76186:18)
at Array.right (TypeScript/node_modules/typescript/lib/typescript.js:27825:36)
at trampoline (TypeScript/node_modules/typescript/lib/typescript.js:27591:44)
at TypeScript/node_modules/typescript/lib/typescript.js:76116:24
at checkExpressionWorker (TypeScript/node_modules/typescript/lib/typescript.js:77261:18)
Node.js v18.16.0
🙂 预期行为
不会导致 Node.js 运行时崩溃
关于问题的附加信息
- 无响应*
4条答案
按热度按时间ttp71kqs1#
我得到了两个不同的减少重复的答案$x_1a_0b_1^x$.
oymdgrw72#
yrdbyhpb3#
为了我自己的将来参考
izj3ouym4#
哦,有趣!我这边无法复现其他跟踪。猜想这使得这个问题更加相关👍。