../../../flutter/third_party/dart/runtime/vm/virtual_memory_posix.cc: 428: error: mprotect failed: 13 (Permission denied) version=3.6.0 (stable) (Thu Dec 5 07:46:24 2024 -0800) on "ios_arm64" pid=3252, thread=259, isolate_group=vm-isolate(0x107205400), isolate=vm-isolate(0x107369000) os=ios, arch=arm64, comp=no, sim=no isolate_instructions=108e375a0, vm_instructions=108e375a0 fp=16bb19560, sp=16bb19540, pc=109889864 pc 0x0000000109889864 fp 0x000000016bb19560 Dart_DumpNativeStackTrace+0x18 pc 0x000000010943aeb8 fp 0x000000016bb19580 dart::Assert::Fail(char const*, ...) const+0x30 pc 0x0000000109536100 fp 0x000000016bb19a30 dart::Code::FinalizeCode(dart::FlowGraphCompiler*, dart::compiler::Assembler*, dart::Code::PoolAttachment, bool, dart::CodeStatistics*)+0x82c pc 0x00000001095f51c8 fp 0x000000016bb1a040 dart::StubCode::Init()+0x31c pc 0x0000000109485c30 fp 0x000000016bb1ab00 dart::Dart::DartInit(Dart_InitializeParams const*)+0x2a9c pc 0x0000000109870310 fp 0x000000016bb1ab20 Dart_Initialize+0x3c pc 0x0000000108f1aaf4 fp 0x000000016bb1b0f0 flutter::DartVM::Create(flutter::Settings const&, fml::RefPtr<flutter::DartSnapshot const>, fml::RefPtr<flutter::DartSnapshot const>, std::_fl::shared_ptr<flutter::IsolateNameServer>)+0x1d60 pc 0x00000001093f17dc fp 0x000000016bb1b850 flutter::Shell::Create(flutter::PlatformData const&, flutter::TaskRunners const&, flutter::Settings, std::_fl::function<std::_fl::unique_ptr<flutter::PlatformView, std::_fl::default_delete<flutter::PlatformView>> (flutter::Shell&)> const&, std::_fl::function<std::_fl::unique_ptr<flutter::Rasterizer, std::_fl::default_delete<flutter::Rasterizer>> (flutter::Shell&)> const&, bool)+0x310 pc 0x0000000108e3b060 fp 0x000000016bb1c5c0 -[FlutterEngine createShell:libraryURI:initialRoute:]+0x934 pc 0x0000000108e42c4c fp 0x000000016bb1c630 -[FlutterViewController sharedSetupWithProject:initialRoute:]+0x1cc pc 0x0000000108e42a58 fp 0x000000016bb1c660 -[FlutterViewController awakeFromNib]+0x58具体原理就是在于:从目前 iOS 18.4 beta 上看,iOS 加强了对应用运行时修改内存权限的限制,也就是上面出现mprotect failed: 13 (Permission denied)的原因。
3.混合模式执行,其中 App 通过 AOT/JIT 签名编译,并且仅解释修改后的代码