You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Core is able to access the GameData any time between on_load_game (when it is passed in) until on_unload_game (when it must be returned). However the data seems to be valid only for the duration of the on_load_game call (I don't know if the libretro documentation states this explicitly anywhere). Thus the trait allows use-after-free errors. Consider the following minimal example:
A
Core
is able to access theGameData
any time betweenon_load_game
(when it is passed in) untilon_unload_game
(when it must be returned). However the data seems to be valid only for the duration of theon_load_game
call (I don't know if the libretro documentation states this explicitly anywhere). Thus the trait allows use-after-free errors. Consider the following minimal example:$ retroarch --version
RetroArch: Frontend for libretro -- v1.4.1 -- d8855ca --
$ echo blah > text.txt
$ retroarch -L target/release/libdefect.so text.txt 2>/dev/null
on_load_game: [98, 108, 97, 104, 10]
run: [0, 0, 0, 0, 0]
run: [0, 0, 0, 0, 0]
run: [0, 0, 0, 0, 0]
run: [0, 0, 0, 0, 0]
run: [0, 0, 0, 0, 0]
The text was updated successfully, but these errors were encountered: