Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault on several cores #46

Merged
merged 1 commit into from
Sep 22, 2018
Merged

Fix segfault on several cores #46

merged 1 commit into from
Sep 22, 2018

Conversation

garbear
Copy link
Member

@garbear garbear commented Sep 16, 2018

The segfaults occur because the core is trying to determine the ROM's base name from the path. However, when loading by memory, the libretro API says the path must be null. When noncompliant cores try to parse the null path, they segfault.

To fix this, we just set the path parameter even when loading by memory.

However, there is a potential problem: the libretro API says if path is set, it must be valid. But VFS paths are invalid, because cores can't load from Kodi's VFS. So this may cause cores to fail for ROMs on network drives.

Motivation:

Continued from libretro/beetle-gba-libretro#33.

How Has This Been Tested?

Test builds: Coming soon.

Tested on OSX with FCEUmm with local files.

Screenshots

FCEUmm no longer crashes:

fceumm

The path parameter is null according to the libretro API, but many cores
expect the frontend to set this. We adopt this behavior to guard against
noncompliant cores.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant