<p dir="auto">Using/calling a variable defined as a BigFloat literal (ie. <code class="notranslate">a = big"1.0"</code>) will cause a seg fault (and consequently crash julia) in a precompiled module, but the two other methods of defining BigFloats that I am aware of, <code class="notranslate">b = BigFloat(1.0)</code> and <code class="notranslate">parse(BigFloat,"1.0")</code> do not cause the seg fault.</p>
<p dir="auto">This is the smallest code that will reproduce the issue:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__precompile__()

module Global_bigfloat_literal

export a,b,c,d

function __init__()
    global const a = big&quot;28.0&quot;
    global const b = 10.0
    global const c = BigFloat(28.0)
    global const d = parse(BigFloat,&quot;2.6666666666666666666666666666666666666666666666666666666666666666666666666666666&quot;)
end

end"><pre class="notranslate"><span class="pl-c1">__precompile__</span>()

<span class="pl-k">module</span> Global_bigfloat_literal

<span class="pl-k">export</span> a,b,c,d

<span class="pl-k">function</span> <span class="pl-en">__init__</span>()
    <span class="pl-k">global</span> <span class="pl-k">const</span> a <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">big</span>"</span>28.0<span class="pl-pds">"</span></span>
    <span class="pl-k">global</span> <span class="pl-k">const</span> b <span class="pl-k">=</span> <span class="pl-c1">10.0</span>
    <span class="pl-k">global</span> <span class="pl-k">const</span> c <span class="pl-k">=</span> <span class="pl-c1">BigFloat</span>(<span class="pl-c1">28.0</span>)
    <span class="pl-k">global</span> <span class="pl-k">const</span> d <span class="pl-k">=</span> <span class="pl-c1">parse</span>(BigFloat,<span class="pl-s"><span class="pl-pds">"</span>2.6666666666666666666666666666666666666666666666666666666666666666666666666666666<span class="pl-pds">"</span></span>)
<span class="pl-k">end</span>

<span class="pl-k">end</span></pre></div>
<p dir="auto">Output of above code:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; b
28.0

julia&gt; c
2.800000000000000000000000000000000000000000000000000000000000000000000000000000e+01

julia&gt; d
2.666666666666666666666666666666666666666666666666666666666666666666666666666678

julia&gt; a

signal (11): Segmentation fault
while loading no file, in expression starting on line 0
__gmpn_mul_basecase at /usr/bin/../lib/x86_64-linux-gnu/libgmp.so (unknown line)
mpfr_get_str at /usr/lib/x86_64-linux-gnu/libmpfr.so.4 (unknown line)
unknown function (ip: 0x7facfaa0f8e3)
__gmpfr_vasprintf at /usr/lib/x86_64-linux-gnu/libmpfr.so.4 (unknown line)
mpfr_snprintf at /usr/lib/x86_64-linux-gnu/libmpfr.so.4 (unknown line)
string at ./mpfr.jl:857
show at ./mpfr.jl:869 [inlined]
show at ./replutil.jl:4 [inlined]
display at ./REPL.jl:132
unknown function (ip: 0x7facec00c476)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
display at ./REPL.jl:135
unknown function (ip: 0x7facec00c186)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
display at ./multimedia.jl:143
unknown function (ip: 0x7facec00bfc2)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
print_response at ./REPL.jl:154
unknown function (ip: 0x7facec008bf8)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
print_response at ./REPL.jl:139
unknown function (ip: 0x7facec008648)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
#22 at ./REPL.jl:652
unknown function (ip: 0x7facebfffd11)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
run_interface at ./LineEdit.jl:1579
unknown function (ip: 0x7faefd93639f)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
run_frontend at ./REPL.jl:903
run_repl at ./REPL.jl:188
unknown function (ip: 0x7facebff7532)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
_start at ./client.jl:363
unknown function (ip: 0x7faefd9512c8)
jl_call_method_internal at ./src/./src/julia_internal.h:211 [inlined]
jl_apply_generic at ./src/./src/gf.c:1950
unknown function (ip: 0x5616362c4a8c)
unknown function (ip: 0x5616362c4356)
__libc_start_main at /build/glibc-cxyGtm/glibc-2.24/csu/../csu/libc-start.c:291
unknown function (ip: 0x5616362c43a9)
Allocations: 1722872 (Pool: 1721994; Big: 878); GC: 0"><pre class="notranslate">julia<span class="pl-k">&gt;</span> b
<span class="pl-c1">28.0</span>

julia<span class="pl-k">&gt;</span> c
<span class="pl-c1">2.800000000000000000000000000000000000000000000000000000000000000000000000000000e+01</span>

julia<span class="pl-k">&gt;</span> d
<span class="pl-c1">2.666666666666666666666666666666666666666666666666666666666666666666666666666678</span>

julia<span class="pl-k">&gt;</span> a

signal (<span class="pl-c1">11</span>)<span class="pl-k">:</span> Segmentation fault
<span class="pl-k">while</span> loading no file, <span class="pl-k">in</span> expression starting on line <span class="pl-c1">0</span>
__gmpn_mul_basecase at <span class="pl-k">/</span>usr<span class="pl-k">/</span>bin<span class="pl-k">/</span><span class="pl-k">..</span><span class="pl-k">/</span>lib<span class="pl-k">/</span>x86_64<span class="pl-k">-</span>linux<span class="pl-k">-</span>gnu<span class="pl-k">/</span>libgmp<span class="pl-k">.</span>so (unknown line)
mpfr_get_str at <span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">/</span>x86_64<span class="pl-k">-</span>linux<span class="pl-k">-</span>gnu<span class="pl-k">/</span>libmpfr<span class="pl-k">.</span>so.<span class="pl-c1">4</span> (unknown line)
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facfaa0f8e3</span>)
__gmpfr_vasprintf at <span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">/</span>x86_64<span class="pl-k">-</span>linux<span class="pl-k">-</span>gnu<span class="pl-k">/</span>libmpfr<span class="pl-k">.</span>so.<span class="pl-c1">4</span> (unknown line)
mpfr_snprintf at <span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">/</span>x86_64<span class="pl-k">-</span>linux<span class="pl-k">-</span>gnu<span class="pl-k">/</span>libmpfr<span class="pl-k">.</span>so.<span class="pl-c1">4</span> (unknown line)
string at <span class="pl-k">./</span>mpfr<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">857</span>
show at <span class="pl-k">./</span>mpfr<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">869</span> [inlined]
show at <span class="pl-k">./</span>replutil<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">4</span> [inlined]
display at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">132</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facec00c476</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
display at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">135</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facec00c186</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
display at <span class="pl-k">./</span>multimedia<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">143</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facec00bfc2</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
print_response at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">154</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facec008bf8</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
print_response at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">139</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facec008648</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
<span class="pl-c"><span class="pl-c">#</span>22 at ./REPL.jl:652</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facebfffd11</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
run_interface at <span class="pl-k">./</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1579</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7faefd93639f</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
run_frontend at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">903</span>
run_repl at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">188</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7facebff7532</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
_start at <span class="pl-k">./</span>client<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">363</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x7faefd9512c8</span>)
jl_call_method_internal at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">211</span> [inlined]
jl_apply_generic at <span class="pl-k">./</span>src<span class="pl-k">/./</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">1950</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x5616362c4a8c</span>)
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x5616362c4356</span>)
__libc_start_main at <span class="pl-k">/</span>build<span class="pl-k">/</span>glibc<span class="pl-k">-</span>cxyGtm<span class="pl-k">/</span>glibc<span class="pl-k">-</span><span class="pl-c1">2.24</span><span class="pl-k">/</span>csu<span class="pl-k">/</span><span class="pl-k">..</span><span class="pl-k">/</span>csu<span class="pl-k">/</span>libc<span class="pl-k">-</span>start<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">291</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x5616362c43a9</span>)
Allocations<span class="pl-k">:</span> <span class="pl-c1">1722872</span> (Pool<span class="pl-k">:</span> <span class="pl-c1">1721994</span>; Big<span class="pl-k">:</span> <span class="pl-c1">878</span>); GC<span class="pl-k">:</span> <span class="pl-c1">0</span></pre></div>
<p dir="auto">Version info:</p>
<p dir="auto">Julia Version 0.5.2<br>
Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/f4c6c9d4bbbd9587d84494e314f692c15ff1f9c0/hovercard" href="https://github.com/JuliaLang/julia/commit/f4c6c9d4bbbd9587d84494e314f692c15ff1f9c0"><tt>f4c6c9d</tt></a> (2017-05-06 16:34 UTC)<br>
Platform Info:<br>
OS: Linux (x86_64-linux-gnu)<br>
CPU: Intel(R) Core(TM) i3-2370M CPU @ 2.40GHz<br>
WORD_SIZE: 64<br>
BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Sandybridge)<br>
LAPACK: liblapack.so.3<br>
LIBM: libopenlibm<br>
LLVM: libLLVM-3.7.1 (ORCJIT, sandybridge)</p>
<p dir="auto">I have also tested that this is an issue in Windows (it is).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="__precompile__()
module Crash
const x = big&quot;123&quot;
__init__() = @show x
end # module"><pre class="notranslate"><code class="notranslate">__precompile__()
module Crash
const x = big"123"
__init__() = @show x
end # module
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; using Crash
INFO: Precompiling module Crash...

signal (11): Segmentation fault
while loading no file, in expression starting on line 0
__gmpz_get_str at /home/ubuntu/julia-debugger/usr/bin/../lib/libgmp.so (unknown line)
base at ./gmp.jl:518
[inline] at ./gmp.jl:509
showall at ./show.jl:1428"><pre class="notranslate"><code class="notranslate">julia&gt; using Crash
INFO: Precompiling module Crash...

signal (11): Segmentation fault
while loading no file, in expression starting on line 0
__gmpz_get_str at /home/ubuntu/julia-debugger/usr/bin/../lib/libgmp.so (unknown line)
base at ./gmp.jl:518
[inline] at ./gmp.jl:509
showall at ./show.jl:1428
</code></pre></div>