Skip to content

Instantly share code, notes, and snippets.

View larsbergstrom's full-sized avatar

Lars Bergstrom larsbergstrom

View GitHub Profile
@larsbergstrom
larsbergstrom / gist:7859719
Created December 8, 2013 16:26
RUST_LOG=gfx::platform ./servo ../src/test/html/about-mozilla.html 2> out.txt
Creating new FontFamily for family: .Aqua Kana
Creating new FontFamily for family: .Helvetica LT MM
Creating new FontFamily for family: .Helvetica Neue Desk UI
Creating new FontFamily for family: .Keyboard
Creating new FontFamily for family: .Lucida Grande UI
Creating new FontFamily for family: .Savoye LET CC.
Creating new FontFamily for family: .Times LT MM
Creating new FontFamily for family: Abadi MT Condensed Extra Bold
Creating new FontFamily for family: Abadi MT Condensed Light
Creating new FontFamily for family: Academy Engraved LET
@larsbergstrom
larsbergstrom / compilation
Created December 11, 2013 22:19
Sharing a pixmap across threads with/without separate XDisplay pointer
gcc visual.c -g -lGL -lX11 -lGLU -lpthread && ./a.out
@larsbergstrom
larsbergstrom / gist:8250182
Created January 4, 2014 01:20
rust crash
[larsberg@lbergstrom build]$ make
make -C "/Users/larsberg/servo-jack/build/src/rust" CFG_RUSTC_FLAGS="" RUSTFLAGS=""
cfg: build triple x86_64-apple-darwin
cfg: host triples x86_64-apple-darwin
cfg: target triples x86_64-apple-darwin
cfg: host for x86_64-apple-darwin is x86_64
cfg: os for x86_64-apple-darwin is apple-darwin
cfg: using gcc
cfg: no pandoc found, omitting doc/rust.pdf
cfg: no llnextgen found, omitting grammar-verification
@larsbergstrom
larsbergstrom / gist:8261178
Created January 4, 2014 21:48
No timer support
task '<unnamed>' failed at 'Unhandled condition: io_error: io::IoError{kind: IoUnavailable, desc: "unimplemented I/O interface", detail: None}', /home/larsberg/servo-jack/src/compiler/rust/src/libstd/condition.rs:139
Breakpoint 2, 0x00007ffff77698b0 in rust_fail ()
from /home/larsberg/servo-jack/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-3e5aeb83-0.9.so
(gdb) bt
#0 0x00007ffff77698b0 in rust_fail ()
from /home/larsberg/servo-jack/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-3e5aeb83-0.9.so
#1 0x00007ffff76c65d8 in rt::unwind::Unwinder::begin_unwind::hd890d6617f8679e94GaP::v0.9 ()
from /home/larsberg/servo-jack/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-3e5aeb83-0.9.so
#2 0x00007ffff76c56e9 in rt::unwind::begin_unwind::h2f304945dd8fa486ax::v0.9 ()
@larsbergstrom
larsbergstrom / gist:8270752
Created January 5, 2014 17:01
Random startup crash
(gdb) bt
#0 0x000000000049ac0b in sync::atomics::atomic_store::h05a0c6a14b8e9ba0a8::v0.0 ()
#1 0x000000000049ab7e in sync::atomics::AtomicPtr::store::h4b80349701d2f01eiOa7::v0.0 ()
#2 0x000000000049a61f in sync::mpsc_queue::State::push::h2c8a10f05faa18bd2uaW::v0.0 ()
#3 0x000000000049a3b4 in sync::mpsc_queue::Producer::push::hc6e3a1a3114eaecdveaV::v0.0 ()
#4 0x000000000049a04e in comm::SharedChan::try_send::h13a809ebcc71cdf9oCaR::v0.0 ()
#5 0x0000000000499d55 in comm::SharedChan::send::hfd7dfe121ee18600oCaQ::v0.0 ()
at /home/larsberg/servo-jack/src/components/main/compositing/compositor_task.rs:44
#6 0x0000000000499b88 in servo::compositing::ScriptListener$CompositorChan::set_ready_state (self=0x7fa780204050,
ready_state=FinishedLoading) at /home/larsberg/servo-jack/src/components/main/compositing/compositor_task.rs:44
@larsbergstrom
larsbergstrom / gist:8270924
Created January 5, 2014 17:15
disassembly and registers
(gdb) disas 0x49ac0b
Dump of assembler code for function _ZN4sync7atomics12atomic_store19h05a0c6a14b8e9ba0a84v0.0E:
0x000000000049ab90 <+0>: cmp %fs:0x70,%rsp
0x000000000049ab99 <+9>: ja 0x49abb5 <_ZN4sync7atomics12atomic_store19h05a0c6a14b8e9ba0a84v0.0E+37>
0x000000000049ab9b <+11>: movabs $0x48,%r10
0x000000000049aba5 <+21>: movabs $0x0,%r11
0x000000000049abaf <+31>: callq 0x5f7878 <__morestack>
0x000000000049abb4 <+36>: retq
0x000000000049abb5 <+37>: push %rbp
0x000000000049abb6 <+38>: mov %rsp,%rbp
@larsbergstrom
larsbergstrom / gist:8271341
Created January 5, 2014 17:41
selector matching crash in atomics code
(gdb) bt
#0 0x0000000000410456 in sync::atomics::atomic_sub::h815d09af8c559e22a2::v0.0 ()
#1 0x000000000041035e in sync::atomics::AtomicUint::fetch_sub::h9ec7ccbfe1db76b1nGaW::v0.0 ()
#2 0x0000000000412e76 in sync::arc::Drop$UnsafeArc::drop::h082fb8804938a44egta7::v0.0 ()
#3 0x0000000000412e09 in std..sync..arc..UnsafeArc$LT$$UP$$x5bstyle..properties..PropertyDeclaration$x5d$GT$::glue_drop::hf9d899205dbbef9aa6 ()
#4 0x0000000000412dc3 in extra..arc..Arc$LT$$UP$$x5bstyle..properties..PropertyDeclaration$x5d$GT$::glue_drop::h154d2a9dbe41f7eea2 ()
#5 0x00000000004a972d in unboxed_vec$LT$extra..arc..Arc$LT$$UP$$x5bstyle..properties..PropertyDeclaration$x5d$GT$$GT$::glue_drop::h2541e0c90524adf7aK ()
#6 0x00000000004a96aa in _$UP$$x5bextra..arc..Arc$LT$$UP$$x5bstyle..properties..PropertyDeclaration$x5d$GT$$x5d::glue_free::h31e00a2d7c7106d6aG ()
#7 0x00000000004a9643 in _$UP$$x5bextra..arc..Arc$LT$$UP$$x5bstyle..properties..PropertyDeclaration$x5d$GT$$x5d::glue_drop::h31e00a2d7c7106d6aF () at /home/larsberg/
@larsbergstrom
larsbergstrom / gist:8272223
Created January 5, 2014 18:49
Crash in flow construction
(gdb) bt
#0 0x0000000000540cd3 in _$UP$layout..flow..Flow$LT$no.bounds$GT$::glue_drop::ha207b4efd13a0fdeaK ()
#1 0x0000000000573d44 in layout..construct..ConstructionResult::glue_drop::h67c02fa6f8c47ed3aY ()
at /home/larsberg/servo-jack/src/components/main/layout/construct.rs:271
#2 0x000000000059573d in set_flow_construction_result (self=..., result=..., self=..., result=...)
at /home/larsberg/servo-jack/src/components/main/layout/construct.rs:547
#3 process (self=0x7f14d81ffce0, node=...) at /home/larsberg/servo-jack/src/components/main/layout/construct.rs:494
#4 servo::layout::wrapper::LayoutNode::traverse_postorder_mut<layout::construct::FlowConstructor<>> (self=...,
traversal=0x7f14d81ffce0) at /home/larsberg/servo-jack/src/components/main/layout/wrapper.rs:227
#5 0x0000000000596449 in servo::layout::wrapper::LayoutNode::traverse_postorder_mut<layout::construct::FlowConstructor<>> (self=..., traversal=0x7f14d81ffce0) at /home/larsberg/servo-jack/src/components/main/layout/wrapper.rs:21
@larsbergstrom
larsbergstrom / gist:8285665
Created January 6, 2014 16:48
enlist in jack
export ROOT=~/servo-jack
cd $ROOT/src/platform/linux/rust-fontconfig
git remote add metajack http://github.com/metajack/rust-fontconfig.git
git fetch metajack
cd $ROOT/src/platform/linux/rust-freetype
git remote add metajack http://github.com/metajack/rust-freetype.git
git fetch metajack
cd $ROOT/src/platform/linux/rust-xlib
git remote add metajack http://github.com/metajack/rust-xlib.git
git fetch metajack
larsberg@ubuntu:~/rust-arm$ sudo apt-get install ia32-libs
[sudo] password for larsberg:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0