Curious runtime issue. All function arguments are undefined

13 views
Skip to first unread message

Jeremy Ong

unread,
Apr 9, 2017, 8:02:08 PM4/9/17
to v8-users
I am compiling on Linux on a regular intel x64 processor. After following the build instructions using GN, the v8_sample_shell process works in addition to the other sample programs as intended.

However, when I try to compile things on my own, linking to all the libv8_* and icu libraries, everything compiles correctly but I get the following strange result:

V8 version 5.9.0 (candidate) [sample shell]
> function a(x) { return x + 5; }
> a(3)
NaN

The exact same snippet using the v8_sample_process gives me the correct output of 8. I've verified with more experimentation that seemingly all function arguments become "undefined" with the version I've compiled. What gives? Am I missing a compile definition or step somewhere?


Jeremy Ong

unread,
Apr 9, 2017, 8:20:51 PM4/9/17
to v8-users
Another thing worth noting is that if I link against the shared libraries, the problem mysteriously vanishes which tells me there's some other link-time magic that needs to happen in order to make the static libraries work.
Reply all
Reply to author
Forward
0 new messages