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
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior?
There two test cases, one that passes a script by value on the command line, the second that passes the name of a script file on the command line. Here are the examples with expected behavior:
$ LD_LIBRARY_PATH=~/opt/node/lib ./embedtest -e "console.log('hello friend')"
$ LD_LIBRARY_PATH=~/opt/node/lib ./embedtest test.jsevalmachine.<anonymous>:1test.js^ReferenceError: test is not defined at evalmachine.<anonymous>:1:1 at Script.runInThisContext (node:vm:129:12) at Object.runInThisContext (node:vm:313:38) at node:embedder_main_0:1:173Node.js v19.0.1
Additional information
The first test case works if the -e option is not used. For example,
Version
19.0.1
Platform
Linux sodela-laptop-3 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
embedtest.cc
What steps will reproduce the bug?
Build node from source
git clone https://github.com/nodejs/node.git
cd node
git checkout v19.0.1
./configure --prefix=~/opt/node --shared
make install
Create and build external embedtest project
mkdir embedtest
cd embedtest
cp ~/node/test/embedding/embedtest.cc .
make
Run the test
Run the command as follows:
LD_LIBRARY_PATH=~/opt/node/lib ./embedtest
See the following sections for test cases.
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior?
There two test cases, one that passes a script by value on the command line, the second that passes the name of a script file on the command line. Here are the examples with expected behavior:
What do you see instead?
Additional information
The first test case works if the
-e
option is not used. For example,The Makefile and script file are attached.
Makefile and test.js files
makefile-and-js.zip
The text was updated successfully, but these errors were encountered: