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

SIGABRT in IsFileNotFound #373

Closed
riggs- opened this Issue Oct 16, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@riggs-
Contributor

riggs- commented Oct 16, 2018

We have another instance of issue #41 on FreeBSD (reproducible e.g. with clang6 on i386):
IsFileNotFound() in src/input/Error.hxx is declared gcc_pure but it executes std::rethrow_exception(ep);

Thus it dies with SIGABRT on the first startup when no database exists yet. Can we remove the gcc_pure?

@riggs-

This comment has been minimized.

Contributor

riggs- commented Oct 16, 2018

This is the FreeBSD commit that fixes things for us in the current version of mpd:
https://svnweb.freebsd.org/ports/head/audio/musicpd/files/patch-src_input_Error.hxx?view=markup&pathrev=482238

@MaxKellermann

This comment has been minimized.

Member

MaxKellermann commented Oct 16, 2018

No exception can "leak" from this function, because it contains a catch-all exception handler. Maybe this is a clang bug? Or am I missing something?
In any case, removing the pure attribute is the wrong approach to this problem, because this non-solution implies that this function can throw, but it must never.

@riggs-

This comment has been minimized.

Contributor

riggs- commented Oct 21, 2018

I'll check under which circumstances I can reproduce this problem.

@MaxKellermann

This comment has been minimized.

Member

MaxKellermann commented Oct 23, 2018

I can reproduce this with clang 7 on Android. This very much looks like a clang bug! Can you please report it to the clang/llvm project? I'll add a workaround to MPD inside an #ifdef __clang__ so it doesn't hurt GCC builds.

@MaxKellermann

This comment has been minimized.

Member

MaxKellermann commented Oct 25, 2018

Oh no, I found more instances of this clang bug. I get lots of Android crash reports caused by this clang bug in other places.

@MaxKellermann

This comment has been minimized.

Member

MaxKellermann commented Oct 26, 2018

Reported to the Android NDK bug tracker, let's see if they figure something out: android-ndk/ndk#831

@riggs-

This comment has been minimized.

Contributor

riggs- commented Oct 27, 2018

Great, thank you for following up!
In the Android ndk bug you filed there is a response mentioning a fix in llvm 7.0: https://bugs.llvm.org/show_bug.cgi?id=32611

MaxKellermann added a commit that referenced this issue Oct 29, 2018

configure.ac: add `-funwind-tables` to work around clang bug
Replaces the workaround from commit
751fff0 which fixed only one of many
crash locations.

See:

 #373
 android-ndk/ndk#831
 https://bugs.llvm.org/show_bug.cgi?id=32611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment