Package: libllvm3.4 Version: 1:3.4~+rc1-1 Severity: normal File: libLLVM-3.4.so.1
I'm using YouCompleteMe (vim plugin) for C programming. During writing a comment the plugin crashes; this is reproducible with a CLI call. I know that the sources are botched, I'm currently rewriting large parts. clang -cc1 -fsyntax-only -I/usr/include/c++/4.8 -I/usr/include/x86_64-linux- gnu/c++/4.8 -I/usr/include/c++/4.8/backward -I/usr/lib/gcc/x86_64-linux- gnu/4.8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.8 /include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include -code-completion- at config.h:43:30 config.h In file included from config.h:24: ../booth.h:105:14: error: duplicate member 'owner' boothc_site owner; ^ ../booth.h:103:11: note: previous declaration is here uint32_t owner; ^ ../booth.h:131:8: error: redefinition of 'paxos_control_data' struct paxos_control_data { ^ ../booth.h:116:8: note: previous definition is here struct paxos_control_data { ^ ../booth.h:139:20: error: field has incomplete type 'struct ticket_msg' struct ticket_msg ticket; ^ ../booth.h:139:9: note: forward declaration of 'struct ticket_msg' struct ticket_msg ticket; ^ ../booth.h:145:20: error: field has incomplete type 'struct ticket_msg' struct ticket_msg ticket; ^ ../booth.h:139:9: note: forward declaration of 'struct ticket_msg' struct ticket_msg ticket; ^ ../booth.h:149:8: error: redefinition of 'ticket_data' struct ticket_data { ^ ../booth.h:98:8: note: previous definition is here struct ticket_data { ^ ../booth.h:153:1: error: type name does not allow storage class to be specified typedef enum { ^ ../booth.h:160:1: error: type name does not allow storage class to be specified typedef enum { ^ ../booth.h:183:1: error: type name does not allow storage class to be specified static inline void init_header(struct boothc_header *h, int cmd, ^ ../booth.h:183:8: error: type name does not allow function specifier to be specified static inline void init_header(struct boothc_header *h, int cmd, ^ ../booth.h:184:29: error: expected ';' at end of declaration list int result, int data_len) ^ ; 0 libLLVM-3.4.so.1 0x00007f9ae1af6562 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 libLLVM-3.4.so.1 0x00007f9ae1af634c 2 libpthread.so.0 0x00007f9ae0a11210 3 clang 0x0000000001171a7f clang::Lexer::Lex(clang::Token&) + 31 4 clang 0x00000000011b37af clang::Preprocessor::Lex(clang::Token&) + 159 5 clang 0x000000000091dc3d clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 573 6 clang 0x000000000091e19e clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) + 942 7 clang 0x0000000000921fb3 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 259 8 clang 0x0000000000922616 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 182 9 clang 0x00000000009198bb clang::ParseAST(clang::Sema&, bool, bool) + 283 10 clang 0x000000000066fe39 clang::FrontendAction::Execute() + 169 11 clang 0x0000000000650915 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 293 12 clang 0x000000000063b936 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1638 13 clang 0x0000000000637748 cc1_main(char const**, char const**, char const*, void*) + 1144 14 clang 0x0000000000635eaf main + 7247 15 libc.so.6 0x00007f9adf82b995 __libc_start_main + 245 16 clang 0x00000000006367df Stack dump: 0. Program arguments: clang -cc1 -fsyntax-only -I/usr/include/c++/4.8 -I/usr/include/x86_64-linux-gnu/c++/4.8 -I/usr/include/c++/4.8/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed -I/usr/include/x86_64-linux- gnu -I/usr/include -code-completion-at config.h:43:30 config.h 1. <unknown> parser at unknown location /home/marek/bin/clang-complete-at: Zeile 19: 23068 Speicherzugriffsfehler clang -cc1 -fsyntax-only -I/usr/include/c++/4.8 -I/usr/include/x86_64-linux- gnu/c++/4.8 -I/usr/include/c++/4.8/backward -I/usr/lib/gcc/x86_64-linux- gnu/4.8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.8 /include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include "$@" -code- completion-at "$I" "${I%%:*}" -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.11-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libllvm3.4:amd64 depends on: ii libc6 2.17-93 ii libffi6 3.0.13-4 ii libgcc1 1:4.8.2-1 ii libstdc++6 4.8.2-1 ii libtinfo5 5.9+20130608-1 ii multiarch-support 2.17-93 libllvm3.4:amd64 recommends no packages. libllvm3.4:amd64 suggests no packages. -- no debconf information
/* * Copyright (C) 2011 Jiaju Zhang <jjzh...@suse.de> * Copyright (C) 2013 Philipp Marek <philipp.ma...@linbit.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _CONFIG_H #define _CONFIG_H #include <stdint.h> #include "booth.h" #include "config.h" #include "paxos_lease.h" #include "transport.h" #define MAX_NODES 16 #define TICKET_ALLOC 16 #define NO_OWNER (-1) struct ticket_config { boothc_ticket name; /* How many seconds to hold it */ int expiry; /* Who has it. */ int owner; struct booth_node *owner; ?? /** Timestamp of expiration. * time_t expires; int ballot; pl_handle_t handle; int weight[MAX_NODES]; }; struct booth_config { char name[BOOTH_NAME_LEN]; int node_count; int ticket_count; transport_layer_t proto; uint16_t port; struct booth_node node[MAX_NODES]; struct ticket_config ticket[0]; }; struct booth_config *booth_conf; int read_config(const char *path); int check_config(int type); int find_site_in_config(unsigned char *site, struct booth_node **node); const char *type_to_string(int type); static inline struct booth_transport const *transport(void) { return booth_transport + booth_conf->proto; } #endif /* _CONFIG_H */
/* * Copyright (C) 2011 Jiaju Zhang <jjzh...@suse.de> * Copyright (C) 2013 Philipp Marek <philipp.ma...@linbit.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _BOOTH_H #define _BOOTH_H #include <stdint.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #define BOOTH_LOG_DUMP_SIZE (1024*1024) #define BOOTH_RUN_DIR "/var/run/booth/" #define BOOTH_LOG_DIR "/var/log" #define BOOTH_LOGFILE_NAME "booth.log" #define BOOTH_DEFAULT_CONF "/etc/booth/booth.conf" #define DAEMON_NAME "booth" #define BOOTH_NAME_LEN 63 #define BOOTH_PATH_LEN 127 #define BOOTH_PROTO_FAMILY AF_INET #define BOOTHC_MAGIC 0x5F1BA08C #define BOOTHC_VERSION 0x00010002 struct boothc_header { /** BOOTHC_MAGIC */ uint32_t magic; /** BOOTHC_VERSION */ uint32_t version; /** Packet source; nodeid. See add_node(). */ uint32_t from; /** Length including header */ uint32_t length; /** The command, see cmd_request_t. cmp paxos_state_t ?? */ uint32_t cmd; /** Result of operation. 0 == OK */ uint32_t result; char data[0]; } __attribute__((packed)); typedef unsigned char boothc_site [BOOTH_NAME_LEN]; typedef unsigned char boothc_ticket[BOOTH_NAME_LEN]; struct booth_node { int nodeid; int type; int local; int role; char addr_string[BOOTH_NAME_LEN]; int tcp_fd; unsigned short family; union { struct sockaddr_in sa4; struct sockaddr_in6 sa6; }; int saddrlen; int addrlen; } __attribute__((packed)); extern struct booth_node *local; inline static int booth_get_myid(void) { return local ? local->nodeid : -1; } struct ticket_data { /** Ticket name. */ boothc_ticket id; /** Owner. May be NO_OWNER. See add_node(). */ uint32_t owner; /* Better use that? but from is an int currently, too */ boothc_site owner; /** POSIX timestamp? Or time until expiration? */ uint32_t expiry; /* needed?? */ /* From lease */ uint32_t op; /* OP_START_LEASE, OP_STOP_LEASE? ?*/ } __attribute__((packed)); struct paxos_control_data { /** Current protocol state. See paxos_state_t. */ uint32_t state; /** Current ballot number. Might be < prev_ballot if overflown. */ uint32_t ballot; /** Previous ballot. */ uint32_t prev_ballot; /* From lease - needed? */ uint32_t clear; /* NOT_CLEAR_RELEASE ? */ uint32_t leased; /* has_been_leased by another node? */ }; struct paxos_control_data { struct site_msg { boothc_site site; }; struct boothc_ticket_site_msg { struct boothc_header header; struct ticket_msg ticket; struct site_msg site; } __attribute__((packed)); struct boothc_ticket_msg { struct boothc_header header; struct ticket_msg ticket; } __attribute__((packed)); struct ticket_data { }; typedef enum { BOOTHC_CMD_LIST = 0x30, BOOTHC_CMD_GRANT, BOOTHC_CMD_REVOKE, BOOTHC_CMD_CATCHUP, } cmd_request_t; typedef enum { BOOTHC_RLT_ASYNC = 0x40, BOOTHC_RLT_SYNC_SUCC, BOOTHC_RLT_SYNC_FAIL, BOOTHC_RLT_INVALID_ARG, BOOTHC_RLT_REMOTE_OP, BOOTHC_RLT_OVERGRANT, } cmd_result_t; struct client { int fd; void (*workfn)(int); void (*deadfn)(int); }; int client_add(int fd, void (*workfn)(int ci), void (*deadfn)(int ci)); int do_read(int fd, void *buf, size_t count); int do_write(int fd, void *buf, size_t count); void process_connection(int ci); void safe_copy(char *dest, char *value, size_t buflen, const char *description); static inline void init_header(struct boothc_header *h, int cmd, int result, int data_len) { h->magic = htonl(BOOTHC_MAGIC); h->version = htonl(BOOTHC_VERSION); h->length = htonl(data_len); h->cmd = htonl(cmd); h->from = htonl(local->nodeid); h->expiry = htonl(0); h->result = htonl(result); } static inline void init_ticket_site_header(struct boothc_ticket_site_msg *msg, int cmd) { init_header(&msg->header, cmd, 0, sizeof(*msg)); } static inline void init_ticket_msg(struct boothc_ticket_msg *msg, int cmd) { init_header(&msg->header, cmd, 0, sizeof(*msg)); memset(&msg->ticket, 0, sizeof(msg->ticket)); } static inline void init_ticket_site_msg(struct boothc_ticket_site_msg *msg, int cmd) { init_ticket_site_header(msg, cmd); memset(&msg->site, 0, sizeof(msg->site)); memset(&msg->ticket, 0, sizeof(msg->ticket)); } #endif /* _BOOTH_H */