Uh oh!
There was an error while loading. Please reload this page.
Update to libv8-node 17.x Take 2 - #271
Conversation
lloeki
commented
Jan 8, 2023
@seanmakesgames you probably want to cherry pick a couple of commits from #261 such as: 10c4e4cd4ff19e03aa36a |
seanmakesgames
commented
Jan 8, 2023
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 |
seanmakesgames
commented
Jan 8, 2023
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. |
seanmakesgames
commented
Jan 8, 2023
must be my machine then. Thanks :) |
seanmakesgames
commented
Jan 8, 2023
@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. |
seanmakesgames
commented
Jan 8, 2023
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. |
lloeki
commented
Jan 8, 2023
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 |
seanmakesgames
commented
Jan 8, 2023
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? |
lloeki
commented
Jan 8, 2023
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. |
seanmakesgames
commented
Jan 8, 2023
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? |
lloeki
commented
Jan 8, 2023
I don't. The only thing I'm vaguely familiar with is whatever is used by https://github.com/datadog/libddwaf. |
seanmakesgames
commented
Jan 8, 2023
looks like google test. https://github.com/DataDog/libddwaf/blob/master/tests/test.h#L23 |
lloeki
commented
Jan 8, 2023
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 |
seanmakesgames
commented
Jan 8, 2023
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) |
seanmakesgames
commented
Jan 8, 2023
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) |
lloeki
commented
Jan 8, 2023
Thanks so much @seanmakesgames@Fayti1703! |
lloeki
commented
Jan 8, 2023
BTW I just pushed the last of the 16.19.0.0 gem so that one should be complete now. |
seanmakesgames
commented
Jan 8, 2023
|
lloeki
commented
Jan 8, 2023
Correct, it does fail in the same way as 17.x and 18.x |
seanmakesgames
commented
Jan 8, 2023
@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.