Commit Graph

3 Commits

Author SHA1 Message Date
Luis Pater
76bae1fe41 fix(pluginhost): move reload test constructors out of cgo preamble
- Move C constructor definitions and mutable test hook state from the //export cgo preamble in main.go into a dedicated hooks.c translation unit so cgo does not emit duplicate constructors.
- Append grandchild PIDs safely with pre-fork lock setup and verify exact child count and descriptor lock release during test cleanup.
- Add a cgo preprocessing regression test verifying that _cgo_export.h, _cgo_export.c, and main.cgo2.c contain no constructor definitions.

Closes: #7647
2026-11-18 20:26:44 +08:00
Luis Pater
dde469d3c2 fix(pluginhost): isolate unix plugin dlopen crashes with a preflight subprocess probe
- Run an out-of-process preflight dlopen and initialization probe before mapping dynamic plugin libraries into the host process so fatal signals such as SIGILL do not crash-loop the gateway.
- Cache only deterministic probe outcomes with bounded stderr collection and non-blocking stdio handling across inherited child descriptors.
- Pin baseline Go and CGO CPU architecture flags in the plugin example build recipe and document baseline ISA flags for prebuilt c-shared plugin releases.

Closes: #7220
2026-11-03 11:49:10 +08:00
Luis Pater
355fd10e76 feat(pluginhost): add content-addressed shadow copies for dynamic library loading
Closes: #6672
2026-10-16 12:04:22 +08:00