-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to libv8-node 17.x Take 2 #271
Conversation
@seanmakesgames you probably want to cherry pick a couple of commits from #261 such as: 10c4e4c d4ff19e 03aa36a |
Thanks @lloeki - By the way, there are now a HUGE amount of compiler warnings on my machine (most of them look like this). Are others seeing them?
|
The only ones I got when building
Although when building
|
After a bit of finagling; I have repro'd the segfault in the default codespace by switching to ruby 3.0 in rvm.
Not sure what to do to fix that. If you're curious and want to do some debugging too, you can spin up a codespace. |
must be my machine then. Thanks :) |
@lloeki What I want to do is test libv8 directly without any of the mini_racer code and/or ruby. Would be great to rule that code out as a source of the issue. |
My current thought here is that there are some c++ files that moved around in v8 in such a way that it all still compiles, but our libv8 construction and collation process are missing them. It is weird that it behaves differently between locales and it behaves differently between mac & linux. As a surprise to probably no-one, running the command in a browser window for the locale works fine. |
Wow that would be fantastic. I had this idea too as this would save me from cloning mini_racer when testing libv8-node (see In addition it would help with these kind of issues in discriminating whether it's |
I'm starting with a codespace at the moment (ubuntu+ruby3.0) running a Do you have a preferred or favorite c++ unit test framework? |
Note that due to how the build system is done there's no
(Yes I'm building and publishing 16.19.0 right now, which is affected as well)
Could be explained by some C pointer thing, use after free, or something like that.
Could be explained by underlying locale stuff using a different OS thing (e.g what if the locales are missing from There are too much unknowns to decide. |
Haha. indeed!
This is great. Can I use this in a context with a pre-built libv8 binary? or does it have to be in the libv8 repo after being compiled? |
I don't. The only thing I'm vaguely familiar with is whatever is used by https://github.com/datadog/libddwaf. |
looks like google test. https://github.com/DataDog/libddwaf/blob/master/tests/test.h#L23 |
It's an artifact from the build but it's not packaged. Also it's probably statically linked against libv8 so I don't think you can swap another precompiled libv8 without a pile of hacks. This should have you
|
Shoot. I didn't check out the specific branch. I'm on default branch- but luckily it's 17.3 and should repro :) |
@Fayti1703 has agreed to help out with writing some c embed code for libv8 -- @lloeki What's the branch strategy / where should we make this PR to add a c++ test in libv8? Should we start in node-17? node-16? the default branch? |
master should target latest node (which should be node-19, although I did not work on that) node-16, node-17, node-18 should be "stable-ish" branches targetting each version. I usually cherry pick changes that make sense between these branches. In this specific case I would have this added to node-16 as a base branch since it's the one that's closest to things that used to work + the one that is the current mini_racer release (and once we have things in good order, apply the changes on each branch) |
ok sweet. then we can move it around wherever it needs to go. |
Alright- we are poking around on this branch to make the test: I've got a codespace building libv8 on ubuntu again (on I'll be taking a look at this again later today. Thanks for the support! I'm sure we'll figure this out (or come up with a suitable solution) |
Thanks so much @seanmakesgames @Fayti1703! |
BTW I just pushed the last of the 16.19.0.0 gem so that one should be complete now. |
|
Correct, it does fail in the same way as 17.x and 18.x |
@Fayti1703 has confirmed that it does not reproduce in the node binary that's built, so that's great news. means we can probably fix the issue and that it exists inside libv8-node somewhere |
Did a rebase of the changes in #232 -- will be taking a look at the segfaults in locale switching introduced after 16.10
Should make 18.x #261 easier to upgrade to.