You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll leave the issue open for a few days so @luyahan can chime in but, as this is a bug in V8's riscv backend, Node's bug tracker isn't really the right place to report or discuss it.
It appears it wasn't an issue in the V8 backend for a specific platform, but rather a miscompilation by GCC of V8. It's still not completely clear whether there may be either UB or ill-advised code in V8, but GCC's fixed it on their side. As of writing, it's not yet been backported. Thanks.
Version
v19.8.1
Platform
Linux kxxt 6.2.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 07 Apr 2023 02:10:43 +0000 riscv64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
pacman -S base-devel asp npm nodejs
git clone https://github.com/go-gitea/gitea -b release/v1.18 --depth=1 && cd gitea
npm i
npx lessc web_src/less/index.less out
How often does it reproduce? Is there a required condition?
100%. No condition is required.
What is the expected behavior? Why is that the expected behavior?
The generated css can be found in file
out
andlessc
exit with code 0.This is the behavior on x86_64 platform so it is the expected behavior.
What do you see instead?
Additional information
By adding some logging :
node_modules/less/lib/less/less-error.js
to show the stack trace.var LessError = function (e, fileContentMap, currentFilename) { Error.call(this); var filename = e.filename || currentFilename; this.message = e.message; this.stack = e.stack; if (fileContentMap && filename) { + console.log("Trace: ", e.stack);
node_modules/less/lib/less/parser/parser.js
We can get the following output:
Output
It seems that
catch
innode_modules/less/lib/less/parser/parser.js
didn't catch the exception because there are no "Caught Exception" in the log._fileInfo
on string"!important"
seems to be successful because "OK" is logged.There are some failed jstest on riscv64 due to
Missing expected exception
. Maybe it is caused by the same error.The nodejs build recipe used on arch riscv64
The nodejs-v8-jit-fix.patch is equivalient to #47399
This issue is also reproducible with JIT disabled:
NODE_OPTIONS=--jitless npx lessc web_src/less/index.less out
The text was updated successfully, but these errors were encountered: