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
my_av_info gets malloc'd once on program init (although not in retro_init), then when retro_unload_game is called it gets free'd... and since it's never malloc'd again a subseqent retro_unload_game call causes it to free that pointer again which expectingly crashes.
So, presumably my_av_info doesn't need to be free'd until deinit instead of in retro_unload_game...?
Why it doesn't crash in RetroArch is surely pure luck (perhaps RetroArch doesn't call retro_unload_game, which is surely a bug). The core allocates my_av_info globally but then frees it locally; whether free should be in retro_unload_game or retro_deinit is fairly a moot point; allocating my_av_info should be in retro_load_game or retro_init (depending on where free is).
keithbowes
added a commit
to keithbowes/tgbdual-libretro
that referenced
this issue
Jul 5, 2024
For whatever reason, this isn't (apparently) a problem in RetroArch but crashes in BizHawk and presumably other frontends.
So, presumably my_av_info doesn't need to be free'd until deinit instead of in retro_unload_game...?
original issue from BizHawk's repo: TASEmulators/BizHawk#3250
The text was updated successfully, but these errors were encountered: