Bug#781754: crash in libclang while parsing autocomplete options

2015-04-03 Thread Giuseppe Bilotta
On Thu, Apr 2, 2015 at 6:32 PM, Onur Aslan o...@onur.im wrote:
 Control: tags -1 wontfix

 On 2015-04-02, Giuseppe Bilotta wrote:
 def FlagsForFile( filename ):
   return { 'flags' : ['-x c'] + cppflags + cflags, 'do_cache' : False }

 I think issue is '-x c', I tried your conf with ['-x', 'c'] and didn't
 get any crash.

I can't believe I made such a stupid mistake.

(Still, crashing with a wrong option doesn't sound like correct behavior).

-- 
Giuseppe Oblomov Bilotta


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#781754: crash in libclang while parsing autocomplete options

2015-04-02 Thread Giuseppe Bilotta
Package: vim-youcompleteme
Version: 0+20140207+git18be5c2-2
Severity: normal

With some configurations, libclang autocompletion is not available due
to an instantaneous crash. For example, I have a (whitelisted)
.ycm_extra_conf.py structured as such:

--- 8 --
import subprocess

cppflags=subprocess.check_output(env | grep CPPFLAGS - Makefile | cut -f2- 
-d=, shell=True).strip().split()
cflags=subprocess.check_output(env | grep CFLAGS - Makefile | cut -f2- -d=, 
shell=True).strip().split()

def FlagsForFile( filename ):
  return { 'flags' : ['-x c'] + cppflags + cflags, 'do_cache' : False }
--- 8 --

with a Makefile that includes the line

--- 8 --
CFLAGS+=-std=c99 -O3 -march=native -g -Wall
--- 8 --

and the resulting server logfiles for YCM end up being like this:

--- 8 --
2015-04-02 17:17:59,895 - INFO - Received event notification
2015-04-02 17:17:59,896 - INFO - Received event notification
2015-04-02 17:17:59,896 - INFO - Adding buffer identifiers for file: 
/home/oblomov/uni/PRISMA/codice/vecsum_ocl.c
libclang: crash detected during parsing: {
  'source_filename' : '/home/oblomov/uni/PRISMA/codice/vecsum_ocl.c'
  'command_line_args' : ['-x c', '-std=c99', '-O3', '-march=native', '-g', 
'-Wall', '-isystem', '/usr/lib/vim-youcompleteme/clang_includes'],
  'unsaved_files' : [('/home/oblomov/uni/PRISMA/codice/vecsum_ocl.c', '...', 
2829)],
  'options' : 12,
}
2015-04-02 17:18:03,762 - INFO - Received health request
2015-04-02 17:18:03,769 - INFO - Received debug info request
--- 8 --

This might be a bug in libclang rather than in the way YCM, but I don't
know. :YcmDebugInfo shows:

--- 8 --
-- Server has Clang support compiled in: True
-- Clang version: Debian clang version 3.5.0-10 (tags/RELEASE_350/final)
(based on LLVM 3.5.0)
-- Flags for /home/oblomov/uni/PRISMA/codice/vecsum_ocl.c loaded from 
/home/oblomov/uni/PRISMA/codice/.ycm_extra_conf.py:
-- ['-x c', '-std=c99', '-O3', '-march=native', '-g', '-Wall', '-isystem', 
'/usr/lib/vim-youcompleteme/clang_includes']
--- 8 --

Anything else I can do to help track down the issue?

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vim-youcompleteme depends on:
ii  libboost-filesystem1.55.0   1.55.0+dfsg-3
ii  libboost-python1.55.0   1.55.0+dfsg-3
ii  libboost-regex1.55.01.55.0+dfsg-3
ii  libboost-system1.55.0   1.55.0+dfsg-3
ii  libc6   2.19-17
ii  libclang1-3.5   1:3.5-10
ii  libgcc1 1:4.9.2-10
ii  libstdc++6  4.9.2-10
ii  python-bottle   0.12.7-1
ii  python-concurrent.futures [python-futures]  2.2.0-1
ii  python-jedi 0.8.1-1
ii  python-requests 2.4.3-6
ii  python-waitress 0.8.9-2
ii  python2.7   2.7.9-2
pn  python:any  none
ii  vim-gtk [vim-python]2:7.4.488-7

Versions of packages vim-youcompleteme recommends:
ii  vim-addon-manager  0.5.3

vim-youcompleteme suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#781754: crash in libclang while parsing autocomplete options

2015-04-02 Thread Onur Aslan
Control: tags -1 wontfix

On 2015-04-02, Giuseppe Bilotta wrote:
 def FlagsForFile( filename ):
   return { 'flags' : ['-x c'] + cppflags + cflags, 'do_cache' : False }

I think issue is '-x c', I tried your conf with ['-x', 'c'] and didn't
get any crash.


signature.asc
Description: Digital signature