Hi folks, 

Looks like this happened during our adoption of the BrowserEngine API. I have a 
PR to fix it https://github.com/WebKit/WebKit/pull/27587

There was also an unrelated build breakage for the JSCOnly port, which I also 
fixed in that PR.

Cheers,
Keith

> On Apr 22, 2024, at 11:53 AM, Alexey Proskuryakov <a...@webkit.org> wrote:
> 
> + Keith for visibility
> 
>> 16 апр. 2024 г., в 3:01 PM, Steve Glass via webkit-dev 
>> <webkit-dev@lists.webkit.org> написал(а):
>> 
>> Hi,
>> 
>>> Hi, I’m trying to build jsc on my M1 Mac following the instructions at
>>> https://trac.webkit.org/wiki/JSCOnly and 
>>> https://webkit.org/getting-started/ .
>>> However when I run the built binary it exits immediately with a bus error
>>> which lldb shows to be EXC_BAD_ACCESS.
>> 
>> I'm also trying to build JSC on my M1 Mac and my experience is the exact 
>> same error as Laurence has reported above.
>> 
>> When I run I get a bus error at the same location in the code:
>> 
>>> [27467]>DYLD_FRAMEWORK_PATH=/users/stevie/git/WebKit/WebKitBuild/JSCOnly/Debug
>>>  lldb WebKitBuild/JSCOnly/Debug/bin/jsc 
>>> (lldb) target create "WebKitBuild/JSCOnly/Debug/bin/jsc"
>>> Current executable set to 
>>> '/Users/stevie/git/WebKit/WebKitBuild/JSCOnly/Debug/bin/jsc' (arm64).
>>> (lldb) target create Web
>>> Available completions:
>>>     WebKitBuild/       
>>>     WebDriverTests/    
>>>     WebKit.xcworkspace/
>>>     WebKitLibraries/   
>>>     Websites/          
>>> (lldb) target create WebKitBuild/JSCOnly/Debug/b
>>> Available completions:
>>>     WebKitBuild/JSCOnly/Debug/bmalloc/                
>>>     WebKitBuild/JSCOnly/Debug/bin/                    
>>>     WebKitBuild/JSCOnly/Debug/build-webkit-options.txt
>>> (lldb) target create WebKitBuild/JSCOnly/Debug/bin/jsc 
>>> Current executable set to 
>>> '/Users/stevie/git/WebKit/WebKitBuild/JSCOnly/Debug/bin/jsc' (arm64).
>>> (lldb) run
>>> Process 86562 launched: 
>>> '/Users/stevie/git/WebKit/WebKitBuild/JSCOnly/Debug/bin/jsc' (arm64)
>>> Process 86562 stopped
>>> * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
>>> (code=2, address=0x133804000)
>>>     frame #0: 0x000000018696f248 libsystem_platform.dylib`_platform_memmove 
>>> + 168
>>> libsystem_platform.dylib`:
>>> ->  0x18696f248 <+168>: stp    q2, q3, [x0]
>>>     0x18696f24c <+172>: subs   x2, x2, #0x40
>>>     0x18696f250 <+176>: b.ls <http://b.ls/>   0x18696f26c               ; 
>>> <+204>
>>>     0x18696f254 <+180>: stp    q0, q1, [x3]
>>> Target 1: (jsc) stopped.
>> 
>> This is what 'image list' reports at this point:
>>  
>>> (lldb) image list
>>> [  0] 7A464963-87D0-342F-BF0D-B030FC8488D4 0x0000000100000000 
>>> /Users/stevie/git/WebKit/WebKitBuild/JSCOnly/Debug/bin/jsc 
>>> [  1] F6DD3EC2-85A4-3AB1-8486-B189CD980EBE 0x00000001865b0000 /usr/lib/dyld 
>>> [  2] BDD21D2C-3C16-3379-9501-D64F8AFA3C0E 0x000000010781c000 
>>> /Users/stevie/git/WebKit/WebKitBuild/JSCOnly/Debug/lib/JavaScriptCore.framework/Versions/1.0.0/JavaScriptCore
>>>  
>>> [  3] A356C2AE-08AC-30C6-B3D2-89535B87B958 0x00000001d1096000 
>>> /usr/lib/libedit.3.dylib 
>>> [  4] 27A49F84-CD29-3448-BE8C-ED4240A78C9C 0x00000001b06d7000 
>>> /usr/lib/libncurses.5.4.dylib 
>>> [  5] BE250157-7A2B-39DA-B404-983D7989DFC6 0x00000001935ae000 
>>> /usr/lib/libSystem.B.dylib 
>>> [  6] C0BCBAE5-4913-3D80-8E3A-9D4DEC1EA827 0x00000001935a8000 
>>> /usr/lib/system/libcache.dylib 
>>> [  7] 0BA453ED-E5A2-3C2F-86F4-CFCFFA6C1879 0x0000000193563000 
>>> /usr/lib/system/libcommonCrypto.dylib 
>>> [  8] DE476BC5-36E2-3F7A-87C8-1EF2BE6ADFDA 0x000000019358f000 
>>> /usr/lib/system/libcompiler_rt.dylib 
>>> [  9] 3DF60503-459B-3DA5-BD91-E72518FA9370 0x0000000193585000 
>>> /usr/lib/system/libcopyfile.dylib 
>>> [ 10] 95C1D199-1B36-32B2-9BE7-5723A58D0D96 0x00000001866a4000 
>>> /usr/lib/system/libcorecrypto.dylib 
>>> [ 11] 7F973554-8168-35BF-AE86-2E9123E81BF7 0x000000018678a000 
>>> /usr/lib/system/libdispatch.dylib 
>>> [ 12] 72199A80-9C55-376D-8ECF-EE68AFA57B7A 0x0000000186945000 
>>> /usr/lib/system/libdyld.dylib 
>>> [ 13] 291CFCDE-CF87-3F39-A3E3-36C4303BEC16 0x000000019359e000 
>>> /usr/lib/system/libkeymgr.dylib 
>>> [ 14] DD2A9F47-7F80-344C-B6FE-82682F8AAB4A 0x000000019353b000 
>>> /usr/lib/system/libmacho.dylib 
>>> [ 15] 158A39C2-F9C6-32CA-845B-F1DFB711718A 0x0000000192a1c000 
>>> /usr/lib/system/libquarantine.dylib 
>>> [ 16] 92A7E10F-1F6C-30D5-9C44-D42352D3A674 0x000000019359b000 
>>> /usr/lib/system/libremovefile.dylib 
>>> [ 17] B8B21C7C-4530-3EA2-AB35-BA98B82F33D0 0x000000018c0bc000 
>>> /usr/lib/system/libsystem_asl.dylib 
>>> [ 18] E9F1A3B9-AE38-3F4C-BF14-8A6E012AD36C 0x0000000186639000 
>>> /usr/lib/system/libsystem_blocks.dylib 
>>> [ 19] 49477E07-E77B-332F-B98D-79CA210A866D 0x00000001867d5000 
>>> /usr/lib/system/libsystem_c.dylib 
>>> [ 20] 2EA02C23-E13C-39AE-B850-82CEABACE7A6 0x0000000193593000 
>>> /usr/lib/system/libsystem_collections.dylib 
>>> [ 21] D57D8736-2800-3066-82D4-C433A2DC10C4 0x0000000191bf6000 
>>> /usr/lib/system/libsystem_configuration.dylib 
>>> [ 22] C9DB5B40-6F90-348A-A518-3ACFB49B39FE 0x0000000190c34000 
>>> /usr/lib/system/libsystem_containermanager.dylib 
>>> [ 23] 324A6A0A-BBDE-3257-9A75-6A74C85E3430 0x00000001931d2000 
>>> /usr/lib/system/libsystem_coreservices.dylib 
>>> [ 24] 8DB1E11F-85AB-3699-AD96-228BE7D8C715 0x0000000189d5b000 
>>> /usr/lib/system/libsystem_darwin.dylib 
>>> [ 25] 0395D567-DBD9-3F03-A9E0-A0969963A834 0x000000024d32a000 
>>> /usr/lib/system/libsystem_darwindirectory.dylib 
>>> [ 26] 4D030E4B-27FC-3C22-8467-A8CAFECA7761 0x000000019359f000 
>>> /usr/lib/system/libsystem_dnssd.dylib 
>>> [ 27] 6C663441-D4D5-361C-ABE7-B68D7B6E5B9B 0x000000024d32e000 
>>> /usr/lib/system/libsystem_eligibility.dylib 
>>> [ 28] D8AF5585-B9E4-38C0-B48B-CFD5C13DEB82 0x00000001867d2000 
>>> /usr/lib/system/libsystem_featureflags.dylib 
>>> [ 29] 615EAFA2-4446-3994-89E9-858A0552F1B8 0x0000000186973000 
>>> /usr/lib/system/libsystem_info.dylib 
>>> [ 30] 9735ABAE-2939-30EB-90D4-C6F23F795B2F 0x0000000193500000 
>>> /usr/lib/system/libsystem_m.dylib 
>>> [ 31] B36EAAD5-558D-39E8-AB0D-FD87F2EF154B 0x000000018674d000 
>>> /usr/lib/system/libsystem_malloc.dylib 
>>> [ 32] EBACF63D-8B18-37FF-8952-85FD99605BD7 0x000000018c02a000 
>>> /usr/lib/system/libsystem_networkextension.dylib 
>>> [ 33] EDCEB984-2FC8-3EB5-9016-3453A3DDEE8F 0x000000018a1d1000 
>>> /usr/lib/system/libsystem_notify.dylib 
>>> [ 34] 2F95044C-6CEF-3731-B1B9-F7D6A51B3A3F 0x0000000191bfb000 
>>> /usr/lib/system/libsystem_sandbox.dylib 
>>> [ 35] EEA82D78-5036-3A22-8DC6-4E131A57941B 0x000000024d332000 
>>> /usr/lib/system/libsystem_sanitizers.dylib 
>>> [ 36] 11D0DCC2-FC9F-3E2C-B2CF-0662E64DC96D 0x0000000193598000 
>>> /usr/lib/system/libsystem_secinit.dylib 
>>> [ 37] 2A91FD2C-4CEF-3211-A025-7A1C0A8C2DB5 0x00000001868fd000 
>>> /usr/lib/system/libsystem_kernel.dylib 
>>> [ 38] 031F3E8C-5227-3138-A444-68174C1C28CF 0x000000018696b000 
>>> /usr/lib/system/libsystem_platform.dylib 
>>> [ 39] 45239F06-CC53-36D0-9933-7776AC7EA2FA 0x0000000186938000 
>>> /usr/lib/system/libsystem_pthread.dylib 
>>> [ 40] 372ACDF1-29E7-34DA-B035-BD7671EB5A8B 0x000000018daaa000 
>>> /usr/lib/system/libsystem_symptoms.dylib 
>>> [ 41] 681EBF40-B321-364A-88EA-04AB45E3DA66 0x0000000186689000 
>>> /usr/lib/system/libsystem_trace.dylib 
>>> [ 42] 31BBAE83-7FFD-30A6-8BFC-6D5D17A6CC82 0x0000000193571000 
>>> /usr/lib/system/libunwind.dylib 
>>> [ 43] C43D5322-9B69-37EE-B51E-45FDE5D81B5B 0x000000018663e000 
>>> /usr/lib/system/libxpc.dylib 
>>> [ 44] 4FED965B-18AD-3A4F-8928-1F0A3C35345F 0x00000001868e1000 
>>> /usr/lib/libc++abi.dylib 
>>> [ 45] 76C8305C-4066-390C-8F3E-F0858D756AD8 0x0000000186560000 
>>> /usr/lib/libobjc.A.dylib 
>>> [ 46] 3FE71C4F-17CC-3B93-AE29-05CE7D116F1B 0x000000019357d000 
>>> /usr/lib/liboah.dylib 
>>> [ 47] 08C4329E-407F-310B-B037-75A8020B2963 0x0000000186854000 
>>> /usr/lib/libc++.1.dylib 
>>> [ 48] 50DE7E22-A040-3E0F-836E-BEF36B36EC01 0x0000000189a94000 
>>> /usr/lib/libicucore.A.dylib 
>>> (lldb) 
>> 
>> ...and the backtrace at the point of crash looks like this:
>> 
>>> (lldb) bt
>>> * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
>>> (code=2, address=0x133804000)
>>>   * frame #0: 0x000000018696f248 libsystem_platform.dylib`_platform_memmove 
>>> + 168
>>>     frame #1: 0x000000010798f984 
>>> JavaScriptCore`JSC::performJITMemcpy(dst=0x0000000133804000, 
>>> src=0x00000001010300c0, n=64) at ExecutableAllocator.h:147:12
>>>     frame #2: 0x000000010797ef60 JavaScriptCore`void 
>>> JSC::LinkBuffer::copyCompactAndLinkCode<unsigned 
>>> int>(this=0x000000016fdfeb60, macroAssembler=0x000000016fdfec40, 
>>> effort=JITCompilationMustSucceed) at LinkBuffer.cpp:433:9
>>>     frame #3: 0x000000010797e1c4 
>>> JavaScriptCore`JSC::LinkBuffer::linkCode(this=0x000000016fdfeb60, 
>>> macroAssembler=0x000000016fdfec40, effort=JITCompilationMustSucceed) at 
>>> LinkBuffer.cpp:475:5
>>>     frame #4: 0x00000001079bee10 
>>> JavaScriptCore`JSC::LinkBuffer::LinkBuffer(this=0x000000016fdfeb60, 
>>> macroAssembler=0x000000016fdfec40, ownerUID=0xffffffffffffffff, 
>>> profile=Thunk, effort=JITCompilationMustSucceed) at LinkBuffer.h:117:9
>>>     frame #5: 0x0000000108a0c29c 
>>> JavaScriptCore`JSC::LinkBuffer::LinkBuffer(this=0x000000016fdfeb60, 
>>> macroAssembler=0x000000016fdfec40, ownerUID=0xffffffffffffffff, 
>>> profile=Thunk, effort=JITCompilationMustSucceed) at LinkBuffer.h:116:5
>>>     frame #6: 0x0000000108ec280c 
>>> JavaScriptCore`JSC::LLInt::defaultCallThunk()::$_14::operator()(this=0x000000016fdfef17)
>>>  const at LLIntThunks.cpp:340:20
>>>     frame #7: 0x0000000108ec2718 
>>> JavaScriptCore`decltype(std::declval<JSC::LLInt::defaultCallThunk()::$_14>()())
>>>  
>>> std::__1::__invoke[abi:un170006]<JSC::LLInt::defaultCallThunk()::$_14>(__f=0x000000016fdfef17)
>>>  at invoke.h:340:25
>>>     frame #8: 0x0000000108ec26f4 JavaScriptCore`void 
>>> std::__1::__call_once_param<std::__1::tuple<JSC::LLInt::defaultCallThunk()::$_14&&>>::__execute[abi:un170006]<>(this=0x000000016fdfeed0,
>>>  (null)=__tuple_indices<> @ 0x000000016fdfee2f) at mutex:632:9
>>>     frame #9: 0x0000000108ec26c8 
>>> JavaScriptCore`std::__1::__call_once_param<std::__1::tuple<JSC::LLInt::defaultCallThunk()::$_14&&>>::operator()[abi:un170006](this=0x000000016fdfeed0)
>>>  at mutex:624:9
>>>     frame #10: 0x0000000108ec25c8 JavaScriptCore`void 
>>> std::__1::__call_once_proxy[abi:un170006]<std::__1::tuple<JSC::LLInt::defaultCallThunk()::$_14&&>>(__vp=0x000000016fdfeed0)
>>>  at mutex:660:5
>>>     frame #11: 0x000000018686ae44 
>>> libc++.1.dylib`std::__1::__call_once(unsigned long volatile&, void*, void 
>>> (*)(void*)) + 180
>>>     frame #12: 0x0000000108eb4ce0 JavaScriptCore`void 
>>> std::__1::call_once[abi:un170006]<JSC::LLInt::defaultCallThunk()::$_14>(__flag=0x000000010ae2af68,
>>>  __func=0x000000016fdfef17) at mutex:677:9
>>>     frame #13: 0x0000000108e9b704 
>>> JavaScriptCore`JSC::LLInt::defaultCallThunk() at LLIntThunks.cpp:309:5
>>>     frame #14: 0x0000000108e9a9b8 JavaScriptCore`JSC::LLInt::defaultCall() 
>>> at LLIntEntrypoint.cpp:198:16
>>>     frame #15: 0x0000000108e9a87c JavaScriptCore`JSC::LLInt::initialize() 
>>> at LLIntData.cpp:264:36
>>>     frame #16: 0x00000001091ba7b8 
>>> JavaScriptCore`JSC::initialize()::$_12::operator()(this=0x000000016fdff0ff) 
>>> const at InitializeThreading.cpp:121:9
>>>     frame #17: 0x00000001091ba6c0 
>>> JavaScriptCore`decltype(std::declval<JSC::initialize()::$_12>()()) 
>>> std::__1::__invoke[abi:un170006]<JSC::initialize()::$_12>(__f=0x000000016fdff0ff)
>>>  at invoke.h:340:25
>>>     frame #18: 0x00000001091ba69c JavaScriptCore`void 
>>> std::__1::__call_once_param<std::__1::tuple<JSC::initialize()::$_12&&>>::__execute[abi:un170006]<>(this=0x000000016fdff0c0,
>>>  (null)=__tuple_indices<> @ 0x000000016fdff01f) at mutex:632:9
>>>     frame #19: 0x00000001091ba670 
>>> JavaScriptCore`std::__1::__call_once_param<std::__1::tuple<JSC::initialize()::$_12&&>>::operator()[abi:un170006](this=0x000000016fdff0c0)
>>>  at mutex:624:9
>>>     frame #20: 0x00000001091ba570 JavaScriptCore`void 
>>> std::__1::__call_once_proxy[abi:un170006]<std::__1::tuple<JSC::initialize()::$_12&&>>(__vp=0x000000016fdff0c0)
>>>  at mutex:660:5
>>>     frame #21: 0x000000018686ae44 
>>> libc++.1.dylib`std::__1::__call_once(unsigned long volatile&, void*, void 
>>> (*)(void*)) + 180
>>>     frame #22: 0x0000000109191860 JavaScriptCore`void 
>>> std::__1::call_once[abi:un170006]<JSC::initialize()::$_12>(__flag=0x000000010ae2b7f0,
>>>  __func=0x000000016fdff0ff) at mutex:677:9
>>>     frame #23: 0x00000001091917f4 JavaScriptCore`JSC::initialize() at 
>>> InitializeThreading.cpp:73:5
>>>     frame #24: 0x000000010000987c jsc`jscmain(argc=1, 
>>> argv=0x000000016fdff440) at jsc.cpp:4361:5
>>>     frame #25: 0x0000000100009680 jsc`main(argc=1, argv=0x000000016fdff440) 
>>> at jsc.cpp:3541:15
>>>     frame #26: 0x00000001865b60e0 dyld`start + 2360
>>> (lldb) 
>> 
>> 
>> My software versions are different to those reported by Laurence:
>> 
>>   Versions:
>> 
>>     - WebKit main (9dc3f9d6339)
>>     - Xcode 15.3 (15E204a)
>>     - macOS 14.4.1
>>     - CMake.app 3.24.4
>> 
>> I run the tests for JSC using 'Tools/Scripts/run-javascriptcore-tests 
>> --jsc-only --debug --no-build --no-fail-fast' and it is reporting bus errors 
>> everywhere. I've tried pulling newer versions of webkit but this error has 
>> persisted for the last couple of weeks.
>> 
>> Thanks
>> 
>> Steve
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev@lists.webkit.org
>> https://lists.webkit.org/mailman/listinfo/webkit-dev
> 

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to