Bug 197389 - audio/murmur crashes when built with clang 3.4
Summary: audio/murmur crashes when built with clang 3.4
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2015-02-07 13:59 UTC by Steven Hartland
Modified: 2015-02-20 10:37 UTC (History)
1 user (show)

See Also:

stack from murmur crash when built with clang34. (4.99 KB, text/plain)
2015-02-07 13:59 UTC, Steven Hartland
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Hartland freebsd_committer 2015-02-07 13:59:55 UTC
Created attachment 152667 [details]
stack from murmur crash when built with clang34.

When the audio/murmur port is built using the base system clang (3.4.1 (tags/RELEASE_34/dot1-final 208032) 2014051) when connecting to the murmur daemon with ice it will crash.

I've narrowed this down to a problem with clang 3.4 as compiling with either ports clang33 or ports clang35 fixes the problem. I also tested with clang34 from ports which was 3.4.2 and that still caused the crash.

The crash produces the attached stack.
Comment 1 Dimitry Andric freebsd_committer 2015-02-07 21:43:54 UTC
Some additional information would be nice:
* Did you try this on 10-STABLE? What was the result?
* Was the murmur port built with the non-default ICE option enabled?
* Can you give an exact reproduction scenario, e.g. which other port(s) to install, which commands to execute, which environment settings to apply, etc?
* Since this is a crash in boost, how were the boost ports configured?
Comment 2 Steven Hartland freebsd_committer 2015-02-07 22:21:37 UTC
(In reply to Dimitry Andric from comment #1)
I haven't tried it on stable/10 as I don't have a stable/10 box I'm afraid.

Yes select the ICE option from make config.

Boost configured with ICU and Optimised flags.

All other associated ports built with the default options as far as I'm aware.

We've got a little wrapper script which starts the server and talks to it over ICE, and in doing so the underlying murmurd crashes. I'll send you the script via email.

Just to be clear, although the crash happens in boost, fixing it by compiling murmur under 3.3 or 3.5 only required recompiling the murmur package and not boost, however since boost is not listed as a dependency its likely linking it statically.
Comment 3 commit-hook freebsd_committer 2015-02-14 23:25:54 UTC
A commit references this bug:

Author: dim
Date: Sat Feb 14 23:25:41 UTC 2015
New revision: 278788
URL: https://svnweb.freebsd.org/changeset/base/278788

  Pull in r201130 from upstream clang trunk (by Ted Kremenek):

    Fix PCH deserialization bug with local static symbols being treated
    as local extern.

    This triggered a miscompilation of code using Boost's
    function_template.hpp when it was included inside a PCH file.  A
    local static within that header would be treated as local extern,
    resulting in the wrong mangling.  This only occurred during PCH

    Fixes <rdar://problem/15975816> and <rdar://problem/15926311>.

  This fixes a crash in audio/murmur, which is using both PCH and Boost.

  Direct commit to stable/10 and stable/9, since head has clang 3.5.1,
  which already includes this change.

  Reported by:	smh
  PR:		197389

Comment 4 Dimitry Andric freebsd_committer 2015-02-14 23:30:08 UTC
Steven, can you please verify that clang built after r278788 also fixes the crash for you?
Comment 5 Dimitry Andric freebsd_committer 2015-02-20 10:37:08 UTC
This appears to be fixed now.  Please reopen if the crash returns.