Skip to content

Undefined behaviour / Sanitizer warnings #47

Description

@mrdudz

so... apparently we have a spurious crash in VICE which tracks down to libresidfp. I am not entirely ruling out this is a problem specific to VICE - but it doesn't look like it.

I am not sure what kind of info you need to pinpoint the problem, so here is what i found so far:

Valgrind warnings, see https://vice-emu.pokefinder.org/wiki/Grinding#ReSIDfp

Sanitizer warnings (if you build VICE yourself, configure with --enable-sanitizer on Linux): when starting VICE we always see something like this:

../../src/lib/libresidfp/src/ExternalFilter.h:138:30: runtime error: left shift of negative value -2513
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../src/lib/libresidfp/src/ExternalFilter.h:138:30 

And here is a backtrace of this occasional crash: https://sourceforge.net/p/vice-emu/bugs/_discuss/thread/ed4c8271d0/5b03/attachment/console_and_backtrace.txt

#0  0x0000000000000000 in ?? ()
#1  0x00007ffc13776f38 in ?? () from /c/Utils/GTK3VICE/bin/libwinpthread-1.dll
#2  0x00007ff68bddd843 in __gthread_once (__once=0x7ff68c7e9320 <reSIDfp::flag6581>, __func=<optimized out>) at C:/msys64/mingw64/include/c++/15.2.0/x86_64-w64-mingw32/bits/gthr-default.h:746
#3  std::call_once<reSIDfp::FilterModelConfig6581::getInstance()::<lambda()> > (__once=..., __f=...) at C:/msys64/mingw64/include/c++/15.2.0/mutex:918
#4  reSIDfp::FilterModelConfig6581::getInstance () at src/FilterModelConfig6581.cpp:95
#5  0x00007ff68bdd88f9 in reSIDfp::Filter6581::Filter6581 (this=0x5f5faa0) at src/Filter6581.h:352
#6  reSIDfp::SID::SID (this=this@entry=0x5f5b390) at src/SID.cpp:152

Really no idea what is going there - maybe you have more luck or even insight :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ReadyAvailable in main

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions