Skip to content

Instantly share code, notes, and snippets.

@jacquelinekay
jacquelinekay / build_error.txt
Created May 28, 2017 16:25
llvm build error: segfault on tablegen
[ 38%] Building X86GenFoldTables.inc...
../../../bin/llvm-tblgen[0x56c484]
../../../bin/llvm-tblgen[0x56c756]
/usr/lib/libpthread.so.0(+0x11fe0)[0x7f41d106ffe0]
../../../bin/llvm-tblgen[0x53fa2c]
../../../bin/llvm-tblgen[0x53f2d5]
../../../bin/llvm-tblgen[0x538b95]
../../../bin/llvm-tblgen[0x572119]
../../../bin/llvm-tblgen[0x5386f3]
/usr/lib/libc.so.6(__libc_start_main+0xf1)[0x7f41cfb97511]
@jacquelinekay
jacquelinekay / crash-2566e6.sh
Created May 25, 2017 21:05
run script for clang error with deduced return type
# Crash reproducer for clang version 5.0.0 (https://github.com/matus-chochlik/clang.git 12b1c25b3957bf3d5a598f0f3f7d7d54b546abc6) (llvm/trunk 303273)
# Driver args: "--driver-mode=g++" "crash.cpp" "-std=c++1z"
# Original command: "/usr/local/bin/clang-5.0" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "crash.cpp" "-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64" "-dwarf-column-info" "-debugger-tuning=gdb" "-resource-dir" "/usr/local/lib/clang/5.0.0" "-internal-isystem" "/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1" "-internal-isystem" "/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/x86_64-pc-linux-gnu" "-internal-isystem" "/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/backward" "-internal-isystem" "/usr/loca
@jacquelinekay
jacquelinekay / crash.cpp
Created May 25, 2017 21:04
preprocessed source of clang return type error
This file has been truncated, but you can view the full file.
# 1 "<built-in>"
# 1 "crash.cpp"
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 1 "crash.cpp"
# 1 "/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/tuple" 1 3
// <tuple> -*- C++ -*-
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
@jacquelinekay
jacquelinekay / error.txt
Created May 8, 2017 20:35
clang scelta build error
In file included from /home/jackie/code/scelta/example/error_handling.cpp:6:
In file included from /home/jackie/code/scelta/example/./example_utils.hpp:8:
In file included from /home/jackie/code/scelta/include/scelta.hpp:10:
In file included from /home/jackie/code/scelta/include/./scelta/support.hpp:8:
In file included from /home/jackie/code/scelta/include/./scelta/./support/variant.hpp:8:
In file included from /home/jackie/code/scelta/include/./scelta/./support/./variant/std.hpp:13:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:46: error: cannot cast 'std::variant<io_outcome::success, io_outcome::not_found>' to its private base class 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>'
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u);
^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:1233:35: note: in in
#include <iostream>
#include <string>
#include <reflexpr>
#include <type_traits>
namespace product_type {
namespace meta = std::meta;
template <typename PT>
struct size : meta::get_size<meta::get_data_members_m<reflexpr(PT)>> {};
@jacquelinekay
jacquelinekay / gist:d4512ddbc485643c1301bcfa924d8f1b
Created October 11, 2016 19:10
backtrace of qt5 linker error
*** Error in `/home/jackie/code/mBot/ros/devel/lib/mbot_nav/pf_localization_gui': realloc(): invalid pointer: 0x00007ff6b0511820 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7ff6accdb725]
/lib/x86_64-linux-gnu/libc.so.6(realloc+0x348)[0x7ff6acce7f88]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN9QListData7reallocEi+0x1f)[0x7ff6a9a9aa5f]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN9QListData6appendEi+0x81)[0x7ff6a9a9ab31]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x1d7018)[0x7ff6a9b67018]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_Z21qRegisterResourceDataiPKhS0_S0_+0x2e6)[0x7ff6a9b62db6]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x7bcc3)[0x7ff6a9a0bcc3]
/lib64/ld-linux-x86-64.so.2(+0x104ea)[0x7ff6d9f664ea]
@jacquelinekay
jacquelinekay / imu_test.world
Last active August 25, 2016 16:08
IMU test world
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<include>
<uri>model://sun</uri>
</include>
<include>
<uri>model://ground_plane</uri>
#include <iostream>
class A {
public:
A(const char * foo) {
std::cout << "Invoking constructor" << std::endl;
s = std::string(foo);
}
A(const A& a) {
std::cout << "Invoking copy constructor" << std::endl;
#include <iostream>
class A {
public:
A(const char * foo) {
std::cout << "Invoking constructor" << std::endl;
s = std::string(foo);
}
A(const A& a) {
std::cout << "Invoking copy constructor" << std::endl;
<?xml verison="1.0"?>
<robot name="one_link">
<link name="link1">
<inertial>
<mass value="1"/>
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
</inertial>
<visual>
<geometry>
<box size="1 1 1"/>