summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-23 19:51:29 +0200
committerMax Kellermann <max@musicpd.org>2018-10-23 19:52:22 +0200
commit751fff07fb28720156d0d1dc833a2b6534959a0d (patch)
tree5bd558edbe78b84b0ce3ed251eaa3d630622815b
parentf7d1408a1afd00c9a7f164dae6a82707bc83df6e (diff)
input/Error: work around clang bug leading to crash
Closes #373
-rw-r--r--NEWS1
-rw-r--r--src/input/Error.hxx8
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 6553fbef0..6f50551f7 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ ver 0.20.22 (not yet released)
- now runs as a service
- add button to start/stop MPD
- add option to auto-start on boot
+* work around clang bug leading to crash
* install the SVG icon
ver 0.20.21 (2018/08/17)
diff --git a/src/input/Error.hxx b/src/input/Error.hxx
index b52b9d06b..0811abc68 100644
--- a/src/input/Error.hxx
+++ b/src/input/Error.hxx
@@ -30,7 +30,15 @@
* exist? This function attempts to recognize exceptions thrown by
* various input plugins.
*/
+#ifndef __clang__
+/* the "pure" attribute must be disabled because it triggers a clang
+ bug, wrongfully leading to std::terminate() even though the
+ function catches all exceptions thrown by std::rethrow_exception();
+ this can be reproduced with clang 7 from Android NDK r18b and on
+ clang 6 on FreeBSD
+ (https://github.com/MusicPlayerDaemon/MPD/issues/373) */
gcc_pure
+#endif
bool
IsFileNotFound(std::exception_ptr e);