fix(bid-ffi): Fix HostVtable lifetime issue causing segfault
🚨 Critical memory safety fix: - HostVtable was created on stack and destroyed after init - Plugin stored reference to destroyed memory → NULL pointer access - Changed to static LazyLock storage for lifetime safety ✅ Results: - Segfault completely eliminated - Plugin logging now works properly - Type info system confirmed working - Full E2E FileBox plugin operation successful 🔧 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -72,6 +72,14 @@ enum Commands {
|
||||
#[arg(short, long, default_value = "Hello TLV Debug!")]
|
||||
message: String,
|
||||
},
|
||||
/// Validate plugin type information against nyash.toml
|
||||
Typecheck {
|
||||
/// Path to plugin .so file
|
||||
plugin: PathBuf,
|
||||
/// Path to nyash.toml configuration file
|
||||
#[arg(short, long, default_value = "../../nyash.toml")]
|
||||
config: PathBuf,
|
||||
},
|
||||
}
|
||||
|
||||
// ============ Host Functions (テスト用実装) ============
|
||||
|
||||
Reference in New Issue
Block a user