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

[Linux] - Segmentation fault under Clang/Musl build #504

Open
3 tasks done
z-erica opened this issue Mar 17, 2024 · 1 comment
Open
3 tasks done

[Linux] - Segmentation fault under Clang/Musl build #504

z-erica opened this issue Mar 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@z-erica
Copy link

z-erica commented Mar 17, 2024

Checklist

  • I am reporting exactly 1 bug with this issue.
  • This bug hasn't already been reported.
  • This bug hasn't already been fixed in the latest development build.

Bug Description

i am trying to package bambootracker for chimera linux, a new linux distribution which uses clang as its compiler toolchain and musl as its standard c library. both the v0.6.3 tag and the master branch immediately crash upon running the program with a segmentation fault.

lldb backtrace (for v0.6.3):

* thread #17, name = 'BambooTracker', stop reason = signal SIGSEGV: invalid permissions for mapped object (fault address: 0x7fffde3d3fd8)
  * frame #0: 0x000055555565a73b BambooTracker`chip::BlipResampler::interpolate(this=0x00007fffef6333f0, src=0x00007fffebe16ba0, nSamples=735, intrSize=924) at resampler.cpp:133
    frame #1: 0x000055555564b5ed BambooTracker`chip::OPNA::mix(this=0x00007fffebe16b20, stream=0x00007fffe9121080, nSamples=735) at opna.cpp:239:35
    frame #2: 0x00005555558d234f BambooTracker`OPNAController::getStreamSamples(this=0x00007fffeb312148, container=<unavailable>, nSamples=735) at opna_controller.cpp:191:23
    frame #3: 0x00005555556278b9 BambooTracker`AudioStream::generate(this=0x00007fffec7327f8, container=<unavailable>, nSamples=<unavailable>) at audio_stream.cpp:136:17
    frame #4: 0x00005555556298ac BambooTracker`AudioStreamRtAudio::initialize(unsigned int, unsigned int, unsigned int, QString const&, QString const&, QString*)::$_0::__invoke(void*, void*, unsigned int, double, unsigned int, void*) [inlined] AudioStreamRtAudio::initialize(unsigned int, unsigned int, unsigned int, QString const&, QString const&, QString*)::$_0::operator()(this=<unavailable>, outputBuffer=<unavailable>, (null)=<unavailable>, nFrames=<unavailable>, (null)=<unavailable>, (null)=<unavailable>, userData=<unavailable>) const at audio_stream_rtaudio.cpp:71:25
    frame #5: 0x00005555556298a4 BambooTracker`AudioStreamRtAudio::initialize(unsigned int, unsigned int, unsigned int, QString const&, QString const&, QString*)::$_0::__invoke(outputBuffer=<unavailable>, (null)=<unavailable>, nFrames=<unavailable>, (null)=<unavailable>, (null)=<unavailable>, userData=<unavailable>) at audio_stream_rtaudio.cpp:68:5
    frame #6: 0x00007ffff7f8ae89 librtaudio.so.7`RtApiPulse::callbackEvent() + 265
    frame #7: 0x00007ffff7f8ab1d librtaudio.so.7`pulseaudio_callback(void*) + 253

a git bisect shows b1a6d2e as the commit which introduces this crash

How to reproduce

build bambootracker normally, then run the resulting binary

System Information

  • Operating System: Chimera Linux
  • BambooTracker Version: v0.6.3
  • Build Type: local
@z-erica z-erica added the bug Something isn't working label Mar 17, 2024
@OPNA2608
Copy link
Member

clang as its compiler toolchain and musl as its standard c library

I tried to replicate that configuration, but it would require too many patches to other packages to get working on my distro. Musl support is not very widely maintained there...

  • frame #0: 0x000055555565a73b BambooTracker`chip::BlipResampler::interpolate(this=0x00007fffef6333f0, src=0x00007fffebe16ba0, nSamples=735, intrSize=924) at resampler.cpp:133

That just points at the start of that function afaict.

sample** BlipResampler::interpolate(sample** src, size_t nSamples, size_t intrSize)
{
if (srcRate_ == destRate_) return src;

Not sure how to interpret that. Is that as accurate as you can get the stack trace? Would it be possible for you to debug this any further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants