With the midi track and sound font I am using, when compiling with zig (which enables address sanitizer by default), and playing back my track, I get an error (at runtime) on this line:
|
case GEN_UINT_ADD15: ((unsigned int*)region)[offset] += amount->shortAmount<<15; return; |
I don't remember enough about the low level details of these formats to know that a value of -1 should even happen at this point. So maybe there's a content or decoding problem upstream from this line of code. But the equivalent code used to do a * 32768 instead of a << 15, which would not trip the sanitizer.
The midi content:
https://github.com/kavika13/jumpmanzero/blob/master/JumpmanAssets/sound/title.mid
The sound font:
https://github.com/kavika13/jumpmanzero/blob/master/JumpmanAssets/sound/reality_gmgs_falcomod.sf2
With the midi track and sound font I am using, when compiling with zig (which enables address sanitizer by default), and playing back my track, I get an error (at runtime) on this line:
TinySoundFont/tsf.h
Line 627 in 21f8430
I don't remember enough about the low level details of these formats to know that a value of
-1should even happen at this point. So maybe there's a content or decoding problem upstream from this line of code. But the equivalent code used to do a* 32768instead of a<< 15, which would not trip the sanitizer.The midi content:
https://github.com/kavika13/jumpmanzero/blob/master/JumpmanAssets/sound/title.mid
The sound font:
https://github.com/kavika13/jumpmanzero/blob/master/JumpmanAssets/sound/reality_gmgs_falcomod.sf2