NEW220458
Crash in JavaScriptCore after using reassigned JSContext variable
https://bugs.webkit.org/show_bug.cgi?id=220458
Summary Crash in JavaScriptCore after using reassigned JSContext variable
Maarten Engels
Reported 2021-01-08 01:00:17 PST
Created attachment 417255 [details] Xcode example program to show bug I'm using a simple wrapper around JavaScriptCore: SwiftJS (https://github.com/SusanDoggie/SwiftJS) The wrapper uses: * libjavascriptcoregtk-4.0-18 on Linux (tested on Ubuntu 20.04.1 LTS on ARM64) * "Built in" JavaScriptCore on macOS (tested on macOS 11.1 Intel) Both environments exhibit the same behaviour. Actual behaviour This wrapper crashes when trying to use an existing variable that has a new JSContext assigned. This looks like the bug described in https://bugs.webkit.org/show_bug.cgi?id=129070 but that one should already be fixed. Expected behaviour After assigning a new JSContext the old JSContext should be freed (this happens), the new one should be initialized (this also happens) and should after that be accessible just like the earlier one. (this does not happen) Steps to reproduce See attached project for an example. Just build and run the project. Now, this could be the due to a bug in the wrapper. However, the wrapper code seems simple enough, so perhaps there is a bug in JavaScriptCore? See also issue: https://github.com/SusanDoggie/SwiftJS/issues/1 Kind regards, Maarten
Attachments
Xcode example program to show bug (298.58 KB, application/zip)
2021-01-08 01:00 PST, Maarten Engels
no flags
Radar WebKit Bug Importer
Comment 1 2021-01-15 01:01:12 PST
Note You need to log in before you can comment on or make changes to this bug.