fix: teardown UAF in Track block cache and headless test/render environment
- Track: new InputDisconnectedEvent trims blocks_/block_array_indexes_ when a block edge is removed outside the Track's own operations (block deletion, undo commands detaching a whole track). Previously blocks_ kept dangling pointers and Project teardown crashed in track_length() (ASan heap-use-after-free in oakengine_timeline_edit / oakengine_sync). The persistent array map is intentionally not rewritten so undo of remove_track can re-attach the clips; replace_block guards the handler with ignore_block_disconnect_ - filefunctions: honor OAK_CONFIG_DIR to redirect the configuration root; QStandardPaths ignores XDG_* on macOS, so the engine tests read the real user config (a stale 0.1.x file) and failed frame-rate assertions. All engine tests now set OAK_CONFIG_DIR to their tmpdir - init test: chdir to the fixture directory before loading project_with_footage.ove so the engine's moved-project footage relocation does not rewrite the stored relative filename - renderworkerpool: do not let the render worker inherit QT_QPA_PLATFORM=offscreen from a headless host process; the worker needs a real platform GL context and exited immediately otherwise, failing oak_cli_transcode
This commit is contained in:
@@ -922,6 +922,7 @@ TEST(OakEngineEvents, Main)
|
||||
EXPECT_TRUE(setenv("XDG_CONFIG_HOME", g_tmpdir, 1) == 0);
|
||||
EXPECT_TRUE(setenv("XDG_CACHE_HOME", g_tmpdir, 1) == 0);
|
||||
EXPECT_TRUE(setenv("XDG_DATA_HOME", g_tmpdir, 1) == 0);
|
||||
EXPECT_TRUE(setenv("OAK_CONFIG_DIR", g_tmpdir, 1) == 0);
|
||||
#endif
|
||||
|
||||
EXPECT_TRUE(oakengine_init(OAKENGINE_INIT_HEADLESS) == OAKENGINE_OK);
|
||||
|
||||
Reference in New Issue
Block a user