Commit 88f8553
committed
test: fix ABI conflict stress test by using loader.execute()
THE INSIGHT:
Running a raw `import numpy` directly in the host process permanently maps the C-extension (.so) into memory via `dlopen`. Once mapped, it is impossible to unload or swap in the same process.
THE FIX:
Switched the stress test to use `loader.execute(...)` instead of raw imports.
WHY IT MATTERS & THE CAVEAT:
`loader.execute` is vastly safer than raw imports when dealing with C-extensions. If Omnipkg detects a severe ABI conflict, `loader.execute` can actually heal the environment by delegating the execution payload to a daemon worker.
CRITICAL LIMITATION: You fundamentally cannot load multiple highly conflicting C-extensions (like different numpy ABIs) simultaneously in a single Python process. Delegation to a clean subprocess/daemon is the *only* way to execute them safely, and `loader.execute` provides the exact bridge to do that.1 parent e70597c commit 88f8553
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
438 | 447 | | |
439 | 448 | | |
440 | 449 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
| |||
0 commit comments