[v8-users] Is it safe to reuse code cache generated before a context snapshot is serialized?

2022-02-21 Thread jo...@igalia.com
Hi, I am running into a bug and I am not sure if it's caused by inappropriate usage of the SnapshotCreator API or a bug in V8. This was an issue discovered when working on the user land snapshot prototype in Node.js (https://github.com/nodejs/node/pull/38905), the upstream issue is https://g

[v8-users] Re: Is it safe to reuse code cache generated before a context snapshot is serialized?

2022-02-21 Thread jo...@igalia.com
}; return result; }; ''.replace(re, '$') !== '7'; ``` ``` 'use strict'; var chars = ('a'+'#').split(''); var entity = {}; for (var c of chars) { entity[c] = true; } ``` On Tuesday, February 22, 2022 at 3:39:48 AM UTC+8 jo...@igalia.co

Re: [v8-users] Re: Is it safe to reuse code cache generated before a context snapshot is serialized?

2022-03-15 Thread jo...@igalia.com
e/context snapshot; > and neither contain serialized Code (Bytecode is possible though). > > It does sound like snapshots are getting confused somewhere, resulting in > broken object graphs. Not sure what exactly is going wrong though. Have you > tried recreating the code cache as well in

Re: [v8-users] Re: Is it safe to reuse code cache generated before a context snapshot is serialized?

2022-03-15 Thread jo...@igalia.com
Correction: in the snippet in the last reply, the comment `// This crashes with the stack trace below` should be `// This crashes with the stack trace above`. On Wednesday, March 16, 2022 at 4:10:33 AM UTC+8 jo...@igalia.com wrote: > > > Have you tried recreating the code cache as wel

Re: [v8-users] Re: Is it safe to reuse code cache generated before a context snapshot is serialized?

2022-03-18 Thread jo...@igalia.com
> on how to compile and run the repro? > > On Tue, Mar 15, 2022 at 9:12 PM jo...@igalia.com wrote: > >> Correction: in the snippet in the last reply, the comment `// This >> crashes with the stack trace below` should be `// This crashes with the >> stack trace above`.