libretro / blastem

Upstream tracking repo of BlastEm, the fast and accurate Genesis emulator, with libretro specific changes
https://www.retrodev.com/blastem/
GNU General Public License v3.0
54 stars 25 forks source link

blastem is linking against the wrong debug_message function ? #36

Open barbudreadmon opened 3 years ago

barbudreadmon commented 3 years ago

My setup is an up-to-date Gentoo Linux x86_64.

note : it might be a duplicate of https://github.com/libretro/blastem/issues/15 since i'm getting the same error message :

[INFO] Did not find a valid content patch.
Erreur de segmentation (core dumped)

Using gdb i get this :

(gdb) bt
#0  0x00007ffff35cf849 in debug_message () at /usr/lib64/libsmbconf.so.0
#1  0x00007fffef92da06 in configure_rom (rom_db=0x555556107a20, vrom=0x5555562668f0, rom_size=1048576, lock_on=0x0, lock_on_size=0, base_map=0x7fffef9b19a0 <base_map>, base_chunks=4) at romdb.c:910
#2  0x00007fffef8d8423 in alloc_config_genesis (rom=0x5555562668f0, rom_size=1048576, lock_on=0x0, lock_on_size=0, ym_opts=0, force_region=0 '\000') at genesis.c:2075
#3  0x00007fffef8d1486 in alloc_config_system (stype=SYSTEM_GENESIS, media=0x7fffef9b6c00 <current_media>, opts=0, force_region=0 '\000') at system.c:71
#4  0x00007fffef8d08bc in retro_load_game (game=0x555556109580) at libblastem.c:266

So apparently It is happening because debug_message calls aren't using the function in util.c, instead some function in /usr/lib64/libsmbconf.so.0 (some samba library i guess) is used. I have no explanation for this, and it happens with both buildbot's core and self-built core.

Renaming debug_message fixes the crash.