Issue 1:
When trying to use the Julia package Images with julia-debug, the process crashes with the following message:

julia> using Images
julia-debug: dump.c:2117: jl_recache_type: Zusicherung »t->uid != 0« nicht erfüllt.

signal (6): Abgebrochen
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
...

I've tried to use a self compiled Julia version as well as the original binaries from the home page:

Version 0.4.6 (2016-06-19 17:16 UTC)

The system runs with a x64 Ubuntu 16.04.1 OS

Issue 2:
Using Images commit fbf9e98112c88355fc0b6c986995b7e9875ebcba, and

julia> versioninfo()
Julia Version 0.5.0-dev+4015
Commit 0eb3875* (2016-05-10 17:38 UTC)
DEBUG build
Platform Info:
System: Linux (x86_64-linux-gnu)
CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.7.1 (ORCJIT, sandybridge)

(NB: this is a debug build)

I get a segfault from dump.c:

julia-0.5: /home/tim/src/julia-0.5/src/dump.c:2222: jl_recache_type: Assertion `t->uid != 0' failed.

signal (6): Aborted
while loading no file, in expression starting on line 0
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f99e1da1b85)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
jl_recache_type at /home/tim/src/julia-0.5/src/dump.c:2222
jl_recache_types at /home/tim/src/julia-0.5/src/dump.c:2273
_jl_restore_incremental at /home/tim/src/julia-0.5/src/dump.c:2330
jl_restore_incremental at /home/tim/src/julia-0.5/src/dump.c:2379
_require_from_serialized at ./loading.jl:174
require at ./loading.jl:365
unknown function (ip: 0x7f99dea1f016)
jl_call_method_internal at /home/tim/src/julia-0.5/src/julia_internal.h:76
jl_apply_generic at /home/tim/src/julia-0.5/src/gf.c:1561
jl_apply at /home/tim/src/julia-0.5/src/julia.h:1382
eval_import_path_ at /home/tim/src/julia-0.5/src/toplevel.c:375
eval_import_path at /home/tim/src/julia-0.5/src/toplevel.c:402
jl_toplevel_eval_flex at /home/tim/src/julia-0.5/src/toplevel.c:451
jl_toplevel_eval at /home/tim/src/julia-0.5/src/toplevel.c:557
jl_toplevel_eval_in_warn at /home/tim/src/julia-0.5/src/builtins.c:547
jl_toplevel_eval_in at /home/tim/src/julia-0.5/src/builtins.c:514
eval at ./boot.jl:230
unknown function (ip: 0x7f99de987070)
jl_call_method_internal at /home/tim/src/julia-0.5/src/julia_internal.h:76
jl_apply_generic at /home/tim/src/julia-0.5/src/gf.c:1561
[inline] at ./REPL.jl:3
eval_user_input at ./REPL.jl:62
unknown function (ip: 0x7f97dcbfb5a6)
jl_call_method_internal at /home/tim/src/julia-0.5/src/julia_internal.h:76
jl_apply_generic at /home/tim/src/julia-0.5/src/gf.c:1561
[inline] at ./REPL.jl:92
#1 at ./event.jl:46
unknown function (ip: 0x7f99e3e5b52f)
jl_call_method_internal at /home/tim/src/julia-0.5/src/julia_internal.h:76
jl_apply_generic at /home/tim/src/julia-0.5/src/gf.c:1561
jl_apply at /home/tim/src/julia-0.5/src/julia.h:1382
start_task at /home/tim/src/julia-0.5/src/task.c:253
unknown function (ip: 0xffffffffffffffff)
Allocations: 4340062 (Pool: 4338379; Big: 1683); GC: 9
Aborted (core dumped)

This doesn't happen if I set __precompile__(false), or just directly include("Images.jl").

I've reproduced this on two machines, and it happens every time at the same place. It's not a complete corruption, because

(gdb) call jl_(t)
Images.Clamp{ColorTypes.BGRA{#T<:Any}}